From 877e55104a4485a94be80ac00523ffc7bd82ebd1 Mon Sep 17 00:00:00 2001 From: Arcadio Quintero Date: Thu, 7 Dec 2023 12:03:55 -0500 Subject: [PATCH] fix(block-editor) fix conflicts --- dotCMS/src/main/webapp/html/binary-field.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotCMS/src/main/webapp/html/binary-field.js b/dotCMS/src/main/webapp/html/binary-field.js index f66d6b684de8..f071557570f3 100644 --- a/dotCMS/src/main/webapp/html/binary-field.js +++ b/dotCMS/src/main/webapp/html/binary-field.js @@ -1 +1 @@ -var runtime=function(c){"use strict";var l,M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},O="function"==typeof Symbol?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var i=Object.create((t&&t.prototype instanceof j?t:j).prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}c.wrap=R;var Y="suspendedStart",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if("throw"!==f.type){var C=f.arg,m=C.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}h(f.arg)}var o;w(this,"_invoke",{value:function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}})}function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if("normal"===f.type){if(o=e.done?b:"suspendedYield",f.arg===s)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,"throw"===e&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),"throw"===t.method)||"return"!==e&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;return i?i.done?(t[r.resultName]=i.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function A(r){if(r){var t=r[L];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=l),s}},c}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,_={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return _[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=_,e=[],r.O=(n,t,i,f)=>{if(!t){var a=1/0;for(o=0;o=f)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(s=!1,f0&&e[o-1][2]>f;o--)e[o]=e[o-1];e[o]=[t,i,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,i){if(1&i&&(t=this(t)),8&i||"object"==typeof t&&t&&(4&i&&t.__esModule||16&i&&"function"==typeof t.then))return t;var f=Object.create(null);r.r(f);var o={};n=n||[null,e({}),e([]),e(e)];for(var a=2&i&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(s=>o[s]=()=>t[s]);return o.default=()=>t,r.d(f,o),f}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(8592===e?"common":e)+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="dotcms-binary-field-builder:";r.l=(t,i,f,o)=>{if(e[t])e[t].push(i);else{var a,s;if(void 0!==f)for(var d=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var y=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),y&&y.forEach(h=>h(b)),g)return g(b)},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)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={3666:0};r.f.j=(i,f)=>{var o=r.o(e,i)?e[i]:void 0;if(0!==o)if(o)f.push(o[2]);else if(3666!=i){var a=new Promise((l,c)=>o=e[i]=[l,c]);f.push(o[2]=a);var s=r.p+r.u(i),d=new Error;r.l(s,l=>{if(r.o(e,i)&&(0!==(o=e[i])&&(e[i]=void 0),o)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;d.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,o[1](d)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,f)=>{var d,u,[o,a,s]=f,l=0;if(o.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(s)var c=s(r)}for(i&&i(f);l{!function(e){const n=e.performance;function i(I){n&&n.mark&&n.mark(I)}function r(I,_){n&&n.measure&&n.measure(I,_)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function u(I){return c+I}const f=!0===e[u("forceDuplicateZoneCheck")];if(e.Zone){if(f||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let p=(()=>{class I{constructor(t,o){this._parent=t,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new T(this,this._parent&&this._parent._zoneDelegate,o)}static assertZonePatched(){if(e.Promise!==K.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 t=I.current;for(;t.parent;)t=t.parent;return t}static get current(){return G.zone}static get currentTask(){return te}static __load_patch(t,o,y=!1){if(K.hasOwnProperty(t)){if(!y&&f)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const P="Zone:"+t;i(P),K[t]=o(e,I,le),r(P,P)}}get parent(){return this._parent}get name(){return this._name}get(t){const o=this.getZoneWith(t);if(o)return o._properties[t]}getZoneWith(t){let o=this;for(;o;){if(o._properties.hasOwnProperty(t))return o;o=o._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,o){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const y=this._zoneDelegate.intercept(this,t,o),P=this;return function(){return P.runGuarded(y,this,arguments,o)}}run(t,o,y,P){G={parent:G,zone:this};try{return this._zoneDelegate.invoke(this,t,o,y,P)}finally{G=G.parent}}runGuarded(t,o=null,y,P){G={parent:G,zone:this};try{try{return this._zoneDelegate.invoke(this,t,o,y,P)}catch(J){if(this._zoneDelegate.handleError(this,J))throw J}}finally{G=G.parent}}runTask(t,o,y){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");if(t.state===H&&(t.type===R||t.type===M))return;const P=t.state!=X;P&&t._transitionTo(X,Z),t.runCount++;const J=te;te=t,G={parent:G,zone:this};try{t.type==M&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,o,y)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==H&&t.state!==Y&&(t.type==R||t.data&&t.data.isPeriodic?P&&t._transitionTo(Z,X):(t.runCount=0,this._updateTaskCount(t,-1),P&&t._transitionTo(H,X,H))),G=G.parent,te=J}}scheduleTask(t){if(t.zone&&t.zone!==this){let y=this;for(;y;){if(y===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);y=y.parent}}t._transitionTo(W,H);const o=[];t._zoneDelegates=o,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(y){throw t._transitionTo(Y,W,H),this._zoneDelegate.handleError(this,y),y}return t._zoneDelegates===o&&this._updateTaskCount(t,1),t.state==W&&t._transitionTo(Z,W),t}scheduleMicroTask(t,o,y,P){return this.scheduleTask(new m(v,t,o,y,P,void 0))}scheduleMacroTask(t,o,y,P,J){return this.scheduleTask(new m(M,t,o,y,P,J))}scheduleEventTask(t,o,y,P,J){return this.scheduleTask(new m(R,t,o,y,P,J))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");t._transitionTo(A,Z,X);try{this._zoneDelegate.cancelTask(this,t)}catch(o){throw t._transitionTo(Y,A),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(t,-1),t._transitionTo(H,A),t.runCount=0,t}_updateTaskCount(t,o){const y=t._zoneDelegates;-1==o&&(t._zoneDelegates=null);for(let P=0;PI.hasTask(t,o),onScheduleTask:(I,_,t,o)=>I.scheduleTask(t,o),onInvokeTask:(I,_,t,o,y,P)=>I.invokeTask(t,o,y,P),onCancelTask:(I,_,t,o)=>I.cancelTask(t,o)};class T{constructor(_,t,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=_,this._parentDelegate=t,this._forkZS=o&&(o&&o.onFork?o:t._forkZS),this._forkDlgt=o&&(o.onFork?t:t._forkDlgt),this._forkCurrZone=o&&(o.onFork?this.zone:t._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:t._interceptZS),this._interceptDlgt=o&&(o.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:t._invokeZS),this._invokeDlgt=o&&(o.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:t._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:t._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:t._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:t._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const y=o&&o.onHasTask;(y||t&&t._hasTaskZS)&&(this._hasTaskZS=y?o:g,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=_,o.onScheduleTask||(this._scheduleTaskZS=g,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),o.onInvokeTask||(this._invokeTaskZS=g,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),o.onCancelTask||(this._cancelTaskZS=g,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(_,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,t):new p(_,t)}intercept(_,t,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,t,o):t}invoke(_,t,o,y,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,t,o,y,P):t.apply(o,y)}handleError(_,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,t)}scheduleTask(_,t){let o=t;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,t),o||(o=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=v)throw new Error("Task is missing scheduleFn.");d(t)}return o}invokeTask(_,t,o,y){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,t,o,y):t.callback.apply(o,y)}cancelTask(_,t){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");o=t.cancelFn(t)}return o}hasTask(_,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,t)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,t){const o=this._taskCounts,y=o[_],P=o[_]=y+t;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=y&&0!=P||this.hasTask(this.zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class m{constructor(_,t,o,y,P,J){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=t,this.data=y,this.scheduleFn=P,this.cancelFn=J,!o)throw new Error("callback is not defined");this.callback=o;const l=this;this.invoke=_===R&&y&&y.useG?m.invokeTask:function(){return m.invokeTask.call(e,l,this,arguments)}}static invokeTask(_,t,o){_||(_=this),re++;try{return _.runCount++,_.zone.runTask(_,t,o)}finally{1==re&&L(),re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(H,W)}_transitionTo(_,t,o){if(this._state!==t&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${t}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==H&&(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 D=u("setTimeout"),S=u("Promise"),O=u("then");let E,F=[],V=!1;function d(I){if(0===re&&0===F.length)if(E||e[S]&&(E=e[S].resolve(0)),E){let _=E[O];_||(_=E.then),_.call(E,L)}else e[D](L,0);I&&F.push(I)}function L(){if(!V){for(V=!0;F.length;){const I=F;F=[];for(let _=0;_G,onUnhandledError:B,microtaskDrainDone:B,scheduleMicroTask:d,showUncaughtError:()=>!p[u("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:B,patchMethod:()=>B,bindArguments:()=>[],patchThen:()=>B,patchMacroTask:()=>B,patchEventPrototype:()=>B,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>B,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>B,wrapWithCurrentZone:()=>B,filterProperties:()=>[],attachOriginToPatched:()=>B,_redefineProperty:()=>B,patchCallbacks:()=>B};let G={parent:null,zone:new p(null,null)},te=null,re=0;function B(){}r("Zone","Zone"),e.Zone=p}(typeof window<"u"&&window||typeof self<"u"&&self||global);const fe=Object.getOwnPropertyDescriptor,be=Object.defineProperty,ye=Object.getPrototypeOf,lt=Object.create,ut=Array.prototype.slice,De="addEventListener",Ze="removeEventListener",Oe=Zone.__symbol__(De),Ie=Zone.__symbol__(Ze),se="true",ie="false",ge=Zone.__symbol__("");function Le(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,r,c){return Zone.current.scheduleMacroTask(e,n,i,r,c)}const x=Zone.__symbol__,we=typeof window<"u",de=we?window:void 0,$=we&&de||"object"==typeof self&&self||global,ht=[null];function Ae(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Le(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Pe=!("nw"in $)&&typeof $.process<"u"&&"[object process]"==={}.toString.call($.process),He=!Pe&&!Be&&!(!we||!de.HTMLElement),Ue=typeof $.process<"u"&&"[object process]"==={}.toString.call($.process)&&!Be&&!(!we||!de.HTMLElement),Re={},qe=function(e){if(!(e=e||$.event))return;let n=Re[e.type];n||(n=Re[e.type]=x("ON_PROPERTY"+e.type));const i=this||e.target||$,r=i[n];let c;return He&&i===de&&"error"===e.type?(c=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===c&&e.preventDefault()):(c=r&&r.apply(this,arguments),null!=c&&!c&&e.preventDefault()),c};function We(e,n,i){let r=fe(e,n);if(!r&&i&&fe(i,n)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;const c=x("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete r.writable,delete r.value;const u=r.get,f=r.set,p=n.substr(2);let g=Re[p];g||(g=Re[p]=x("ON_PROPERTY"+p)),r.set=function(T){let m=this;!m&&e===$&&(m=$),m&&(m[g]&&m.removeEventListener(p,qe),f&&f.apply(m,ht),"function"==typeof T?(m[g]=T,m.addEventListener(p,qe,!1)):m[g]=null)},r.get=function(){let T=this;if(!T&&e===$&&(T=$),!T)return null;const m=T[g];if(m)return m;if(u){let D=u&&u.call(this);if(D)return r.set.call(this,D),"function"==typeof T.removeAttribute&&T.removeAttribute(n),D}return null},be(e,n,r),e[c]=!0}function Xe(e,n,i){if(n)for(let r=0;rfunction(f,p){const g=i(f,p);return g.cbIdx>=0&&"function"==typeof p[g.cbIdx]?Me(g.name,p[g.cbIdx],g,c):u.apply(f,p)})}function ae(e,n){e[x("OriginalDelegate")]=n}let Ye=!1,je=!1;function mt(){if(Ye)return je;Ye=!0;try{const e=de.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(je=!0)}catch{}return je}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const r=Object.getOwnPropertyDescriptor,c=Object.defineProperty,f=i.symbol,p=[],g=!0===e[f("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],T=f("Promise"),m=f("then");i.onUnhandledError=l=>{if(i.showUncaughtError()){const s=l&&l.rejection;s?console.error("Unhandled Promise rejection:",s instanceof Error?s.message:s,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",s,s instanceof Error?s.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;p.length;){const l=p.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(s){O(s)}}};const S=f("unhandledPromiseRejectionHandler");function O(l){i.onUnhandledError(l);try{const s=n[S];"function"==typeof s&&s.call(this,l)}catch{}}function F(l){return l&&l.then}function V(l){return l}function E(l){return t.reject(l)}const d=f("state"),L=f("value"),z=f("finally"),H=f("parentPromiseValue"),W=f("parentPromiseState"),X=null,A=!0,Y=!1;function M(l,s){return a=>{try{G(l,s,a)}catch(h){G(l,!1,h)}}}const le=f("currentTaskTrace");function G(l,s,a){const h=function(){let l=!1;return function(a){return function(){l||(l=!0,a.apply(null,arguments))}}}();if(l===a)throw new TypeError("Promise resolved with itself");if(l[d]===X){let w=null;try{("object"==typeof a||"function"==typeof a)&&(w=a&&a.then)}catch(N){return h(()=>{G(l,!1,N)})(),l}if(s!==Y&&a instanceof t&&a.hasOwnProperty(d)&&a.hasOwnProperty(L)&&a[d]!==X)re(a),G(l,a[d],a[L]);else if(s!==Y&&"function"==typeof w)try{w.call(a,h(M(l,s)),h(M(l,!1)))}catch(N){h(()=>{G(l,!1,N)})()}else{l[d]=s;const N=l[L];if(l[L]=a,l[z]===z&&s===A&&(l[d]=l[W],l[L]=l[H]),s===Y&&a instanceof Error){const k=n.currentTask&&n.currentTask.data&&n.currentTask.data.__creationTrace__;k&&c(a,le,{configurable:!0,enumerable:!1,writable:!0,value:k})}for(let k=0;k{try{const b=l[L],C=!!a&&z===a[z];C&&(a[H]=b,a[W]=N);const j=s.run(k,void 0,C&&k!==E&&k!==V?[]:[b]);G(a,!0,j)}catch(b){G(a,!1,b)}},a)}const _=function(){};class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(s){return G(new this(null),A,s)}static reject(s){return G(new this(null),Y,s)}static race(s){let a,h,w=new this((b,C)=>{a=b,h=C});function N(b){a(b)}function k(b){h(b)}for(let b of s)F(b)||(b=this.resolve(b)),b.then(N,k);return w}static all(s){return t.allWithCallback(s)}static allSettled(s){return(this&&this.prototype instanceof t?this:t).allWithCallback(s,{thenCallback:h=>({status:"fulfilled",value:h}),errorCallback:h=>({status:"rejected",reason:h})})}static allWithCallback(s,a){let h,w,N=new this((j,U)=>{h=j,w=U}),k=2,b=0;const C=[];for(let j of s){F(j)||(j=this.resolve(j));const U=b;try{j.then(Q=>{C[U]=a?a.thenCallback(Q):Q,k--,0===k&&h(C)},Q=>{a?(C[U]=a.errorCallback(Q),k--,0===k&&h(C)):w(Q)})}catch(Q){w(Q)}k++,b++}return k-=2,0===k&&h(C),N}constructor(s){const a=this;if(!(a instanceof t))throw new Error("Must be an instanceof Promise.");a[d]=X,a[L]=[];try{s&&s(M(a,A),M(a,Y))}catch(h){G(a,!1,h)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(s,a){let h=this.constructor[Symbol.species];(!h||"function"!=typeof h)&&(h=this.constructor||t);const w=new h(_),N=n.current;return this[d]==X?this[L].push(N,w,s,a):B(this,N,w,s,a),w}catch(s){return this.then(null,s)}finally(s){let a=this.constructor[Symbol.species];(!a||"function"!=typeof a)&&(a=t);const h=new a(_);h[z]=z;const w=n.current;return this[d]==X?this[L].push(w,h,s,s):B(this,w,h,s,s),h}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const o=e[T]=e.Promise;e.Promise=t;const y=f("thenPatched");function P(l){const s=l.prototype,a=r(s,"then");if(a&&(!1===a.writable||!a.configurable))return;const h=s.then;s[m]=h,l.prototype.then=function(w,N){return new t((b,C)=>{h.call(this,b,C)}).then(w,N)},l[y]=!0}return i.patchThen=P,o&&(P(o),ce(e,"fetch",l=>function J(l){return function(s,a){let h=l.apply(s,a);if(h instanceof t)return h;let w=h.constructor;return w[y]||P(w),h}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=p,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=x("OriginalDelegate"),r=x("Promise"),c=x("Error"),u=function(){if("function"==typeof this){const T=this[i];if(T)return"function"==typeof T?n.call(T):Object.prototype.toString.call(T);if(this===Promise){const m=e[r];if(m)return n.call(m)}if(this===Error){const m=e[c];if(m)return n.call(m)}}return n.call(this)};u[i]=n,Function.prototype.toString=u;const f=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":f.call(this)}});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 Et={useG:!0},ee={},$e={},Je=new RegExp("^"+ge+"(\\w+)(true|false)$"),xe=x("propagationStopped");function Ke(e,n){const i=(n?n(e):e)+ie,r=(n?n(e):e)+se,c=ge+i,u=ge+r;ee[e]={},ee[e][ie]=c,ee[e][se]=u}function Tt(e,n,i){const r=i&&i.add||De,c=i&&i.rm||Ze,u=i&&i.listeners||"eventListeners",f=i&&i.rmAll||"removeAllListeners",p=x(r),g="."+r+":",T="prependListener",m="."+T+":",D=function(E,d,L){if(E.isRemoved)return;const z=E.callback;"object"==typeof z&&z.handleEvent&&(E.callback=W=>z.handleEvent(W),E.originalDelegate=z),E.invoke(E,d,[L]);const H=E.options;H&&"object"==typeof H&&H.once&&d[c].call(d,L.type,E.originalDelegate?E.originalDelegate:E.callback,H)},S=function(E){if(!(E=E||e.event))return;const d=this||E.target||e,L=d[ee[E.type][ie]];if(L)if(1===L.length)D(L[0],d,E);else{const z=L.slice();for(let H=0;Hfunction(c,u){c[xe]=!0,r&&r.apply(c,u)})}function gt(e,n,i,r,c){const u=Zone.__symbol__(r);if(n[u])return;const f=n[u]=n[r];n[r]=function(p,g,T){return g&&g.prototype&&c.forEach(function(m){const D=`${i}.${r}::`+m,S=g.prototype;if(S.hasOwnProperty(m)){const O=e.ObjectGetOwnPropertyDescriptor(S,m);O&&O.value?(O.value=e.wrapWithCurrentZone(O.value,D),e._redefineProperty(g.prototype,m,O)):S[m]&&(S[m]=e.wrapWithCurrentZone(S[m],D))}else S[m]&&(S[m]=e.wrapWithCurrentZone(S[m],D))}),f.call(n,p,g,T)},e.attachOriginToPatched(n[r],f)}const Ve=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],wt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],et=["load"],tt=["blur","error","focus","load","resize","scroll","messageerror"],St=["bounce","finish","start"],nt=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],_e=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],Dt=["close","error","open","message"],Zt=["error","message"],me=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Ve,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function rt(e,n,i){if(!i||0===i.length)return n;const r=i.filter(u=>u.target===e);if(!r||0===r.length)return n;const c=r[0].ignoreProperties;return n.filter(u=>-1===c.indexOf(u))}function q(e,n,i,r){e&&Xe(e,rt(e,n,i),r)}Zone.__load_patch("util",(e,n,i)=>{i.patchOnProperties=Xe,i.patchMethod=ce,i.bindArguments=Ae,i.patchMacroTask=pt;const r=n.__symbol__("BLACK_LISTED_EVENTS"),c=n.__symbol__("UNPATCHED_EVENTS");e[c]&&(e[r]=e[c]),e[r]&&(n[r]=n[c]=e[r]),i.patchEventPrototype=yt,i.patchEventTarget=Tt,i.isIEOrEdge=mt,i.ObjectDefineProperty=be,i.ObjectGetOwnPropertyDescriptor=fe,i.ObjectCreate=lt,i.ArraySlice=ut,i.patchClass=ke,i.wrapWithCurrentZone=Le,i.filterProperties=rt,i.attachOriginToPatched=ae,i._redefineProperty=Object.defineProperty,i.patchCallbacks=gt,i.getGlobalObjects=()=>({globalSources:$e,zoneSymbolEventNames:ee,eventNames:me,isBrowser:He,isMix:Ue,isNode:Pe,TRUE_STR:se,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ge,ADD_EVENT_LISTENER_STR:De,REMOVE_EVENT_LISTENER_STR:Ze})});const Ne=x("zoneTask");function Ee(e,n,i,r){let c=null,u=null;i+=r;const f={};function p(T){const m=T.data;return m.args[0]=function(){return T.invoke.apply(this,arguments)},m.handleId=c.apply(e,m.args),T}function g(T){return u.call(e,T.data.handleId)}c=ce(e,n+=r,T=>function(m,D){if("function"==typeof D[0]){const S={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?D[1]||0:void 0,args:D},O=D[0];D[0]=function(){try{return O.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete f[S.handleId]:S.handleId&&(S.handleId[Ne]=null))}};const F=Me(n,D[0],S,p,g);if(!F)return F;const V=F.data.handleId;return"number"==typeof V?f[V]=F:V&&(V[Ne]=F),V&&V.ref&&V.unref&&"function"==typeof V.ref&&"function"==typeof V.unref&&(F.ref=V.ref.bind(V),F.unref=V.unref.bind(V)),"number"==typeof V||V?V:F}return T.apply(e,D)}),u=ce(e,i,T=>function(m,D){const S=D[0];let O;"number"==typeof S?O=f[S]:(O=S&&S[Ne],O||(O=S)),O&&"string"==typeof O.type?"notScheduled"!==O.state&&(O.cancelFn&&O.data.isPeriodic||0===O.runCount)&&("number"==typeof S?delete f[S]:S&&(S[Ne]=null),O.zone.cancelTask(O)):T.apply(e,D)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{i.patchMethod(e,"queueMicrotask",r=>function(c,u){n.current.scheduleMicroTask("queueMicrotask",u[0])})}),Zone.__load_patch("timers",e=>{const n="set",i="clear";Ee(e,n,i,"Timeout"),Ee(e,n,i,"Interval"),Ee(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{Ee(e,"request","cancel","AnimationFrame"),Ee(e,"mozRequest","mozCancel","AnimationFrame"),Ee(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let r=0;rfunction(g,T){return n.current.run(u,e,T,p)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function Mt(e,n){n.patchEventPrototype(e,n)})(e,i),function Lt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:r,TRUE_STR:c,FALSE_STR:u,ZONE_SYMBOL_PREFIX:f}=n.getGlobalObjects();for(let g=0;g{ke("MutationObserver"),ke("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,n,i)=>{ke("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,n,i)=>{ke("FileReader")}),Zone.__load_patch("on_property",(e,n,i)=>{!function Ot(e,n){if(Pe&&!Ue||Zone[e.symbol("patchEvents")])return;const i=typeof WebSocket<"u",r=n.__Zone_ignore_on_properties;if(He){const f=window,p=function _t(){try{const e=de.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:f,ignoreProperties:["error"]}]:[];q(f,me.concat(["messageerror"]),r&&r.concat(p),ye(f)),q(Document.prototype,me,r),typeof f.SVGElement<"u"&&q(f.SVGElement.prototype,me,r),q(Element.prototype,me,r),q(HTMLElement.prototype,me,r),q(HTMLMediaElement.prototype,wt,r),q(HTMLFrameSetElement.prototype,Ve.concat(tt),r),q(HTMLBodyElement.prototype,Ve.concat(tt),r),q(HTMLFrameElement.prototype,et,r),q(HTMLIFrameElement.prototype,et,r);const g=f.HTMLMarqueeElement;g&&q(g.prototype,St,r);const T=f.Worker;T&&q(T.prototype,Zt,r)}const c=n.XMLHttpRequest;c&&q(c.prototype,nt,r);const u=n.XMLHttpRequestEventTarget;u&&q(u&&u.prototype,nt,r),typeof IDBIndex<"u"&&(q(IDBIndex.prototype,_e,r),q(IDBRequest.prototype,_e,r),q(IDBOpenDBRequest.prototype,_e,r),q(IDBDatabase.prototype,_e,r),q(IDBTransaction.prototype,_e,r),q(IDBCursor.prototype,_e,r)),i&&q(WebSocket.prototype,Dt,r)}(i,e)}),Zone.__load_patch("customElements",(e,n,i)=>{!function It(e,n){const{isBrowser:i,isMix:r}=n.getGlobalObjects();(i||r)&&e.customElements&&"customElements"in e&&n.patchCallbacks(n,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,i)}),Zone.__load_patch("XHR",(e,n)=>{!function g(T){const m=T.XMLHttpRequest;if(!m)return;const D=m.prototype;let O=D[Oe],F=D[Ie];if(!O){const v=T.XMLHttpRequestEventTarget;if(v){const M=v.prototype;O=M[Oe],F=M[Ie]}}const V="readystatechange",E="scheduled";function d(v){const M=v.data,R=M.target;R[u]=!1,R[p]=!1;const K=R[c];O||(O=R[Oe],F=R[Ie]),K&&F.call(R,V,K);const le=R[c]=()=>{if(R.readyState===R.DONE)if(!M.aborted&&R[u]&&v.state===E){const te=R[n.__symbol__("loadfalse")];if(0!==R.status&&te&&te.length>0){const re=v.invoke;v.invoke=function(){const B=R[n.__symbol__("loadfalse")];for(let I=0;Ifunction(v,M){return v[r]=0==M[2],v[f]=M[1],H.apply(v,M)}),Z=x("fetchTaskAborting"),X=x("fetchTaskScheduling"),A=ce(D,"send",()=>function(v,M){if(!0===n.current[X]||v[r])return A.apply(v,M);{const R={target:v,url:v[f],isPeriodic:!1,args:M,aborted:!1},K=Me("XMLHttpRequest.send",L,R,d,z);v&&!0===v[p]&&!R.aborted&&K.state===E&&K.invoke()}}),Y=ce(D,"abort",()=>function(v,M){const R=function S(v){return v[i]}(v);if(R&&"string"==typeof R.type){if(null==R.cancelFn||R.data&&R.data.aborted)return;R.zone.cancelTask(R)}else if(!0===n.current[Z])return Y.apply(v,M)})}(e);const i=x("xhrTask"),r=x("xhrSync"),c=x("xhrListener"),u=x("xhrScheduled"),f=x("xhrURL"),p=x("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function dt(e,n){const i=e.constructor.name;for(let r=0;r{const g=function(){return p.apply(this,Ae(arguments,i+"."+c))};return ae(g,p),g})(u)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(r){return function(c){Qe(e,r).forEach(f=>{const p=e.PromiseRejectionEvent;if(p){const g=new p(r,{promise:c.promise,reason:c.rejection});f.invoke(g)}})}}e.PromiseRejectionEvent&&(n[x("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[x("rejectionHandledHandler")]=i("rejectionhandled"))})}},Se=>{Se(Se.s=88583)}]);(self.webpackChunkdotcms_binary_field_builder=self.webpackChunkdotcms_binary_field_builder||[]).push([[179],{92988:(Zi,oa,mr)=>{"use strict";function ii(n){return"function"==typeof n}let ki=!1;const an={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else ki&&console.log("RxJS: Back to a better error behavior. Thank you. <3");ki=n},get useDeprecatedSynchronousErrorHandling(){return ki}};function gi(n){setTimeout(()=>{throw n},0)}const ho={closed:!0,next(n){},error(n){if(an.useDeprecatedSynchronousErrorHandling)throw n;gi(n)},complete(){}},ri=Array.isArray||(n=>n&&"number"==typeof n.length);function cl(n){return null!==n&&"object"==typeof n}const ul=(()=>{function n(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return n.prototype=Object.create(Error.prototype),n})();class ft{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ft)e.remove(this);else if(null!==e)for(let s=0;st.concat(e instanceof ul?e.errors:e),[])}ft.EMPTY=((n=new ft).closed=!0,n);const dl="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ut extends ft{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=ho;break;case 1:if(!t){this.destination=ho;break}if("object"==typeof t){t instanceof ut?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new Fd(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new Fd(this,t,e,i)}}[dl](){return this}static create(t,e,i){const r=new ut(t,e,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class Fd extends ut{constructor(t,e,i,r){super(),this._parentSubscriber=t;let o,s=this;ii(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==ho&&(s=Object.create(e),ii(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;an.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=an;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):gi(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;gi(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);an.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),an.useDeprecatedSynchronousErrorHandling)throw i;gi(i)}}__tryOrSetError(t,e,i){if(!an.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return an.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(gi(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const aa="function"==typeof Symbol&&Symbol.observable||"@@observable";function Rc(n){return n}let mt=(()=>{class n{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function sa(n,t,e){if(n){if(n instanceof ut)return n;if(n[dl])return n[dl]()}return n||t||e?new ut(n,t,e):new ut(ho)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||an.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),an.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){an.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function jv(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof ut?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=xf(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[aa](){return this}pipe(...e){return 0===e.length?this:function hl(n){return 0===n.length?Rc:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=xf(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function xf(n){if(n||(n=an.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const po=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class jd extends ft{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class pl extends ut{constructor(t){super(t),this.destination=t}}let ye=(()=>{class n extends mt{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[dl](){return new pl(this)}lift(e){const i=new Of(this,this);return i.operator=e,i}next(e){if(this.closed)throw new po;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew Of(t,e),n})();class Of extends ye{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):ft.EMPTY}}function la(n){return n&&"function"==typeof n.schedule}function me(n,t){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new Vv(n,t))}}class Vv{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new zv(t,this.project,this.thisArg))}}class zv extends ut{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const kf=n=>t=>{for(let e=0,i=n.length;en&&"number"==typeof n.length&&"function"!=typeof n;function Af(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const gr=n=>{if(n&&"function"==typeof n[aa])return(n=>t=>{const e=n[aa]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)})(n);if(Vd(n))return kf(n);if(Af(n))return(n=>t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,gi),t))(n);if(n&&"function"==typeof n[jc])return(n=>t=>{const e=n[jc]();for(;;){let i;try{i=e.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof e.return&&t.add(()=>{e.return&&e.return()}),t})(n);{const e=`You provided ${cl(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function Vc(n,t){return new mt(e=>{const i=new ft;let r=0;return i.add(t.schedule(function(){r!==n.length?(e.next(n[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Ff(n,t){if(null!=n){if(function Pf(n){return n&&"function"==typeof n[aa]}(n))return function Nf(n,t){return new mt(e=>{const i=new ft;return i.add(t.schedule(()=>{const r=n[aa]();i.add(r.subscribe({next(o){i.add(t.schedule(()=>e.next(o)))},error(o){i.add(t.schedule(()=>e.error(o)))},complete(){i.add(t.schedule(()=>e.complete()))}}))})),i})}(n,t);if(Af(n))return function Lf(n,t){return new mt(e=>{const i=new ft;return i.add(t.schedule(()=>n.then(r=>{i.add(t.schedule(()=>{e.next(r),i.add(t.schedule(()=>e.complete()))}))},r=>{i.add(t.schedule(()=>e.error(r)))}))),i})}(n,t);if(Vd(n))return Vc(n,t);if(function Rf(n){return n&&"function"==typeof n[jc]}(n)||"string"==typeof n)return function zd(n,t){if(!n)throw new Error("Iterable cannot be null");return new mt(e=>{const i=new ft;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=n[jc](),i.add(t.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(n,t)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function Kt(n,t){return t?Ff(n,t):n instanceof mt?n:new mt(gr(n))}class fl extends ut{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class ml extends ut{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function gl(n,t){if(t.closed)return;if(n instanceof mt)return n.subscribe(t);let e;try{e=gr(n)(t)}catch(i){t.error(i)}return e}function Dn(n,t,e=Number.POSITIVE_INFINITY){return"function"==typeof t?i=>i.pipe(Dn((r,o)=>Kt(n(r,o)).pipe(me((s,a)=>t(r,s,o,a))),e)):("number"==typeof t&&(e=t),i=>i.lift(new $v(n,e)))}class $v{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new Wv(t,this.project,this.concurrent))}}class Wv extends ml{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function ua(n,t){return t?Vc(n,t):new mt(kf(n))}function ys(...n){let t=Number.POSITIVE_INFINITY,e=null,i=n[n.length-1];return la(i)?(e=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(t=n.pop())):"number"==typeof i&&(t=n.pop()),null===e&&1===n.length&&n[0]instanceof mt?n[0]:function ca(n=Number.POSITIVE_INFINITY){return Dn(Rc,n)}(t)(ua(n,e))}function _l(){return function(t){return t.lift(new Vr(t))}}class Vr{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const r=new jf(t,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class jf extends ut{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=t._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class zc extends mt{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new ft,t.add(this.source.subscribe(new Vf(this.getSubject(),this))),t.closed&&(this._connection=null,t=ft.EMPTY)),t}refCount(){return _l()(this)}}const Gv=(()=>{const n=zc.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class Vf extends pl{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}class qv{constructor(t,e){this.subjectFactory=t,this.selector=e}call(t,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(t);return o.add(e.subscribe(r)),o}}function vs(){return new ye}function Ft(n){for(let t in n)if(n[t]===Ft)return t;throw Error("Could not find renamed property on target object.")}function Hd(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function kt(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(kt).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function bs(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const $d=Ft({__forward_ref__:Ft});function Ue(n){return n.__forward_ref__=Ue,n.toString=function(){return kt(this())},n}function xe(n){return Cs(n)?n():n}function Cs(n){return"function"==typeof n&&n.hasOwnProperty($d)&&n.__forward_ref__===Ue}function Wd(n){return n&&!!n.\u0275providers}const Bc="https://g.co/ng/security#xss";class j extends Error{constructor(t,e){super(function Uc(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function je(n){return"string"==typeof n?n:null==n?"":String(n)}function Hc(n,t){throw new j(-201,!1)}function Ji(n,t){null==n&&function ht(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function K(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function Ae(n){return{providers:n.providers||[],imports:n.imports||[]}}function $c(n){return Hf(n,yl)||Hf(n,$f)}function Hf(n,t){return n.hasOwnProperty(t)?n[t]:null}function ha(n){return n&&(n.hasOwnProperty(Gc)||n.hasOwnProperty(Xv))?n[Gc]:null}const yl=Ft({\u0275prov:Ft}),Gc=Ft({\u0275inj:Ft}),$f=Ft({ngInjectableDef:Ft}),Xv=Ft({ngInjectorDef:Ft});var ke=(()=>((ke=ke||{})[ke.Default=0]="Default",ke[ke.Host=1]="Host",ke[ke.Self=2]="Self",ke[ke.SkipSelf=4]="SkipSelf",ke[ke.Optional=8]="Optional",ke))();let Gd;function Xi(n){const t=Gd;return Gd=n,t}function Gf(n,t,e){const i=$c(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&ke.Optional?null:void 0!==t?t:void Hc(kt(n))}const It=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),er={},qd="__NG_DI_FLAG__",qc="ngTempTokenPath",nb=/\n/gm,Lo="__source";let pa;function fa(n){const t=pa;return pa=n,t}function Kc(n,t=ke.Default){if(void 0===pa)throw new j(-203,!1);return null===pa?Gf(n,void 0,t):pa.get(n,t&ke.Optional?null:void 0,t)}function U(n,t=ke.Default){return(function Wf(){return Gd}()||Kc)(xe(n),t)}function se(n,t=ke.Default){return U(n,bl(t))}function bl(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Qc(n){const t=[];for(let e=0;e((_r=_r||{})[_r.OnPush=0]="OnPush",_r[_r.Default=1]="Default",_r))(),B=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(B||(B={})),B))();const re={},Te=[],Ve=Ft({\u0275cmp:Ft}),Yt=Ft({\u0275dir:Ft}),yn=Ft({\u0275pipe:Ft}),kn=Ft({\u0275mod:Ft}),Ct=Ft({\u0275fac:Ft}),Rn=Ft({__NG_ELEMENT_ID__:Ft});let yr=0;function Y(n){return Po(()=>{const e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===_r.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Te,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||B.Emulated,id:"c"+yr++,styles:n.styles||Te,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=Kd(n.inputs,i),r.outputs=Kd(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(Ni).filter(mo):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(Li).filter(mo):null,r})}function Fn(n,t,e){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(Ni),i.pipeDefs=()=>("function"==typeof e?e():e).map(Li)}function Ni(n){return At(n)||_i(n)}function mo(n){return null!==n}function we(n){return Po(()=>({type:n.type,bootstrap:n.bootstrap||Te,declarations:n.declarations||Te,imports:n.imports||Te,exports:n.exports||Te,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function Kd(n,t){if(null==n)return re;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}const de=Y;function Tn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function At(n){return n[Ve]||null}function _i(n){return n[Yt]||null}function Li(n){return n[yn]||null}function br(n){return Array.isArray(n)&&"object"==typeof n[1]}function _o(n){return Array.isArray(n)&&!0===n[1]}function ab(n){return 0!=(4&n.flags)}function Jd(n){return n.componentOffset>-1}function Jf(n){return 1==(1&n.flags)}function yo(n){return null!==n.template}function q5(n){return 0!=(256&n[2])}function Sl(n,t){return n.hasOwnProperty(Ct)?n[Ct]:null}class HT{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Yn(){return $T}function $T(n){return n.type.prototype.ngOnChanges&&(n.setInput=Z5),Q5}function Q5(){const n=GT(this),t=n?.current;if(t){const e=n.previous;if(e===re)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Z5(n,t,e,i){const r=this.declaredInputs[e],o=GT(n)||function J5(n,t){return n[WT]=t}(n,{previous:re,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new HT(l&&l.currentValue,t,a===re),n[i]=t}Yn.ngInherit=!0;const WT="__ngSimpleChanges__";function GT(n){return n[WT]||null}function oi(n){for(;Array.isArray(n);)n=n[0];return n}function Xf(n,t){return oi(t[n])}function Cr(n,t){return oi(t[n.index])}function YT(n,t){return n.data[t]}function nu(n,t){return n[t]}function wr(n,t){const e=t[n];return br(e)?e:e[0]}function em(n){return 64==(64&n[2])}function ga(n,t){return null==t?null:n[t]}function QT(n){n[18]=0}function cb(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const He={lFrame:sM(null),bindingsEnabled:!0};function JT(){return He.bindingsEnabled}function W(){return He.lFrame.lView}function _t(){return He.lFrame.tView}function I(n){return He.lFrame.contextLView=n,n[8]}function x(n){return He.lFrame.contextLView=null,n}function si(){let n=XT();for(;null!==n&&64===n.type;)n=n.parent;return n}function XT(){return He.lFrame.currentTNode}function Fo(n,t){const e=He.lFrame;e.currentTNode=n,e.isParent=t}function ub(){return He.lFrame.isParent}function db(){He.lFrame.isParent=!1}function Ri(){const n=He.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function iu(){return He.lFrame.bindingIndex++}function Es(n){const t=He.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function dV(n,t){const e=He.lFrame;e.bindingIndex=e.bindingRootIndex=n,hb(t)}function hb(n){He.lFrame.currentDirectiveIndex=n}function iM(){return He.lFrame.currentQueryIndex}function fb(n){He.lFrame.currentQueryIndex=n}function pV(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function rM(n,t,e){if(e&ke.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&ke.Host||(r=pV(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}const i=He.lFrame=oM();return i.currentTNode=t,i.lView=n,!0}function mb(n){const t=oM(),e=n[1];He.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function oM(){const n=He.lFrame,t=null===n?null:n.child;return null===t?sM(n):t}function sM(n){const t={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:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function aM(){const n=He.lFrame;return He.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const lM=aM;function gb(){const n=aM();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Fi(){return He.lFrame.selectedIndex}function Dl(n){He.lFrame.selectedIndex=n}function dn(){const n=He.lFrame;return YT(n.tView,n.selectedIndex)}function tm(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class eh{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function Cb(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let wb=!0;function sm(n){const t=wb;return wb=n,t}let TV=0;const jo={};function am(n,t){const e=gM(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Sb(i.data,n),Sb(t,null),Sb(i.blueprint,null));const r=Db(n,t),o=n.injectorIndex;if(pM(r)){const s=rm(r),a=om(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Sb(n,t){n.push(0,0,0,0,0,0,0,0,t)}function gM(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Db(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=SM(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Tb(n,t,e){!function MV(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Rn)&&(i=e[Rn]),null==i&&(i=e[Rn]=TV++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:OV:t}(e);if("function"==typeof o){if(!rM(t,n,i))return i&ke.Host?_M(r,0,i):yM(t,e,i,r);try{const s=o(i);if(null!=s||i&ke.Optional)return s;Hc()}finally{lM()}}else if("number"==typeof o){let s=null,a=gM(n,t),l=-1,c=i&ke.Host?t[16][6]:null;for((-1===a||i&ke.SkipSelf)&&(l=-1===a?Db(n,t):t[a+8],-1!==l&&wM(i,!1)?(s=t[1],a=rm(l),t=om(l,t)):a=-1);-1!==a;){const u=t[1];if(CM(o,a,u.data)){const d=IV(a,t,e,s,i,c);if(d!==jo)return d}l=t[a+8],-1!==l&&wM(i,t[1].data[a+8]===c)&&CM(o,a,t)?(s=u,a=rm(l),t=om(l,t)):a=-1}}return r}function IV(n,t,e,i,r,o){const s=t[1],a=s.data[n+8],u=lm(a,s,e,null==i?Jd(a)&&wb:i!=s&&0!=(3&a.type),r&ke.Host&&o===a);return null!==u?Tl(t,s,u,a):jo}function lm(n,t,e,i,r){const o=n.providerIndexes,s=t.data,a=1048575&o,l=n.directiveStart,u=o>>20,h=r?a+u:n.directiveEnd;for(let p=i?a:a+u;p=l&&f.type===e)return p}if(r){const p=s[l];if(p&&yo(p)&&p.type===e)return l}return null}function Tl(n,t,e,i){let r=n[e];const o=t.data;if(function CV(n){return n instanceof eh}(r)){const s=r;s.resolving&&function ws(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new j(-200,`Circular dependency in DI detected for ${n}${e}`)}(function gt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():je(n)}(o[e]));const a=sm(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Xi(s.injectImpl):null;rM(n,i,ke.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function vV(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=$T(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&Xi(l),sm(a),s.resolving=!1,lM()}}return r}function CM(n,t,e){return!!(e[t+(n>>5)]&1<{const t=Mb(xe(n));return t&&t()}:Sl(n)}function SM(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}const au="__parameters__";function cu(n,t,e){return Po(()=>{const i=function Eb(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(au)?l[au]:Object.defineProperty(l,au,{value:[]})[au];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class oe{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=K({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Ml(n,t){n.forEach(e=>Array.isArray(e)?Ml(e,t):t(e))}function TM(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function um(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function rh(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function PV(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function xb(n,t){const e=uu(n,t);if(e>=0)return n[1|e]}function uu(n,t){return function MM(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),oh=ma(cu("Optional"),8),sh=ma(cu("SkipSelf"),4);var tr=(()=>((tr=tr||{})[tr.Important=1]="Important",tr[tr.DashCase=2]="DashCase",tr))();const Lb=new Map;let iz=0;const Rb="__ngContext__";function bi(n,t){br(t)?(n[Rb]=t[20],function oz(n){Lb.set(n[20],n)}(t)):n[Rb]=t}function jb(n,t){return undefined(n,t)}function uh(n){const t=n[3];return _o(t)?t[3]:t}function Vb(n){return GM(n[13])}function zb(n){return GM(n[4])}function GM(n){for(;null!==n&&!_o(n);)n=n[4];return n}function hu(n,t,e,i,r){if(null!=i){let o,s=!1;_o(i)?o=i:br(i)&&(s=!0,i=i[0]);const a=oi(i);0===n&&null!==e?null==r?JM(t,e,a):El(t,e,a,r||null,!0):1===n&&null!==e?El(t,e,a,r||null,!0):2===n?function qb(n,t,e){const i=mm(n,t);i&&function Tz(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function Iz(n,t,e,i,r){const o=e[7];o!==oi(e)&&hu(t,n,i,o,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const o=um(n,10+t);!function _z(n,t){dh(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function YM(n,t){if(!(128&t[2])){const e=t[11];e.destroyNode&&dh(n,t,e,3,null,null),function bz(n){let t=n[13];if(!t)return $b(n[1],n);for(;t;){let e=null;if(br(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)br(t)&&$b(t[1],t),t=t[3];null===t&&(t=n),br(t)&&$b(t[1],t),e=t&&t[4]}t=e}}(t)}}function $b(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function Dz(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===B.None||o===B.Emulated)return null}return Cr(i,e)}}(n,t.parent,e)}function El(n,t,e,i,r){n.insertBefore(t,e,i,r)}function JM(n,t,e){n.appendChild(t,e)}function XM(n,t,e,i,r){null!==i?El(n,t,e,i,r):JM(n,t,e)}function mm(n,t){return n.parentNode(t)}function eE(n,t,e){return nE(n,t,e)}let ym,Qb,vm,nE=function tE(n,t,e){return 40&n.type?Cr(n,e):null};function gm(n,t,e,i){const r=QM(n,i,t),o=t[11],a=eE(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return ym}()?.createHTML(n)||n}function cE(n){return function Zb(){if(void 0===vm&&(vm=null,It.trustedTypes))try{vm=It.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return vm}()?.createHTML(n)||n}class xl{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Bc})`}}class Pz extends xl{getTypeName(){return"HTML"}}class Rz extends xl{getTypeName(){return"Style"}}class Fz extends xl{getTypeName(){return"Script"}}class jz extends xl{getTypeName(){return"URL"}}class Vz extends xl{getTypeName(){return"ResourceURL"}}function Dr(n){return n instanceof xl?n.changingThisBreaksApplicationSecurity:n}function Vo(n,t){const e=function zz(n){return n instanceof xl&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Bc})`)}return e===t}class Gz{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Il(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class qz{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Il(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=Il(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0"),!0}endElement(t){const e=t.nodeName.toLowerCase();Jb.hasOwnProperty(e)&&!pE.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(_E(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const Jz=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Xz=/([^\#-~ |!])/g;function _E(n){return n.replace(/&/g,"&").replace(Jz,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(Xz,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let Cm;function yE(n,t){let e=null;try{Cm=Cm||function hE(n){const t=new qz(n);return function Kz(){try{return!!(new window.DOMParser).parseFromString(Il(""),"text/html")}catch{return!1}}()?new Gz(t):t}(n);let i=t?String(t):"";e=Cm.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=Cm.getInertBodyElement(i)}while(i!==o);return Il((new Zz).sanitizeChildren(eC(e)||e))}finally{if(e){const i=eC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function eC(n){return"content"in n&&function eB(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Qt=(()=>((Qt=Qt||{})[Qt.NONE=0]="NONE",Qt[Qt.HTML=1]="HTML",Qt[Qt.STYLE=2]="STYLE",Qt[Qt.SCRIPT=3]="SCRIPT",Qt[Qt.URL=4]="URL",Qt[Qt.RESOURCE_URL=5]="RESOURCE_URL",Qt))();function pu(n){const t=ph();return t?cE(t.sanitize(Qt.HTML,n)||""):Vo(n,"HTML")?cE(Dr(n)):yE(function lE(){return void 0!==Qb?Qb:typeof document<"u"?document:void 0}(),je(n))}function zo(n){const t=ph();return t?t.sanitize(Qt.URL,n)||"":Vo(n,"URL")?Dr(n):bm(je(n))}function ph(){const n=W();return n&&n[12]}const wm=new oe("ENVIRONMENT_INITIALIZER"),CE=new oe("INJECTOR",-1),wE=new oe("INJECTOR_DEF_TYPES");class SE{get(t,e=er){if(e===er){const i=new Error(`NullInjectorError: No provider for ${kt(t)}!`);throw i.name="NullInjectorError",i}return e}}function aB(...n){return{\u0275providers:DE(0,n),\u0275fromNgModule:!0}}function DE(n,...t){const e=[],i=new Set;let r;return Ml(t,o=>{const s=o;tC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&TE(r,e),e}function TE(n,t){for(let e=0;e{t.push(o)})}}function tC(n,t,e,i){if(!(n=xe(n)))return!1;let r=null,o=ha(n);const s=!o&&At(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=ha(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)tC(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Ml(o.imports,u=>{tC(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&TE(c,t)}if(!a){const c=Sl(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Te},{provide:wE,useValue:r,multi:!0},{provide:wm,useValue:()=>U(r),multi:!0})}const l=o.providers;null==l||a||nC(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}function nC(n,t){for(let e of n)Wd(e)&&(e=e.\u0275providers),Array.isArray(e)?nC(e,t):t(e)}const lB=Ft({provide:String,useValue:Ft});function iC(n){return null!==n&&"object"==typeof n&&lB in n}function Ol(n){return"function"==typeof n}const rC=new oe("Set Injector scope."),Sm={},uB={};let oC;function Dm(){return void 0===oC&&(oC=new SE),oC}class Bo{}class IE extends Bo{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,aC(t,s=>this.processProvider(s)),this.records.set(CE,fu(void 0,this)),r.has("environment")&&this.records.set(Bo,fu(void 0,this));const o=this.records.get(rC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(wE.multi,Te,ke.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=fa(this),i=Xi(void 0);try{return t()}finally{fa(e),Xi(i)}}get(t,e=er,i=ke.Default){this.assertNotDestroyed(),i=bl(i);const r=fa(this),o=Xi(void 0);try{if(!(i&ke.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function mB(n){return"function"==typeof n||"object"==typeof n&&n instanceof oe}(t)&&$c(t);a=l&&this.injectableDefInScope(l)?fu(sC(t),Sm):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&ke.Self?Dm():this.parent).get(t,e=i&ke.Optional&&e===er?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[qc]=s[qc]||[]).unshift(kt(t)),r)throw s;return function qf(n,t,e,i){const r=n[qc];throw t[Lo]&&r.unshift(t[Lo]),n.message=function rb(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=kt(t);if(Array.isArray(t))r=t.map(kt).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):kt(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(nb,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[qc]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{Xi(o),fa(r)}}resolveInjectorInitializers(){const t=fa(this),e=Xi(void 0);try{const i=this.get(wm.multi,Te,ke.Self);for(const r of i)r()}finally{fa(t),Xi(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(kt(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new j(205,!1)}processProvider(t){let e=Ol(t=xe(t))?t:xe(t&&t.provide);const i=function hB(n){return iC(n)?fu(void 0,n.useValue):fu(xE(n),Sm)}(t);if(Ol(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=fu(void 0,Sm,!0),r.factory=()=>Qc(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===Sm&&(e.value=uB,e.value=e.factory()),"object"==typeof e.value&&e.value&&function fB(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=xe(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function sC(n){const t=$c(n),e=null!==t?t.factory:Sl(n);if(null!==e)return e;if(n instanceof oe)throw new j(204,!1);if(n instanceof Function)return function dB(n){const t=n.length;if(t>0)throw rh(t,"?"),new j(204,!1);const e=function Wc(n){const t=n&&(n[yl]||n[$f]);if(t){const e=function Jv(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new j(204,!1)}function xE(n,t,e){let i;if(Ol(n)){const r=xe(n);return Sl(r)||sC(r)}if(iC(n))i=()=>xe(n.useValue);else if(function EE(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Qc(n.deps||[]));else if(function ME(n){return!(!n||!n.useExisting)}(n))i=()=>U(xe(n.useExisting));else{const r=xe(n&&(n.useClass||n.provide));if(!function pB(n){return!!n.deps}(n))return Sl(r)||sC(r);i=()=>new r(...Qc(n.deps))}return i}function fu(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function aC(n,t){for(const e of n)Array.isArray(e)?aC(e,t):e&&Wd(e)?aC(e.\u0275providers,t):t(e)}class gB{}class OE{}class yB{resolveComponentFactory(t){throw function _B(n){const t=Error(`No component factory found for ${kt(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let kl=(()=>{class n{}return n.NULL=new yB,n})();function vB(){return mu(si(),W())}function mu(n,t){return new qe(Cr(n,t))}let qe=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=vB,n})();function bB(n){return n instanceof qe?n.nativeElement:n}class fh{}let Vn=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function CB(){const n=W(),e=wr(si().index,n);return(br(e)?e:n)[11]}(),n})(),wB=(()=>{class n{}return n.\u0275prov=K({token:n,providedIn:"root",factory:()=>null}),n})();class gu{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const SB=new gu("15.1.1"),lC={};function uC(n){return n.ngOriginalError}class _u{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&uC(t);for(;e&&uC(e);)e=uC(e);return e||null}}function AE(n){return n.ownerDocument.defaultView}function LE(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const PE="ng-template";function NB(n,t,e){let i=0;for(;io?"":r[d+1].toLowerCase();const p=8&i?h:null;if(p&&-1!==LE(p,c,0)||2&i&&c!==h){if(vo(i))return!1;s=!0}}}}else{if(!s&&!vo(i)&&!vo(l))return!1;if(s&&vo(l))continue;s=!1,i=l|1&i}}return vo(i)||s}function vo(n){return 0==(1&n)}function RB(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!vo(s)&&(t+=jE(o,r),r=""),i=s,o=o||!vo(i);e++}return""!==r&&(t+=jE(o,r)),t}const $e={};function v(n){VE(_t(),W(),Fi()+n,!1)}function VE(n,t,e,i){if(!i)if(3==(3&t[2])){const o=n.preOrderCheckHooks;null!==o&&nm(t,o,e)}else{const o=n.preOrderHooks;null!==o&&im(t,o,0,e)}Dl(e)}function HE(n,t=null,e=null,i){const r=$E(n,t,e,i);return r.resolveInjectorInitializers(),r}function $E(n,t=null,e=null,i,r=new Set){const o=[e||Te,aB(n)];return i=i||("object"==typeof n?void 0:kt(n)),new IE(o,t||Dm(),i||null,r)}let Ci=(()=>{class n{static create(e,i){if(Array.isArray(e))return HE({name:""},i,e,"");{const r=e.name??"";return HE({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=er,n.NULL=new SE,n.\u0275prov=K({token:n,providedIn:"any",factory:()=>U(CE)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,t=ke.Default){const e=W();return null===e?U(n,t):vM(si(),e,xe(n),t)}function JE(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&VE(n,t,22,!1),e(i,r)}finally{Dl(o)}}function _C(n,t,e){if(ab(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,mh(n,e,r.hostVars,$e),r)}function Uo(n,t,e,i,r,o){const s=Cr(n,t);!function SC(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?je(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[11],s,o,n.value,e,i,r)}function E8(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let l=0;l0&&DC(e)}}function DC(n){for(let i=Vb(n);null!==i;i=zb(i))for(let r=10;r0&&DC(o)}const e=n[1].components;if(null!==e)for(let i=0;i0&&DC(r)}}function A8(n,t){const e=wr(t,n),i=e[1];(function N8(n,t){for(let e=t.length;e-1&&(Hb(t,i),um(e,i))}this._attachedToViewContainer=!1}YM(this._lView[1],this._lView)}onDestroy(t){tI(this._lView[1],this._lView,null,t)}markForCheck(){TC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){xm(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new j(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function vz(n,t){dh(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new j(902,!1);this._appRef=t}}class L8 extends gh{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;xm(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}}class hI extends kl{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=At(t);return new _h(e,this.ngModule)}}function pI(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class R8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=bl(i);const r=this.injector.get(t,lC,i);return r!==lC||e===lC?r:this.parentInjector.get(t,e,i)}}class _h extends OE{get inputs(){return pI(this.componentDef.inputs)}get outputs(){return pI(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function UB(n){return n.map(BB).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Bo?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new R8(t,o):t,a=s.get(fh,null);if(null===a)throw new j(407,!1);const l=s.get(wB,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function h8(n,t,e){return n.selectRootElement(t,e===B.ShadowDom)}(c,i,this.componentDef.encapsulation):Ub(c,u,function P8(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),h=this.componentDef.onPush?288:272,p=bC(0,null,null,1,0,null,null,null,null,null),f=Mm(null,p,null,h,null,null,a,c,l,s,null);let m,_;mb(f);try{const b=this.componentDef;let T,M=null;b.findHostDirectiveDefs?(T=[],M=new Map,b.findHostDirectiveDefs(b,T,M),T.push(b)):T=[b];const w=function j8(n,t){const e=n[1];return n[22]=t,bu(e,22,2,"#host",null)}(f,d),N=function V8(n,t,e,i,r,o,s,a){const l=r[1];!function z8(n,t,e,i){for(const r of n)t.mergedAttrs=th(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(Om(t,t.mergedAttrs,!0),null!==e&&aE(i,e,t))}(i,n,t,s);const c=o.createRenderer(t,e),u=Mm(r,eI(e),null,e.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&wC(l,n,i.length-1),Im(r,u),r[n.index]=u}(w,d,b,T,f,a,c);_=YT(p,22),d&&function U8(n,t,e,i){if(i)Cb(n,e,["ng-version",SB.full]);else{const{attrs:r,classes:o}=function HB(n){const t=[],e=[];let i=1,r=2;for(;i0&&sE(n,e,o.join(" "))}}(c,b,d,i),void 0!==e&&function H8(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=th(r.hostAttrs,e=th(e,r.hostAttrs))}}(i)}function IC(n){return n===re?{}:n===Te?[]:n}function G8(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function q8(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function K8(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let Am=null;function Al(){if(!Am){const n=It.Symbol;if(n&&n.iterator)Am=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;es(oi(w[i.index])):i.index;let M=null;if(!s&&a&&(M=function l9(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==M)(M.__ngLastListenerFn__||M).__ngNextListenerFn__=o,M.__ngLastListenerFn__=o,h=!1;else{o=kI(i,t,u,o,!1);const w=e.listen(_,r,o);d.push(o,w),c&&c.push(r,T,b,b+1)}}else o=kI(i,t,u,o,!1);const p=i.outputs;let f;if(h&&null!==p&&(f=p[r])){const m=f.length;if(m)for(let _=0;_-1?wr(n.index,t):t);let l=OI(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=OI(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function y(n=1){return function fV(n){return(He.lFrame.contextLView=function mV(n,t){for(;n>0;)t=t[15],n--;return t}(n,He.lFrame.contextLView))[8]}(n)}function c9(n,t){let e=null;const i=function FB(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function AC(n){return 2|n}function Ll(n){return(131068&n)>>2}function NC(n,t){return-131069&n|t<<2}function LC(n){return 1|n}function zI(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?_a(o):Ll(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];m9(n[a],t)&&(l=!0,n[a+1]=i?LC(u):AC(u)),a=i?_a(u):Ll(u)}l&&(n[e+1]=i?AC(o):LC(o))}function m9(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&uu(n,t)>=0}const zn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function BI(n){return n.substring(zn.key,zn.keyEnd)}function g9(n){return n.substring(zn.value,zn.valueEnd)}function UI(n,t){const e=zn.textEnd;return e===t?-1:(t=zn.keyEnd=function v9(n,t,e){for(;t32;)t++;return t}(n,zn.key=t,e),Ou(n,t,e))}function HI(n,t){const e=zn.textEnd;let i=zn.key=Ou(n,t,e);return e===i?-1:(i=zn.keyEnd=function b9(n,t,e){let i;for(;t=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=WI(n,i,e),i=zn.value=Ou(n,i,e),i=zn.valueEnd=function C9(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),WI(n,i,e))}function $I(n){zn.key=0,zn.keyEnd=0,zn.value=0,zn.valueEnd=0,zn.textEnd=n.length}function Ou(n,t,e){for(;t=0;e=HI(t,e))YI(n,BI(t),g9(t))}function Ke(n){Co(Sr,$o,n,!0)}function $o(n,t){for(let e=function _9(n){return $I(n),UI(n,Ou(n,0,zn.textEnd))}(t);e>=0;e=UI(t,e))Sr(n,BI(t),!0)}function bo(n,t,e,i){const r=W(),o=_t(),s=Es(2);o.firstUpdatePass&&KI(o,n,s,i),t!==$e&&wi(r,s,t)&&QI(o,o.data[Fi()],r,r[11],n,r[s+1]=function x9(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=kt(Dr(n)))),n}(t,e),i,s)}function Co(n,t,e,i){const r=_t(),o=Es(2);r.firstUpdatePass&&KI(r,null,o,i);const s=W();if(e!==$e&&wi(s,o,e)){const a=r.data[Fi()];if(JI(a,i)&&!qI(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=bs(l,e||"")),OC(r,a,s,e,i)}else!function I9(n,t,e,i,r,o,s,a){r===$e&&(r=Te);let l=0,c=0,u=0=n.expandoStartIndex}function KI(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[Fi()],s=qI(n,e);JI(o,i)&&null===t&&!s&&(t=!1),t=function S9(n,t,e,i){const r=function pb(n){const t=He.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=bh(e=PC(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=PC(r,n,t,e,i),null===o){let l=function D9(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Ll(i))return n[_a(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=PC(null,n,t,l[1],i),l=bh(l,t.attrs,i),function T9(n,t,e,i){n[_a(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function M9(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=_a(n[a+1]);n[i+1]=Rm(h,a),0!==h&&(n[h+1]=NC(n[h+1],i)),n[a+1]=function d9(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=Rm(a,0),0!==a&&(n[a+1]=NC(n[a+1],i)),a=i;else n[i+1]=Rm(l,0),0===a?a=i:n[l+1]=NC(n[l+1],i),l=i;c&&(n[i+1]=AC(n[i+1])),zI(n,u,i,!0),zI(n,u,i,!1),function f9(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&uu(o,t)>=0&&(e[i+1]=LC(e[i+1]))}(t,u,n,i,o),s=Rm(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function PC(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===$e&&(h=d?Te:void 0);let p=d?xb(h,i):u===i?h:void 0;if(c&&!Fm(p)&&(p=xb(l,i)),Fm(p)&&(a=p,s))return a;const f=n[r+1];r=s?_a(f):Ll(f)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=xb(l,i))}return a}function Fm(n){return void 0!==n}function JI(n,t){return 0!=(n.flags&(t?8:16))}function H(n,t=""){const e=W(),i=_t(),r=n+22,o=i.firstCreatePass?bu(i,r,1,t,null):i.data[r],s=e[r]=function Bb(n,t){return n.createText(t)}(e[11],t);gm(i,e,s,o),Fo(o,!1)}function ve(n){return xt("",n,""),ve}function xt(n,t,e){const i=W(),r=function wu(n,t,e,i){return wi(n,iu(),e)?t+je(e)+i:$e}(i,n,t,e);return r!==$e&&Os(i,Fi(),r),xt}function ya(n,t,e,i,r){const o=W(),s=Su(o,n,t,e,i,r);return s!==$e&&Os(o,Fi(),s),ya}const Pl=void 0;var Y9=["en",[["a","p"],["AM","PM"],Pl],[["AM","PM"],Pl,Pl],[["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"]],Pl,[["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"]],Pl,[["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}",Pl,"{1} 'at' {0}",Pl],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function K9(n){const e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let ku={};function ji(n){const t=function Q9(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=yx(t);if(e)return e;const i=t.split("-")[0];if(e=yx(i),e)return e;if("en"===i)return Y9;throw new j(701,!1)}function yx(n){return n in ku||(ku[n]=It.ng&&It.ng.common&&It.ng.common.locales&&It.ng.common.locales[n]),ku[n]}var ue=(()=>((ue=ue||{})[ue.LocaleId=0]="LocaleId",ue[ue.DayPeriodsFormat=1]="DayPeriodsFormat",ue[ue.DayPeriodsStandalone=2]="DayPeriodsStandalone",ue[ue.DaysFormat=3]="DaysFormat",ue[ue.DaysStandalone=4]="DaysStandalone",ue[ue.MonthsFormat=5]="MonthsFormat",ue[ue.MonthsStandalone=6]="MonthsStandalone",ue[ue.Eras=7]="Eras",ue[ue.FirstDayOfWeek=8]="FirstDayOfWeek",ue[ue.WeekendRange=9]="WeekendRange",ue[ue.DateFormat=10]="DateFormat",ue[ue.TimeFormat=11]="TimeFormat",ue[ue.DateTimeFormat=12]="DateTimeFormat",ue[ue.NumberSymbols=13]="NumberSymbols",ue[ue.NumberFormats=14]="NumberFormats",ue[ue.CurrencyCode=15]="CurrencyCode",ue[ue.CurrencySymbol=16]="CurrencySymbol",ue[ue.CurrencyName=17]="CurrencyName",ue[ue.Currencies=18]="Currencies",ue[ue.Directionality=19]="Directionality",ue[ue.PluralCase=20]="PluralCase",ue[ue.ExtraData=21]="ExtraData",ue))();const Au="en-US";let vx=Au;function jC(n,t,e,i,r){if(n=xe(n),Array.isArray(n))for(let o=0;o>20;if(Ol(n)||!n.multi){const p=new eh(l,r,O),f=zC(a,t,r?u:u+h,d);-1===f?(Tb(am(c,s),o,a),VC(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(p),s.push(p)):(e[f]=p,s[f]=p)}else{const p=zC(a,t,u+h,d),f=zC(a,t,u,u+h),_=f>=0&&e[f];if(r&&!_||!r&&!(p>=0&&e[p])){Tb(am(c,s),o,a);const b=function qU(n,t,e,i,r){const o=new eh(n,e,O);return o.multi=[],o.index=t,o.componentProviders=0,$x(o,r,i&&!e),o}(r?GU:WU,e.length,r,i,l);!r&&_&&(e[f].providerFactory=b),VC(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(b),s.push(b)}else VC(o,n,p>-1?p:f,$x(e[r?f:p],l,!r&&i));!r&&i&&_&&e[f].componentProviders++}}}function VC(n,t,e,i){const r=Ol(t),o=function cB(n){return!!n.useClass}(t);if(r||o){const l=(o?xe(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function $x(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function zC(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function $U(n,t,e){const i=_t();if(i.firstCreatePass){const r=yo(n);jC(e,i.data,i.blueprint,r,!0),jC(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class Nu{}class Wx{}class Gx extends Nu{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new hI(this);const i=function vr(n,t){const e=n[kn]||null;if(!e&&!0===t)throw new Error(`Type ${kt(n)} does not have '\u0275mod' property.`);return e}(t);this._bootstrapComponents=function xs(n){return n instanceof Function?n():n}(i.bootstrap),this._r3Injector=$E(t,e,[{provide:Nu,useValue:this},{provide:kl,useValue:this.componentFactoryResolver}],kt(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class UC extends Wx{constructor(t){super(),this.moduleType=t}create(t){return new Gx(this.moduleType,t)}}class YU extends Nu{constructor(t,e,i){super(),this.componentFactoryResolver=new hI(this),this.instance=null;const r=new IE([...t,{provide:Nu,useValue:this},{provide:kl,useValue:this.componentFactoryResolver}],e||Dm(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}let QU=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=DE(0,e.type),r=i.length>0?function Um(n,t,e=null){return new YU(n,t,e).injector}([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=K({token:n,providedIn:"environment",factory:()=>new n(U(Bo))}),n})();function Zt(n){n.getStandaloneInjector=t=>t.get(QU).getOrCreateStandaloneInjector(n)}function hn(n,t,e){const i=Ri()+n,r=W();return r[i]===$e?Ho(r,i,e?t.call(e):t()):yh(r,i)}function te(n,t,e,i){return tO(W(),Ri(),n,t,e,i)}function lt(n,t,e,i,r){return nO(W(),Ri(),n,t,e,i,r)}function Hr(n,t,e,i,r,o){return function iO(n,t,e,i,r,o,s,a){const l=t+e;return function Lm(n,t,e,i,r){const o=Nl(n,t,e,i);return wi(n,t+2,r)||o}(n,l,r,o,s)?Ho(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Mh(n,l+3)}(W(),Ri(),n,t,e,i,r,o)}function va(n,t,e,i,r,o,s){return function rO(n,t,e,i,r,o,s,a,l){const c=t+e;return Ur(n,c,r,o,s,a)?Ho(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Mh(n,c+4)}(W(),Ri(),n,t,e,i,r,o,s)}function $C(n,t,e,i){return function oO(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=Sl(i.type)),s=Xi(O);try{const a=sm(!1),l=o();return sm(a),function o9(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,W(),r,l),l}finally{Xi(s)}}function Je(n,t,e){const i=n+22,r=W(),o=nu(r,i);return Eh(r,i)?tO(r,Ri(),t,o.transform,e,o):o.transform(e)}function Hm(n,t,e,i){const r=n+22,o=W(),s=nu(o,r);return Eh(o,r)?nO(o,Ri(),t,s.transform,e,i,s):s.transform(e,i)}function Eh(n,t){return n[1].data[t].pure}function WC(n){return t=>{setTimeout(n,void 0,t)}}const R=class dH extends ye{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=WC(o),r&&(r=WC(r)),s&&(s=WC(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof ft&&t.add(a),a}};function hH(){return this._results[Al()]()}class Ih{get changes(){return this._changes||(this._changes=new R)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=Al(),i=Ih.prototype;i[e]||(i[e]=hH)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=function Br(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function NV(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=mH,n})();const pH=$r,fH=class extends pH{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=Mm(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),gC(i,r,t),new gh(r)}};function mH(){return $m(si(),W())}function $m(n,t){return 4&n.type?new fH(t,n,mu(n,t)):null}let ir=(()=>{class n{}return n.__NG_ELEMENT_ID__=gH,n})();function gH(){return lO(si(),W())}const _H=ir,sO=class extends _H{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return mu(this._hostTNode,this._hostLView)}get injector(){return new ou(this._hostTNode,this._hostLView)}get parentInjector(){const t=Db(this._hostTNode,this._hostLView);if(pM(t)){const e=om(t,this._hostLView),i=rm(t);return new ou(e[1].data[i+8],e)}return new ou(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=aO(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function ih(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?t:new _h(At(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Bo,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){const i=t._lView,r=i[1];if(function iV(n){return _o(n[3])}(i)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const d=i[3],h=new sO(d,d[6],d[3]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function Cz(n,t,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=10;d{class n{constructor(e){this.appInits=e,this.resolve=Gm,this.reject=Gm,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(U(Oh,8))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const kh=new oe("AppId",{providedIn:"root",factory:function AO(){return`${n0()}${n0()}${n0()}`}});function n0(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const NO=new oe("Platform Initializer"),Km=new oe("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),LO=new oe("appBootstrapListener"),PO=new oe("AnimationModuleType"),Ns=new oe("LocaleId",{providedIn:"root",factory:()=>se(Ns,ke.Optional|ke.SkipSelf)||function $H(){return typeof $localize<"u"&&$localize.locale||Au}()}),YH=(()=>Promise.resolve(0))();function r0(n){typeof Zone>"u"?YH.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class nt{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new R(!1),this.onMicrotaskEmpty=new R(!1),this.onStable=new R(!1),this.onError=new R(!1),typeof Zone>"u")throw new j(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function QH(){let n=It.requestAnimationFrame,t=It.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function XH(n){const t=()=>{!function JH(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(It,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,s0(n),n.isCheckStableRunning=!0,o0(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),s0(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return VO(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),zO(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return VO(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),zO(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,s0(n),o0(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!nt.isInAngularZone())throw new j(909,!1)}static assertNotInAngularZone(){if(nt.isInAngularZone())throw new j(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,ZH,Gm,Gm);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const ZH={};function o0(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function s0(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function VO(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function zO(n){n._nesting--,o0(n)}class e7{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new R,this.onMicrotaskEmpty=new R,this.onStable=new R,this.onError=new R}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const BO=new oe(""),Ym=new oe("");let c0,a0=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,c0||(function t7(n){c0=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{nt.assertNotInAngularZone(),r0(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())r0(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!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(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(U(nt),U(l0),U(Ym))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),l0=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return c0?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),ba=null;const UO=new oe("AllowMultipleToken"),u0=new oe("PlatformDestroyListeners");function WO(n,t,e=[]){const i=`Platform: ${t}`,r=new oe(i);return(o=[])=>{let s=d0();if(!s||s.injector.get(UO,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function r7(n){if(ba&&!ba.get(UO,!1))throw new j(400,!1);ba=n;const t=n.get(qO);(function $O(n){const t=n.get(NO,null);t&&t.forEach(e=>e())})(n)}(function GO(n=[],t){return Ci.create({name:t,providers:[{provide:rC,useValue:"platform"},{provide:u0,useValue:new Set([()=>ba=null])},...n]})}(a,i))}return function s7(n){const t=d0();if(!t)throw new j(401,!1);return t}()}}function d0(){return ba?.get(qO)??null}let qO=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function YO(n,t){let e;return e="noop"===n?new e7:("zone.js"===n?void 0:n)||new nt(t),e}(i?.ngZone,function KO(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:nt,useValue:r}];return r.run(()=>{const s=Ci.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(_u,null);if(!l)throw new j(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qm(this._modules,a),c.unsubscribe()})}),function QO(n,t,e){try{const i=e();return vh(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(qm);return c.runInitializers(),c.donePromise.then(()=>(function bx(n){Ji(n,"Expected localeId to be defined"),"string"==typeof n&&(vx=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ns,Au)||Au),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=ZO({},i);return function n7(n,t,e){const i=new UC(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Rl);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new j(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new j(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(u0,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(U(Ci))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function ZO(n,t){return Array.isArray(t)?t.reduce(ZO,n):{...n,...t}}let Rl=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new mt(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new mt(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{nt.assertNotInAngularZone(),r0(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{nt.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ys(o,s.pipe(function Uf(){return n=>_l()(function Bf(n,t){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof t)return i.lift(new qv(r,t));const o=Object.create(i,Gv);return o.source=i,o.subjectFactory=r,o}}(vs)(n))}()))}bootstrap(e,i){const r=e instanceof OE;if(!this._injector.get(qm).done)throw!r&&function Zc(n){const t=At(n)||_i(n)||Li(n);return null!==t&&t.standalone}(e),new j(405,false);let s;s=r?e:this._injector.get(kl).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function i7(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Nu),c=s.create(Ci.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(BO,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qm(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new j(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qm(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(LO,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qm(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new j(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(U(nt),U(Bo),U(_u))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Qm(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let Tt=(()=>{class n{}return n.__NG_ELEMENT_ID__=c7,n})();function c7(n){return function u7(n,t,e){if(Jd(n)&&!e){const i=wr(n.index,t);return new gh(i,i)}return 47&n.type?new gh(t[16],t):null}(si(),W(),16==(16&n))}class nk{constructor(){}supports(t){return Nm(t)}create(t){return new g7(t)}}const m7=(n,t)=>t;class g7{constructor(t){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=t||m7}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new _7(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ik),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ik),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class _7{constructor(t,e){this.item=t,this.trackById=e,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 y7{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ik{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new y7,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function rk(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new b7(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class b7{constructor(t){this.key=t,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 sk(){return new Ah([new nk])}let Ah=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||sk()),deps:[[n,new sh,new oh]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new j(901,!1)}}return n.\u0275prov=K({token:n,providedIn:"root",factory:sk}),n})();function ak(){return new Nh([new ok])}let Nh=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||ak()),deps:[[n,new sh,new oh]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new j(901,!1)}}return n.\u0275prov=K({token:n,providedIn:"root",factory:ak}),n})();const S7=WO(null,"core",[]);let D7=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(U(Rl))},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({}),n})();let g0=null;function Wo(){return g0}class I7{}const Jt=new oe("DocumentToken");var rr=(()=>((rr=rr||{})[rr.Decimal=0]="Decimal",rr[rr.Percent=1]="Percent",rr[rr.Currency=2]="Currency",rr[rr.Scientific=3]="Scientific",rr))(),Ne=(()=>((Ne=Ne||{})[Ne.Decimal=0]="Decimal",Ne[Ne.Group=1]="Group",Ne[Ne.List=2]="List",Ne[Ne.PercentSign=3]="PercentSign",Ne[Ne.PlusSign=4]="PlusSign",Ne[Ne.MinusSign=5]="MinusSign",Ne[Ne.Exponential=6]="Exponential",Ne[Ne.SuperscriptingExponent=7]="SuperscriptingExponent",Ne[Ne.PerMille=8]="PerMille",Ne[Ne.Infinity=9]="Infinity",Ne[Ne.NaN=10]="NaN",Ne[Ne.TimeSeparator=11]="TimeSeparator",Ne[Ne.CurrencyDecimal=12]="CurrencyDecimal",Ne[Ne.CurrencyGroup=13]="CurrencyGroup",Ne))();function Wr(n,t){const e=ji(n),i=e[ue.NumberSymbols][t];if(typeof i>"u"){if(t===Ne.CurrencyDecimal)return e[ue.NumberSymbols][Ne.Decimal];if(t===Ne.CurrencyGroup)return e[ue.NumberSymbols][Ne.Group]}return i}const a6=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function E0(n){const t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function wk(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const x0=/\s+/,Sk=[];let Lt=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=Sk,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(x0):Sk}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(x0):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(x0).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(O(Ah),O(Nh),O(qe),O(Vn))},n.\u0275dir=de({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class v6{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}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 Un=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new v6(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),Mk(a,r)}});for(let r=0,o=i.length;r{Mk(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(Ah))},n.\u0275dir=de({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function Mk(n,t){n.context.$implicit=t.item}let Ge=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new C6,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Ek("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Ek("ngIfElse",e),this._elseTemplateRef=e,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(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r))},n.\u0275dir=de({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class C6{constructor(){this.$implicit=null,this.ngIf=null}}function Ek(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${kt(t)}'.`)}class O0{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Fs=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=de({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),Vl=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new O0(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(Fs,9))},n.\u0275dir=de({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),Rh=(()=>{class n{constructor(e,i,r){r._addDefault(new O0(e,i))}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(Fs,9))},n.\u0275dir=de({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),fn=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:tr.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Nh),O(Vn))},n.\u0275dir=de({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Zn=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(O(ir))},n.\u0275dir=de({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]}),n})();function Do(n,t){return new j(2100,!1)}class S6{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class D6{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const T6=new D6,M6=new S6;let zl=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(vh(e))return T6;if(EI(e))return M6;throw Do()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(O(Tt,16))},n.\u0275pipe=Tn({name:"async",type:n,pure:!1,standalone:!0}),n})(),k0=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw Do();return e.toLowerCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Tn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})(),Ak=(()=>{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function A0(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{return function p6(n,t,e){return function T0(n,t,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(n)){let c=function m6(n){let i,r,o,s,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(o=t.search(/e/i))>0?(r<0&&(r=o),r+=+t.slice(o+1),t=t.substring(0,o)):r<0&&(r=t.length),o=0;"0"===t.charAt(o);o++);if(o===(a=t.length))i=[0],r=1;else{for(a--;"0"===t.charAt(a);)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(t.charAt(o))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);s&&(c=function f6(n){if(0===n.digits[0])return n;const t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let u=t.minInt,d=t.minFrac,h=t.maxFrac;if(o){const T=o.match(a6);if(null===T)throw new Error(`${o} is not a valid digit info`);const M=T[1],w=T[3],N=T[5];null!=M&&(u=E0(M)),null!=w&&(d=E0(w)),null!=N?h=E0(N):null!=w&&d>h&&(h=d)}!function g6(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen;const o=Math.min(Math.max(t,r),e);let s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r=c?f.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}(c,d,h);let p=c.digits,f=c.integerLen;const m=c.exponent;let _=[];for(l=p.every(T=>!T);f0?_=p.splice(f,p.length):(_=p,p=[0]);const b=[];for(p.length>=t.lgSize&&b.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)b.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&b.unshift(p.join("")),a=b.join(Wr(e,i)),_.length&&(a+=Wr(e,r)+_.join("")),m&&(a+=Wr(e,Ne.Exponential)+"+"+m)}else a=Wr(e,Ne.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,function M0(n,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(";"),r=i[0],o=i[1],s=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf("#"));for(let u=0;u{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({}),n})();class Pk{}class v$ extends I7{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class R0 extends v${static makeCurrent(){!function E7(n){g0||(g0=n)}(new R0)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function b$(){return jh=jh||document.querySelector("base"),jh?jh.getAttribute("href"):null}();return null==e?null:function C$(n){cg=cg||document.createElement("a"),cg.setAttribute("href",n);const t=cg.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){jh=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return wk(document.cookie,t)}}let cg,jh=null;const Bk=new oe("TRANSITION_ID"),S$=[{provide:Oh,useFactory:function w$(n,t,e){return()=>{e.get(qm).donePromise.then(()=>{const i=Wo(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const ug=new oe("EventManagerPlugins");let dg=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),Vh=(()=>{class n extends Hk{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach($k),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach($k))}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function $k(n){Wo().remove(n)}const F0={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/MathML/"},j0=/%COMP%/g;function V0(n,t){return t.flat(100).map(e=>e.replace(j0,n))}function qk(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let hg=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new z0(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case B.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new k$(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case B.ShadowDom:return new A$(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=V0(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(U(dg),U(Vh),U(kh))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class z0{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(F0[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(Yk(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Yk(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const o=F0[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=F0[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(tr.DashCase|tr.Important)?t.style.setProperty(e,i,r&tr.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&tr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,qk(i)):this.eventManager.addEventListener(t,e,qk(i))}}function Yk(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class k$ extends z0{constructor(t,e,i,r){super(t),this.component=i;const o=V0(r+"-"+i.id,i.styles);e.addStyles(o),this.contentAttr=function I$(n){return"_ngcontent-%COMP%".replace(j0,n)}(r+"-"+i.id),this.hostAttr=function x$(n){return"_nghost-%COMP%".replace(j0,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class A$ extends z0{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=V0(r.id,r.styles);for(let s=0;s{class n extends Uk{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const Qk=["alt","control","meta","shift"],L$={"\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"},P$={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let R$=(()=>{class n extends Uk{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Wo().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),Qk.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=L$[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),Qk.forEach(s=>{s!==r&&(0,P$[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const Jk=[{provide:Km,useValue:"browser"},{provide:NO,useValue:function F$(){R0.makeCurrent()},multi:!0},{provide:Jt,useFactory:function V$(){return function Lz(n){Qb=n}(document),document},deps:[]}],z$=WO(S7,"browser",Jk),Xk=new oe(""),eA=[{provide:Ym,useClass:class D${addToWindow(t){It.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},It.getAllAngularTestabilities=()=>t.getAllTestabilities(),It.getAllAngularRootElements=()=>t.getAllRootElements(),It.frameworkStabilizers||(It.frameworkStabilizers=[]),It.frameworkStabilizers.push(i=>{const r=It.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Wo().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:BO,useClass:a0,deps:[nt,l0,Ym]},{provide:a0,useClass:a0,deps:[nt,l0,Ym]}],tA=[{provide:rC,useValue:"root"},{provide:_u,useFactory:function j$(){return new _u},deps:[]},{provide:ug,useClass:N$,multi:!0,deps:[Jt,nt,Km]},{provide:ug,useClass:R$,multi:!0,deps:[Jt]},{provide:hg,useClass:hg,deps:[dg,Vh,kh]},{provide:fh,useExisting:hg},{provide:Hk,useExisting:Vh},{provide:Vh,useClass:Vh,deps:[Jt]},{provide:dg,useClass:dg,deps:[ug,nt]},{provide:Pk,useClass:T$,deps:[]},[]];let nA=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:kh,useValue:e.appId},{provide:Bk,useExisting:kh},S$]}}}return n.\u0275fac=function(e){return new(e||n)(U(Xk,12))},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({providers:[...tA,...eA],imports:[Be,D7]}),n})();typeof window<"u"&&window;let H0=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:function(e){let i=null;return i=e?new(e||n):U($0),i},providedIn:"root"}),n})(),$0=(()=>{class n extends H0{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Qt.NONE:return i;case Qt.HTML:return Vo(i,"HTML")?Dr(i):yE(this._doc,String(i)).toString();case Qt.STYLE:return Vo(i,"Style")?Dr(i):i;case Qt.SCRIPT:if(Vo(i,"Script"))return Dr(i);throw new Error("unsafe value used in a script context");case Qt.URL:return Vo(i,"URL")?Dr(i):bm(String(i));case Qt.RESOURCE_URL:if(Vo(i,"ResourceURL"))return Dr(i);throw new Error(`unsafe value used in a resource URL context (see ${Bc})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Bc})`)}}bypassSecurityTrustHtml(e){return function Bz(n){return new Pz(n)}(e)}bypassSecurityTrustStyle(e){return function Uz(n){return new Rz(n)}(e)}bypassSecurityTrustScript(e){return function Hz(n){return new Fz(n)}(e)}bypassSecurityTrustUrl(e){return function $z(n){return new jz(n)}(e)}bypassSecurityTrustResourceUrl(e){return function Wz(n){return new Vz(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:function(e){let i=null;return i=e?new e:function Y$(n){return new $0(n.get(Jt))}(U(Ci)),i},providedIn:"root"}),n})();function $t(n,t){return function(i){return i.lift(new Q$(n,t))}}class Q${constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new Z$(t,this.predicate,this.thisArg))}}class Z$ extends ut{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}const sA=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})(),To=new mt(n=>n.complete());function pg(n){return n?function J$(n){return new mt(t=>n.schedule(()=>t.complete()))}(n):To}function Wt(n){return t=>0===n?pg():t.lift(new X$(n))}class X${constructor(t){if(this.total=t,this.total<0)throw new sA}call(t,e){return e.subscribe(new eW(t,this.total))}}class eW extends ut{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}class zi extends ye{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new po;return this._value}next(t){super.next(this._value=t)}}function fg(n,t){return new mt(e=>{const i=n.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(t?t.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let aA=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(qe))},n.\u0275dir=de({type:n}),n})(),Bl=(()=>{class n extends aA{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=function Qn(n){return Po(()=>{const t=n.prototype.constructor,e=t[Ct]||Mb(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[Ct]||Mb(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}(n)))(i||n)}}(),n.\u0275dir=de({type:n,features:[Nt]}),n})();const Cn=new oe("NgValueAccessor"),iW={provide:Cn,useExisting:Ue(()=>qr),multi:!0},oW=new oe("CompositionEventMode");let qr=(()=>{class n extends aA{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function rW(){const n=Wo()?Wo().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(qe),O(oW,8))},n.\u0275dir=de({type:n,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(e,i){1&e&&P("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Ie([iW]),Nt]}),n})();function wa(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function cA(n){return null!=n&&"number"==typeof n.length}const li=new oe("NgValidators"),Sa=new oe("NgAsyncValidators"),aW=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Kr{static min(t){return function uA(n){return t=>{if(wa(t.value)||wa(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(wa(t.value)||wa(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function hA(n){return wa(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function pA(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function fA(n){return wa(n.value)||aW.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function mA(n){return t=>wa(t.value)||!cA(t.value)?null:t.value.lengthcA(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function _A(n){if(!n)return mg;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(wa(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return SA(t)}static composeAsync(t){return DA(t)}}function mg(n){return null}function yA(n){return null!=n}function vA(n){return vh(n)?Kt(n):n}function bA(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function CA(n,t){return t.map(e=>e(n))}function wA(n){return n.map(t=>function lW(n){return!n.validate}(t)?t:e=>t.validate(e))}function SA(n){if(!n)return null;const t=n.filter(yA);return 0==t.length?null:function(e){return bA(CA(e,t))}}function W0(n){return null!=n?SA(wA(n)):null}function DA(n){if(!n)return null;const t=n.filter(yA);return 0==t.length?null:function(e){return function tW(...n){if(1===n.length){const t=n[0];if(ri(t))return fg(t,null);if(cl(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return fg(e.map(i=>t[i]),e)}}if("function"==typeof n[n.length-1]){const t=n.pop();return fg(n=1===n.length&&ri(n[0])?n[0]:n,null).pipe(me(e=>t(...e)))}return fg(n,null)}(CA(e,t).map(vA)).pipe(me(bA))}}function G0(n){return null!=n?DA(wA(n)):null}function TA(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function MA(n){return n._rawValidators}function EA(n){return n._rawAsyncValidators}function q0(n){return n?Array.isArray(n)?n:[n]:[]}function gg(n,t){return Array.isArray(n)?n.includes(t):n===t}function IA(n,t){const e=q0(t);return q0(n).forEach(r=>{gg(e,r)||e.push(r)}),e}function xA(n,t){return q0(t).filter(e=>!gg(n,e))}class OA{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(t){this._rawValidators=t||[],this._composedValidatorFn=W0(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=G0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class rt extends OA{get formDirective(){return null}get path(){return null}}class Go extends OA{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class kA{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let $n=(()=>{class n extends kA{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Go,2))},n.\u0275dir=de({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Si("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Nt]}),n})(),js=(()=>{class n extends kA{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(rt,10))},n.\u0275dir=de({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Si("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Nt]}),n})();const zh="VALID",yg="INVALID",Fu="PENDING",Bh="DISABLED";function Z0(n){return(vg(n)?n.validators:n)||null}function J0(n,t){return(vg(t)?t.asyncValidators:n)||null}function vg(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function NA(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function LA(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new j(1002,"")})}class bg{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===zh}get invalid(){return this.status===yg}get pending(){return this.status==Fu}get disabled(){return this.status===Bh}get enabled(){return this.status!==Bh}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(IA(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(IA(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(xA(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(xA(t,this._rawAsyncValidators))}hasValidator(t){return gg(this._rawValidators,t)}hasAsyncValidator(t){return gg(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=Fu,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Bh,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=zh,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===zh||this.status===Fu)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Bh:zh}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=Fu,this._hasOwnPendingAsyncValidator=!0;const e=vA(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new R,this.statusChanges=new R}_calculateStatus(){return this._allControlsDisabled()?Bh:this.errors?yg:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Fu)?Fu:this._anyControlsHaveStatus(yg)?yg:zh}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){vg(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function mW(n){return Array.isArray(n)?W0(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function gW(n){return Array.isArray(n)?G0(n):n||null}(this._rawAsyncValidators)}}class Da extends bg{constructor(t,e,i){super(Z0(e),J0(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){LA(this,0,t),Object.keys(t).forEach(i=>{NA(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class PA extends Da{}const ju=new oe("CallSetDisabledState",{providedIn:"root",factory:()=>Cg}),Cg="always";function wg(n,t){return[...t.path,n]}function Uh(n,t,e=Cg){X0(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function yW(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&RA(n,t)})}(n,t),function bW(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function vW(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&RA(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function _W(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Sg(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Tg(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Dg(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function X0(n,t){const e=MA(n);null!==t.validator?n.setValidators(TA(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=EA(n);null!==t.asyncValidator?n.setAsyncValidators(TA(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Dg(t._rawValidators,r),Dg(t._rawAsyncValidators,r)}function Tg(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=MA(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=EA(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return Dg(t._rawValidators,i),Dg(t._rawAsyncValidators,i),e}function RA(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function tw(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function nw(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===qr?e=o:function SW(n){return Object.getPrototypeOf(n.constructor)===Bl}(o)?i=o:r=o}),r||i||e||null}function VA(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function zA(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Vs=class extends bg{constructor(t=null,e,i){super(Z0(e),J0(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),vg(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=zA(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){VA(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){VA(this._onDisabledChange,t)}_forEachChild(t){}_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(t){zA(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},IW={provide:Go,useExisting:Ue(()=>$h)},HA=(()=>Promise.resolve())();let $h=(()=>{class n extends Go{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Vs,this._registered=!1,this.update=new R,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=nw(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),tw(e,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(e){this.viewModel=e,this.update.emit(e)}_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(){Uh(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(e){HA.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&function Ru(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);HA.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?wg(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(O(rt,9),O(li,10),O(Sa,10),O(Cn,10),O(Tt,8),O(ju,8))},n.\u0275dir=de({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ie([IW]),Nt,Yn]}),n})(),zs=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=de({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),WA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({}),n})();const rw=new oe("NgModelWithFormControlWarning"),LW={provide:rt,useExisting:Ue(()=>Yr)};let Yr=(()=>{class n extends rt{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new R,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Tg(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Uh(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Sg(e.control||null,e,!1),function DW(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function jA(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Sg(i||null,e),(n=>n instanceof Vs)(r)&&(Uh(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function FA(n,t){X0(n,t)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function CW(n,t){return Tg(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){X0(this.form,this),this._oldForm&&Tg(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(O(li,10),O(Sa,10),O(ju,8))},n.\u0275dir=de({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&P("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ie([LW]),Nt,Yn]}),n})();const FW={provide:Go,useExisting:Ue(()=>Jn)};let Jn=(()=>{class n extends Go{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new R,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=nw(0,o)}ngOnChanges(e){this._added||this._setUpControl(),tw(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return wg(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(O(rt,13),O(li,10),O(Sa,10),O(Cn,10),O(rw,8))},n.\u0275dir=de({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ie([FW]),Nt,Yn]}),n})(),a2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[WA]}),n})();class l2 extends bg{constructor(t,e,i){super(Z0(e),J0(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){LA(this,0,t),t.forEach((i,r)=>{NA(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function c2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let Wh=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return c2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Da(r,o)}record(e,i=null){const r=this._reduceControls(e);return new PA(r,i)}control(e,i,r){let o={};return this.useNonNullable?(c2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Vs(e,{...o,nonNullable:!0})):new Vs(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new l2(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Vs||e instanceof bg?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Hl=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:ju,useValue:e.callSetDisabledState??Cg}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[a2]}),n})(),Wn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:rw,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:ju,useValue:e.callSetDisabledState??Cg}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[a2]}),n})();const JW=["editor"];let eG=(()=>{class n{constructor(e,i){this.ngZone=e,this.monacoPathConfig=i,this.isMonacoLoaded$=new zi(!1),this._monacoPath="assets/monaco-editor/min/vs",window.monacoEditorAlreadyInitialized?e.run(()=>this.isMonacoLoaded$.next(!0)):(window.monacoEditorAlreadyInitialized=!0,this.monacoPathConfig&&(this.monacoPath=this.monacoPathConfig),this.loadMonaco())}set monacoPath(e){e&&(this._monacoPath=e)}loadMonaco(){const e=()=>{let s=this._monacoPath;window.amdRequire=window.require;const a=!!this.nodeRequire,l=s.includes("http");a&&(window.require=this.nodeRequire,l||(s=window.require("path").resolve(window.__dirname,this._monacoPath))),window.amdRequire.config({paths:{vs:s}}),window.amdRequire(["vs/editor/editor.main"],()=>{this.ngZone.run(()=>this.isMonacoLoaded$.next(!0))},c=>console.error("Error loading monaco-editor: ",c))};if(window.amdRequire)return e();window.require&&(this.addElectronFixScripts(),this.nodeRequire=window.require);const o=document.createElement("script");o.type="text/javascript",o.src=`${this._monacoPath}/loader.js`,o.addEventListener("load",e),document.body.appendChild(o)}addElectronFixScripts(){const e=document.createElement("script"),i=document.createTextNode("self.module = undefined;"),r=document.createTextNode("self.process.browser = true;");e.appendChild(i),e.appendChild(r),document.body.appendChild(e)}}return n.\u0275fac=function(e){return new(e||n)(U(nt),U("MONACO_PATH",8))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),u2=(()=>{class n{constructor(e){this.monacoLoader=e,this.init=new R,this.onTouched=()=>{},this.onErrorStatusChange=()=>{},this.propagateChange=()=>{}}get model(){return this.editor&&this.editor.getModel()}get modelMarkers(){return this.model&&monaco.editor.getModelMarkers({resource:this.model.uri})}ngOnInit(){this.monacoLoader.isMonacoLoaded$.pipe($t(e=>e),Wt(1)).subscribe(()=>{this.initEditor()})}ngOnChanges(e){if(this.editor&&e.options&&!e.options.firstChange){const{language:i,theme:r,...o}=e.options.currentValue,{language:s,theme:a}=e.options.previousValue;s!==i&&monaco.editor.setModelLanguage(this.editor.getModel(),this.options&&this.options.language?this.options.language:"text"),a!==r&&monaco.editor.setTheme(r),this.editor.updateOptions(o)}if(this.editor&&e.uri){const i=e.uri.currentValue,r=e.uri.previousValue;if(r&&!i||!r&&i||i&&r&&i.path!==r.path){const o=this.editor.getValue();let s;this.modelUriInstance&&this.modelUriInstance.dispose(),i&&(s=monaco.editor.getModels().find(a=>a.uri.path===i.path)),this.modelUriInstance=s||monaco.editor.createModel(o,this.options.language||"text",this.uri),this.editor.setModel(this.modelUriInstance)}}}writeValue(e){this.value=e,this.editor&&e?this.editor.setValue(e):this.editor&&this.editor.setValue("")}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.parsedError?{monaco:{value:this.parsedError.split("|")}}:null}registerOnValidatorChange(e){this.onErrorStatusChange=e}initEditor(){const e={value:[this.value].join("\n"),language:"text",automaticLayout:!0,scrollBeyondLastLine:!1,theme:"vc"};this.editor=monaco.editor.create(this.editorContent.nativeElement,this.options?{...e,...this.options}:e),this.registerEditorListeners(),this.init.emit(this.editor)}registerEditorListeners(){this.editor.onDidChangeModelContent(()=>{this.propagateChange(this.editor.getValue())}),this.editor.onDidChangeModelDecorations(()=>{const e=this.modelMarkers.map(({message:r})=>r).join("|");this.parsedError!==e&&(this.parsedError=e,this.onErrorStatusChange())}),this.editor.onDidBlurEditorText(()=>{this.onTouched()})}ngOnDestroy(){this.editor&&this.editor.dispose()}}return n.\u0275fac=function(e){return new(e||n)(O(eG))},n.\u0275cmp=Y({type:n,selectors:[["ngx-monaco-editor"]],viewQuery:function(e,i){if(1&e&&Ee(JW,7),2&e){let r;J(r=X())&&(i.editorContent=r.first)}},inputs:{options:"options",uri:"uri"},outputs:{init:"init"},features:[Ie([{provide:Cn,useExisting:Ue(()=>n),multi:!0},{provide:li,useExisting:Ue(()=>n),multi:!0}]),Yn],decls:4,vars:0,consts:[["fxFlex","",1,"editor-container"],["container",""],[1,"monaco-editor"],["editor",""]],template:function(e,i){1&e&&(S(0,"div",0,1),F(2,"div",2,3),D())},styles:[".monaco-editor[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;right:0}.editor-container[_ngcontent-%COMP%]{overflow:hidden;position:relative;display:table;width:100%;height:100%;min-width:0}"],changeDetection:0}),n})(),Mg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[[]]}),n})();function _e(...n){let t=n[n.length-1];return la(t)?(n.pop(),Vc(n,t)):ua(n)}class Eg{}class dw{}class Mr{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Mr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Mr;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Mr?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class tG{encodeKey(t){return d2(t)}encodeValue(t){return d2(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const iG=/%(\d[a-f0-9])/gi,rG={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function d2(n){return encodeURIComponent(n).replace(iG,(t,e)=>rG[e]??t)}function Ig(n){return`${n}`}class Bs{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new tG,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function nG(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(Ig):[Ig(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Bs({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(Ig(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(Ig(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class oG{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function h2(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function p2(n){return typeof Blob<"u"&&n instanceof Blob}function f2(n){return typeof FormData<"u"&&n instanceof FormData}class $l{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function sG(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Mr),this.context||(this.context=new oG),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,t.setHeaders[h]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,h)=>d.set(h,t.setParams[h]),c)),new $l(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var rn=(()=>((rn=rn||{})[rn.Sent=0]="Sent",rn[rn.UploadProgress=1]="UploadProgress",rn[rn.ResponseHeader=2]="ResponseHeader",rn[rn.DownloadProgress=3]="DownloadProgress",rn[rn.Response=4]="Response",rn[rn.User=5]="User",rn))();class hw{constructor(t,e=200,i="OK"){this.headers=t.headers||new Mr,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class pw extends hw{constructor(t={}){super(t),this.type=rn.ResponseHeader}clone(t={}){return new pw({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class xg extends hw{constructor(t={}){super(t),this.type=rn.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new xg({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class m2 extends hw{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function fw(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let Er=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof $l)o=e;else{let l,c;l=r.headers instanceof Mr?r.headers:new Mr(r.headers),r.params&&(c=r.params instanceof Bs?r.params:new Bs({fromObject:r.params})),o=new $l(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=_e(o).pipe(function Ta(n,t){return Dn(n,t,1)}(l=>this.handler.handle(l)));if(e instanceof $l||"events"===r.observe)return s;const a=s.pipe($t(l=>l instanceof xg));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(me(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(me(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(me(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(me(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Bs).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,fw(r,i))}post(e,i,r={}){return this.request("POST",e,fw(r,i))}put(e,i,r={}){return this.request("PUT",e,fw(r,i))}}return n.\u0275fac=function(e){return new(e||n)(U(Eg))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function g2(n,t){return t(n)}function lG(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const uG=new oe("HTTP_INTERCEPTORS"),Gh=new oe("HTTP_INTERCEPTOR_FNS");function dG(){let n=null;return(t,e)=>(null===n&&(n=(se(uG,{optional:!0})??[]).reduceRight(lG,g2)),n(t,e))}let _2=(()=>{class n extends Eg{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(Gh)));this.chain=i.reduceRight((r,o)=>function cG(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),g2)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(U(dw),U(Bo))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const mG=/^\)\]\}',?\n/;let v2=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new mt(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((p,f)=>r.setRequestHeader(p,f.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const p=e.detectContentTypeHeader();null!==p&&r.setRequestHeader("Content-Type",p)}if(e.responseType){const p=e.responseType.toLowerCase();r.responseType="json"!==p?p:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const p=r.statusText||"OK",f=new Mr(r.getAllResponseHeaders()),m=function gG(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new pw({headers:f,status:r.status,statusText:p,url:m}),s},l=()=>{let{headers:p,status:f,statusText:m,url:_}=a(),b=null;204!==f&&(b=typeof r.response>"u"?r.responseText:r.response),0===f&&(f=b?200:0);let T=f>=200&&f<300;if("json"===e.responseType&&"string"==typeof b){const M=b;b=b.replace(mG,"");try{b=""!==b?JSON.parse(b):null}catch(w){b=M,T&&(T=!1,b={error:w,text:b})}}T?(i.next(new xg({body:b,headers:p,status:f,statusText:m,url:_||void 0})),i.complete()):i.error(new m2({error:b,headers:p,status:f,statusText:m,url:_||void 0}))},c=p=>{const{url:f}=a(),m=new m2({error:p,status:r.status||0,statusText:r.statusText||"Unknown Error",url:f||void 0});i.error(m)};let u=!1;const d=p=>{u||(i.next(a()),u=!0);let f={type:rn.DownloadProgress,loaded:p.loaded};p.lengthComputable&&(f.total=p.total),"text"===e.responseType&&r.responseText&&(f.partialText=r.responseText),i.next(f)},h=p=>{let f={type:rn.UploadProgress,loaded:p.loaded};p.lengthComputable&&(f.total=p.total),i.next(f)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:rn.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(U(Pk))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const mw=new oe("XSRF_ENABLED"),b2="XSRF-TOKEN",C2=new oe("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>b2}),w2="X-XSRF-TOKEN",S2=new oe("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>w2});class D2{}let _G=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=wk(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(U(Jt),U(Km),U(C2))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function yG(n,t){const e=n.url.toLowerCase();if(!se(mw)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=se(D2).getToken(),r=se(S2);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var In=(()=>((In=In||{})[In.Interceptors=0]="Interceptors",In[In.LegacyInterceptors=1]="LegacyInterceptors",In[In.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",In[In.NoXsrfProtection=3]="NoXsrfProtection",In[In.JsonpSupport=4]="JsonpSupport",In[In.RequestsMadeViaParent=5]="RequestsMadeViaParent",In))();function Vu(n,t){return{\u0275kind:n,\u0275providers:t}}function vG(...n){const t=[Er,v2,_2,{provide:Eg,useExisting:_2},{provide:dw,useExisting:v2},{provide:Gh,useValue:yG,multi:!0},{provide:mw,useValue:!0},{provide:D2,useClass:_G}];for(const e of n)t.push(...e.\u0275providers);return function sB(n){return{\u0275providers:n}}(t)}const T2=new oe("LEGACY_INTERCEPTOR_FN");function CG({cookieName:n,headerName:t}){const e=[];return void 0!==n&&e.push({provide:C2,useValue:n}),void 0!==t&&e.push({provide:S2,useValue:t}),Vu(In.CustomXsrfConfiguration,e)}let Og=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({providers:[vG(Vu(In.LegacyInterceptors,[{provide:T2,useFactory:dG},{provide:Gh,useExisting:T2,multi:!0}]),CG({cookieName:b2,headerName:w2}))]}),n})();class wG extends ft{constructor(t,e){super()}schedule(t,e=0){return this}}class kg extends wG{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let M2=(()=>{class n{constructor(e,i=n.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return n.now=()=>Date.now(),n})();class Mo extends M2{constructor(t,e=M2.now){super(t,()=>Mo.delegate&&Mo.delegate!==this?Mo.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return Mo.delegate&&Mo.delegate!==this?Mo.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const gw=new class DG extends Mo{}(class SG extends kg{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}),TG=gw;function Ir(n,t){return new mt(t?e=>t.schedule(MG,0,{error:n,subscriber:e}):e=>e.error(n))}function MG({error:n,subscriber:t}){t.error(n)}class or{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return _e(this.value);case"E":return Ir(this.error);case"C":return pg()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new or("N",t):or.undefinedValueNotification}static createError(t){return new or("E",void 0,t)}static createComplete(){return or.completeNotification}}or.completeNotification=new or("C"),or.undefinedValueNotification=new or("N",void 0);class IG{constructor(t,e=0){this.scheduler=t,this.delay=e}call(t,e){return e.subscribe(new Ag(t,this.scheduler,this.delay))}}class Ag extends ut{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Ag.dispatch,this.delay,new xG(t,this.destination)))}_next(t){this.scheduleMessage(or.createNext(t))}_error(t){this.scheduleMessage(or.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(or.createComplete()),this.unsubscribe()}}class xG{constructor(t,e){this.notification=t,this.destination=e}}class Ng extends ye{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new OG(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new po;if(this.isStopped||this.hasError?s=ft.EMPTY:(this.observers.push(t),s=new jd(this,t)),r&&t.add(t=new Ag(t,r)),e)for(let a=0;ae&&(s=Math.max(s,o-e)),s>0&&r.splice(0,s),r}}class OG{constructor(t,e){this.time=t,this.value=e}}function xn(n,t){return"function"==typeof t?e=>e.pipe(xn((i,r)=>Kt(n(i,r)).pipe(me((o,s)=>t(i,o,r,s))))):e=>e.lift(new kG(n))}class kG{constructor(t){this.project=t}call(t,e){return e.subscribe(new AG(t,this.project))}}class AG extends ml{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new fl(this),r=this.destination;r.add(i),this.innerSubscription=gl(t,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const Lg={schedule(n,t){const e=setTimeout(n,t);return()=>clearTimeout(e)},scheduleBeforeRender(n){if(typeof window>"u")return Lg.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return Lg.schedule(n,16);const t=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(t)}};let _w;function BG(n,t,e){let i=e;return function LG(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&t.some((r,o)=>!("*"===r||!function RG(n,t){if(!_w){const e=Element.prototype;_w=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&_w.call(n,t)}(n,r)||(i=o,0))),i}class HG{constructor(t,e){this.componentFactory=e.get(kl).resolveComponentFactory(t)}create(t){return new $G(this.componentFactory,t)}}class $G{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new Ng(1),this.events=this.eventEmitters.pipe(xn(i=>ys(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(nt),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=Lg.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{null!==this.componentRef?function FG(n,t){return n===t||n!=n&&t!=t}(e,this.getInputValue(t))&&(void 0!==e||!this.unchangedInputs.has(t))||(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Ci.create({providers:[],parent:this.injector}),i=function zG(n,t){const e=n.childNodes,i=t.map(()=>[]);let r=-1;t.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=e.length;o{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:i,templateName:r})=>t.instance[i].pipe(me(s=>({name:r,value:s}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=Lg.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[t];if(i)return void(i.currentValue=e);const r=this.unchangedInputs.has(t),o=r?void 0:this.getInputValue(t);this.inputChanges[t]=new HT(o,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class WG extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}class E2{}class qG{}const Us="*";function Wl(n,t){return{type:7,name:n,definitions:t,options:{}}}function Bi(n,t=null){return{type:4,styles:t,timings:n}}function I2(n,t=null){return{type:2,steps:n,options:t}}function Pt(n){return{type:6,styles:n,offset:null}}function zu(n,t,e){return{type:0,name:n,styles:t,options:e}}function Ui(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function Pg(n,t=null){return{type:8,animation:n,options:t}}function Rg(n,t=null){return{type:10,animation:n,options:t}}function x2(n){Promise.resolve().then(n)}class qh{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){x2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class O2{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?x2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}function k2(n){return new j(3e3,!1)}function xq(){return typeof window<"u"&&typeof window.document<"u"}function vw(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ma(n){switch(n.length){case 0:return new qh;case 1:return n[0];default:return new O2(n)}}function A2(n,t,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,p=h&&c||new Map;u.forEach((f,m)=>{let _=m,b=f;if("offset"!==m)switch(_=t.normalizePropertyName(_,s),b){case"!":b=r.get(m);break;case Us:b=o.get(m);break;default:b=t.normalizeStyleValue(m,_,b,s)}p.set(_,b)}),h||a.push(p),c=p,l=d}),s.length)throw function _q(n){return new j(3502,!1)}();return a}function bw(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&Cw(e,"start",n)));break;case"done":n.onDone(()=>i(e&&Cw(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&Cw(e,"destroy",n)))}}function Cw(n,t,e){const o=ww(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function ww(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function xr(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function N2(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let Sw=(n,t)=>!1,L2=(n,t,e)=>[],P2=null;function Dw(n){const t=n.parentNode||n.host;return t===P2?null:t}(vw()||typeof Element<"u")&&(xq()?(P2=(()=>document.documentElement)(),Sw=(n,t)=>{for(;t;){if(t===n)return!0;t=Dw(t)}return!1}):Sw=(n,t)=>n.contains(t),L2=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let Gl=null,R2=!1;const F2=Sw,j2=L2;let V2=(()=>{class n{validateStyleProperty(e){return function kq(n){Gl||(Gl=function Aq(){return typeof document<"u"?document.body:null}()||{},R2=!!Gl.style&&"WebkitAppearance"in Gl.style);let t=!0;return Gl.style&&!function Oq(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in Gl.style,!t&&R2&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Gl.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return F2(e,i)}getParentElement(e){return Dw(e)}query(e,i,r){return j2(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new qh(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),Tw=(()=>{class n{}return n.NOOP=new V2,n})();const Mw="ng-enter",Fg="ng-leave",jg="ng-trigger",Vg=".ng-trigger",B2="ng-animating",Ew=".ng-animating";function Hs(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Iw(parseFloat(t[1]),t[2])}function Iw(n,t){return"s"===t?1e3*n:n}function zg(n,t,e){return n.hasOwnProperty("duration")?n:function Pq(n,t,e){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(k2()),{duration:0,delay:0,easing:""};r=Iw(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=Iw(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function YG(){return new j(3100,!1)}()),a=!0),o<0&&(t.push(function QG(){return new j(3101,!1)}()),a=!0),a&&t.splice(l,0,k2())}return{duration:r,delay:o,easing:s}}(n,t,e)}function Kh(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function U2(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Ea(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function $2(n,t,e){return e?t+":"+e+";":""}function W2(n){let t="";for(let e=0;e{const o=Ow(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),vw()&&W2(n))}function ql(n,t){n.style&&(t.forEach((e,i)=>{const r=Ow(i);n.style[r]=""}),vw()&&W2(n))}function Yh(n){return Array.isArray(n)?1==n.length?n[0]:I2(n):n}const xw=new RegExp("{{\\s*(.+?)\\s*}}","g");function G2(n){let t=[];if("string"==typeof n){let e;for(;e=xw.exec(n);)t.push(e[1]);xw.lastIndex=0}return t}function Qh(n,t,e){const i=n.toString(),r=i.replace(xw,(o,s)=>{let a=t[s];return null==a&&(e.push(function JG(n){return new j(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function Bg(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const jq=/-+([a-z0-9])/g;function Ow(n){return n.replace(jq,(...t)=>t[1].toUpperCase())}function Vq(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Or(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function XG(n){return new j(3004,!1)}()}}function q2(n,t){return window.getComputedStyle(n)[t]}function Wq(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function Gq(n,t,e){if(":"==n[0]){const l=function qq(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function hq(n){return new j(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(K2(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(K2(s,r))}(i,e,t)):e.push(n),e}const Wg=new Set(["true","1"]),Gg=new Set(["false","0"]);function K2(n,t){const e=Wg.has(n)||Gg.has(n),i=Wg.has(t)||Gg.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?Wg.has(n):Gg.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?Wg.has(t):Gg.has(t)),s&&a}}const Kq=new RegExp("s*:selfs*,?","g");function kw(n,t,e,i){return new Yq(n).build(t,e,i)}class Yq{constructor(t){this._driver=t}build(t,e,i){const r=new Jq(e);return this._resetContextStyleTimingState(r),Or(this,Yh(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function tq(){return new j(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function nq(){return new j(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{G2(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Bg(o.values()),e.errors.push(function iq(n,t){return new j(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Or(this,Yh(t.animation),e);return{type:1,matchers:Wq(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:Kl(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Or(this,i,e)),options:Kl(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=Or(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:Kl(t.options)}}visitAnimate(t,e){const i=function eK(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return Aw(zg(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=Aw(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=zg(e,t);return Aw(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:Pt({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Pt(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Us?i.push(a):e.errors.push(new j(3002,!1)):i.push(U2(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function oq(n,t,e,i,r){return new j(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function Fq(n,t,e){const i=t.params||{},r=G2(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function ZG(n){return new j(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function sq(){return new j(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(b=>{const T=this._makeStyleAst(b,e);let M=null!=T.offset?T.offset:function Xq(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(T.styles),w=0;return null!=M&&(o++,w=T.offset=M),l=l||w<0||w>1,a=a||w0&&o{const M=h>0?T==p?1:h*T:s[T],w=M*_;e.currentTime=f+m.delay+w,m.duration=w,this._validateStyleAst(b,e),b.offset=M,i.styles.push(b)}),i}visitReference(t,e){return{type:8,animation:Or(this,Yh(t.animation),e),options:Kl(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:Kl(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:Kl(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function Qq(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(Kq,"")),n=n.replace(/@\*/g,Vg).replace(/@\w+/g,e=>Vg+"-"+e.slice(1)).replace(/:animating/g,Ew),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,xr(e.collectedStyles,e.currentQuerySelector,new Map);const a=Or(this,Yh(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:Kl(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function uq(){return new j(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:zg(t.timings,e.errors,!0);return{type:12,animation:Or(this,Yh(t.animation),e),timings:i,options:null}}}class Jq{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function Kl(n){return n?(n=Kh(n)).params&&(n.params=function Zq(n){return n?Kh(n):null}(n.params)):n={},n}function Aw(n,t,e){return{duration:n,delay:t,easing:e}}function Nw(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class qg{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const iK=new RegExp(":enter","g"),oK=new RegExp(":leave","g");function Lw(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new sK).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}class sK{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new qg;const d=new Pw(t,e,c,r,o,u,[]);d.options=l;const h=l.delay?Hs(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),Or(this,i,d);const p=d.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){const _=p[m];if(_.element===e){f=_;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,d.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[Nw(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Hs(Qh(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Hs(i.duration):null,a=null!=i.delay?Hs(i.delay):null;return 0!==s&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Or(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Kg);const s=Hs(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Or(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?Hs(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),Or(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return zg(e.params?Qh(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Hs(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Kg);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),Or(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;Or(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Kg={};class Pw{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Kg,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Yg(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Hs(i.duration)),null!=i.delay&&(r.delay=Hs(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Qh(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new Pw(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Kg,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new aK(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(iK,"."+this._enterClassName)).replace(oK,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function dq(n){return new j(3014,!1)}()),a}}class Yg{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Yg(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Us),this._currentKeyframe.set(e,Us);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function lK(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,Us)}else Ea(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Qh(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Us),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Ea(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===Us&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=t.size?Bg(t.values()):[],s=e.size?Bg(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Nw(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class aK extends Yg{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Ea(t[0]);l.set("offset",0),o.push(l);const c=Ea(t[0]);c.set("offset",Z2(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let h=Ea(t[d]);const p=h.get("offset");h.set("offset",Z2((e+p*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return Nw(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function Z2(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class Rw{}const cK=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class uK extends Rw{normalizePropertyName(t,e){return Ow(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(cK.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function eq(n,t){return new j(3005,!1)}())}return s+o}}function J2(n,t,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const Fw={};class X2{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function dK(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||Fw,f=this.buildStyles(i,a&&a.params||Fw,d),m=l&&l.params||Fw,_=this.buildStyles(r,m,d),b=new Set,T=new Map,M=new Map,w="void"===r,N={params:hK(m,h),delay:this.ast.options?.delay},k=u?[]:Lw(t,e,this.ast.animation,o,s,f,_,N,c,d);let $=0;if(k.forEach(he=>{$=Math.max(he.duration+he.delay,$)}),d.length)return J2(e,this._triggerName,i,r,w,f,_,[],[],T,M,$,d);k.forEach(he=>{const De=he.element,st=xr(T,De,new Set);he.preStyleProps.forEach(Qe=>st.add(Qe));const et=xr(M,De,new Set);he.postStyleProps.forEach(Qe=>et.add(Qe)),De!==e&&b.add(De)});const V=Bg(b.values());return J2(e,this._triggerName,i,r,w,f,_,k,V,T,M,$)}}function hK(n,t){const e=Kh(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class pK{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=Kh(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Qh(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class mK{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new pK(r.style,r.options&&r.options.params||{},i))}),eN(this.states,"true","1"),eN(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new X2(t,r,this.states))}),this.fallbackTransition=function gK(n,t,e){return new X2(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function eN(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const _K=new qg;class yK{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],o=kw(this._driver,e,i,[]);if(i.length)throw function yq(n){return new j(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=A2(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=Lw(this._driver,e,o,Mw,Fg,new Map,new Map,i,_K,r),s.forEach(u=>{const d=xr(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function vq(){return new j(3300,!1)}()),s=[]),r.length)throw function bq(n){return new j(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,p)=>{u.set(p,this._driver.computeStyle(d,p,Us))})});const c=Ma(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function Cq(n){return new j(3301,!1)}();return e}listen(t,e,i,r){const o=ww(e,"","","");return bw(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const tN="ng-animate-queued",jw="ng-animate-disabled",SK=[],nN={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},DK={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Qr="__ng_removed";class Vw{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function IK(n){return n??null}(i?t.value:t),i){const o=Kh(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Zh="void",zw=new Vw(Zh);class TK{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Zr(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function wq(n,t){return new j(3302,!1)}();if(null==i||0==i.length)throw function Sq(n){return new j(3303,!1)}();if(!function xK(n){return"start"==n||"done"==n}(i))throw function Dq(n,t){return new j(3400,!1)}();const o=xr(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=xr(this._engine.statesByElement,t,new Map);return a.has(e)||(Zr(t,jg),Zr(t,jg+"-"+e),a.set(e,zw)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function Tq(n){return new j(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new Bw(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Zr(t,jg),Zr(t,jg+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new Vw(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=zw),c.value!==Zh&&l.value===c.value){if(!function AK(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{ql(t,_),qo(t,b)})}return}const h=xr(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,c.value,t,c.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:p,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Zr(t,tN),s.onStart(()=>{Bu(t,tN)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const _=this._engine.playersByElement.get(t);if(_){let b=_.indexOf(s);b>=0&&_.splice(b,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,Vg,!0);i.forEach(r=>{if(r[Qr])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,Zh,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&Ma(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||zw,u=new Vw(Zh),d=new Bw(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Qr];(!o||o===nN)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Zr(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=ww(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,bw(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class MK{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new TK(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Qg(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Qg(e))return;const o=e[Qr];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Zr(t,jw)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Bu(t,jw))}removeNode(t,e,i,r){if(Qg(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Qr]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Qg(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,Vg,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,Ew,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ma(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Qr];if(e&&e.setForRemoval){if(t[Qr]=nN,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(jw)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ma(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function Mq(n){return new j(3402,!1)}()}_flushAnimations(t,e){const i=new qg,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Q=>{u.add(Q);const ee=this.driver.query(Q,".ng-animate-queued",!0);for(let ne=0;ne{const ne=Mw+m++;f.set(ee,ne),Q.forEach(Ce=>Zr(Ce,ne))});const _=[],b=new Set,T=new Set;for(let Q=0;Qb.add(Ce)):T.add(ee))}const M=new Map,w=oN(h,Array.from(b));w.forEach((Q,ee)=>{const ne=Fg+m++;M.set(ee,ne),Q.forEach(Ce=>Zr(Ce,ne))}),t.push(()=>{p.forEach((Q,ee)=>{const ne=f.get(ee);Q.forEach(Ce=>Bu(Ce,ne))}),w.forEach((Q,ee)=>{const ne=M.get(ee);Q.forEach(Ce=>Bu(Ce,ne))}),_.forEach(Q=>{this.processLeaveNode(Q)})});const N=[],k=[];for(let Q=this._namespaceList.length-1;Q>=0;Q--)this._namespaceList[Q].drainQueuedTransitions(e).forEach(ne=>{const Ce=ne.player,at=ne.element;if(N.push(Ce),this.collectedEnterElements.length){const _n=at[Qr];if(_n&&_n.setForMove){if(_n.previousTriggersValues&&_n.previousTriggersValues.has(ne.triggerName)){const mi=_n.previousTriggersValues.get(ne.triggerName),Kn=this.statesByElement.get(ne.element);if(Kn&&Kn.has(ne.triggerName)){const jr=Kn.get(ne.triggerName);jr.value=mi,Kn.set(ne.triggerName,jr)}}return void Ce.destroy()}}const zt=!d||!this.driver.containsElement(d,at),Ot=M.get(at),sn=f.get(at),St=this._buildInstruction(ne,i,sn,Ot,zt);if(St.errors&&St.errors.length)return void k.push(St);if(zt)return Ce.onStart(()=>ql(at,St.fromStyles)),Ce.onDestroy(()=>qo(at,St.toStyles)),void r.push(Ce);if(ne.isFallbackTransition)return Ce.onStart(()=>ql(at,St.fromStyles)),Ce.onDestroy(()=>qo(at,St.toStyles)),void r.push(Ce);const fr=[];St.timelines.forEach(_n=>{_n.stretchStartingKeyframe=!0,this.disabledNodes.has(_n.element)||fr.push(_n)}),St.timelines=fr,i.append(at,St.timelines),s.push({instruction:St,player:Ce,element:at}),St.queriedElements.forEach(_n=>xr(a,_n,[]).push(Ce)),St.preStyleProps.forEach((_n,mi)=>{if(_n.size){let Kn=l.get(mi);Kn||l.set(mi,Kn=new Set),_n.forEach((jr,_s)=>Kn.add(_s))}}),St.postStyleProps.forEach((_n,mi)=>{let Kn=c.get(mi);Kn||c.set(mi,Kn=new Set),_n.forEach((jr,_s)=>Kn.add(_s))})});if(k.length){const Q=[];k.forEach(ee=>{Q.push(function Eq(n,t){return new j(3505,!1)}())}),N.forEach(ee=>ee.destroy()),this.reportError(Q)}const $=new Map,V=new Map;s.forEach(Q=>{const ee=Q.element;i.has(ee)&&(V.set(ee,ee),this._beforeAnimationBuild(Q.player.namespaceId,Q.instruction,$))}),r.forEach(Q=>{const ee=Q.element;this._getPreviousPlayers(ee,!1,Q.namespaceId,Q.triggerName,null).forEach(Ce=>{xr($,ee,[]).push(Ce),Ce.destroy()})});const he=_.filter(Q=>aN(Q,l,c)),De=new Map;rN(De,this.driver,T,c,Us).forEach(Q=>{aN(Q,l,c)&&he.push(Q)});const et=new Map;p.forEach((Q,ee)=>{rN(et,this.driver,new Set(Q),l,"!")}),he.forEach(Q=>{const ee=De.get(Q),ne=et.get(Q);De.set(Q,new Map([...Array.from(ee?.entries()??[]),...Array.from(ne?.entries()??[])]))});const Qe=[],qt=[],gn={};s.forEach(Q=>{const{element:ee,player:ne,instruction:Ce}=Q;if(i.has(ee)){if(u.has(ee))return ne.onDestroy(()=>qo(ee,Ce.toStyles)),ne.disabled=!0,ne.overrideTotalTime(Ce.totalTime),void r.push(ne);let at=gn;if(V.size>1){let Ot=ee;const sn=[];for(;Ot=Ot.parentNode;){const St=V.get(Ot);if(St){at=St;break}sn.push(Ot)}sn.forEach(St=>V.set(St,at))}const zt=this._buildAnimation(ne.namespaceId,Ce,$,o,et,De);if(ne.setRealPlayer(zt),at===gn)Qe.push(ne);else{const Ot=this.playersByElement.get(at);Ot&&Ot.length&&(ne.parentPlayer=Ma(Ot)),r.push(ne)}}else ql(ee,Ce.fromStyles),ne.onDestroy(()=>qo(ee,Ce.toStyles)),qt.push(ne),u.has(ee)&&r.push(ne)}),qt.forEach(Q=>{const ee=o.get(Q.element);if(ee&&ee.length){const ne=Ma(ee);Q.setRealPlayer(ne)}}),r.forEach(Q=>{Q.parentPlayer?Q.syncPlayerEvents(Q.parentPlayer):Q.destroy()});for(let Q=0;Q<_.length;Q++){const ee=_[Q],ne=ee[Qr];if(Bu(ee,Fg),ne&&ne.hasAnimation)continue;let Ce=[];if(a.size){let zt=a.get(ee);zt&&zt.length&&Ce.push(...zt);let Ot=this.driver.query(ee,Ew,!0);for(let sn=0;sn!zt.destroyed);at.length?OK(this,ee,at):this.processLeaveNode(ee)}return _.length=0,Qe.forEach(Q=>{this.players.push(Q),Q.onDone(()=>{Q.destroy();const ee=this.players.indexOf(Q);this.players.splice(ee,1)}),Q.play()}),Qe}elementContainsData(t,e){let i=!1;const r=e[Qr];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==Zh;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=xr(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(p=>{const f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),d.push(p)})}ql(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(f=>{const m=f.element;u.add(m);const _=m[Qr];if(_&&_.removedBeforeQueried)return new qh(f.duration,f.delay);const b=m!==l,T=function kK(n){const t=[];return sN(n,t),t}((i.get(m)||SK).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),M=o.get(m),w=s.get(m),N=A2(0,this._normalizer,0,f.keyframes,M,w),k=this._buildPlayer(f,N,T);if(f.subTimeline&&r&&d.add(m),b){const $=new Bw(t,a,m);$.setRealPlayer(k),c.push($)}return k});c.forEach(f=>{xr(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>function EK(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,f.element,f))}),u.forEach(f=>Zr(f,B2));const p=Ma(h);return p.onDestroy(()=>{u.forEach(f=>Bu(f,B2)),qo(l,e.toStyles)}),d.forEach(f=>{xr(r,f,[]).push(p)}),p}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new qh(t.duration,t.delay)}}class Bw{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new qh,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>bw(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){xr(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Qg(n){return n&&1===n.nodeType}function iN(n,t){const e=n.style.display;return n.style.display=t??"none",e}function rN(n,t,e,i,r){const o=[];e.forEach(l=>o.push(iN(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=t.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Qr]=DK,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>iN(l,o[a++])),s}function oN(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&e.get(l).push(a)}),e}function Zr(n,t){n.classList?.add(t)}function Bu(n,t){n.classList?.remove(t)}function OK(n,t,e){Ma(e).onDone(()=>n.processLeaveNode(t))}function sN(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Zg{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new MK(t,e,i),this._timelineEngine=new yK(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=kw(this._driver,o,l,[]);if(l.length)throw function gq(n,t){return new j(3404,!1)}();a=function fK(n,t,e){return new mK(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=N2(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=N2(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let LK=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&qo(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(qo(this._element,this._initialStyles),this._endStyles&&(qo(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(ql(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ql(this._element,this._endStyles),this._endStyles=null),qo(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function Uw(n){let t=null;return n.forEach((e,i)=>{(function PK(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class lN{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:q2(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class RK{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return F2(t,e)}getParentElement(t){return Dw(t)}query(t,e,i){return j2(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(p=>p instanceof lN);(function zq(n,t){return 0===n||0===t})(i,r)&&u.forEach(p=>{p.currentSnapshot.forEach((f,m)=>c.set(m,f))});let d=function Rq(n){return n.length?n[0]instanceof Map?n:n.map(t=>U2(t)):[]}(e).map(p=>Ea(p));d=function Bq(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,q2(n,a)))}}return t}(t,d,c);const h=function NK(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=Uw(t[0]),t.length>1&&(i=Uw(t[t.length-1]))):t instanceof Map&&(e=Uw(t)),e||i?new LK(n,e,i):null}(t,d);return new lN(t,d,l,h)}}let FK=(()=>{class n extends E2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:B.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?I2(e):e;return cN(this._renderer,null,i,"register",[r]),new jK(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(U(fh),U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class jK extends qG{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new VK(this._id,t,e||{},this._renderer)}}class VK{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return cN(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function cN(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const uN="@.disabled";let zK=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new dN("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new BK(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(U(fh),U(Zg),U(nt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class dN{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==uN?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class BK extends dN{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==uN?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function UK(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function HK(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let $K=(()=>{class n extends Zg{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(U(Jt),U(Tw),U(Rw),U(Rl))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const hN=[{provide:E2,useClass:FK},{provide:Rw,useFactory:function WK(){return new uK}},{provide:Zg,useClass:$K},{provide:fh,useFactory:function GK(n,t,e){return new zK(n,t,e)},deps:[hg,Zg,nt]}],Hw=[{provide:Tw,useFactory:()=>new RK},{provide:PO,useValue:"BrowserAnimations"},...hN],pN=[{provide:Tw,useClass:V2},{provide:PO,useValue:"NoopAnimations"},...hN];let qK=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?pN:Hw}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({providers:Hw,imports:[nA]}),n})();function ci(n){return function(e){const i=new ZK(n),r=e.lift(i);return i.caught=r}}class ZK{constructor(t){this.selector=t}call(t,e){return e.subscribe(new JK(t,this.selector,this.caught))}}class JK extends ml{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new fl(this);this.add(i);const r=gl(e,i);r!==i&&this.add(r)}}}Object.create(Error.prototype);class yN extends ut{notifyNext(t,e,i,r,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class iY extends ut{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function vN(n,t,e,i,r=new iY(n,e,i)){if(!r.closed)return t instanceof mt?t.subscribe(r):gr(t)(r)}const bN={};class rY{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new oY(t,this.resultSelector))}}class oY extends yN{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(bN),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(Ju||(Ju={})),Ju))();getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70");let QZ=(()=>{class n{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),gp=class{constructor(t){this.iconPath=t.iconPath}displayErrorMessage(t){this.displayMessage("Error",t,"error")}displaySuccessMessage(t){this.displayMessage("Success",t,"success")}displayInfoMessage(t){this.displayMessage("Info",t,"info")}displayMessage(t,e,i){let r;return r=new Notification(i,{body:e,icon:this.iconPath+"/"+i+".png"}),r}};function on(...n){const t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return e=>me(function eJ(n,t){return i=>{let r=i;for(let o=0;ori(r)?i(...r):i(r))):new mt(r=>{LL(n,t,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function LL(n,t,e,i,r){let o;if(function iJ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(t,e,r),o=()=>s.removeEventListener(t,e,r)}else if(function nJ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(t,e),o=()=>s.off(t,e)}else if(function tJ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(t,e),o=()=>s.removeListener(t,e)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}([hm("config"),function qZ(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}("design:paramtypes",[QZ])],gp);const PL=n=>{const t=parseInt(n,0);if(t)return t;try{return JSON.parse(n)}catch{return n}};let rJ=(()=>{class n{setItem(e,i){let r;r="object"==typeof i?JSON.stringify(i):i,localStorage.setItem(e,r)}getItem(e){const i=localStorage.getItem(e);return PL(i)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}listen(e){return S_(window,"storage").pipe($t(({key:i})=>i===e),me(i=>PL(i.newValue)))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),ka=(()=>{class n{constructor(e,i){this.http=e,this.dotLocalstorageService=i,this.messageMap={},this.MESSAGES_LOCALSTORAGE_KEY="dotMessagesKeys",this.BUILDATE_LOCALSTORAGE_KEY="buildDate"}init(e){if(e&&(this.dotLocalstorageService.getItem(this.BUILDATE_LOCALSTORAGE_KEY)!==e?.buildDate||e.language))this.getAll(e.language||"default"),e.buildDate&&this.dotLocalstorageService.setItem(this.BUILDATE_LOCALSTORAGE_KEY,e.buildDate);else{const i=this.dotLocalstorageService.getItem(this.MESSAGES_LOCALSTORAGE_KEY);i?this.messageMap=i:this.getAll(e?.language||"default")}}get(e,...i){return this.messageMap[e]?i.length?function XZ(n,t){return n.replace(/{(\d+)}/g,(e,i)=>typeof t[i]<"u"?t[i]:e)}(this.messageMap[e],i):this.messageMap[e]:e}getAll(e){this.http.get(this.geti18nURL(e)).pipe(Wt(1),on("entity")).subscribe(i=>{this.messageMap=i,this.dotLocalstorageService.setItem(this.MESSAGES_LOCALSTORAGE_KEY,this.messageMap)})}geti18nURL(e){return`/api/v2/languages/${e||"default"}/keys`}}return n.\u0275fac=function(e){return new(e||n)(U(Er),U(rJ))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const cJ=[{icon:"tune",titleKey:"com.dotcms.repackage.javax.portlet.title.rules",url:"/rules"},{icon:"cloud_upload",titleKey:"com.dotcms.repackage.javax.portlet.title.publishing-queue",url:"/c/publishing-queue"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.site-search",url:"/c/site-search"},{icon:"person",titleKey:"com.dotcms.repackage.javax.portlet.title.personas",url:"/c/c_Personas"},{icon:"update",titleKey:"com.dotcms.repackage.javax.portlet.title.time-machine",url:"/c/time-machine"},{icon:"device_hub",titleKey:"com.dotcms.repackage.javax.portlet.title.workflow-schemes",url:"/c/workflow-schemes"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.es-search",url:"/c/es-search"},{icon:"business",titleKey:"Forms-and-Form-Builder",url:"/forms"},{icon:"apps",titleKey:"com.dotcms.repackage.javax.portlet.title.apps",url:"/apps"},{icon:"integration_instructions",titleKey:"com.dotcms.repackage.javax.portlet.title.velocity",url:"/c/velocity_playground"}];let RL=(()=>{class n{constructor(e){this.http=e,this.unlicenseData=new zi({icon:"",titleKey:"",url:""}),this.licenseURL="/api/v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(me(e=>e.level>=200))}canAccessEnterprisePortlet(e){return this.isEnterprise().pipe(Wt(1),me(i=>{const r=this.checksIfEnterpriseUrl(e);return!r||r&&i}))}checksIfEnterpriseUrl(e){const i=cJ.filter(r=>0===e.indexOf(r.url));return i.length&&this.unlicenseData.next(...i),!!i.length}getLicense(){return this.license?_e(this.license):this.http.get(this.licenseURL).pipe(on("entity","config","license"),Mt(e=>{this.setLicense(e)}))}updateLicense(){this.http.get(this.licenseURL).pipe(on("entity","config","license")).subscribe(e=>{this.setLicense(e)})}setLicense(e){this.license={...e}}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function FL(n,t,e,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function Xu(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(l){FL(o,i,r,s,a,"next",l)}function a(l){FL(o,i,r,s,a,"throw",l)}s(void 0)})}}const dJ={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};let _p=(()=>{class n{uploadFile({file:e,maxSize:i,signal:r}){return"string"==typeof e?this.uploadFileByURL(e,r):this.uploadBinaryFile({file:e,maxSize:i,signal:r})}uploadFileByURL(e,i){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:i,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:e})}).then(function(){var o=Xu(function*(s){if(200===s.status)return(yield s.json()).tempFiles[0];throw{message:(yield s.json()).message,status:s.status}});return function(s){return o.apply(this,arguments)}}()).catch(o=>{const{message:s,response:a}=o,l="string"==typeof a?JSON.parse(a):a;throw this.errorHandler(l||{message:s},o.status)})}uploadBinaryFile({file:e,maxSize:i,signal:r}){let o="/api/v1/temp";o+=i?`?maxFileLength=${i}`:"";const s=new FormData;return s.append("file",e),fetch(o,{method:"POST",signal:r,headers:{Origin:window.location.hostname},body:s}).then(function(){var a=Xu(function*(l){if(200===l.status)return(yield l.json()).tempFiles[0];throw{message:(yield l.json()).message,status:l.status}});return function(l){return a.apply(this,arguments)}}()).catch(a=>{throw this.errorHandler(JSON.parse(a.response),a.status)})}errorHandler(e,i){let r="";try{r=e.message||e.errors[0].message}catch{r=dJ[i||500]}return{message:r,status:500|i}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Oe{static equals(t,e,i){return i?this.resolveFieldData(t,i)===this.resolveFieldData(e,i):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var o,s,a,i=Array.isArray(t),r=Array.isArray(e);if(i&&r){if((s=t.length)!=e.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(i!=r)return!1;var l=t instanceof Date,c=e instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var h=Object.keys(t);if((s=h.length)!==Object.keys(e).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[a=h[o]],e[a]))return!1;return!0}return t!=t&&e!=e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(-1==e.indexOf("."))return t[e];{let i=e.split("."),r=t;for(let o=0,s=i.length;o=t.length&&(i%=t.length,e%=t.length),t.splice(i,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,t),o=!0;break}o||i.push(t)}else i.push(t)}static findIndexInList(t,e){let i=-1;if(e)for(let r=0;r-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}static isEmpty(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length}static isNotEmpty(t){return!this.isEmpty(t)}static compare(t,e,i,r=1){let o=-1;const s=this.isEmpty(t),a=this.isEmpty(e);return o=s&&a?0:s?r:a?-r:"string"==typeof t&&"string"==typeof e?t.localeCompare(e,i,{numeric:!0}):te?1:0,o}static sort(t,e,i=1,r,o=1){return(1===o?i:o)*Oe.compare(t,e,r,i)}static merge(t,e){if(null!=t||null!=e)return null!=t&&"object"!=typeof t||null!=e&&"object"!=typeof e?null!=t&&"string"!=typeof t||null!=e&&"string"!=typeof e?e||t:[t||"",e||""].join(" "):{...t||{},...e||{}}}}var jL=0;function D_(){return"pr_id_"+ ++jL}var $i=function fJ(){let n=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return n.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{n=n.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>n.length>0?n[n.length-1].value:0}}();const VL=["*"];let Di=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),w1=(()=>{class n{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return Oe.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Oe.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Oe.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r),s=Oe.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Oe.removeAccents(e.toString()).toLocaleLowerCase(r)==Oe.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Oe.removeAccents(e.toString()).toLocaleLowerCase(r)==Oe.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=Oe.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),mJ=(()=>{class n{constructor(){this.messageSource=new ye,this.clearSource=new ye,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),yp=(()=>{class n{constructor(){this.clickSource=new ye,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Eo=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[Di.STARTS_WITH,Di.CONTAINS,Di.NOT_CONTAINS,Di.ENDS_WITH,Di.EQUALS,Di.NOT_EQUALS],numeric:[Di.EQUALS,Di.NOT_EQUALS,Di.LESS_THAN,Di.LESS_THAN_OR_EQUAL_TO,Di.GREATER_THAN,Di.GREATER_THAN_OR_EQUAL_TO],date:[Di.DATE_IS,Di.DATE_IS_NOT,Di.DATE_BEFORE,Di.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new ye,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation={...this.translation,...e},this.translationSource.next(this.translation)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),T_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-header"]],ngContentSelectors:VL,decls:1,vars:0,template:function(e,i){1&e&&(ai(),ln(0))},encapsulation:2}),n})(),M_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-footer"]],ngContentSelectors:VL,decls:1,vars:0,template:function(e,i){1&e&&(ai(),ln(0))},encapsulation:2}),n})(),mn=(()=>{class n{constructor(e){this.template=e}getType(){return this.name}}return n.\u0275fac=function(e){return new(e||n)(O($r))},n.\u0275dir=de({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),wn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be]}),n})(),Ln=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),A=(()=>{class n{static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(e)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let p,f;a.top+s+o.height>u.height?(p=a.top-h.top-o.height,e.style.transformOrigin="bottom",a.top+p<0&&(p=-1*a.top)):(p=s+a.top-h.top,e.style.transformOrigin="top"),f=o.width>u.width?-1*(a.left-h.left):a.left-h.left+o.width>u.width?-1*(a.left-h.left+o.width-u.width):a.left-h.left,e.style.top=p+"px",e.style.left=f+"px"}static absolutePosition(e,i){const r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();let p,f;c.top+a+o>h.height?(p=c.top+u-o,e.style.transformOrigin="bottom",p<0&&(p=u)):(p=a+c.top+u,e.style.transformOrigin="top"),f=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=p+"px",e.style.left=f+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,p=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+p>h&&(e.scrollTop=d+u-h+p)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||null===e.offsetParent}static isVisible(e){return e&&null!=e.offsetParent}static isExist(e){return null!==e&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableElements(e){let i=n.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)(o.offsetWidth||o.offsetHeight||o.getClientRects().length)&&r.push(o);return r}static getNextFocusableElement(e,i=!1){const r=n.getFocusableElements(e);let o=0;if(r&&r.length>0){const s=r.indexOf(r[0].ownerDocument.activeElement);i?o=-1==s||0===s?r.length-1:s-1:-1!=s&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,i){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:const r=typeof e;if("string"===r)return document.querySelector(e);if("object"===r&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;const s=(a=e)&&a.constructor&&a.call&&a.apply?e():e;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class E_{constructor(t,e=(()=>{})){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=A.getScrollableParents(this.element);for(let t=0;t{class n{constructor(e,i,r){this.el=e,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(A.removeClass(i,"p-ink-active"),!A.getHeight(i)&&!A.getWidth(i)){let a=Math.max(A.getOuterWidth(this.el.nativeElement),A.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=A.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-A.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-A.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",A.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&A.removeClass(a,"p-ink-active")},401)}getInk(){const e=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be]}),n})();function gJ(n,t){1&n&&ce(0)}const _J=function(n,t,e,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":t,"p-button-icon-top":e,"p-button-icon-bottom":i}};function yJ(n,t){if(1&n&&F(0,"span",4),2&n){const e=y();Ke(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),g("ngClass",va(4,_J,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),pe("aria-hidden",!0)}}function vJ(n,t){if(1&n&&(S(0,"span",5),H(1),D()),2&n){const e=y();pe("aria-hidden",e.icon&&!e.label),v(1),ve(e.label)}}function bJ(n,t){if(1&n&&(S(0,"span",4),H(1),D()),2&n){const e=y();Ke(e.badgeClass),g("ngClass",e.badgeStyleClass()),v(1),ve(e.badge)}}const CJ=function(n,t,e,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":t,"p-disabled":e,"p-button-loading":i,"p-button-loading-label-only":r}},wJ=["*"],ic={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"};let Nr=(()=>{class n{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(ic)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){A.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const e=[ic.button,ic.component];return this.icon&&!this.label&&Oe.isEmpty(this.htmlElement.textContent)&&e.push(ic.iconOnly),this.loading&&(e.push(ic.disabled,ic.loading),!this.icon&&this.label&&e.push(ic.labelOnly)),e}setStyleClass(){const e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(this.label){let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",e.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(e)}}createIcon(){if(this.icon||this.loading){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&A.addClass(e,i);let r=this.getIconClass();r&&A.addMultipleClasses(e,r),this.htmlElement.insertBefore(e,this.htmlElement.firstChild)}}updateLabel(){let e=A.findSingle(this.htmlElement,".p-button-label");this.label?e?e.textContent=this.label:this.createLabel():e&&this.htmlElement.removeChild(e)}updateIcon(){let e=A.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():e&&this.htmlElement.removeChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),ed=(()=>{class n{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new R,this.onFocus=new R,this.onBlur=new R}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-button"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:wJ,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(e,i){1&e&&(ai(),S(0,"button",0),P("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),ln(1),C(2,gJ,1,0,"ng-container",1),C(3,yJ,1,9,"span",2),C(4,vJ,2,2,"span",3),C(5,bJ,2,4,"span",2),D()),2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function Xx(n,t,e,i,r,o,s,a){const l=Ri()+n,c=W(),u=Ur(c,l,e,i,r,o);return wi(c,l+4,s)||u?Ho(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):yh(c,l+5)}(11,CJ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),pe("type",i.type)("aria-label",i.ariaLabel),v(2),g("ngTemplateOutlet",i.contentTemplate),v(1),g("ngIf",!i.contentTemplate&&(i.icon||i.loading)),v(1),g("ngIf",!i.contentTemplate&&i.label),v(1),g("ngIf",!i.contentTemplate&&i.badge))},dependencies:[Lt,Ge,Zn,fn,Xr],encapsulation:2,changeDetection:0}),n})(),di=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be,Ar]}),n})(),I_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be]}),n})();const SJ=["*"];var Aa=(()=>(function(n){n.FILE_TYPE_MISMATCH="FILE_TYPE_MISMATCH",n.MAX_FILE_SIZE_EXCEEDED="MAX_FILE_SIZE_EXCEEDED",n.MULTIPLE_FILES_DROPPED="MULTIPLE_FILES_DROPPED"}(Aa||(Aa={})),Aa))();let DJ=(()=>{class n{constructor(){this.fileDropped=new R,this.fileDragEnter=new R,this.fileDragOver=new R,this.fileDragLeave=new R,this._accept=[],this.errorsType=[],this._validity={fileTypeMismatch:!1,maxFileSizeExceeded:!1,multipleFilesDropped:!1,errorsType:[],valid:!0}}set accept(e){this._accept=e?.filter(i=>"*/*"!==i).map(i=>i.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(e){e.stopPropagation(),e.preventDefault();const{dataTransfer:i}=e,r=this.getFiles(i),o=1===r?.length?r[0]:null;0!==r.length&&(this.setValidity(r),i.items?.clear(),i.clearData(),this.fileDropped.emit({file:o,validity:this._validity}))}onDragEnter(e){e.stopPropagation(),e.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(e){e.stopPropagation(),e.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(e){e.stopPropagation(),e.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(e){if(!this._accept.length)return!0;const i=e.name.split(".").pop().toLowerCase(),r=e.type.toLowerCase(),o=this._accept.some(s=>r.includes(s)||s.includes(`.${i}`));return o||this.errorsType.push(Aa.FILE_TYPE_MISMATCH),o}getFiles(e){const{items:i,files:r}=e;return i?Array.from(i).filter(o=>"file"===o.kind).map(o=>o.getAsFile()):Array.from(r)||[]}isFileTooLong(e){if(!this.maxFileSize)return!1;const i=e.size>this.maxFileSize;return i&&this.errorsType.push(Aa.MAX_FILE_SIZE_EXCEEDED),i}multipleFilesDropped(e){const i=e.length>1;return i&&this.errorsType.push(Aa.MULTIPLE_FILES_DROPPED),i}setValidity(e){this.errorsType=[];const i=e[0],r=this.multipleFilesDropped(e),o=!this.typeMatch(i),s=this.isFileTooLong(i);this._validity={...this._validity,multipleFilesDropped:r,fileTypeMismatch:o,maxFileSizeExceeded:s,errorsType:this.errorsType,valid:!o&&!s&&!r}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-drop-zone"]],hostBindings:function(e,i){1&e&&P("drop",function(o){return i.onDrop(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragover",function(o){return i.onDragOver(o)})("dragleave",function(o){return i.onDragLeave(o)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[Zt],ngContentSelectors:SJ,decls:1,vars:0,template:function(e,i){1&e&&(ai(),ln(0))},dependencies:[Be],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0}),n})(),Zo=(()=>{class n{constructor(e){this.dotMessageService=e}transform(e,i=[]){return e?this.dotMessageService.get(e,...i):""}}return n.\u0275fac=function(e){return new(e||n)(O(ka,16))},n.\u0275pipe=Tn({name:"dm",type:n,pure:!0,standalone:!0}),n})();function Rt(n){return t=>t.lift(new NJ(n))}class NJ{constructor(t){this.notifier=t}call(t,e){const i=new LJ(t),r=gl(this.notifier,new fl(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class LJ extends ml{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function PJ(n,t){if(1&n&&(S(0,"small",1),H(1),We(2,"dm"),D()),2&n){const e=y();v(1),xt(" ",Je(2,1,e.errorMsg),"\n")}}const x_={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};let S1=(()=>{class n{constructor(e,i){this.cd=e,this.dotMessageService=i,this.errorMsg="",this.destroy$=new ye}set message(e){this.defaultMessage=e,this.cd.markForCheck()}set field(e){e&&(this._field=e,e.statusChanges.pipe(Rt(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(e.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(e){let i=[];return e&&(i=[...this.getMsgDefaultValidators(e),...this.getMsgCustomsValidators(e)]),this.defaultMessage?this.defaultMessage:i.slice(0,1)[0]}getMsgDefaultValidators(e){let i=[];return Object.entries(e).forEach(([r,o])=>{if(r in x_){let s="";const{requiredLength:a,requiredPattern:l}=o;switch(r){case"maxlength":s=this.dotMessageService.get(x_[r],a);break;case"pattern":s=this.dotMessageService.get(this.patternErrorMessage||x_[r],l);break;default:s=x_[r]}i=[...i,s]}}),i}getMsgCustomsValidators(e){let i=[];return Object.entries(e).forEach(([,r])=>{"string"==typeof r&&(i=[...i,r])}),i}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(ka))},n.\u0275cmp=Y({type:n,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[Zt],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(e,i){1&e&&C(0,PJ,3,3,"small",0),2&e&&g("ngIf",i._field&&i._field.enabled&&i._field.dirty&&!i._field.valid)},dependencies:[Ge,Zo],encapsulation:2,changeDetection:0}),n})();function RJ(n,t){if(1&n){const e=q();S(0,"img",4),P("error",function(){return I(e),x(y().handleError())}),D()}if(2&n){const e=y();g("src",e.src,zo)("title",e.name)("alt",e.name)}}function FJ(n,t){if(1&n){const e=q();S(0,"video",5),P("error",function(){return I(e),x(y().handleError())}),F(1,"source",6),D()}if(2&n){const e=y();v(1),g("src",e.src,zo)}}const jJ=function(n){return["pi",n]},VJ=function(n){return{"font-size":n,color:"var(--color-palette-secondary-400)"}};function zJ(n,t){if(1&n&&F(0,"i",7),2&n){const e=y();g("ngClass",te(2,jJ,e.thumbnailIcon))("ngStyle",te(4,VJ,e.iconSize))}}const BJ={html:"pi-file",pdf:"pi-file-pdf",image:"pi-image",video:"pi-video",msword:"pi-file-word",doc:"pi-file-word",docx:"pi-file-word"};var td=(()=>(function(n){n.image="image",n.video="video",n.icon="icon"}(td||(td={})),td))();let UJ=(()=>{class n{constructor(){this.CONTENT_THUMBNAIL_TYPE=td,this.DEFAULT_ICON="pi-file",this.thumbnailUrlMap={image:this.getImageThumbnailUrl.bind(this),video:this.getVideoThumbnailUrl.bind(this),pdf:this.getPdfThumbnailUrl.bind(this)}}get iconSize(){return this._iconSize||"1rem"}get name(){return this._name||""}ngOnInit(){this.buildThumbnail()}handleError(){this.thumbnailType=this.CONTENT_THUMBNAIL_TYPE.icon}setProperties(){const{tempUrl:e,inode:i,name:r,contentType:o,titleImage:s,iconSize:a}=this.dotThumbanilOptions;this._tempUrl=e,this._inode=i,this._name=r,this._contentType=o,this._titleImage=s,this._iconSize=a,this._type=this._contentType.split("/")[0]}buildThumbnail(){this.setProperties(),this.setSrc(),this.setThumbnailType(),this.setThumbnailIcon()}setThumbnailType(){this.thumbnailType=td[this._type]||td.icon}setSrc(){this.src=this._tempUrl||this.thumbnailUrlMap[this._type]?.()}setThumbnailIcon(){const e=this._name.split(".").pop();this.thumbnailIcon=BJ[e]||this.DEFAULT_ICON}getPdfThumbnailUrl(){return`/contentAsset/image/${this._inode}/${this._titleImage}/pdf_page/1/resize_w/250/quality_q/45`}getImageThumbnailUrl(){return`/dA/${this._inode}/500w/50q`}getVideoThumbnailUrl(){return`/dA/${this._inode}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-content-thumbnail"]],inputs:{dotThumbanilOptions:"dotThumbanilOptions"},standalone:!0,features:[Zt],decls:4,vars:3,consts:[[3,"ngSwitch"],["data-testId","thumbail-image",3,"src","title","alt","error",4,"ngSwitchCase"],["controls","","data-testId","thumbail-video",3,"error",4,"ngSwitchCase"],["data-testId","thumbail-icon",3,"ngClass","ngStyle",4,"ngSwitchDefault"],["data-testId","thumbail-image",3,"src","title","alt","error"],["controls","","data-testId","thumbail-video",3,"error"],[3,"src"],["data-testId","thumbail-icon",3,"ngClass","ngStyle"]],template:function(e,i){1&e&&(ae(0,0),C(1,RJ,1,3,"img",1),C(2,FJ,2,1,"video",2),C(3,zJ,1,6,"i",3),le()),2&e&&(g("ngSwitch",i.thumbnailType),v(1),g("ngSwitchCase",i.CONTENT_THUMBNAIL_TYPE.image),v(1),g("ngSwitchCase",i.CONTENT_THUMBNAIL_TYPE.video))},dependencies:[Be,Lt,fn,Fs,Vl,Rh],styles:["[_nghost-%COMP%]{width:100%;height:100%;justify-content:center;align-items:center;display:flex}[_nghost-%COMP%] img[_ngcontent-%COMP%], [_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover}[_nghost-%COMP%] i[_ngcontent-%COMP%]{color:var(--color-palette-secondary-400)}"],changeDetection:0}),n})(),BL=(()=>{class n{constructor(e){this.host=e,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const e=A.getFocusableElements(this.host.nativeElement);0===e.length&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})(),Na=(()=>{class n{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O($h,8),O(Tt))},n.\u0275dir=de({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&P("input",function(o){return i.onInput(o)}),2&e&&Si("p-filled",i.filled)}}),n})(),rc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be]}),n})();const $J=["overlay"],WJ=["content"];function GJ(n,t){1&n&&ce(0)}const qJ=function(n,t,e){return{showTransitionParams:n,hideTransitionParams:t,transform:e}},KJ=function(n){return{value:"visible",params:n}},YJ=function(n){return{mode:n}},QJ=function(n){return{$implicit:n}};function ZJ(n,t){if(1&n){const e=q();S(0,"div",1,3),P("click",function(r){return I(e),x(y(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return I(e),x(y(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return I(e),x(y(2).onOverlayContentAnimationDone(r))}),ln(2),C(3,GJ,1,0,"ng-container",4),D()}if(2&n){const e=y(2);Ke(e.contentStyleClass),g("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",te(11,KJ,Hr(7,qJ,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),v(3),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",te(15,QJ,te(13,YJ,e.overlayMode)))}}const JJ=function(n,t,e,i,r,o,s,a,l,c,u,d,h,p){return{"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":n,"p-overlay-center":t,"p-overlay-top":e,"p-overlay-top-start":i,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":l,"p-overlay-left-start":c,"p-overlay-left-end":u,"p-overlay-right":d,"p-overlay-right-start":h,"p-overlay-right-end":p}};function XJ(n,t){if(1&n){const e=q();S(0,"div",1,2),P("click",function(r){return I(e),x(y().onOverlayClick(r))}),C(2,ZJ,4,17,"div",0),D()}if(2&n){const e=y();Ke(e.styleClass),g("ngStyle",e.style)("ngClass",$C(5,JJ,[e.modal,e.modal&&"center"===e.overlayResponsiveDirection,e.modal&&"top"===e.overlayResponsiveDirection,e.modal&&"top-start"===e.overlayResponsiveDirection,e.modal&&"top-end"===e.overlayResponsiveDirection,e.modal&&"bottom"===e.overlayResponsiveDirection,e.modal&&"bottom-start"===e.overlayResponsiveDirection,e.modal&&"bottom-end"===e.overlayResponsiveDirection,e.modal&&"left"===e.overlayResponsiveDirection,e.modal&&"left-start"===e.overlayResponsiveDirection,e.modal&&"left-end"===e.overlayResponsiveDirection,e.modal&&"right"===e.overlayResponsiveDirection,e.modal&&"right-start"===e.overlayResponsiveDirection,e.modal&&"right-end"===e.overlayResponsiveDirection])),v(2),g("ngIf",e.visible)}}const eX=["*"],tX={provide:Cn,useExisting:Ue(()=>k_),multi:!0},nX=Pg([Pt({transform:"{{transform}}",opacity:0}),Bi("{{showTransitionParams}}")]),iX=Pg([Bi("{{hideTransitionParams}}",Pt({transform:"{{transform}}",opacity:0}))]);let k_=(()=>{class n{constructor(e,i,r,o,s,a){this.document=e,this.el=i,this.renderer=r,this.config=o,this.overlayService=s,this.zone=a,this.visibleChange=new R,this.onBeforeShow=new R,this.onShow=new R,this.onBeforeHide=new R,this.onHide=new R,this.onAnimationStart=new R,this.onAnimationDone=new R,this._visible=!1,this.modalVisible=!1,this.isOverlayClicked=!1,this.isOverlayContentClicked=!1,this.transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"},this.window=this.document.defaultView}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return Oe.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Oe.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Oe.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Oe.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){const e=this._target||this.overlayOptions?.target;return void 0===e?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){const e=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===e||e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){const e=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===e?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){const e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===e?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){const e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===e?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}get modal(){return"modal"===this.mode||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return{...this.config?.overlayOptions,...this.options}}get overlayResponsiveOptions(){return{...this.overlayOptions?.responsive,...this.responsive}}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return A.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(e=>{e.getType(),this.contentTemplate=e.template})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.addClass(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&A.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(e){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&$i.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),A.appendOverlay(this.overlayEl,"body"===this.appendTo?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&A.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){const i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),$i.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&this.config?.overlayOptions[e]&&this.config?.overlayOptions[e](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new E_(this.targetEl,e=>{(!this.listener||this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target))||this.isOverlayContentClicked);(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:3!==e.which&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{this.overlayOptions.hideOnEscape&&27===e.keyCode&&(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),$i.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(e){return new(e||n)(O(Jt),O(qe),O(Vn),O(Eo),O(yp),O(nt))},n.\u0275cmp=Y({type:n,selectors:[["p-overlay"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee($J,5),Ee(WJ,5)),2&e){let r;J(r=X())&&(i.overlayViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Ie([tX])],ngContentSelectors:eX,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(ai(),C(0,XJ,3,20,"div",0)),2&e&&g("ngIf",i.modalVisible)},dependencies:[Lt,Ge,Zn,fn],styles:[".p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}\n"],encapsulation:2,data:{animation:[Wl("overlayContentAnimation",[Ui(":enter",[Rg(nX)]),Ui(":leave",[Rg(iX)])])]},changeDetection:0}),n})();const rX=["element"],oX=["content"];function sX(n,t){1&n&&ce(0)}const D1=function(n,t){return{$implicit:n,options:t}};function aX(n,t){if(1&n&&(ae(0),C(1,sX,1,0,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",lt(2,D1,e.loadedItems,e.getContentOptions()))}}function lX(n,t){1&n&&ce(0)}function cX(n,t){if(1&n&&(ae(0),C(1,lX,1,0,"ng-container",7),le()),2&n){const e=t.$implicit,i=t.index,r=y(3);v(1),g("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",lt(2,D1,e,r.getOptions(i)))}}const uX=function(n){return{"p-scroller-loading":n}};function dX(n,t){if(1&n&&(S(0,"div",8,9),C(2,cX,2,5,"ng-container",10),D()),2&n){const e=y(2);g("ngClass",te(4,uX,e.d_loading))("ngStyle",e.contentStyle),v(2),g("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function hX(n,t){1&n&&F(0,"div",11),2&n&&g("ngStyle",y(2).spacerStyle)}function pX(n,t){1&n&&ce(0)}const fX=function(n){return{numCols:n}},UL=function(n){return{options:n}};function mX(n,t){if(1&n&&(ae(0),C(1,pX,1,0,"ng-container",7),le()),2&n){const e=t.index,i=y(4);v(1),g("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",te(4,UL,i.getLoaderOptions(e,i.both&&te(2,fX,i._numItemsInViewport.cols))))}}function gX(n,t){if(1&n&&(ae(0),C(1,mX,2,6,"ng-container",14),le()),2&n){const e=y(3);v(1),g("ngForOf",e.loaderArr)}}function _X(n,t){1&n&&ce(0)}const yX=function(){return{styleClass:"p-scroller-loading-icon"}};function vX(n,t){if(1&n&&(ae(0),C(1,_X,1,0,"ng-container",7),le()),2&n){const e=y(4);v(1),g("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",te(3,UL,hn(2,yX)))}}function bX(n,t){1&n&&F(0,"i",16)}function CX(n,t){if(1&n&&(C(0,vX,2,5,"ng-container",0),C(1,bX,1,0,"ng-template",null,15,yt)),2&n){const e=Pe(2);g("ngIf",y(3).loaderIconTemplate)("ngIfElse",e)}}const wX=function(n){return{"p-component-overlay":n}};function SX(n,t){if(1&n&&(S(0,"div",12),C(1,gX,2,1,"ng-container",0),C(2,CX,3,2,"ng-template",null,13,yt),D()),2&n){const e=Pe(3),i=y(2);g("ngClass",te(3,wX,!i.loaderTemplate)),v(1),g("ngIf",i.loaderTemplate)("ngIfElse",e)}}const DX=function(n,t,e){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":t,"p-horizontal-scroll":e}};function TX(n,t){if(1&n){const e=q();ae(0),S(1,"div",2,3),P("scroll",function(r){return I(e),x(y().onContainerScroll(r))}),C(3,aX,2,5,"ng-container",0),C(4,dX,3,6,"ng-template",null,4,yt),C(6,hX,1,1,"div",5),C(7,SX,4,5,"div",6),D(),le()}if(2&n){const e=Pe(5),i=y();v(1),Ke(i._styleClass),g("ngStyle",i._style)("ngClass",Hr(10,DX,i.inline,i.both,i.horizontal)),pe("id",i._id)("tabindex",i.tabindex),v(2),g("ngIf",i.contentTemplate)("ngIfElse",e),v(3),g("ngIf",i._showSpacer),v(1),g("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function MX(n,t){1&n&&ce(0)}const EX=function(n,t){return{rows:n,columns:t}};function IX(n,t){if(1&n&&(ae(0),C(1,MX,1,0,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",lt(5,D1,e.items,lt(2,EX,e._items,e.loadedColumns)))}}function xX(n,t){if(1&n&&(ln(0),C(1,IX,2,8,"ng-container",17)),2&n){const e=y();v(1),g("ngIf",e.contentTemplate)}}const OX=["*"];let A_=(()=>{class n{constructor(e,i){this.cd=e,this.zone=i,this.onLazyLoad=new R,this.onScroll=new R,this.onScrollIndexChange=new R,this._tabindex=0,this._itemSize=0,this._orientation="vertical",this._step=0,this._delay=0,this._resizeDelay=10,this._appendOnly=!1,this._inline=!1,this._lazy=!1,this._disabled=!1,this._loaderDisabled=!1,this._showSpacer=!0,this._showLoader=!1,this._autoSize=!1,this.d_loading=!1,this.first=0,this.last=0,this.page=0,this.isRangeChanged=!1,this.numItemsInViewport=0,this.lastScrollPos=0,this.lazyLoadState={},this.loaderArr=[],this.spacerStyle={},this.contentStyle={},this.initialized=!1}get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&"object"==typeof e&&Object.entries(e).forEach(([i,r])=>this[`_${i}`]!==r&&(this[`_${i}`]=r))}get vertical(){return"vertical"===this._orientation}get horizontal(){return"horizontal"===this._orientation}get both(){return"both"===this._orientation}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:e.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}get isPageChanged(){return!this._step||this.page!==this.getPageByFirst()}ngOnInit(){this.setInitialState()}ngOnChanges(e){let i=!1;if(e.loading){const{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){const{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){const{previousValue:r,currentValue:o}=e.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,i=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!i&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":default:this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){A.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=A.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=A.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||A.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(){return Math.floor((this.first+4*this.d_numToleratedItems)/(this._step||1))}scrollTo(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,i="auto"){const{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(u=0,d)=>u<=d?0:u,a=(u,d,h)=>u*d+h,l=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:i});let c=0;this.both?(c={rows:s(e[0],r[0]),cols:s(e[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(e,r),this.horizontal?l(a(c,this._itemSize,o.left),0):l(0,a(c,this._itemSize,o.top))),this.isRangeChanged=this.first!==c,this.first=c}scrollInView(e,i,r="auto"){if(i){const{first:o,viewport:s}=this.getRenderedRange(),a=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:r}),c="to-end"===i;if("to-start"===i){if(this.both)s.first.rows-o.rows>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){const u=(s.first-1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else if(c)if(this.both)s.last.rows-o.rows<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(e,r)}getRenderedRange(){const e=(o,s)=>Math.floor(o/(s||o));let i=this.first,r=0;if(this.elementViewChild?.nativeElement){const{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;this.both?(i={rows:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=e(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const e=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0,o=(c,u)=>Math.ceil(c/(u||c)),s=c=>Math.ceil(c/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(i,this._itemSize[1])}:o(this.horizontal?i:r,this._itemSize);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a))}}calculateOptions(){const{numItemsInViewport:e,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";const[e,i]=[A.getWidth(this.contentEl),A.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[A.getWidth(this.elementViewChild.nativeElement),A.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",i)):o("height",r)}}setSpacerSize(){if(this._items){const e=this.getContentPosition(),i=(r,o,s,a=0)=>this.spacerStyle={...this.spacerStyle,[`${r}`]:(o||[]).length*s+a+"px"};this.both?(i("height",this._items,this._itemSize[0],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){const i=e?e.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${s}px, ${a}px, 0)`};if(this.both)o(r(i.cols,this._itemSize[1]),r(i.rows,this._itemSize[0]));else{const s=r(i,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(e){const i=e.target,r=this.getContentPosition(),o=(_,b)=>_?_>b?_-b:_:0,s=(_,b)=>Math.floor(_/(b||_)),a=(_,b,T,M,w,N)=>_<=w?w:N?T-M-w:b+w-1,l=(_,b,T,M,w,N,k)=>_<=N?0:Math.max(0,k?_b?T:_-2*N),c=(_,b,T,M,w,N=!1)=>{let k=b+M+2*w;return _>=w&&(k+=w+1),this.getLast(k,N)},u=o(i.scrollTop,r.top),d=o(i.scrollLeft,r.left);let h=this.both?{rows:0,cols:0}:0,p=this.last,f=!1,m=this.lastScrollPos;if(this.both){const _=this.lastScrollPos.top<=u,b=this.lastScrollPos.left<=d;if(!this._appendOnly||this._appendOnly&&(_||b)){const T={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},M={rows:a(T.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],_),cols:a(T.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],b)};h={rows:l(T.rows,M.rows,this.first.rows,0,0,this.d_numToleratedItems[0],_),cols:l(T.cols,M.cols,this.first.cols,0,0,this.d_numToleratedItems[1],b)},p={rows:c(T.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(T.cols,h.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},f=h.rows!==this.first.rows||p.rows!==this.last.rows||h.cols!==this.first.cols||p.cols!==this.last.cols||this.isRangeChanged,m={top:u,left:d}}}else{const _=this.horizontal?d:u,b=this.lastScrollPos<=_;if(!this._appendOnly||this._appendOnly&&b){const T=s(_,this._itemSize);h=l(T,a(T,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,b),this.first,0,0,this.d_numToleratedItems,b),p=c(T,h,0,this.numItemsInViewport,this.d_numToleratedItems),f=h!==this.first||p!==this.last||this.isRangeChanged,m=_}}return{first:h,last:p,isRangeChanged:f,scrollPos:m}}onScrollChange(e){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);if(o){const a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged){const l={first:this._step?Math.min(this.getPageByFirst()*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst()+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.handleEvents("onLazyLoad",l),this.lazyLoadState=l}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(e);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this.showLoader&&(!this._lazy||void 0===this._loading)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){this.windowResizeListener||this.zone.runOutsideAngular(()=>{this.windowResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.windowResizeListener),window.addEventListener("orientationchange",this.windowResizeListener)})}unbindResizeListener(){this.windowResizeListener&&(window.removeEventListener("resize",this.windowResizeListener),window.removeEventListener("orientationchange",this.windowResizeListener),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(A.isVisible(this.elementViewChild?.nativeElement)){const[e,i]=[A.getWidth(this.elementViewChild.nativeElement),A.getHeight(this.elementViewChild.nativeElement)],[r,o]=[e!==this.defaultWidth,i!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical&&o)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=i,this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(e){const i=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(e,i){const r=this.loaderArr.length;return{index:e,count:r,first:0===e,last:e===r-1,even:e%2==0,odd:e%2!=0,...i}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(nt))},n.\u0275cmp=Y({type:n,selectors:[["p-scroller"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(rX,5),Ee(oX,5)),2&e){let r;J(r=X())&&(i.elementViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Yn],ngContentSelectors:OX,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[1,"p-scroller-loading-icon","pi","pi-spinner","pi-spin"],[4,"ngIf"]],template:function(e,i){if(1&e&&(ai(),C(0,TX,8,14,"ng-container",0),C(1,xX,2,1,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[Lt,Un,Ge,Zn,fn],styles:["p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{font-size:2rem}.p-scroller-inline .p-scroller-content{position:static}\n"],encapsulation:2}),n})();const kX=["container"],AX=["in"],NX=["multiIn"],LX=["multiContainer"],PX=["ddBtn"],RX=["items"],FX=["scroller"],jX=["overlay"],VX=function(n,t){return{"p-autocomplete-dd-input":n,"p-disabled":t}};function zX(n,t){if(1&n){const e=q();S(0,"input",13,14),P("click",function(r){return I(e),x(y().onInputClick(r))})("input",function(r){return I(e),x(y().onInput(r))})("keydown",function(r){return I(e),x(y().onKeydown(r))})("keyup",function(r){return I(e),x(y().onKeyup(r))})("focus",function(r){return I(e),x(y().onInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))})("change",function(r){return I(e),x(y().onInputChange(r))})("paste",function(r){return I(e),x(y().onInputPaste(r))}),D()}if(2&n){const e=y();Ke(e.inputStyleClass),g("autofocus",e.autofocus)("ngStyle",e.inputStyle)("autocomplete",e.autocomplete)("ngClass",lt(20,VX,e.dropdown,e.disabled))("value",e.inputFieldValue)("readonly",e.readonly)("disabled",e.disabled),pe("type",e.type)("id",e.inputId)("required",e.required)("name",e.name)("placeholder",e.placeholder)("size",e.size)("maxlength",e.maxlength)("tabindex",e.tabindex)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)}}function BX(n,t){if(1&n){const e=q();S(0,"i",15),P("click",function(){return I(e),x(y().clear())}),D()}}function UX(n,t){if(1&n){const e=q();S(0,"i",15),P("click",function(){return I(e),x(y().clear())}),D()}}function HX(n,t){1&n&&ce(0)}function $X(n,t){if(1&n&&(S(0,"span",27),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.resolveFieldData(e))}}function WX(n,t){if(1&n){const e=q();S(0,"span",28),P("click",function(){I(e),y();const r=Pe(1);return x(y(2).removeItem(r))}),D()}}const N_=function(n){return{$implicit:n}};function GX(n,t){if(1&n&&(S(0,"li",22,23),C(2,HX,1,0,"ng-container",24),C(3,$X,2,1,"span",25),C(4,WX,1,0,"span",26),D()),2&n){const e=t.$implicit,i=y(2);v(2),g("ngTemplateOutlet",i.selectedItemTemplate)("ngTemplateOutletContext",te(4,N_,e)),v(1),g("ngIf",!i.selectedItemTemplate),v(1),g("ngIf",!i.disabled&&!i.readonly)}}const qX=function(n,t){return{"p-disabled":n,"p-focus":t}};function KX(n,t){if(1&n){const e=q();S(0,"ul",16,17),P("click",function(){return I(e),x(Pe(5).focus())}),C(2,GX,5,6,"li",18),S(3,"li",19)(4,"input",20,21),P("input",function(r){return I(e),x(y().onInput(r))})("click",function(r){return I(e),x(y().onInputClick(r))})("keydown",function(r){return I(e),x(y().onKeydown(r))})("keyup",function(r){return I(e),x(y().onKeyup(r))})("focus",function(r){return I(e),x(y().onInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))})("change",function(r){return I(e),x(y().onInputChange(r))})("paste",function(r){return I(e),x(y().onInputPaste(r))}),D()()()}if(2&n){const e=y();g("ngClass",lt(20,qX,e.disabled,e.focus)),v(2),g("ngForOf",e.value),v(2),Ke(e.inputStyleClass),g("autofocus",e.autofocus)("disabled",e.disabled)("readonly",e.readonly)("autocomplete",e.autocomplete)("ngStyle",e.inputStyle),pe("type",e.type)("id",e.inputId)("placeholder",e.value&&e.value.length?null:e.placeholder)("tabindex",e.tabindex)("maxlength",e.maxlength)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)("aria-controls",e.listId)("aria-expanded",e.overlayVisible)("aria-activedescendant","p-highlighted-option")}}function YX(n,t){1&n&&F(0,"i",29)}function QX(n,t){if(1&n){const e=q();S(0,"button",30,31),P("click",function(r){return I(e),x(y().handleDropdownClick(r))}),D()}if(2&n){const e=y();g("icon",e.dropdownIcon)("disabled",e.disabled),pe("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex)}}function ZX(n,t){1&n&&ce(0)}function JX(n,t){1&n&&ce(0)}const HL=function(n,t){return{$implicit:n,options:t}};function XX(n,t){if(1&n&&C(0,JX,1,0,"ng-container",24),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(15))("ngTemplateOutletContext",lt(2,HL,e,i))}}function eee(n,t){1&n&&ce(0)}const tee=function(n){return{options:n}};function nee(n,t){if(1&n&&C(0,eee,1,0,"ng-container",24),2&n){const e=t.options;g("ngTemplateOutlet",y(3).loaderTemplate)("ngTemplateOutletContext",te(2,tee,e))}}function iee(n,t){1&n&&(ae(0),C(1,nee,1,4,"ng-template",35),le())}const L_=function(n){return{height:n}};function ree(n,t){if(1&n){const e=q();S(0,"p-scroller",32,33),P("onLazyLoad",function(r){return I(e),x(y().onLazyLoad.emit(r))}),C(2,XX,1,5,"ng-template",34),C(3,iee,2,0,"ng-container",11),D()}if(2&n){const e=y();jt(te(8,L_,e.scrollHeight)),g("items",e.suggestions)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function oee(n,t){1&n&&ce(0)}const see=function(){return{}};function aee(n,t){if(1&n&&(ae(0),C(1,oee,1,0,"ng-container",24),le()),2&n){const e=y(),i=Pe(15);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",lt(3,HL,e.suggestions,hn(2,see)))}}function lee(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(3);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function cee(n,t){1&n&&ce(0)}function uee(n,t){1&n&&ce(0)}function dee(n,t){if(1&n&&(S(0,"li",41),C(1,lee,2,1,"span",11),C(2,cee,1,0,"ng-container",24),D(),C(3,uee,1,0,"ng-container",24)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y();g("ngStyle",te(6,L_,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,N_,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(10,N_,o.getOptionGroupChildren(e)))}}function hee(n,t){if(1&n&&(ae(0),C(1,dee,4,12,"ng-template",40),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function pee(n,t){1&n&&ce(0)}function fee(n,t){if(1&n&&(ae(0),C(1,pee,1,0,"ng-container",24),le()),2&n){const e=y().$implicit,i=Pe(5);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,N_,e))}}function mee(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(3);v(1),ve(i.resolveFieldData(e))}}function gee(n,t){1&n&&ce(0)}const _ee=function(n){return{"p-highlight":n}},yee=function(n,t){return{$implicit:n,index:t}};function vee(n,t){if(1&n){const e=q();S(0,"li",43),P("click",function(){const o=I(e).$implicit;return x(y(3).selectItem(o))}),C(1,mee,2,1,"span",11),C(2,gee,1,0,"ng-container",24),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(2).options,o=y();g("ngStyle",te(6,L_,r.itemSize+"px"))("ngClass",te(8,_ee,e===o.highlightOption))("id",o.highlightOption==e?"p-highlighted-option":""),v(1),g("ngIf",!o.itemTemplate),v(1),g("ngTemplateOutlet",o.itemTemplate)("ngTemplateOutletContext",lt(10,yee,e,r.getOptions?r.getOptions(i):i))}}function bee(n,t){1&n&&C(0,vee,3,13,"li",42),2&n&&g("ngForOf",t.$implicit)}function Cee(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(3);v(1),xt(" ",e.emptyMessageLabel," ")}}function wee(n,t){1&n&&ce(0,null,46)}function See(n,t){if(1&n&&(S(0,"li",44),C(1,Cee,2,1,"ng-container",45),C(2,wee,2,0,"ng-container",9),D()),2&n){const e=y().options,i=y();g("ngStyle",te(4,L_,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function Dee(n,t){if(1&n&&(S(0,"ul",36,37),C(2,hee,2,1,"ng-container",11),C(3,fee,2,4,"ng-container",11),C(4,bee,1,1,"ng-template",null,38,yt),C(6,See,3,6,"li",39),D()),2&n){const e=t.options,i=y();jt(e.contentStyle),g("ngClass",e.contentStyleClass),pe("id",i.listId),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.noResults&&i.showEmptyMessage)}}function Tee(n,t){1&n&&ce(0)}const Mee=function(n,t){return{"p-autocomplete p-component":!0,"p-autocomplete-dd":n,"p-autocomplete-multiple":t}},Eee=function(){return["p-autocomplete-panel p-component"]},Iee={provide:Cn,useExisting:Ue(()=>T1),multi:!0};let T1=(()=>{class n{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.differs=o,this.config=s,this.overlayService=a,this.zone=l,this.minLength=1,this.delay=300,this.scrollHeight="200px",this.lazy=!1,this.type="text",this.autoZIndex=!0,this.baseZIndex=0,this.dropdownIcon="pi pi-chevron-down",this.unique=!0,this.completeOnFocus=!1,this.showClear=!1,this.dropdownMode="blank",this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.autocomplete="off",this.completeMethod=new R,this.onSelect=new R,this.onUnselect=new R,this.onFocus=new R,this.onBlur=new R,this.onDropdownClick=new R,this.onClear=new R,this.onKeyUp=new R,this.onShow=new R,this.onHide=new R,this.onLazyLoad=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.overlayVisible=!1,this.focus=!1,this.inputFieldValue=null,this.inputValue=null,this.differ=o.find([]).create(null),this.listId=D_()+"_list"}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get suggestions(){return this._suggestions}set suggestions(e){this._suggestions=e,this.handleSuggestionsChange()}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1}),this.highlightOptionChanged&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{if(this.overlay&&this.itemsWrapper){let e=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&A.scrollInView(this.itemsWrapper,e)}},1),this.highlightOptionChanged=!1})}handleSuggestionsChange(){null!=this._suggestions&&this.loading&&(this.highlightOption=null,this._suggestions.length?(this.noResults=!1,this.show(),this.suggestionsUpdated=!0,this.autoHighlight&&(this.highlightOption=this._suggestions[0])):(this.noResults=!0,this.showEmptyMessage?(this.show(),this.suggestionsUpdated=!0):this.hide()),this.loading=!1)}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}writeValue(e){this.value=e,this.filled=this.value&&""!=this.value,this.updateInputField(),this.cd.markForCheck()}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInput(e){if(!this.inputKeyDown&&A.isIE())return;this.timeout&&clearTimeout(this.timeout);let i=e.target.value;this.inputValue=i,!this.multiple&&!this.forceSelection&&this.onModelChange(i),0===i.length&&!this.multiple&&(this.value=null,this.hide(),this.onClear.emit(e),this.onModelChange(i)),i.length>=this.minLength?this.timeout=setTimeout(()=>{this.search(e,i)},this.delay):this.hide(),this.updateFilledState(),this.inputKeyDown=!1}onInputClick(e){this.documentClickListener&&(this.inputClick=!0)}search(e,i){null!=i&&(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:i}))}selectItem(e,i=!0){this.forceSelectionUpdateModelTimeout&&(clearTimeout(this.forceSelectionUpdateModelTimeout),this.forceSelectionUpdateModelTimeout=null),this.multiple?(this.multiInputEL.nativeElement.value="",this.value=this.value||[],(!this.isSelected(e)||!this.unique)&&(this.value=[...this.value,e],this.onModelChange(this.value))):(this.inputEL.nativeElement.value=this.resolveFieldData(e),this.value=e,this.onModelChange(this.value)),this.onSelect.emit(e),this.updateFilledState(),i&&(this.itemClicked=!0,this.focusInput()),this.hide()}show(e){(this.multiInputEL||this.inputEL)&&!this.overlayVisible&&(this.multiple?this.multiInputEL.nativeElement.ownerDocument.activeElement==this.multiInputEL.nativeElement:this.inputEL.nativeElement.ownerDocument.activeElement==this.inputEL.nativeElement)&&(this.overlayVisible=!0),this.onShow.emit(e),this.cd.markForCheck()}clear(){this.multiple?this.value=null:(this.inputValue=null,this.inputEL.nativeElement.value=""),this.updateFilledState(),this.onModelChange(this.value),this.onClear.emit()}onOverlayAnimationStart(e){"visible"===e.toState&&(this.itemsWrapper=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild.nativeElement))}resolveFieldData(e){let i=this.field?Oe.resolveFieldData(e,this.field):e;return void 0!==i?i:""}hide(e){this.overlayVisible=!1,this.onHide.emit(e),this.cd.markForCheck()}handleDropdownClick(e){if(this.overlayVisible)this.hide();else{this.focusInput();let i=this.multiple?this.multiInputEL.nativeElement.value:this.inputEL.nativeElement.value;"blank"===this.dropdownMode?this.search(e,""):"current"===this.dropdownMode&&this.search(e,i),this.onDropdownClick.emit({originalEvent:e,query:i})}}focusInput(){this.multiple?this.multiInputEL.nativeElement.focus():this.inputEL.nativeElement.focus()}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}removeItem(e){let i=A.index(e),r=this.value[i];this.value=this.value.filter((o,s)=>s!=i),this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(r)}onKeydown(e){if(this.overlayVisible)switch(e.which){case 40:if(this.group){let r=this.findOptionGroupIndex(this.highlightOption,this.suggestions);if(-1!==r){let o=r.itemIndex+1;o=0)this.highlightOption=this.getOptionGroupChildren(this.suggestions[r.groupIndex])[o],this.highlightOptionChanged=!0;else if(o<0){let s=this.suggestions[r.groupIndex-1];s&&(this.highlightOption=this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1],this.highlightOptionChanged=!0)}}}else{let r=this.findOptionIndex(this.highlightOption,this.suggestions);r>0&&(this.highlightOption=this.suggestions[r-1],this.highlightOptionChanged=!0)}e.preventDefault();break;case 13:this.highlightOption&&(this.selectItem(this.highlightOption),this.hide()),e.preventDefault();break;case 27:this.hide(),e.preventDefault();break;case 9:this.highlightOption&&this.selectItem(this.highlightOption),this.hide()}else 40===e.which&&this.suggestions?this.search(e,e.target.value):e.ctrlKey&&"z"===e.key&&!this.multiple?(this.inputEL.nativeElement.value=this.resolveFieldData(null),this.value="",this.onModelChange(this.value)):e.ctrlKey&&"z"===e.key&&this.multiple&&(this.value.pop(),this.onModelChange(this.value),this.updateFilledState());if(this.multiple&&8===e.which&&this.value&&this.value.length&&!this.multiInputEL.nativeElement.value){this.value=[...this.value];const r=this.value.pop();this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(r)}this.inputKeyDown=!0}onKeyup(e){this.onKeyUp.emit(e)}onInputFocus(e){!this.itemClicked&&this.completeOnFocus&&this.search(e,this.multiple?this.multiInputEL.nativeElement.value:this.inputEL.nativeElement.value),this.focus=!0,this.onFocus.emit(e),this.itemClicked=!1}onInputBlur(e){this.focus=!1,this.onModelTouched(),this.onBlur.emit(e)}onInputChange(e){if(this.forceSelection){let i=!1,r=e.target.value.trim();if(this.suggestions)for(let o of this.suggestions){let s=this.field?Oe.resolveFieldData(o,this.field):o;if(s&&r===s.trim()){i=!0,this.forceSelectionUpdateModelTimeout=setTimeout(()=>{this.selectItem(o,!1)},250);break}}i||(this.multiple?this.multiInputEL.nativeElement.value="":(this.value=null,this.inputEL.nativeElement.value=""),this.onClear.emit(e),this.onModelChange(this.value),this.updateFilledState())}}onInputPaste(e){this.onKeydown(e)}isSelected(e){let i=!1;if(this.value&&this.value.length)for(let r=0;r{const t=n+1;return{label:`Heading ${t}`,icon:Jo(Nee[n]||""),id:`heading${t}`,attributes:{level:t}}}),E1={label:"Paragraph",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"};function Jo(n){return Hee.bypassSecurityTrustUrl(n)}const F_=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...GL,{label:"Table",icon:"table_view",id:"table"},...[{label:"List Ordered",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],...[{label:"AI Content",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}],E1],Zee={horizontalRule:!0,table:!0,image:!0,video:!0};function Ti(n){this.content=n}function ZL(n,t,e){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:e;let r=n.child(i),o=t.child(i);if(r!=o){if(!r.sameMarkup(o))return e;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)e++;return e}if(r.content.size||o.content.size){let s=ZL(r.content,o.content,e+1);if(null!=s)return s}e+=r.nodeSize}else e+=r.nodeSize}}function JL(n,t,e,i){for(let r=n.childCount,o=t.childCount;;){if(0==r||0==o)return r==o?null:{a:e,b:i};let s=n.child(--r),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c!Zee[n.id]),Ti.prototype={constructor:Ti,find:function(n){for(var t=0;t>1}},Ti.from=function(n){if(n instanceof Ti)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new Ti(t)};class G{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let i=0;it&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),i,r+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,i,r){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,e-l),s=!i):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!i):!s&&a.isBlock&&(o+=i,s=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(i)&&(r[r.length-1]=e.withText(e.text+i.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),i.push(a),r+=a.nodeSize),s=l}return new G(i,r)}cutByIndex(t,e){return t==e?G.empty:0==t&&e==this.content.length?this:new G(this.content.slice(t,e))}replaceChild(t,e){let i=this.content[t];if(i==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-i.nodeSize;return r[t]=e,new G(r,o)}addToStart(t){return new G([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new G(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=t)return s==t||e>0?j_(i+1,s):j_(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return G.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new G(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return G.empty;let e,i=0;for(let r=0;r{class n{constructor(e,i){this.type=e,this.attrs=i}addToSet(e){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=e.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=e.slice()),r||i.push(this),i}removeFromSet(e){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class z_ extends Error{}class ie{constructor(t,e,i){this.content=t,this.openStart=e,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let i=eP(this.content,t+this.openStart,e);return i&&new ie(i,this.openStart,this.openEnd)}removeBetween(t,e){return new ie(XL(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return ie.empty;let i=e.openStart||0,r=e.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new ie(G.fromJSON(t,e.content),i,r)}static maxOpen(t,e=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new ie(t,i,r)}}function XL(n,t,e){let{index:i,offset:r}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(e);if(r==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(XL(o.content,t-r-1,e-r-1)))}function eP(n,t,e,i){let{index:r,offset:o}=n.findIndex(t),s=n.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,e)?null:n.cut(0,t).append(e).append(n.cut(t));let a=eP(s.content,t-o-1,e);return a&&n.replaceChild(r,s.copy(a))}function Xee(n,t,e){if(e.openStart>n.depth)throw new z_("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new z_("Inconsistent open depths");return tP(n,t,e,0)}function tP(n,t,e,i){let r=n.index(i),o=n.node(i);if(r==t.index(i)&&i=0;o--)r=t.node(o).copy(G.from(r));return{start:r.resolveNoCache(n.openStart+e),end:r.resolveNoCache(r.content.size-n.openEnd-e)}}(e,n);return sc(o,iP(n,s,a,t,i))}{let s=n.parent,a=s.content;return sc(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return sc(o,B_(n,t,i))}function nP(n,t){if(!t.type.compatibleContent(n.type))throw new z_("Cannot join "+t.type.name+" onto "+n.type.name)}function x1(n,t,e){let i=n.node(e);return nP(i,t.node(e)),i}function oc(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function vp(n,t,e,i){let r=(t||n).node(e),o=0,s=t?t.index(e):r.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(oc(n.nodeAfter,i),o++));for(let a=o;ar&&x1(n,t,r+1),s=i.depth>r&&x1(e,i,r+1),a=[];return vp(null,n,r,a),o&&s&&t.index(r)==e.index(r)?(nP(o,s),oc(sc(o,iP(n,t,e,i,r+1)),a)):(o&&oc(sc(o,B_(n,t,r+1)),a),vp(t,e,r,a),s&&oc(sc(s,B_(e,i,r+1)),a)),vp(i,null,r,a),new G(a)}function B_(n,t,e){let i=[];return vp(null,n,e,i),n.depth>e&&oc(sc(x1(n,t,e+1),B_(n,t,e+1)),i),vp(t,null,e,i),new G(i)}ie.empty=new ie(G.empty,0,0);class bp{constructor(t,e,i){this.pos=t,this.path=e,this.parentOffset=i,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(e);return i?t.child(e).cut(i):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let i=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!e||e(this.node(i))))return new U_(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let i=[],r=0,o=e;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new bp(e,i,o)}static resolveCached(t,e){for(let r=0;rt&&this.nodesBetween(t,e,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),function rP(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,i=G.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let l=r;le.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,i)}let r=G.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,i)}}Xo.prototype.text=void 0;class ac{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let i=new ite(t,e);if(null==i.next)return ac.empty;let r=oP(i);i.next&&i.err("Unexpected trailing text");let o=function ute(n){let t=Object.create(null);return function e(i){let r=[];i.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),-1==c.indexOf(u)&&c.push(u)})})});let o=t[i.join(",")]=new ac(i.indexOf(n.length-1)>-1);for(let s=0;sl.concat(o(c,a)),[]);if("seq"!=s.type){if("star"==s.type){let l=e();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=e();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}if("opt"==s.type)return[i(a)].concat(o(s.expr,a));if("range"==s.type){let l=a;for(let c=0;cl.to=a)}}(r));return function dte(n,t){for(let e=0,i=[n];ec.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(i){t.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(i.next[s].next);return o}).join("\n")}}ac.empty=new ac(!0);class ite{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function oP(n){let t=[];do{t.push(rte(n))}while(n.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function rte(n){let t=[];do{t.push(ote(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function ote(n){let t=function lte(n){if(n.eat("(")){let t=oP(n);return n.eat(")")||n.err("Missing closing paren"),t}if(!/\W/.test(n.next)){let t=function ate(n,t){let e=n.nodeTypes,i=e[t];if(i)return[i];let r=[];for(let o in e){let s=e[o];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+t+"' found"),r}(n,n.next).map(e=>(null==n.inline?n.inline=e.isInline:n.inline!=e.isInline&&n.err("Mixing inline and block content"),{type:"name",value:e}));return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=ste(n,t)}return t}function sP(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function ste(n,t){let e=sP(n),i=e;return n.eat(",")&&(i="}"!=n.next?sP(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:i,expr:t}}function aP(n,t){return t-n}function lP(n,t){let e=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);e.push(r);for(let s=0;si[o]=new W_(o,r++,e,s)),i}removeFromSet(t){for(var e=0;e-1}}class rd{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let r=t.nodes[i.node];return r.contentMatch.matchType(r)})}parse(t,e={}){let i=new gP(this,e,!1);return i.addAll(t,e.from,e.to),i.finish()}parseSlice(t,e={}){let i=new gP(this,e,!0);return i.addAll(t,e.from,e.to),ie.maxOpen(i.finish())}matchTag(t,e,i){for(let r=i?this.tags.indexOf(i)+1:0;rt.length&&(61!=a.charCodeAt(t.length)||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=_P(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=_P(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new rd(t,rd.schemaRules(t)))}}const pP={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},fte={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},fP={ol:!0,ul:!0};function mP(n,t,e){return null!=t?(t?1:0)|("full"===t?2:0):n&&"pre"==n.whitespace?3:-5&e}class K_{constructor(t,e,i,r,o,s,a){this.type=t,this.attrs=e,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=Gt.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(G.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let e=G.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(G.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,i=this.pendingMarks;e{s.clearMark(a)&&(i=a.addToSet(i))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1!==s.consuming)break;o=s}return[e,i]}addElementByRule(t,e,i){let r,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;"string"==typeof e.contentElement?l=t.querySelector(e.contentElement):"function"==typeof e.contentElement?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,i){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,i=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(i);for(let r=0;rthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let i=this.nodes[e].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),i=this.options.context,r=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),o=(r?0:1)-(i?i.depth+1:0),s=(a,l)=>{for(;a>=0;a--){let c=e[a];if(""==c){if(a==e.length-1||0==a)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||0==l&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;l--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let i=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let e in this.parser.schema.nodes){let i=this.parser.schema.nodes[e];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(t){let e=function vte(n,t){for(let e=0;e=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let s=r.popFromStashMark(t);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==e)break}}}function gte(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function _P(n){let t={};for(let e in n)t[e]=n[e];return t}function yte(n,t){let e=t.schema.nodes;for(let i in e){let r=e[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,e,i={}){let r=this.marks[t.type.name];return r&&es.renderSpec(A1(i),r(t,e))}static renderSpec(t,e,i=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r=e[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?t.createElementNS(i,r):t.createElement(r),l=e[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){c=2;for(let u in l)if(null!=l[u]){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:p}=es.renderSpec(t,d,i);if(a.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new es(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=yP(t.nodes);return e.text||(e.text=i=>i.text),e}static marksFromSchema(t){return yP(t.marks)}}function yP(n){let t={};for(let e in n){let i=n[e].spec.toDOM;i&&(t[e]=i)}return t}function A1(n){return n.document||window.document}const bP=Math.pow(2,16);function bte(n,t){return n+t*bP}function CP(n){return 65535&n}class N1{constructor(t,e,i){this.pos=t,this.delInfo=e,this.recover=i}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class eo{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&eo.empty)return eo.empty}recover(t){let e=0,i=CP(t);if(!this.inverted)for(let r=0;rt)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let p=l+r+((c?t==l?-1:t==d?1:e:e)<0?0:u);if(i)return p;let f=t==(e<0?l:d)?null:bte(a/3,t-l),m=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(m|=8),new N1(p,m,f)}r+=u-c}return i?t+r:new N1(t+r,0,null)}touches(t,e){let i=0,r=CP(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(t){let e=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?i-r-1:void 0)}}invert(){let t=new od;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),e.openStart,e.openEnd);return On.fromReplace(t,this.from,this.to,o)}invert(){return new ts(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new Pa(e.pos,i.pos,this.mark)}merge(t){return t instanceof Pa&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Pa(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Pa(e.from,e.to,t.markFromJSON(e.mark))}}Xn.jsonID("addMark",Pa);class ts extends Xn{constructor(t,e,i){super(),this.from=t,this.to=e,this.mark=i}apply(t){let e=t.slice(this.from,this.to),i=new ie(P1(e.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),e.openStart,e.openEnd);return On.fromReplace(t,this.from,this.to,i)}invert(){return new Pa(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new ts(e.pos,i.pos,this.mark)}merge(t){return t instanceof ts&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ts(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ts(e.from,e.to,t.markFromJSON(e.mark))}}Xn.jsonID("removeMark",ts);class Ra extends Xn{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return On.fail("No node at mark step's position");let i=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return On.fromReplace(t,this.pos,this.pos+1,new ie(G.from(i),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let i=this.mark.addToSet(e.marks);if(i.length==e.marks.length){for(let r=0;ri.pos?null:new ei(e.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ei(e.from,e.to,e.gapFrom,e.gapTo,ie.fromJSON(t,e.slice),e.insert,!!e.structure)}}function R1(n,t,e){let i=n.resolve(t),r=e-t,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function Tte(n,t,e){return(0==t||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function ad(n){let e=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(io;c--,u--){let d=r.node(c),h=r.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=i&&i[u+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(p))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function Fa(n,t){let e=n.resolve(t),i=e.index();return MP(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(i,i+1)}function MP(n,t){return!(!n||!t||n.isLeaf||!n.canAppend(t))}function EP(n,t,e=-1){let i=n.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):e>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&MP(o,s)&&i.node(r).canReplace(a,a+1))return t;if(0==r)break;t=e<0?i.before(r):i.after(r)}}function IP(n,t,e){let i=n.resolve(t);if(!e.content.size)return t;let r=e.content;for(let o=0;o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(1==o)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return 0==a?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function j1(n,t,e=t,i=ie.empty){if(t==e&&!i.size)return null;let r=n.resolve(t),o=n.resolve(e);return xP(r,o,i)?new Mi(t,e,i):new Rte(r,o,i).fit()}function xP(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}Xn.jsonID("replaceAround",ei);class Rte{constructor(t,e,i){this.$from=t,this.$to=e,this.unplaced=i,this.frontier=[],this.placed=G.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=G.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new ie(o,s,a);return t>-1?new ei(i.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||i.pos!=this.$to.pos?new Mi(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}e=o.content}for(let e=1;e<=2;e++)for(let i=1==e?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=V1(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let u,{type:l,match:c}=this.frontier[a],d=null;if(1==e&&(s?c.matchType(s.type)||(d=c.fillBefore(G.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==e&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=V1(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new ie(t,e+1,Math.max(i,r.size+e>=t.size-i?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=V1(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new ie(wp(t,e-1,1),e-1,o?e-1:i)}else this.unplaced=new ie(wp(t,e,1),e,i)}placeNodes({sliceDepth:t,frontierDepth:e,parent:i,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=_,u.push(OP(m.mark(h.allowedMarks(m.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=Sp(this.placed,e,G.from(u)),this.frontier[e].match=d,f&&p<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,_=a;m1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:i,type:r}=this.frontier[e],o=e=0;a--){let{match:l,type:c}=this.frontier[a],u=z1(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=Sp(this.placed,e.depth,e.fit)),t=e.move;for(let i=e.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,e=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=Sp(this.placed,this.depth,G.from(t.create(e,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(G.empty,!0);e.childCount&&(this.placed=Sp(this.placed,this.frontier.length,e))}}function wp(n,t,e){return 0==t?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(wp(n.firstChild.content,t-1,e)))}function Sp(n,t,e){return 0==t?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(Sp(n.lastChild.content,t-1,e)))}function V1(n,t){for(let e=0;e1&&(i=i.replaceChild(0,OP(i.firstChild,t-1,1==i.childCount?e-1:0))),t>0&&(i=n.type.contentMatch.fillBefore(i).append(i),e<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(G.empty,!0)))),n.copy(i)}function z1(n,t,e,i,r){let o=n.node(t),s=r?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function Fte(n,t,e){for(let i=e;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(G.empty,!0))}return n}function AP(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let o=n.start(r);if(ot.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&e.push(r)}return e}class ld extends Xn{constructor(t,e,i){super(),this.pos=t,this.attr=e,this.value=i}apply(t){let e=t.nodeAt(this.pos);if(!e)return On.fail("No node at attribute step's position");let i=Object.create(null);for(let o in e.attrs)i[o]=e.attrs[o];i[this.attr]=this.value;let r=e.type.create(i,null,e.marks);return On.fromReplace(t,this.pos,this.pos+1,new ie(G.from(r),0,e.isLeaf?0:1))}getMap(){return eo.empty}invert(t){return new ld(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new ld(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new ld(e.pos,e.attr,e.value)}}Xn.jsonID("attr",ld);let cd=class extends Error{};cd=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(cd.prototype=Object.create(Error.prototype)).constructor=cd,cd.prototype.name="TransformError";class B1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new od}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new cd(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,i=ie.empty){let r=j1(this.doc,t,e,i);return r&&this.step(r),this}replaceWith(t,e,i){return this.replace(t,e,new ie(G.from(i),0,0))}delete(t,e){return this.replace(t,e,ie.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,i){return function Vte(n,t,e,i){if(!i.size)return n.deleteRange(t,e);let r=n.doc.resolve(t),o=n.doc.resolve(e);if(xP(r,o,i))return n.step(new Mi(t,e,i));let s=AP(r,n.doc.resolve(e));0==s[s.length-1]&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let h=r.depth,p=r.pos-1;h>0;h--,p--){let f=r.node(h).type.spec;if(f.defining||f.definingAsContext||f.isolating)break;s.indexOf(h)>-1?a=h:r.before(h)==p&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=i.openStart;for(let h=i.content,p=0;;p++){let f=h.firstChild;if(c.push(f),p==i.openStart)break;h=f.content}for(let h=u-1;h>=0;h--){let p=c[h].type,f=jte(p);if(f&&r.node(l).type!=p)u=h;else if(f||!p.isTextblock)break}for(let h=i.openStart;h>=0;h--){let p=(h+u+1)%(i.openStart+1),f=c[p];if(f)for(let m=0;m=0&&(n.replace(t,e,i),!(n.steps.length>d));h--){let p=s[h];p<0||(t=r.before(p),e=o.after(p))}}(this,t,e,i),this}replaceRangeWith(t,e,i){return function zte(n,t,e,i){if(!i.isInline&&t==e&&n.doc.resolve(t).parent.content.size){let r=function Pte(n,t,e){let i=n.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),e))return t;if(0==i.parentOffset)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,e))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,e))return i.after(r+1);if(o0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(t-i.start(s)==i.depth-s&&e>i.end(s)&&r.end(s)-e!=r.depth-s)return n.delete(i.before(s),e);n.delete(t,e)}(this,t,e),this}lift(t,e){return function Mte(n,t,e){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=G.empty,d=0;for(let f=o,m=!1;f>e;f--)m||i.index(f)>0?(m=!0,u=G.from(i.node(f).copy(u)),d++):l--;let h=G.empty,p=0;for(let f=o,m=!1;f>e;f--)m||r.after(f+1)=0;s--){if(i.size){let a=e[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=G.from(e[s].type.create(e[s].attrs,i))}let r=t.start,o=t.end;n.step(new ei(r,o,r,o,new ie(i,0,0),e.length,!0))}(this,t,e),this}setBlockType(t,e=t,i,r=null){return function Ote(n,t,e,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(t,e,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function kte(n,t,e){let i=n.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,e)}(n.doc,n.mapping.slice(o).map(a),i)){n.clearIncompatible(n.mapping.slice(o).map(a,1),i);let l=n.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return n.step(new ei(c,u,c+1,u-1,new ie(G.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,t,e,i,r),this}setNodeMarkup(t,e,i=null,r){return function Ate(n,t,e,i,r){let o=n.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);let s=e.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);n.step(new ei(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new ie(G.from(s),0,0),1,!0))}(this,t,e,i,r),this}setNodeAttribute(t,e,i){return this.step(new ld(t,e,i)),this}addNodeMark(t,e){return this.step(new Ra(t,e)),this}removeNodeMark(t,e){if(!(e instanceof Gt)){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(i.marks)))return this}return this.step(new sd(t,e)),this}split(t,e=1,i){return function Nte(n,t,e=1,i){let r=n.doc.resolve(t),o=G.empty,s=G.empty;for(let a=r.depth,l=r.depth-e,c=e-1;a>l;a--,c--){o=G.from(r.node(a).copy(o));let u=i&&i[c];s=G.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new Mi(t,t,new ie(o.append(s),e,e),!0))}(this,t,e,i),this}addMark(t,e,i){return function wte(n,t,e,i){let s,a,r=[],o=[];n.doc.nodesBetween(t,e,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,t),p=Math.min(c+l.nodeSize,e),f=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,t,e,i),this}removeMark(t,e,i){return function Ste(n,t,e,i){let r=[],o=0;n.doc.nodesBetween(t,e,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof W_){let u,c=s.marks;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,e);for(let u=0;un.step(new ts(s.from,s.to,s.style)))}(this,t,e,i),this}clearIncompatible(t,e,i){return function Dte(n,t,e,i=e.contentMatch){let r=n.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)n.step(o[a])}(this,t,e,i),this}}const U1=Object.create(null);class Fe{constructor(t,e,i){this.$anchor=t,this.$head=e,this.ranges=i||[new NP(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;o--){let s=e<0?ud(t.node(0),t.node(o),t.before(o+1),t.index(o),e,i):ud(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,i);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Lr(t.node(0))}static atStart(t){return ud(t,t,0,0,1)||new Lr(t)}static atEnd(t){return ud(t,t,t.content.size,t.childCount,-1)||new Lr(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=U1[e.type];if(!i)throw new RangeError(`No selection type ${e.type} defined`);return i.fromJSON(t,e)}static jsonID(t,e){if(t in U1)throw new RangeError("Duplicate use of selection JSON ID "+t);return U1[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Le.between(this.$anchor,this.$head).getBookmark()}}Fe.prototype.visible=!0;class NP{constructor(t,e){this.$from=t,this.$to=e}}let LP=!1;function PP(n){!LP&&!n.parent.inlineContent&&(LP=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Le extends Fe{constructor(t,e=t){PP(t),PP(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let i=t.resolve(e.map(this.head));if(!i.parent.inlineContent)return Fe.near(i);let r=t.resolve(e.map(this.anchor));return new Le(r.parent.inlineContent?r:i,i)}replace(t,e=ie.empty){if(super.replace(t,e),e==ie.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof Le&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Q_(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Le(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,i=e){let r=t.resolve(e);return new this(r,i==e?r:t.resolve(i))}static between(t,e,i){let r=t.pos-e.pos;if((!i||r)&&(i=r>=0?1:-1),!e.parent.inlineContent){let o=Fe.findFrom(e,i,!0)||Fe.findFrom(e,-i,!0);if(!o)return Fe.near(e,i);e=o.$head}return t.parent.inlineContent||(0==r||(t=(Fe.findFrom(t,-i,!0)||Fe.findFrom(t,i,!0)).$anchor).posnew Lr(n)};function ud(n,t,e,i,r,o=!1){if(t.inlineContent)return Le.create(n,e);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&Me.isSelectable(a))return Me.create(n,e-(r<0?a.nodeSize:0))}else{let l=ud(n,a,e+r,r<0?a.childCount:0,r,o);if(l)return l}e+=a.nodeSize*r}return null}function RP(n,t,e){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(Fe.near(n.doc.resolve(s),e)))}function VP(n,t){return t&&n?n.bind(t):n}class Dp{constructor(t,e,i){this.name=t,this.init=VP(e.init,i),this.apply=VP(e.apply,i)}}function zP(n,t,e){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(t):"handleDOMEvents"==i&&(r=zP(r,t,{})),e[i]=r}return e}new Dp("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Dp("selection",{init:(n,t)=>n.selection||Fe.atStart(t.doc),apply:n=>n.selection}),new Dp("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,i)=>i.selection.$cursor?n.storedMarks:null}),new Dp("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t});class pt{constructor(t){this.spec=t,this.props={},t.props&&zP(t.props,this,this.props),this.key=t.key?t.key.key:BP("plugin")}getState(t){return t[this.key]}}const W1=Object.create(null);function BP(n){return n in W1?n+"$"+ ++W1[n]:(W1[n]=0,n+"$")}class Et{constructor(t="key"){this.key=BP(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function Pr(n){if(null==n)return window;if("[object Window]"!==n.toString()){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function lc(n){return n instanceof Pr(n).Element||n instanceof Element}function to(n){return n instanceof Pr(n).HTMLElement||n instanceof HTMLElement}function G1(n){return!(typeof ShadowRoot>"u")&&(n instanceof Pr(n).ShadowRoot||n instanceof ShadowRoot)}var cc=Math.max,J_=Math.min,hd=Math.round;function q1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function UP(){return!/^((?!chrome|android).)*safari/i.test(q1())}function pd(n,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=n.getBoundingClientRect(),r=1,o=1;t&&to(n)&&(r=n.offsetWidth>0&&hd(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&hd(i.height)/n.offsetHeight||1);var a=(lc(n)?Pr(n):window).visualViewport,l=!UP()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function K1(n){var t=Pr(n);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ns(n){return n?(n.nodeName||"").toLowerCase():null}function ja(n){return((lc(n)?n.ownerDocument:n.document)||window.document).documentElement}function Y1(n){return pd(ja(n)).left+K1(n).scrollLeft}function Ys(n){return Pr(n).getComputedStyle(n)}function Q1(n){var t=Ys(n);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function Kte(n,t,e){void 0===e&&(e=!1);var i=to(t),r=to(t)&&function qte(n){var t=n.getBoundingClientRect(),e=hd(t.width)/n.offsetWidth||1,i=hd(t.height)/n.offsetHeight||1;return 1!==e||1!==i}(t),o=ja(t),s=pd(n,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==ns(t)||Q1(o))&&(a=function Gte(n){return n!==Pr(n)&&to(n)?function Wte(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):K1(n)}(t)),to(t)?((l=pd(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=Y1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Z1(n){var t=pd(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function X_(n){return"html"===ns(n)?n:n.assignedSlot||n.parentNode||(G1(n)?n.host:null)||ja(n)}function HP(n){return["html","body","#document"].indexOf(ns(n))>=0?n.ownerDocument.body:to(n)&&Q1(n)?n:HP(X_(n))}function Tp(n,t){var e;void 0===t&&(t=[]);var i=HP(n),r=i===(null==(e=n.ownerDocument)?void 0:e.body),o=Pr(i),s=r?[o].concat(o.visualViewport||[],Q1(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Tp(X_(s)))}function Yte(n){return["table","td","th"].indexOf(ns(n))>=0}function $P(n){return to(n)&&"fixed"!==Ys(n).position?n.offsetParent:null}function Mp(n){for(var t=Pr(n),e=$P(n);e&&Yte(e)&&"static"===Ys(e).position;)e=$P(e);return e&&("html"===ns(e)||"body"===ns(e)&&"static"===Ys(e).position)?t:e||function Qte(n){var t=/firefox/i.test(q1());if(/Trident/i.test(q1())&&to(n)&&"fixed"===Ys(n).position)return null;var r=X_(n);for(G1(r)&&(r=r.host);to(r)&&["html","body"].indexOf(ns(r))<0;){var o=Ys(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||t}var ar="top",no="bottom",io="right",lr="left",J1="auto",Ep=[ar,no,io,lr],fd="start",Ip="end",WP="viewport",xp="popper",GP=Ep.reduce(function(n,t){return n.concat([t+"-"+fd,t+"-"+Ip])},[]),qP=[].concat(Ep,[J1]).reduce(function(n,t){return n.concat([t,t+"-"+fd,t+"-"+Ip])},[]),lne=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function cne(n){var t=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.set(o.name,o)}),n.forEach(function(o){e.has(o.name)||r(o)}),i}function dne(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}var KP={placement:"bottom",modifiers:[],strategy:"absolute"};function YP(){for(var n=arguments.length,t=new Array(n),e=0;e=0?"x":"y"}function QP(n){var l,t=n.reference,e=n.element,i=n.placement,r=i?is(i):null,o=i?md(i):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2;switch(r){case ar:l={x:s,y:t.y-e.height};break;case no:l={x:s,y:t.y+t.height};break;case io:l={x:t.x+t.width,y:a};break;case lr:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?X1(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case fd:l[c]=l[c]-(t[u]/2-e[u]/2);break;case Ip:l[c]=l[c]+(t[u]/2-e[u]/2)}}return l}const _ne={name:"popperOffsets",enabled:!0,phase:"read",fn:function gne(n){var t=n.state;t.modifiersData[n.name]=QP({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var yne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ZP(n){var t,e=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,h=s.x,p=void 0===h?0:h,f=s.y,m=void 0===f?0:f,_="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=_.x,m=_.y;var b=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),M=lr,w=ar,N=window;if(c){var k=Mp(e),$="clientHeight",V="clientWidth";k===Pr(e)&&"static"!==Ys(k=ja(e)).position&&"absolute"===a&&($="scrollHeight",V="scrollWidth"),(r===ar||(r===lr||r===io)&&o===Ip)&&(w=no,m-=(d&&k===N&&N.visualViewport?N.visualViewport.height:k[$])-i.height,m*=l?1:-1),r!==lr&&(r!==ar&&r!==no||o!==Ip)||(M=io,p-=(d&&k===N&&N.visualViewport?N.visualViewport.width:k[V])-i.width,p*=l?1:-1)}var Qe,st=Object.assign({position:a},c&&yne),et=!0===u?function vne(n,t){var i=n.y,r=t.devicePixelRatio||1;return{x:hd(n.x*r)/r||0,y:hd(i*r)/r||0}}({x:p,y:m},Pr(e)):{x:p,y:m};return p=et.x,m=et.y,Object.assign({},st,l?((Qe={})[w]=T?"0":"",Qe[M]=b?"0":"",Qe.transform=(N.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",Qe):((t={})[w]=T?m+"px":"",t[M]=b?p+"px":"",t.transform="",t))}const Cne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function bne(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,l=void 0===a||a,c={placement:is(t.placement),variation:md(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ZP(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ZP(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},JP={name:"applyStyles",enabled:!0,phase:"write",fn:function wne(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!to(o)||!ns(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function Sne(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]).reduce(function(l,c){return l[c]="",l},{});!to(r)||!ns(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Mne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function Tne(n){var t=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=qP.reduce(function(u,d){return u[d]=function Dne(n,t,e){var i=is(n),r=[lr,ar].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},t,{placement:n})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[lr,io].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}};var Ene={left:"right",right:"left",bottom:"top",top:"bottom"};function ty(n){return n.replace(/left|right|bottom|top/g,function(t){return Ene[t]})}var Ine={start:"end",end:"start"};function XP(n){return n.replace(/start|end/g,function(t){return Ine[t]})}function eR(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&G1(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function eS(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function tR(n,t,e){return t===WP?eS(function xne(n,t){var e=Pr(n),i=ja(n),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=UP();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+Y1(n),y:l}}(n,e)):lc(t)?function kne(n,t){var e=pd(n,!1,"fixed"===t);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(t,e):eS(function One(n){var t,e=ja(n),i=K1(n),r=null==(t=n.ownerDocument)?void 0:t.body,o=cc(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=cc(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+Y1(n),l=-i.scrollTop;return"rtl"===Ys(r||e).direction&&(a+=cc(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(ja(n)))}function iR(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function rR(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}function Op(n,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?n.placement:i,o=t.strategy,s=void 0===o?n.strategy:o,a=t.boundary,l=void 0===a?"clippingParents":a,c=t.rootBoundary,u=void 0===c?WP:c,d=t.elementContext,h=void 0===d?xp:d,p=t.altBoundary,f=void 0!==p&&p,m=t.padding,_=void 0===m?0:m,b=iR("number"!=typeof _?_:rR(_,Ep)),M=n.rects.popper,w=n.elements[f?h===xp?"reference":xp:h],N=function Nne(n,t,e,i){var r="clippingParents"===t?function Ane(n){var t=Tp(X_(n)),i=["absolute","fixed"].indexOf(Ys(n).position)>=0&&to(n)?Mp(n):n;return lc(i)?t.filter(function(r){return lc(r)&&eR(r,i)&&"body"!==ns(r)}):[]}(n):[].concat(t),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=tR(n,c,i);return l.top=cc(u.top,l.top),l.right=J_(u.right,l.right),l.bottom=J_(u.bottom,l.bottom),l.left=cc(u.left,l.left),l},tR(n,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(lc(w)?w:w.contextElement||ja(n.elements.popper),l,u,s),k=pd(n.elements.reference),$=QP({reference:k,element:M,strategy:"absolute",placement:r}),V=eS(Object.assign({},M,$)),he=h===xp?V:k,De={top:N.top-he.top+b.top,bottom:he.bottom-N.bottom+b.bottom,left:N.left-he.left+b.left,right:he.right-N.right+b.right},st=n.modifiersData.offset;if(h===xp&&st){var et=st[r];Object.keys(De).forEach(function(Qe){var qt=[io,no].indexOf(Qe)>=0?1:-1,gn=[ar,no].indexOf(Qe)>=0?"y":"x";De[Qe]+=et[gn]*qt})}return De}const Fne={name:"flip",enabled:!0,phase:"main",fn:function Rne(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,p=e.flipVariations,f=void 0===p||p,m=e.allowedAutoPlacements,_=t.options.placement,b=is(_),M=l||(b!==_&&f?function Pne(n){if(is(n)===J1)return[];var t=ty(n);return[XP(n),t,XP(t)]}(_):[ty(_)]),w=[_].concat(M).reduce(function(St,fr){return St.concat(is(fr)===J1?function Lne(n,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?qP:l,u=md(t.placement),d=u?a?GP:GP.filter(function(f){return md(f)===u}):Ep,h=d.filter(function(f){return c.indexOf(f)>=0});0===h.length&&(h=d);var p=h.reduce(function(f,m){return f[m]=Op(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[is(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}(t,{placement:fr,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):fr)},[]),N=t.rects.reference,k=t.rects.popper,$=new Map,V=!0,he=w[0],De=0;De=0,gn=qt?"width":"height",Q=Op(t,{placement:st,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),ee=qt?Qe?io:lr:Qe?no:ar;N[gn]>k[gn]&&(ee=ty(ee));var ne=ty(ee),Ce=[];if(o&&Ce.push(Q[et]<=0),a&&Ce.push(Q[ee]<=0,Q[ne]<=0),Ce.every(function(St){return St})){he=st,V=!1;break}$.set(st,Ce)}if(V)for(var zt=function(fr){var Ao=w.find(function(_n){var mi=$.get(_n);if(mi)return mi.slice(0,fr).every(function(Kn){return Kn})});if(Ao)return he=Ao,"break"},Ot=f?3:1;Ot>0&&"break"!==zt(Ot);Ot--);t.placement!==he&&(t.modifiersData[i]._skip=!0,t.placement=he,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function kp(n,t,e){return cc(n,J_(t,e))}const Bne={name:"preventOverflow",enabled:!0,phase:"main",fn:function zne(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,p=void 0===h||h,f=e.tetherOffset,m=void 0===f?0:f,_=Op(t,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),b=is(t.placement),T=md(t.placement),M=!T,w=X1(b),N=function jne(n){return"x"===n?"y":"x"}(w),k=t.modifiersData.popperOffsets,$=t.rects.reference,V=t.rects.popper,he="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,De="number"==typeof he?{mainAxis:he,altAxis:he}:Object.assign({mainAxis:0,altAxis:0},he),st=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,et={x:0,y:0};if(k){if(o){var Qe,qt="y"===w?ar:lr,gn="y"===w?no:io,Q="y"===w?"height":"width",ee=k[w],ne=ee+_[qt],Ce=ee-_[gn],at=p?-V[Q]/2:0,zt=T===fd?$[Q]:V[Q],Ot=T===fd?-V[Q]:-$[Q],sn=t.elements.arrow,St=p&&sn?Z1(sn):{width:0,height:0},fr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Ao=fr[qt],_n=fr[gn],mi=kp(0,$[Q],St[Q]),Kn=M?$[Q]/2-at-mi-Ao-De.mainAxis:zt-mi-Ao-De.mainAxis,jr=M?-$[Q]/2+at+mi+_n+De.mainAxis:Ot+mi+_n+De.mainAxis,_s=t.elements.arrow&&Mp(t.elements.arrow),Df=null!=(Qe=st?.[w])?Qe:0,xv=ee+jr-Df,Tf=kp(p?J_(ne,ee+Kn-Df-(_s?"y"===w?_s.clientTop||0:_s.clientLeft||0:0)):ne,ee,p?cc(Ce,xv):Ce);k[w]=Tf,et[w]=Tf-ee}if(a){var Mf,ra=k[N],ll="y"===N?"height":"width",Ef=ra+_["x"===w?ar:lr],Lc=ra-_["x"===w?no:io],If=-1!==[ar,lr].indexOf(b),Av=null!=(Mf=st?.[N])?Mf:0,Nv=If?Ef:ra-$[ll]-V[ll]-Av+De.altAxis,Lv=If?ra+$[ll]+V[ll]-Av-De.altAxis:Lc,Pv=p&&If?function Vne(n,t,e){var i=kp(n,t,e);return i>e?e:i}(Nv,ra,Lv):kp(p?Nv:Ef,ra,p?Lv:Lc);k[N]=Pv,et[N]=Pv-ra}t.modifiersData[i]=et}},requiresIfExists:["offset"]},Wne={name:"arrow",enabled:!0,phase:"main",fn:function Hne(n){var t,e=n.state,i=n.name,r=n.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=is(e.placement),l=X1(a),u=[lr,io].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,e){return iR("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:rR(t,Ep))}(r.padding,e),h=Z1(o),p="y"===l?ar:lr,f="y"===l?no:io,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],_=s[l]-e.rects.reference[l],b=Mp(o),T=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,k=T/2-h[u]/2+(m/2-_/2),$=kp(d[p],k,T-h[u]-d[f]);e.modifiersData[i]=((t={})[l]=$,t.centerOffset=$-k,t)}},effect:function $ne(n){var t=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||eR(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function oR(n,t,e){return void 0===e&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function sR(n){return[ar,io,no,lr].some(function(t){return n[t]>=0})}var qne=[mne,_ne,Cne,JP,Mne,Fne,Bne,Wne,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Gne(n){var t=n.state,e=n.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=Op(t,{elementContext:"reference"}),a=Op(t,{altBoundary:!0}),l=oR(s,i),c=oR(a,r,o),u=sR(l),d=sR(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],Kne=pne({defaultModifiers:qne}),aR="tippy-content",cR="tippy-arrow",uR="tippy-svg-arrow",Va={passive:!0,capture:!0},dR=function(){return document.body};function tS(n,t,e){return Array.isArray(n)?n[t]??(Array.isArray(e)?e[t]:e):n}function nS(n,t){var e={}.toString.call(n);return 0===e.indexOf("[object")&&e.indexOf(t+"]")>-1}function hR(n,t){return"function"==typeof n?n.apply(void 0,t):n}function pR(n,t){return 0===t?n:function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)};var e}function za(n){return[].concat(n)}function fR(n,t){-1===n.indexOf(t)&&n.push(t)}function gd(n){return[].slice.call(n)}function gR(n){return Object.keys(n).reduce(function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t},{})}function uc(){return document.createElement("div")}function ny(n){return["Element","Fragment"].some(function(t){return nS(n,t)})}function oS(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function Ap(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function sS(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,e)})}function vR(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var rs={isTouch:!1},bR=0;function nie(){rs.isTouch||(rs.isTouch=!0,window.performance&&document.addEventListener("mousemove",CR))}function CR(){var n=performance.now();n-bR<20&&(rs.isTouch=!1,document.removeEventListener("mousemove",CR)),bR=n}function iie(){var n=document.activeElement;(function _R(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var sie=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,cr=Object.assign({appendTo:dR,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),uie=Object.keys(cr);function MR(n){var e=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=cr[o])?a:r.defaultValue),i},{});return Object.assign({},n,e)}function ER(n,t){var e=Object.assign({},t,{content:hR(t.content,[n])},t.ignoreAttributes?{}:function hie(n,t){return(t?Object.keys(MR(Object.assign({},cr,{plugins:t}))):uie).reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if("content"===o)r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{})}(n,t.plugins));return e.aria=Object.assign({},cr.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?t.interactive:e.aria.expanded,content:"auto"===e.aria.content?t.interactive?null:"describedby":e.aria.content},e}function aS(n,t){n.innerHTML=t}function IR(n){var t=uc();return!0===n?t.className=cR:(t.className=uR,ny(n)?t.appendChild(n):aS(t,n)),t}function xR(n,t){ny(t.content)?(aS(n,""),n.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?aS(n,t.content):n.textContent=t.content)}function iy(n){var t=n.firstElementChild,e=gd(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(aR)}),arrow:e.find(function(i){return i.classList.contains(cR)||i.classList.contains(uR)}),backdrop:e.find(function(i){return i.classList.contains("tippy-backdrop")})}}function OR(n){var t=uc(),e=uc();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=uc();function r(o,s){var a=iy(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&xR(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(IR(s.arrow))):l.appendChild(IR(s.arrow)):u&&l.removeChild(u)}return i.className=aR,i.setAttribute("data-state","hidden"),xR(i,n.props),t.appendChild(e),e.appendChild(i),r(n.props,n.props),{popper:t,onUpdate:r}}OR.$$tippy=!0;var fie=1,ry=[],oy=[];function mie(n,t){var i,r,o,u,d,h,m,e=ER(n,Object.assign({},cr,MR(gR(t)))),s=!1,a=!1,l=!1,c=!1,p=[],f=pR(Iv,e.interactiveDebounce),_=fie++,T=function Jne(n){return n.filter(function(t,e){return n.indexOf(t)===e})}(e.plugins),w={id:_,reference:n,popper:uc(),popperInstance:null,props:e,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:T,clearDelayTimeouts:function Nv(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function Lv(z){if(!w.state.isDestroyed){ne("onBeforeUpdate",[w,z]),Ev();var be=w.props,ze=ER(n,Object.assign({},be,gR(z),{ignoreAttributes:!0}));w.props=ze,_s(),be.interactiveDebounce!==ze.interactiveDebounce&&(zt(),f=pR(Iv,ze.interactiveDebounce)),be.triggerTarget&&!ze.triggerTarget?za(be.triggerTarget).forEach(function(Bt){Bt.removeAttribute("aria-expanded")}):ze.triggerTarget&&n.removeAttribute("aria-expanded"),at(),ee(),$&&$(be,ze),w.popperInstance&&(Ov(),ll().forEach(function(Bt){requestAnimationFrame(Bt._tippy.popperInstance.forceUpdate)})),ne("onAfterUpdate",[w,z])}},setContent:function Pv(z){w.setProps({content:z})},show:function n1e(){var z=w.state.isVisible,be=w.state.isDestroyed,ze=!w.state.isEnabled,Bt=rs.isTouch&&!w.props.touch,Dt=tS(w.props.duration,0,cr.duration);if(!(z||be||ze||Bt||Qe().hasAttribute("disabled")||(ne("onShow",[w],!1),!1===w.props.onShow(w)))){if(w.state.isVisible=!0,et()&&(k.style.visibility="visible"),ee(),fr(),w.state.isMounted||(k.style.transition="none"),et()){var Qi=gn();oS([Qi.box,Qi.content],0)}h=function(){var Pc;if(w.state.isVisible&&!c){if(c=!0,k.style.transition=w.props.moveTransition,et()&&w.props.animation){var gT=gn(),Rv=gT.box,Pd=gT.content;oS([Rv,Pd],Dt),Ap([Rv,Pd],"visible")}Ce(),at(),fR(oy,w),null==(Pc=w.popperInstance)||Pc.forceUpdate(),ne("onMount",[w]),w.props.animation&&et()&&function mi(z,be){Kn(z,be)}(Dt,function(){w.state.isShown=!0,ne("onShown",[w])})}},function ra(){var be,z=w.props.appendTo,ze=Qe();(be=w.props.interactive&&z===dR||"parent"===z?ze.parentNode:hR(z,[ze])).contains(k)||be.appendChild(k),w.state.isMounted=!0,Ov()}()}},hide:function i1e(){var z=!w.state.isVisible,be=w.state.isDestroyed,ze=!w.state.isEnabled,Bt=tS(w.props.duration,1,cr.duration);if(!(z||be||ze)&&(ne("onHide",[w],!1),!1!==w.props.onHide(w))){if(w.state.isVisible=!1,w.state.isShown=!1,c=!1,s=!1,et()&&(k.style.visibility="hidden"),zt(),Ao(),ee(!0),et()){var Dt=gn(),Qi=Dt.box,uo=Dt.content;w.props.animation&&(oS([Qi,uo],Bt),Ap([Qi,uo],"hidden"))}Ce(),at(),w.props.animation?et()&&function _n(z,be){Kn(z,function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&be()})}(Bt,w.unmount):w.unmount()}},hideWithInteractivity:function r1e(z){qt().addEventListener("mousemove",f),fR(ry,f),f(z)},enable:function If(){w.state.isEnabled=!0},disable:function Av(){w.hide(),w.state.isEnabled=!1},unmount:function o1e(){w.state.isVisible&&w.hide(),w.state.isMounted&&(kv(),ll().forEach(function(z){z._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),oy=oy.filter(function(z){return z!==w}),w.state.isMounted=!1,ne("onHidden",[w]))},destroy:function s1e(){w.state.isDestroyed||(w.clearDelayTimeouts(),w.unmount(),Ev(),delete n._tippy,w.state.isDestroyed=!0,ne("onDestroy",[w]))}};if(!e.render)return w;var N=e.render(w),k=N.popper,$=N.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,n._tippy=w,k._tippy=w;var V=T.map(function(z){return z.fn(w)}),he=n.hasAttribute("aria-expanded");return _s(),at(),ee(),ne("onCreate",[w]),e.showOnCreate&&Ef(),k.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&qt().addEventListener("mousemove",f)}),w;function De(){var z=w.props.touch;return Array.isArray(z)?z:[z,0]}function st(){return"hold"===De()[0]}function et(){var z;return!(null==(z=w.props.render)||!z.$$tippy)}function Qe(){return m||n}function qt(){var z=Qe().parentNode;return z?function yR(n){var t,i=za(n)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(z):document}function gn(){return iy(k)}function Q(z){return w.state.isMounted&&!w.state.isVisible||rs.isTouch||u&&"focus"===u.type?0:tS(w.props.delay,z?0:1,cr.delay)}function ee(z){void 0===z&&(z=!1),k.style.pointerEvents=w.props.interactive&&!z?"":"none",k.style.zIndex=""+w.props.zIndex}function ne(z,be,ze){var Bt;void 0===ze&&(ze=!0),V.forEach(function(Dt){Dt[z]&&Dt[z].apply(Dt,be)}),ze&&(Bt=w.props)[z].apply(Bt,be)}function Ce(){var z=w.props.aria;if(z.content){var be="aria-"+z.content,ze=k.id;za(w.props.triggerTarget||n).forEach(function(Dt){var Qi=Dt.getAttribute(be);if(w.state.isVisible)Dt.setAttribute(be,Qi?Qi+" "+ze:ze);else{var uo=Qi&&Qi.replace(ze,"").trim();uo?Dt.setAttribute(be,uo):Dt.removeAttribute(be)}})}}function at(){!he&&w.props.aria.expanded&&za(w.props.triggerTarget||n).forEach(function(be){w.props.interactive?be.setAttribute("aria-expanded",w.state.isVisible&&be===Qe()?"true":"false"):be.removeAttribute("aria-expanded")})}function zt(){qt().removeEventListener("mousemove",f),ry=ry.filter(function(z){return z!==f})}function Ot(z){if(!rs.isTouch||!l&&"mousedown"!==z.type){var be=z.composedPath&&z.composedPath()[0]||z.target;if(!w.props.interactive||!vR(k,be)){if(za(w.props.triggerTarget||n).some(function(ze){return vR(ze,be)})){if(rs.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else ne("onClickOutside",[w,z]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||Ao())}}}function sn(){l=!0}function St(){l=!1}function fr(){var z=qt();z.addEventListener("mousedown",Ot,!0),z.addEventListener("touchend",Ot,Va),z.addEventListener("touchstart",St,Va),z.addEventListener("touchmove",sn,Va)}function Ao(){var z=qt();z.removeEventListener("mousedown",Ot,!0),z.removeEventListener("touchend",Ot,Va),z.removeEventListener("touchstart",St,Va),z.removeEventListener("touchmove",sn,Va)}function Kn(z,be){var ze=gn().box;function Bt(Dt){Dt.target===ze&&(sS(ze,"remove",Bt),be())}if(0===z)return be();sS(ze,"remove",d),sS(ze,"add",Bt),d=Bt}function jr(z,be,ze){void 0===ze&&(ze=!1),za(w.props.triggerTarget||n).forEach(function(Dt){Dt.addEventListener(z,be,ze),p.push({node:Dt,eventType:z,handler:be,options:ze})})}function _s(){st()&&(jr("touchstart",Df,{passive:!0}),jr("touchend",xv,{passive:!0})),function Zne(n){return n.split(/\s+/).filter(Boolean)}(w.props.trigger).forEach(function(z){if("manual"!==z)switch(jr(z,Df),z){case"mouseenter":jr("mouseleave",xv);break;case"focus":jr(sie?"focusout":"blur",Tf);break;case"focusin":jr("focusout",Tf)}})}function Ev(){p.forEach(function(z){z.node.removeEventListener(z.eventType,z.handler,z.options)}),p=[]}function Df(z){var be,ze=!1;if(w.state.isEnabled&&!Mf(z)&&!a){var Bt="focus"===(null==(be=u)?void 0:be.type);u=z,m=z.currentTarget,at(),!w.state.isVisible&&function rS(n){return nS(n,"MouseEvent")}(z)&&ry.forEach(function(Dt){return Dt(z)}),"click"===z.type&&(w.props.trigger.indexOf("mouseenter")<0||s)&&!1!==w.props.hideOnClick&&w.state.isVisible?ze=!0:Ef(z),"click"===z.type&&(s=!ze),ze&&!Bt&&Lc(z)}}function Iv(z){var be=z.target,ze=Qe().contains(be)||k.contains(be);"mousemove"===z.type&&ze||function tie(n,t){var e=t.clientX,i=t.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function mR(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-i+("bottom"===c?u.top.y:0)>l||i-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-e+("right"===c?u.left.x:0)>l||e-o.right-("left"===c?u.right.x:0)>l})}(ll().concat(k).map(function(Dt){var Qi,Ld=null==(Qi=Dt._tippy.popperInstance)?void 0:Qi.state;return Ld?{popperRect:Dt.getBoundingClientRect(),popperState:Ld,props:e}:null}).filter(Boolean),z)&&(zt(),Lc(z))}function xv(z){if(!(Mf(z)||w.props.trigger.indexOf("click")>=0&&s)){if(w.props.interactive)return void w.hideWithInteractivity(z);Lc(z)}}function Tf(z){w.props.trigger.indexOf("focusin")<0&&z.target!==Qe()||w.props.interactive&&z.relatedTarget&&k.contains(z.relatedTarget)||Lc(z)}function Mf(z){return!!rs.isTouch&&st()!==z.type.indexOf("touch")>=0}function Ov(){kv();var z=w.props,be=z.popperOptions,ze=z.placement,Bt=z.offset,Dt=z.getReferenceClientRect,Qi=z.moveTransition,uo=et()?iy(k).arrow:null,Ld=Dt?{getBoundingClientRect:Dt,contextElement:Dt.contextElement||Qe()}:n,Pc=[{name:"offset",options:{offset:Bt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Qi}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Rv){var Pd=Rv.state;if(et()){var _T=gn().box;["placement","reference-hidden","escaped"].forEach(function(Fv){"placement"===Fv?_T.setAttribute("data-placement",Pd.placement):Pd.attributes.popper["data-popper-"+Fv]?_T.setAttribute("data-"+Fv,""):_T.removeAttribute("data-"+Fv)}),Pd.attributes.popper={}}}}];et()&&uo&&Pc.push({name:"arrow",options:{element:uo,padding:3}}),Pc.push.apply(Pc,be?.modifiers||[]),w.popperInstance=Kne(Ld,k,Object.assign({},be,{placement:ze,onFirstUpdate:h,modifiers:Pc}))}function kv(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function ll(){return gd(k.querySelectorAll("[data-tippy-root]"))}function Ef(z){w.clearDelayTimeouts(),z&&ne("onTrigger",[w,z]),fr();var be=Q(!0),ze=De(),Dt=ze[1];rs.isTouch&&"hold"===ze[0]&&Dt&&(be=Dt),be?i=setTimeout(function(){w.show()},be):w.show()}function Lc(z){if(w.clearDelayTimeouts(),ne("onUntrigger",[w,z]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(z.type)>=0&&s)){var be=Q(!1);be?r=setTimeout(function(){w.state.isVisible&&w.hide()},be):o=requestAnimationFrame(function(){w.hide()})}}else Ao()}}function Ba(n,t){void 0===t&&(t={});var e=cr.plugins.concat(t.plugins||[]);!function rie(){document.addEventListener("touchstart",nie,Va),window.addEventListener("blur",iie)}();var i=Object.assign({},t,{plugins:e}),a=function eie(n){return ny(n)?[n]:function Xne(n){return nS(n,"NodeList")}(n)?gd(n):Array.isArray(n)?n:gd(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&mie(c,i);return u&&l.push(u),l},[]);return ny(n)?a[0]:a}Ba.defaultProps=cr,Ba.setDefaultProps=function(t){Object.keys(t).forEach(function(i){cr[i]=t[i]})},Ba.currentInput=rs,Object.assign({},JP,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),Ba.setDefaultProps({render:OR});const ss=Ba,ro=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},dc=function(n,t,e,i){return e&&(LR(n,t,e,i,-1)||LR(n,t,e,i,1))},Sie=/^(img|br|input|textarea|hr)$/i;function LR(n,t,e,i,r){for(;;){if(n==e&&t==i)return!0;if(t==(r<0?0:as(n))){let o=n.parentNode;if(!o||1!=o.nodeType||Tie(n)||Sie.test(n.nodeName)||"false"==n.contentEditable)return!1;t=ro(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?as(n):0}}}function as(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Tie(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const ay=function(n){return n.focusNode&&dc(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function hc(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const ls=typeof navigator<"u"?navigator:null,PR=typeof document<"u"?document:null,Ua=ls&&ls.userAgent||"",cS=/Edge\/(\d+)/.exec(Ua),RR=/MSIE \d/.exec(Ua),uS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ua),ur=!!(RR||uS||cS),Ha=RR?document.documentMode:uS?+uS[1]:cS?+cS[1]:0,Io=!ur&&/gecko\/(\d+)/i.test(Ua);Io&&/Firefox\/(\d+)/.exec(Ua);const dS=!ur&&/Chrome\/(\d+)/.exec(Ua),Ei=!!dS,Iie=dS?+dS[1]:0,Gi=!ur&&!!ls&&/Apple Computer/.test(ls.vendor),_d=Gi&&(/Mobile\/\w+/.test(Ua)||!!ls&&ls.maxTouchPoints>2),oo=_d||!!ls&&/Mac/.test(ls.platform),xie=!!ls&&/Win/.test(ls.platform),xo=/Android \d/.test(Ua),ly=!!PR&&"webkitFontSmoothing"in PR.documentElement.style,Oie=ly?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Fp=function(n){n&&(this.nodeName=n)};function nF(n){return n.editable?n.hasFocus():function cF(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Zs(n,t=!1){let e=n.state.selection;if(function sF(n,t){if(t instanceof Me){let e=n.docView.descAt(t.from);e!=n.lastSelectedViewDesc&&(aF(n),e&&e.selectNode(),n.lastSelectedViewDesc=e)}else aF(n)}(n,e),nF(n)){if(!t&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&Ei){let i=n.domSelectionRange(),r=n.domObserver.currentSelection;if(i.anchorNode&&r.anchorNode&&dc(i.anchorNode,i.anchorOffset,r.anchorNode,r.anchorOffset))return n.input.mouseDown.delayedSelectionSync=!0,void n.domObserver.setCurSelection()}if(n.domObserver.disconnectSelection(),n.cursorWrapper)!function ire(n){let t=n.domSelection(),e=document.createRange(),i=n.cursorWrapper.dom,r="IMG"==i.nodeName;r?e.setEnd(i.parentNode,ro(i)+1):e.setEnd(i,0),e.collapse(!1),t.removeAllRanges(),t.addRange(e),!r&&!n.state.selection.visible&&ur&&Ha<=11&&(i.disabled=!0,i.disabled=!1)}(n);else{let o,s,{anchor:i,head:r}=e;iF&&!(e instanceof Le)&&(e.$from.parent.inlineContent||(o=rF(n,e.from)),!e.empty&&!e.$from.parent.inlineContent&&(s=rF(n,e.to))),n.docView.setSelection(i,r,n.root,t),iF&&(o&&oF(o),s&&oF(s)),e.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function nre(n){let t=n.dom.ownerDocument;t.removeEventListener("selectionchange",n.input.hideSelectionGuard);let e=n.domSelectionRange(),i=e.anchorNode,r=e.anchorOffset;t.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(e.anchorNode!=i||e.anchorOffset!=r)&&(t.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!nF(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}Fp.prototype=Object.create(null),new Fp;const iF=Gi||Ei&&Iie<63;function rF(n,t){let{node:e,offset:i}=n.docView.domFromPos(t,0),r=ir(n,t,e))||Le.between(t,e,i)}function bS(n,t){let{$anchor:e,$head:i}=n.selection,r=t>0?e.max(i):e.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(t>0?r.after():r.before()):null:r;return o&&Fe.findFrom(o,t)}function gc(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function uF(n,t,e){let i=n.state.selection;if(!(i instanceof Le)){if(i instanceof Me&&i.node.isInline)return gc(n,new Le(t>0?i.$to:i.$from));{let r=bS(n.state,t);return!!r&&gc(n,r)}}if(!i.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let r=bS(n.state,t);return!!(r&&r instanceof Me)&&gc(n,r)}if(!(oo&&e.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(Me.isSelectable(o)?gc(n,new Me(t<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!ly&&gc(n,new Le(n.state.doc.resolve(t<0?a:a+o.nodeSize))))}}function uy(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function jp(n){let t=n.pmViewDesc;return t&&0==t.size&&(n.nextSibling||"BR"!=n.nodeName)}function Vp(n,t){return t<0?function ore(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let r,o,s=!1;for(Io&&1==e.nodeType&&i0){if(1!=e.nodeType)break;{let a=e.childNodes[i-1];if(jp(a))r=e,o=--i;else{if(3!=a.nodeType)break;e=a,i=e.nodeValue.length}}}else{if(hF(e))break;{let a=e.previousSibling;for(;a&&jp(a);)r=e.parentNode,o=ro(a),a=a.previousSibling;if(a)e=a,i=uy(e);else{if(e=e.parentNode,e==n.dom)break;i=0}}}s?CS(n,e,i):r&&CS(n,r,o)}(n):dF(n)}function dF(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let o,s,r=uy(e);for(;;)if(i{n.state==r&&Zs(n)},50)}function pF(n,t){let e=n.state.doc.resolve(t);if(!Ei&&!xie&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let o=n.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(n.dom).direction?"rtl":"ltr"}function fF(n,t,e){let i=n.state.selection;if(i instanceof Le&&!i.empty||e.indexOf("s")>-1||oo&&e.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=bS(n.state,t);if(s&&s instanceof Me)return gc(n,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof Lr?Fe.near(s,t):Fe.findFrom(s,t);return!!a&&gc(n,a)}return!1}function mF(n,t){if(!(n.state.selection instanceof Le))return!0;let{$head:e,$anchor:i,empty:r}=n.state.selection;if(!e.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function gF(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function _F(n,t){n.someProp("transformCopied",p=>{t=p(t,n)});let e=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let p=i.firstChild;e.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),i=p.content}let s=n.someProp("clipboardSerializer")||es.fromSchema(n.state.schema),a=TF(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=SF[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(e)}`),{dom:l,text:n.someProp("clipboardTextSerializer",p=>p(t,n))||t.content.textBetween(0,t.content.size,"\n\n")}}function yF(n,t,e,i,r){let s,a,o=r.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(i||o||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,o||i,n)}),o)return t?new ie(G.from(n.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):ie.empty;let d=n.someProp("clipboardTextParser",h=>h(t,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:p}=n.state,f=es.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let _=s.appendChild(document.createElement("p"));m&&_.appendChild(f.serializeNode(p.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{e=d(e,n)}),s=function dre(n){let t=/^(\s*]*>)*/.exec(n);t&&(n=n.slice(t[0].length));let r,e=TF().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&SF[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),e.innerHTML=n,r)for(let o=0;o0;d--){let h=s.firstChild;for(;h&&1!=h.nodeType;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||rd.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||cre.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function pre(n,t){if(!n.size)return n;let i,e=n.content.firstChild.type.schema;try{i=JSON.parse(t)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=e.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=G.from(l.create(i[a+1],r)),o++,s++}return new ie(r,o,s)}(wF(a,+u[1],+u[2]),u[4]);else if(a=ie.maxOpen(function ure(n,t){if(n.childCount<2)return n;for(let e=t.depth;e>=0;e--){let o,r=t.node(e).contentMatchAt(t.index(e)),s=[];if(n.forEach(a=>{if(!s)return;let c,l=r.findWrapping(a.type);if(!l)return s=null;if(c=s.length&&o.length&&bF(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=CF(s[s.length-1],o.length));let u=vF(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return G.from(s)}return n}(a.content,r),!0),a.openStart||a.openEnd){let d=0,h=0;for(let p=a.content.firstChild;d{a=d(a,n)}),a}const cre=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function vF(n,t,e=0){for(let i=t.length-1;i>=e;i--)n=t[i].create(null,G.from(n));return n}function bF(n,t,e,i,r){if(r1&&(o=0),r=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(G.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function wF(n,t,e){return t0;s--)if(n.someProp(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),r,!0):a(n,e,o.node(s),o.before(s),r,!1)))return!0;return!1}function vd(n,t,e){n.focused||n.focus();let i=n.state.tr.setSelection(t);"pointer"==e&&i.setMeta("pointer",!0),n.dispatch(i)}function Dre(n,t,e,i){return TS(n,"handleDoubleClickOn",t,e,i)||n.someProp("handleDoubleClick",r=>r(n,t,i))}function Tre(n,t,e,i){return TS(n,"handleTripleClickOn",t,e,i)||n.someProp("handleTripleClick",r=>r(n,t,i))||function Mre(n,t,e){if(0!=e.button)return!1;let i=n.state.doc;if(-1==t)return!!i.inlineContent&&(vd(n,Le.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(t);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)vd(n,Le.create(i,a+1,a+1+s.content.size),"pointer");else{if(!Me.isSelectable(s))continue;vd(n,Me.create(i,a),"pointer")}return!0}}(n,e,i)}function MS(n){return hy(n)}Ki.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=16==e.keyCode||e.shiftKey,!EF(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!xo||!Ei||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!_d||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",i=>i(n,e))||function lre(n,t){let e=t.keyCode,i=function are(n){let t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}(t);if(8==e||oo&&72==e&&"c"==i)return mF(n,-1)||Vp(n,-1);if(46==e||oo&&68==e&&"c"==i)return mF(n,1)||Vp(n,1);if(13==e||27==e)return!0;if(37==e||oo&&66==e&&"c"==i){let r=37==e?"ltr"==pF(n,n.state.selection.from)?-1:1:-1;return uF(n,r,i)||Vp(n,r)}if(39==e||oo&&70==e&&"c"==i){let r=39==e?"ltr"==pF(n,n.state.selection.from)?1:-1:1;return uF(n,r,i)||Vp(n,r)}return 38==e||oo&&80==e&&"c"==i?fF(n,-1,i)||Vp(n,-1):40==e||oo&&78==e&&"c"==i?function sre(n){if(!Gi||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:e}=n.domSelectionRange();if(t&&1==t.nodeType&&0==e&&t.firstChild&&"false"==t.firstChild.contentEditable){let i=t.firstChild;gF(n,i,"true"),setTimeout(()=>gF(n,i,"false"),20)}return!1}(n)||fF(n,1,i)||dF(n):i==(oo?"m":"c")&&(66==e||73==e||89==e||90==e)}(n,e)?e.preventDefault():qa(n,"key");else{let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,hc(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},Ki.keyup=(n,t)=>{16==t.keyCode&&(n.input.shiftKey=!1)},Ki.keypress=(n,t)=>{let e=t;if(EF(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||oo&&e.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,e)))return void e.preventDefault();let i=n.state.selection;if(!(i instanceof Le&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(e.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}};const MF=oo?"metaKey":"ctrlKey";qi.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let i=MS(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function bre(n,t){let e=t.x-n.clientX,i=t.y-n.clientY;return e*e+i*i<100}(e,n.input.lastClick)&&!e[MF]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(dy(e));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Ere(n,s,e,!!i)):("doubleClick"==o?Dre:Tre)(n,s.pos,s.inside,e)?e.preventDefault():qa(n,"pointer"))};class Ere{constructor(t,e,i,r){let o,s;if(this.view=t,this.pos=e,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[MF],this.allowDefault=i.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let u=t.state.doc.resolve(e.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof Me&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Io||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),qa(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Zs(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(dy(t))),this.updateAllowDefault(t),this.allowDefault||!e?qa(this.view,"pointer"):function Sre(n,t,e,i,r){return TS(n,"handleClickOn",t,e,i)||n.someProp("handleClick",o=>o(n,t,i))||(r?function wre(n,t){if(-1==t)return!1;let i,r,e=n.state.selection;e instanceof Me&&(i=e.node);let o=n.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Me.isSelectable(a)){r=i&&e.$from.depth>0&&s>=e.$from.depth&&o.before(e.$from.depth+1)==e.$from.pos?o.before(e.$from.depth):o.before(s);break}}return null!=r&&(vd(n,Me.create(n.state.doc,r),"pointer"),!0)}(n,e):function Cre(n,t){if(-1==t)return!1;let e=n.state.doc.resolve(t),i=e.nodeAfter;return!!(i&&i.isAtom&&Me.isSelectable(i))&&(vd(n,new Me(e),"pointer"),!0)}(n,e))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Gi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ei&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(vd(this.view,Fe.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):qa(this.view,"pointer")}move(t){this.updateAllowDefault(t),qa(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function EF(n,t){return!!n.composing||!!(Gi&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}qi.touchstart=n=>{n.input.lastTouch=Date.now(),MS(n),qa(n,"pointer")},qi.touchmove=n=>{n.input.lastTouch=Date.now(),qa(n,"pointer")},qi.contextmenu=n=>MS(n);const Ire=xo?5e3:-1;function IF(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>hy(n),t))}function hy(n,t=!1){if(!(xo&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),function xF(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function xre(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}(n),t||n.docView&&n.docView.dirty){let e=function _S(n,t=null){let e=n.domSelectionRange(),i=n.state.doc;if(!e.focusNode)return null;let r=n.docView.nearestDesc(e.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(ay(e)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Me.isSelectable(u)&&r.parent&&(!u.isInline||!function Die(n,t,e){for(let i=0==t,r=t==as(n);i||r;){if(n==e)return!0;let o=ro(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==as(n)}}(e.focusNode,e.focusOffset,r.dom))){let d=r.posBefore;c=new Me(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=vS(n,l,a,"pointer"==t||n.state.selection.head{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||e.marks(),hy(n,!0),n.markCursor=null;else if(hy(n),Io&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&1==r.nodeType&&0!=o;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(3==s.nodeType){n.domSelection().collapse(s,s.nodeValue.length);break}r=s,o=-1}}n.input.composing=!0}IF(n,Ire)},Ki.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionID++,IF(n,20))};const bd=ur&&Ha<15||_d&&Oie<604;function zp(n,t,e,i,r){let o=yF(n,t,e,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||ie.empty)))return!0;if(!o)return!1;let s=function kre(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,n.input.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}qi.copy=Ki.cut=(n,t)=>{let e=t,i=n.state.selection,r="cut"==e.type;if(i.empty)return;let o=bd?null:e.clipboardData,s=i.content(),{dom:a,text:l}=_F(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function Ore(n,t){if(!n.dom.parentNode)return;let e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ki.paste=(n,t)=>{let e=t;if(n.composing&&!xo)return;let i=bd?null:e.clipboardData;i&&zp(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,e)?e.preventDefault():function Are(n,t){if(!n.dom.parentNode)return;let e=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),e?zp(n,i.value,null,n.input.shiftKey,t):zp(n,i.textContent,i.innerHTML,n.input.shiftKey,t)},50)}(n,e)};class Nre{constructor(t,e){this.slice=t,this.move=e}}const OF=oo?"altKey":"ctrlKey";qi.dragstart=(n,t)=>{let e=t,i=n.input.mouseDown;if(i&&i.done(),!e.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(dy(e));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Me?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(Me.create(n.state.doc,i.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(Me.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=_F(n,s);e.dataTransfer.clearData(),e.dataTransfer.setData(bd?"Text":"text/html",a.innerHTML),e.dataTransfer.effectAllowed="copyMove",bd||e.dataTransfer.setData("text/plain",l),n.dragging=new Nre(s,!e[OF])},qi.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},Ki.dragover=Ki.dragenter=(n,t)=>t.preventDefault(),Ki.drop=(n,t)=>{let e=t,i=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let r=n.posAtCoords(dy(e));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",f=>{s=f(s,n)}):s=yF(n,e.dataTransfer.getData(bd?"Text":"text/plain"),bd?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!i||e[OF]);if(n.someProp("handleDrop",f=>f(n,e,s||ie.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?IP(n.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=n.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let p=c.doc.resolve(u);if(d&&Me.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Me(p));else{let f=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,_,b,T)=>f=T),c.setSelection(vS(n,p,c.doc.resolve(f)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},qi.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Zs(n)},20))},qi.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},qi.beforeinput=(n,t)=>{if(Ei&&xo&&"deleteContentBackward"==t.inputType){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,hc(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Ki)qi[n]=Ki[n];function Bp(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class ES{constructor(t,e){this.toDOM=t,this.spec=e||_c,this.side=this.spec.side||0}map(t,e,i,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new Gn(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof ES&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Bp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Ka{constructor(t,e){this.attrs=t,this.spec=e||_c}map(t,e,i,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Gn(o,s,this)}valid(t,e){return e.from=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,i,r+a,o)}}map(t,e,i){return this==Ii||0==t.maps.length?this:this.mapInner(t,e,0,0,i||_c)}mapInner(t,e,i,r,o){let s;for(let a=0;a{let _=m-f-(p-h);for(let b=0;bT+u-d)continue;let M=a[b]+u-d;p>=M?a[b+1]=h<=M?-2:-1:f>=r&&_&&(a[b]+=_,a[b+1]+=_)}d+=_}),u=e.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let p=e.map(n[c+1]+o,-1)-r,{index:f,offset:m}=i.content.findIndex(d),_=i.maybeChild(f);if(_&&m==d&&m+_.nodeSize==p){let b=a[c+2].mapInner(e,_,u+1,n[c]+o+1,s);b!=Ii?(a[c]=d,a[c+1]=p,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=function Pre(n,t,e,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=AF(e,a,c)){for(r||(r=this.children.slice());oa&&d.to=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+e.content.size;for(let a=0;ao&&l.type instanceof Ka){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(t,e,_c));return Ya.from(i)}forChild(t,e){if(e.isLeaf)return en.empty;let i=[];for(let r=0;re instanceof en)?t:t.reduce((e,i)=>e.concat(i instanceof en?i:i.members),[]))}}}function kF(n,t){if(!t||!n.length)return n;let e=[];for(let i=0;ie&&s.to{let c=AF(n,a,l+e);if(c){o=!0;let u=py(c,a,e+l+1,i);u!=Ii&&r.push(l,l+a.nodeSize,u)}});let s=kF(o?NF(n):n,-e).sort(yc);for(let a=0;a0;)t++;n.splice(t,0,e)}for(var Qa={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},fy={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Jre=typeof navigator<"u"&&/Mac/.test(navigator.platform),Xre=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),hi=0;hi<10;hi++)Qa[48+hi]=Qa[96+hi]=String(hi);for(hi=1;hi<=24;hi++)Qa[hi+111]="F"+hi;for(hi=65;hi<=90;hi++)Qa[hi]=String.fromCharCode(hi+32),fy[hi]=String.fromCharCode(hi);for(var AS in Qa)fy.hasOwnProperty(AS)||(fy[AS]=Qa[AS]);const toe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function noe(n){let i,r,o,s,t=n.split(/-(?!$)/),e=t[t.length-1];"Space"==e&&(e=" ");for(let a=0;a127)&&(o=Qa[i.keyCode])&&o!=r){let a=t[NS(o,i)];if(a&&a(e.state,e.dispatch,e))return!0}}return!1}}const PS=(n,t)=>!n.selection.empty&&(t&&t(n.tr.deleteSelection().scrollIntoView()),!0);const $F=(n,t,e)=>{let i=function HF(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("backward",n):e.parentOffset>0)?null:e}(n,e);if(!i)return!1;let r=RS(i);if(!r){let s=i.blockRange(),a=s&&ad(s);return null!=a&&(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&t3(n,r,t))return!0;if(0==i.parent.content.size&&(wd(o,"end")||Me.isSelectable(o))){let s=j1(n.doc,i.before(),i.after(),ie.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=RS(i)}let s=o&&o.nodeBefore;return!(!s||!Me.isSelectable(s)||(t&&t(n.tr.setSelection(Me.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function RS(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}const KF=(n,t,e)=>{let i=function qF(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("forward",n):e.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("forward",n):i.parentOffset=0;t--){let e=n.node(t);if(n.index(t)+1{let{$head:e,$anchor:i}=n.selection;return!(!e.parent.type.spec.code||!e.sameParent(i)||(t&&t(n.tr.insertText("\n").scrollIntoView()),0))};function jS(n){for(let t=0;t{let{$head:e,$anchor:i}=n.selection;if(!e.parent.type.spec.code||!e.sameParent(i))return!1;let r=e.node(-1),o=e.indexAfter(-1),s=jS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=e.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Fe.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},JF=(n,t)=>{let e=n.selection,{$from:i,$to:r}=e;if(e instanceof Lr||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=jS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index(){let{$cursor:e}=n.selection;if(!e||e.parent.content.size)return!1;if(e.depth>1&&e.after()!=e.end(-1)){let o=e.before();if(Ks(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}let i=e.blockRange(),r=i&&ad(i);return null!=r&&(t&&t(n.tr.lift(i,r).scrollIntoView()),!0)},e3=function loe(n){return(t,e)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof Me&&t.selection.node.isBlock)return!(!i.parentOffset||!Ks(t.doc,i.pos)||(e&&e(t.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,s=t.tr;(t.selection instanceof Le||t.selection instanceof Lr)&&s.deleteSelection();let a=0==i.depth?null:jS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=Ks(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&Ks(s.doc,s.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=s.mapping.map(i.before()),h=s.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(i.before()),a)}e(s.scrollIntoView())}return!0}}();function t3(n,t,e){let o,s,i=t.nodeBefore,r=t.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function doe(n,t,e){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&t.parent.canReplace(o-1,o)?(e&&e(n.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!r.isTextblock&&!Fa(n.doc,t.pos)||(e&&e(n.tr.clearIncompatible(t.pos,i.type,i.contentMatchAt(i.childCount)).join(t.pos).scrollIntoView()),0)))}(n,t,e))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(e){let d=t.pos+r.nodeSize,h=G.empty;for(let m=o.length-1;m>=0;m--)h=G.from(o[m].create(null,h));h=G.from(i.copy(h));let p=n.tr.step(new ei(t.pos-1,d,t.pos,d,new ie(h,1,0),o.length,!0)),f=d+2*o.length;Fa(p.doc,f)&&p.join(f),e(p.scrollIntoView())}return!0}let l=Fe.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&ad(c);if(null!=u&&u>=t.depth)return e&&e(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&wd(r,"start",!0)&&wd(i,"end")){let d=i,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=r,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(e){let m=G.empty;for(let b=h.length-1;b>=0;b--)m=G.from(h[b].copy(m));e(n.tr.step(new ei(t.pos-h.length,t.pos+r.nodeSize,t.pos+f,t.pos+r.nodeSize-f,new ie(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function n3(n){return function(t,e){let i=t.selection,r=n<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return!!r.node(o).isTextblock&&(e&&e(t.tr.setSelection(Le.create(t.doc,n<0?r.start(o):r.end(o)))),!0)}}const r3=n3(-1),o3=n3(1);function s3(n,t=null){return function(e,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,t))if(l.type==n)r=!0;else{let u=e.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=e.tr;for(let s=0;s(t&&t(n.tr.setSelection(new Lr(n.doc))),!0)},moe={"Ctrl-h":Za.Backspace,"Alt-Backspace":Za["Mod-Backspace"],"Ctrl-d":Za.Delete,"Ctrl-Alt-Backspace":Za["Mod-Delete"],"Alt-Delete":Za["Mod-Delete"],"Alt-d":Za["Mod-Delete"],"Ctrl-a":r3,"Ctrl-e":o3};for(let n in Za)moe[n]=Za[n];function my(n){const{state:t,transaction:e}=n;let{selection:i}=e,{doc:r}=e,{storedMarks:o}=e;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=e.selection,r=e.doc,o=e.storedMarks,e}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class gy{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:i}=this,{view:r}=e,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,c=t||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,p])=>[h,(...m)=>{const _=this.buildProps(c,e),b=p(...m)(_);return a.push(b),d}])),run:()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(t){const{rawCommands:e,state:i}=this,o=t||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&t.setStoredMarks(o.storedMarks);const a={tr:t,editor:r,view:s,state:my({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}function ge(n,t,e){return void 0===n.config[t]&&n.parent?ge(n.parent,t,e):"function"==typeof n.config[t]?n.config[t].bind({...e,parent:n.parent?ge(n.parent,t,e):null}):n.config[t]}function ti(n,t){if("string"==typeof n){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}function vt(...n){return n.filter(t=>!!t).reduce((t,e)=>{const i={...t};return Object.entries(e).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function Ye(n,t,...e){return function c3(n){return"function"==typeof n}(n)?t?n.bind(t)(...e):n(...e):n}class Up{constructor(t){this.find=t.find,this.handler=t.handler}}class GS{constructor(t){this.find=t.find,this.handler=t.handler}}function qS(n){return"Object"===function Voe(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function yy(n,t){const e={...n};return qS(n)&&qS(t)&&Object.keys(t).forEach(i=>{qS(t[i])?i in n?e[i]=yy(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}class Ut{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ye(ge(this,"addOptions",{name:this.name}))),this.storage=Ye(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ut(t)}configure(t={}){const e=this.extend();return e.options=yy(this.options,t),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Ut(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ye(ge(e,"addOptions",{name:e.name})),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}}function KS(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}function vy(n,t,e={strict:!0}){const i=Object.keys(t);return!i.length||i.every(r=>e.strict?t[r]===n[r]:function $S(n){return"[object RegExp]"===Object.prototype.toString.call(n)}(t[r])?t[r].test(n[r]):t[r]===n[r])}function YS(n,t,e={}){return n.find(i=>i.type===t&&vy(i.attrs,e))}function Joe(n,t,e={}){return!!YS(n,t,e)}function QS(n,t,e={}){if(!n||!t)return;let i=n.parent.childAfter(n.parentOffset);if(n.parentOffset===i.offset&&0!==i.offset&&(i=n.parent.childBefore(n.parentOffset)),!i.node)return;const r=YS([...i.node.marks],t,e);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(YS([...i.node.marks],t,e);o>0&&r.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a${n}`;return(new window.DOMParser).parseFromString(t,"text/html").body}function wy(n,t,e){if(e={slice:!0,parseOptions:{},...e},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?G.fromArray(n.map(i=>t.nodeFromJSON(i))):t.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),wy("",t,e)}if("string"==typeof n){const i=rd.fromSchema(t);return e.slice?i.parseSlice(ZS(n),e.parseOptions).content:i.parse(ZS(n),e.parseOptions)}return wy("",t,e)}function g3(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function Hp(n,t,e={}){const{from:i,to:r,empty:o}=n.selection,s=t?ti(t,n.schema):null,a=[];n.doc.nodesBetween(i,r,(d,h)=>{if(d.isText)return;const p=Math.max(i,h),f=Math.min(r,h+d.nodeSize);a.push({node:d,from:p,to:f})});const l=r-i,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>vy(d.node.attrs,e,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Sy(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function _3(n,t){const e="string"==typeof t?[t]:t;return Object.keys(n).reduce((i,r)=>(e.includes(r)||(i[r]=n[r]),i),{})}function v3(n,t){for(let e=n.depth;e>0;e-=1){const i=n.node(e);if(t(i))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:i}}}function JS(n){return t=>v3(t.$from,n)}function Dy(n,t){const e=Ja(t,n.schema),{from:i,to:r,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===e.name);return a?{...a.attrs}:{}}function Ty(n,t,e){const i=[];return n===t?e.resolve(n).marks().forEach(r=>{const s=QS(e.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):e.nodesBetween(n,t,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function My(n,t,e){return Object.fromEntries(Object.entries(e).filter(([i])=>{const r=n.find(o=>o.type===t&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function S3(n,t){const{nodeExtensions:e}=function _y(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}(t),i=e.find(s=>s.name===n);if(!i)return!1;const o=Ye(ge(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function D3(n,t){const e=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(e){const i=e.filter(r=>t?.includes(r.type.name));n.tr.ensureMarks(i)}}Ut.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new pt({key:new Et("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:i,selection:r}=t,{ranges:o}=r;return function f3(n,t,e){const{from:i,to:r}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=e||{};let a="",l=!0;return n.nodesBetween(i,r,(c,u,d,h)=>{var p;const f=s?.[c.type.name];f?(c.isBlock&&!l&&(a+=o,l=!0),d&&(a+=f({node:c,pos:u,parent:d,index:h,range:t}))):c.isText?(a+=null===(p=c?.text)||void 0===p?void 0:p.slice(Math.max(i,u)-u,r-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:KS(e)})}}})]}});const tD=(n,t)=>{const e=JS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(Math.max(0,e.pos-1)).before(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Fa(n.doc,e.pos)&&n.join(e.pos),!0},nD=(n,t)=>{const e=JS(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(e.start).after(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Fa(n.doc,i)&&n.join(i),!0};var Gse=Object.freeze({__proto__:null,blur:()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{var e;n.isDestroyed||(t.dom.blur(),null===(e=window?.getSelection())||void 0===e||e.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:t})=>t.setContent("",n),clearNodes:()=>({state:n,tr:t,dispatch:e})=>{const{selection:i}=t,{ranges:r}=i;return e&&r.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),p=d.blockRange(h);if(!p)return;const f=ad(p);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(f||0===f)&&t.lift(p,f)})}),!0},command:n=>t=>n(t),createParagraphNear:()=>({state:n,dispatch:t})=>JF(n,t),deleteCurrentNode:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,i=e.$anchor.node();if(i.content.size>0)return!1;const r=n.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(t){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:t,state:e,dispatch:i})=>{const r=ti(n,e.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){const l=o.before(s),c=o.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:t,dispatch:e})=>{const{from:i,to:r}=n;return e&&t.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:t})=>PS(n,t),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:t})=>ZF(n,t),extendMarkRange:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const o=Ja(n,i.schema),{doc:s,selection:a}=e,{$from:l,from:c,to:u}=a;if(r){const d=QS(l,o,t);if(d&&d.from<=c&&d.to>=u){const h=Le.create(s,d.from,d.to);e.setSelection(h)}}return!0},first:n=>t=>{const e="function"==typeof n?n(t):n;for(let i=0;i({editor:e,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{Cy()&&i.dom.focus(),requestAnimationFrame(()=>{e.isDestroyed||(i.focus(),t?.scrollIntoView&&e.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!by(e.state.selection))return s(),!0;const a=function m3(n,t=null){if(!t)return null;const e=Fe.atStart(n),i=Fe.atEnd(n);if("start"===t||!0===t)return e;if("end"===t)return i;const r=e.from,o=i.to;return"all"===t?Le.create(n,Js(0,r,o),Js(n.content.size,r,o)):Le.create(n,Js(t,r,o),Js(t,r,o))}(r.doc,n)||e.state.selection,l=e.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,t)=>e=>n.every((i,r)=>t(i,{...e,index:r})),insertContent:(n,t)=>({tr:e,commands:i})=>i.insertContentAt({from:e.selection.from,to:e.selection.to},n,t),insertContentAt:(n,t,e)=>({tr:i,dispatch:r,editor:o})=>{if(r){e={parseOptions:{},updateSelection:!0,...e};const s=wy(t,o.schema,{parseOptions:{preserveWhitespace:"full",...e.parseOptions}});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(h=>{h.check(),c=!!c&&h.isText&&0===h.marks.length,u=!!u&&h.isBlock}),a===l&&u){const{parent:h}=i.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(t)?i.insertText(t.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof t&&t&&t.text?t.text:t,a,l):i.replaceWith(a,l,s),e.updateSelection&&function rse(n,t,e){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(Fe.near(n.doc.resolve(s),e))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:t})=>((n,t)=>{let r,e=n.selection,i=e instanceof Me;if(i){if(e.node.isTextblock||!Fa(n.doc,e.from))return!1;r=e.from}else if(r=EP(n.doc,e.from,-1),null==r)return!1;if(t){let o=n.tr.join(r);i&&o.setSelection(Me.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0})(n,t),joinDown:()=>({state:n,dispatch:t})=>((n,t)=>{let i,e=n.selection;if(e instanceof Me){if(e.node.isTextblock||!Fa(n.doc,e.to))return!1;i=e.to}else if(i=EP(n.doc,e.to,1),null==i)return!1;return t&&t(n.tr.join(i).scrollIntoView()),!0})(n,t),joinBackward:()=>({state:n,dispatch:t})=>$F(n,t),joinForward:()=>({state:n,dispatch:t})=>KF(n,t),keyboardShortcut:n=>({editor:t,view:e,tr:i,dispatch:r})=>{const o=function dse(n){const t=n.split(/-(?!$)/);let i,r,o,s,e=t[t.length-1];"Space"===e&&(e=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{e.someProp("handleKeyDown",c=>c(e,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,t={})=>({state:e,dispatch:i})=>!!Hp(e,ti(n,e.schema),t)&&((n,t)=>{let{$from:e,$to:i}=n.selection,r=e.blockRange(i),o=r&&ad(r);return null!=o&&(t&&t(n.tr.lift(r,o).scrollIntoView()),!0)})(e,i),liftEmptyBlock:()=>({state:n,dispatch:t})=>XF(n,t),liftListItem:n=>({state:t,dispatch:e})=>function Doe(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!e||(i.node(o.depth-1).type==n?function Toe(n,t,e,i){let r=n.tr,o=i.end,s=i.$to.end(i.depth);om;f--)p-=r.child(f).nodeSize,i.delete(p-1,p+1);let o=i.doc.resolve(e.start),s=o.nodeAfter;if(i.mapping.map(e.end)!=e.start+o.nodeAfter.nodeSize)return!1;let a=0==e.startIndex,l=e.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?G.empty:G.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new ei(d-(a?1:0),h+(l?1:0),d+1,h-1,new ie((a?G.empty:G.from(r.copy(G.empty))).append(l?G.empty:G.from(r.copy(G.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}(t,e,o)))}}(ti(n,t.schema))(t,e),newlineInCode:()=>({state:n,dispatch:t})=>QF(n,t),resetAttributes:(n,t)=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Sy("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=ti(n,i.schema)),"mark"===a&&(s=Ja(n,i.schema)),r&&e.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&e.setNodeMarkup(u,void 0,_3(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&e.addMark(u,u+c.nodeSize,s.create(_3(d.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:t})=>t.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:t})=>GF(n,t),selectNodeForward:()=>({state:n,dispatch:t})=>YF(n,t),selectParentNode:()=>({state:n,dispatch:t})=>((n,t)=>{let r,{$from:e,to:i}=n.selection,o=e.sharedDepth(i);return 0!=o&&(r=e.before(o),t&&t(n.tr.setSelection(Me.create(n.doc,r))),!0)})(n,t),selectTextblockEnd:()=>({state:n,dispatch:t})=>o3(n,t),selectTextblockStart:()=>({state:n,dispatch:t})=>r3(n,t),setContent:(n,t=!1,e={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=function y3(n,t,e={}){return wy(n,t,{slice:!1,parseOptions:e})}(n,r.schema,e);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const{selection:o}=e,{empty:s,ranges:a}=o,l=Ja(n,i.schema);if(r)if(s){const c=Dy(i,l);e.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;i.doc.nodesBetween(u,d,(h,p)=>{const f=Math.max(p,u),m=Math.min(p+h.nodeSize,d);h.marks.find(b=>b.type===l)?h.marks.forEach(b=>{l===b.type&&e.addMark(f,m,l.create({...b.attrs,...t}))}):e.addMark(f,m,l.create(t))})});return function Fse(n,t,e){var i;const{selection:r}=t;let o=null;if(by(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!e.isInSet(a)||!a.some(l=>l.type.excludes(e))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(e);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(e),f=!!e.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(e));c=p&&f}return!c}),c})}(i,e,l)},setMeta:(n,t)=>({tr:e})=>(e.setMeta(n,t),!0),setNode:(n,t={})=>({state:e,dispatch:i,chain:r})=>{const o=ti(n,e.schema);return o.isTextblock?r().command(({commands:s})=>!!s3(o,t)(e)||s.clearNodes()).command(({state:s})=>s3(o,t)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,r=Js(n,0,i.content.size),o=Me.create(i,r);t.setSelection(o)}return!0},setTextSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=Le.atStart(i).from,a=Le.atEnd(i).to,l=Js(r,s,a),c=Js(o,s,a),u=Le.create(i,l,c);t.setSelection(u)}return!0},sinkListItem:n=>({state:t,dispatch:e})=>function Eoe(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=n)return!1;if(e){let c=l.lastChild&&l.lastChild.type==a.type,u=G.from(c?n.create():null),d=new ie(G.from(n.create(null,G.from(a.type.create(null,u)))),c?3:1,0),h=o.start,p=o.end;e(t.tr.step(new ei(h-(c?3:1),p,h,p,d,1,!0)).scrollIntoView())}return!0}}(ti(n,t.schema))(t,e),splitBlock:({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:i,editor:r})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=My(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Me&&o.node.isBlock)return!(!a.parentOffset||!Ks(s,a.pos)||(i&&(n&&D3(e,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof Le&&t.deleteSelection();const h=0===a.depth?void 0:function Ese(n){for(let t=0;t({tr:t,state:e,dispatch:i,editor:r})=>{var o;const s=ti(n,e.schema),{$from:a,$to:l}=e.selection,c=e.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=r.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let _=G.empty;const b=a.index(-1)?1:a.index(-2)?2:3;for(let $=a.depth-b;$>=a.depth-3;$-=1)_=G.from(a.node($).copy(_));const T=a.indexAfter(-1){if(k>-1)return!1;$.isTextblock&&0===$.content.size&&(k=V+1)}),k>-1&&t.setSelection(Le.near(t.doc.resolve(k))),t.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,p=My(d,u.type.name,u.attrs),f=My(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=h?[{type:s,attrs:p},{type:h,attrs:f}]:[{type:s,attrs:p}];if(!Ks(t.doc,a.pos,2))return!1;if(i){const{selection:_,storedMarks:b}=e,{splittableMarks:T}=r.extensionManager,M=b||_.$to.parentOffset&&_.$from.marks();if(t.split(a.pos,2,m).scrollIntoView(),!M||!i)return!0;const w=M.filter(N=>T.includes(N.type.name));t.ensureMarks(w)}return!0},toggleList:(n,t,e,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,p=ti(n,s.schema),f=ti(t,s.schema),{selection:m,storedMarks:_}=s,{$from:b,$to:T}=m,M=b.blockRange(T),w=_||m.$to.parentOffset&&m.$from.marks();if(!M)return!1;const N=JS(k=>S3(k.type.name,d))(m);if(M.depth>=1&&N&&M.depth-N.depth<=1){if(N.node.type===p)return c.liftListItem(f);if(S3(N.node.type.name,d)&&p.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,p),!0)).command(()=>tD(o,p)).command(()=>nD(o,p)).run()}return e&&w&&a?l().command(()=>{const k=u().wrapInList(p,i),$=w.filter(V=>h.includes(V.type.name));return o.ensureMarks($),!!k||c.clearNodes()}).wrapInList(p,i).command(()=>tD(o,p)).command(()=>nD(o,p)).run():l().command(()=>!!u().wrapInList(p,i)||c.clearNodes()).wrapInList(p,i).command(()=>tD(o,p)).command(()=>nD(o,p)).run()},toggleMark:(n,t={},e={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=e,s=Ja(n,i.schema);return function eD(n,t,e={}){const{empty:i,ranges:r}=n.selection,o=t?Ja(t,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>vy(d.attrs,e,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:d,$to:h})=>{const p=d.pos,f=h.pos;n.doc.nodesBetween(p,f,(m,_)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(p,_),T=Math.min(f,_+m.nodeSize);s+=T-b,a.push(...m.marks.map(w=>({mark:w,from:b,to:T})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>vy(d.mark.attrs,e,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+c:l)>=s}(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},toggleNode:(n,t,e={})=>({state:i,commands:r})=>{const o=ti(n,i.schema),s=ti(t,i.schema);return Hp(i,o,e)?r.setNode(s):r.setNode(o,e)},toggleWrap:(n,t={})=>({state:e,commands:i})=>{const r=ti(n,e.schema);return Hp(e,r,t)?i.lift(r):i.wrapIn(r,t)},undoInputRule:()=>({state:n,dispatch:t})=>{const e=n.plugins;for(let i=0;i=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,{empty:i,ranges:r}=e;return i||t&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=e,l=Ja(n,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:h,to:p}=a;const f=null===(o=c.marks().find(_=>_.type===l))||void 0===o?void 0:o.attrs,m=QS(c,l,f);m&&(h=m.from,p=m.to),e.removeMark(h,p,l)}else d.forEach(h=>{e.removeMark(h.$from.pos,h.$to.pos,l)});return e.removeStoredMark(l),!0},updateAttributes:(n,t={})=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Sy("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=ti(n,i.schema)),"mark"===a&&(s=Ja(n,i.schema)),r&&e.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&e.setNodeMarkup(h,void 0,{...d.attrs,...t}),s&&d.marks.length&&d.marks.forEach(p=>{if(s===p.type){const f=Math.max(h,c),m=Math.min(h+d.nodeSize,u);e.addMark(f,m,s.create({...p.attrs,...t}))}})})}),!0)},wrapIn:(n,t={})=>({state:e,dispatch:i})=>function hoe(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=s&&F1(s,n,t);return!!a&&(i&&i(e.tr.wrap(s,a).scrollIntoView()),!0)}}(ti(n,e.schema),t)(e,i),wrapInList:(n,t={})=>({state:e,dispatch:i})=>function woe(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&r.node(s.depth-1).type.compatibleContent(n)&&0==s.startIndex){if(0==r.index(s.depth-1))return!1;let u=e.doc.resolve(s.start-2);l=new U_(u,u,s.depth),s.endIndex=0;u--)o=G.from(e[u].type.create(e[u].attrs,o));n.step(new ei(t.start-(i?2:0),t.end,t.start,t.end,new ie(o,0,0),e.length,!0));let s=0;for(let u=0;u{const r=Ye(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(Ty(e.from,e.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function T3(n){return new Up({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ye(n.getAttributes,void 0,i)||{},{tr:o}=t,s=e.from;let a=e.to;if(i[1]){let c=s+i[0].lastIndexOf(i[1]);c>a?c=a:a=c+i[1].length,o.insertText(i[0][i[0].length-1],s+i[0].length-1),o.replaceWith(c,a,n.type.create(r))}else i[0]&&o.replaceWith(s,a,n.type.create(r))}})}function iD(n){return new Up({find:n.find,handler:({state:t,range:e,match:i})=>{const r=t.doc.resolve(e.from),o=Ye(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,o)}})}function $p(n){return new Up({find:n.find,handler:({state:t,range:e,match:i,chain:r})=>{const o=Ye(n.getAttributes,void 0,i)||{},s=t.tr.delete(e.from,e.to),l=s.doc.resolve(e.from).blockRange(),c=l&&F1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=t,{splittableMarks:p}=n.editor.extensionManager,f=h||d.$to.parentOffset&&d.$from.marks();if(f){const m=f.filter(_=>p.includes(_.type.name));s.ensureMarks(m)}}if(n.keepAttributes){const d="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";r().updateAttributes(d,o).run()}const u=s.doc.resolve(e.from-1).nodeBefore;u&&u.type===n.type&&Fa(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(e.from-1)}})}Ut.create({name:"commands",addCommands:()=>({...Gse})}),Ut.create({name:"editable",addProseMirrorPlugins(){return[new pt({key:new Et("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ut.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new pt({key:new Et("focusEvents"),props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,e)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),Ut.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:h,parent:p}=d,f=Fe.atStart(c).from===h;return!(!(u&&f&&p.type.isTextblock)||p.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Cy()||g3()?o:r},addProseMirrorPlugins(){return[new pt({key:new Et("clearDocument"),appendTransaction:(n,t,e)=>{if(!n.some(f=>f.docChanged)||t.doc.eq(e.doc))return;const{empty:r,from:o,to:s}=t.selection,a=Fe.atStart(t.doc).from,l=Fe.atEnd(t.doc).to;if(r||o!==a||s!==l||0!==e.doc.textBetween(0,e.doc.content.size," "," ").length)return;const d=e.tr,h=my({state:e,transaction:d}),{commands:p}=new gy({editor:this.editor,state:h});return p.clearNodes(),d.steps.length?d:void 0}})]}}),Ut.create({name:"tabindex",addProseMirrorPlugins(){return[new pt({key:new Et("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Yi{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ye(ge(this,"addOptions",{name:this.name}))),this.storage=Ye(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Yi(t)}configure(t={}){const e=this.extend();return e.options=yy(this.options,t),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Yi(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ye(ge(e,"addOptions",{name:e.name})),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===e.name))return!1;const l=s.find(c=>c?.type.name===e.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}}class tn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ye(ge(this,"addOptions",{name:this.name}))),this.storage=Ye(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new tn(t)}configure(t={}){const e=this.extend();return e.options=yy(this.options,t),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new tn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Ye(ge(e,"addOptions",{name:e.name})),e.storage=Ye(ge(e,"addStorage",{name:e.name,options:e.options})),e}}function Xa(n){return new GS({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Ye(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(Ty(e.from,e.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function rae(n){return new GS({find:n.find,handler({match:t,chain:e,range:i}){const r=Ye(n.getAttributes,void 0,t);if(!1===r||null===r)return null;t.input&&e().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}new Et("suggestion");const lae=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function cae(n,t){if(1&n){const e=q();S(0,"button",2),P("mousedown",function(){return I(e),x(y().back.emit())}),D()}2&n&&jt(hn(2,lae))}let rD,M3=(()=>{class n{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new R}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-empty-message"]],inputs:{title:"title",showBackBtn:"showBackBtn"},outputs:{back:"back"},decls:2,vars:2,consts:[[3,"innerHTML"],["pButton","","class","p-button-outlined","label","Back","type","submit",3,"style","mousedown",4,"ngIf"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"mousedown"]],template:function(e,i){1&e&&(F(0,"p",0),C(1,cae,1,3,"button",1)),2&e&&(g("innerHTML",i.title,pu),v(1),g("ngIf",i.showBackBtn))},dependencies:[Ge,Nr],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]}),n})();try{rD=typeof Intl<"u"&&Intl.v8BreakIterator}catch{rD=!1}const wc=new Mo(kg);function qp(n,t=wc){return e=>e.lift(new kae(n,t))}class kae{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new Aae(t,this.dueTime,this.scheduler))}}class Aae extends ut{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(Nae,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function Nae(n){n.debouncedNext()}class Rae{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ye,this._typeaheadSubscription=ft.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ye,this.change=new ye,t instanceof Ih&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Mt(e=>this._pressedLetters.push(e)),qp(t),$t(()=>this._pressedLetters.length>0),me(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(on[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof Ih?this._items.toArray():this._items}}class A3 extends Rae{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}function Wae(n,t){if(1&n&&(S(0,"i",7),H(1),D()),2&n){const e=y();v(1),ve(e.url)}}function Gae(n,t){1&n&&F(0,"dot-contentlet-thumbnail",9),2&n&&g("contentlet",y(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function qae(n,t){if(1&n&&C(0,Gae,1,4,"dot-contentlet-thumbnail",8),2&n){const e=y(),i=Pe(10);g("ngIf",null==e.data?null:e.data.contentlet)("ngIfElse",i)}}function Kae(n,t){if(1&n&&(S(0,"span",10),H(1),D()),2&n){const e=y();v(1),ve(e.data.contentlet.url)}}function Yae(n,t){if(1&n&&(S(0,"div",11),F(1,"dot-state-icon",12),S(2,"dot-badge",13),H(3),We(4,"lowercase"),D()()),2&n){const e=y();v(1),g("state",e.data.contentlet),v(2),ve(Je(4,2,e.data.contentlet.language))}}function Qae(n,t){1&n&&F(0,"img",14),2&n&&g("src",y().url,zo)}let sD=(()=>{class n{constructor(e){this.element=e,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(e){e.preventDefault(),this.disabled||this.command()}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){if(!this.isIntoView()){const e=this.element.nativeElement,i=e.parentElement,{top:r,top:o,height:s}=i.getBoundingClientRect(),{top:a,bottom:l}=e.getBoundingClientRect(),c=a-r,u=l-o;i.scrollTop+=this.alignToTop()?c:u-s}}isIntoView(){const{bottom:e,top:i}=this.element.nativeElement.getBoundingClientRect(),r=this.element.nativeElement.parentElement.getBoundingClientRect();return i>=r.top&&e<=r.bottom}alignToTop(){const{top:e}=this.element.nativeElement.getBoundingClientRect(),{top:i}=this.element.nativeElement.parentElement.getBoundingClientRect();return e span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}.data-wrapper[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{color:#afb3c0;font-size:14.4px}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:8px;display:flex;align-items:flex-end}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:8px}"]}),n})();const Zae=["*"];let L3=(()=>{class n{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new ye,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(e){const i=e.target,r=i.dataset?.index;if(isNaN(r)||!this.mouseMove)return;const o=Number(i?.dataset.index);i.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(o)}onMouseDownHandler(e){e.preventDefault()}ngAfterViewInit(){this.keyManager=new A3(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(Rt(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(e){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(e),this.keyManager.activeItem?.scrollIntoView(),this.mouseMove=!1}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){this.keyManager.activeItem?.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem?.focus()}resetKeyManager(){this.keyManager.activeItem?.unfocus(),this.keyManager=new A3(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(e){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-list"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,sD,4),2&e){let o;J(o=X())&&(i.items=o)}},hostVars:1,hostBindings:function(e,i){1&e&&P("mousemove",function(o){return i.onMouseMove(o)})("mouseover",function(o){return i.onMouseOver(o)})("mousedown",function(o){return i.onMouseDownHandler(o)}),2&e&&pe("id",i.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:Zae,decls:1,vars:0,template:function(e,i){1&e&&(ai(),ln(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]}),n})(),aD=(()=>{class n{constructor(e){this.http=e}get defaultHeaders(){const e=new Mr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getLanguages(){return this.languages?_e(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(on("entity"),me(e=>{const i=this.getDotLanguageObject(e);return this.languages=i,i}))}getDotLanguageObject(e){return e.reduce((i,r)=>Object.assign(i,{[r.id]:r}),{})}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Jae={SHOW_VIDEO_THUMBNAIL:!0};let P3=(()=>{class n{constructor(){this.config=Jae}get configObject(){return this.config}setProperty(e,i){this.config={...this.config,[e]:i}}getProperty(e){return this.config[e]||!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var el=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}(el||(el={})),el))();let Kp=(()=>{class n{constructor(e,i){this.http=e,this.dotUploadService=i}publishContent({data:e,maxSize:i,statusCallback:r=(s=>{}),signal:o}){return r(el.DOWNLOAD),this.setTempResource({data:e,maxSize:i,signal:o}).pipe(xn(s=>{const a=Array.isArray(s)?s:[s],l=[];return a.forEach(c=>{l.push({baseType:"dotAsset",asset:c.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),r(el.IMPORT),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:l}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(on("entity","results"))}),ci(s=>Ir(s)))}setTempResource({data:e,maxSize:i,signal:r}){return Kt(this.dotUploadService.uploadFile({file:e,maxSize:i,signal:r}))}}return n.\u0275fac=function(e){return new(e||n)(U(Er),U(_p))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();var xy=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(xy||(xy={})),xy))();let Xae=(()=>{class n{constructor(e){this.http=e}get({query:e,limit:i=0,offset:r=0}){return this.http.post("/api/content/_search",{query:e,sort:"score,modDate desc",limit:i,offset:r}).pipe(on("entity"))}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lD=(()=>{class n{constructor(e){this.http=e}get defaultHeaders(){const e=new Mr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getContentTypes(e="",i=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:i,query:e},orderBy:"name",direction:"ASC",perPage:40}).pipe(on("entity"))}getContentlets({contentType:e,filter:i,currentLanguage:r,contentletIdentifier:o}){const s=o?`-identifier:${o}`:"",a=i.includes("-")?i:`*${i}*`;return this.http.post("/api/content/_search",{query:`+contentType:${e} ${s} +languageId:${r} +deleted:false +working:true +catchall:${a} title:'${i}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(on("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:e,currentLanguage:i=Qp}){return this.http.post("/api/content/_search",{query:`+languageId:${i} +deleted:false +working:true +(urlmap:*${e}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${e}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(on("entity","jsonObjectView","contentlets"))}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();new Mr({"Content-Type":"application/json"});const F3=["list"];function tle(n,t){if(1&n&&(S(0,"h3"),H(1),D()),2&n){const e=y(2);v(1),ve(e.title)}}function nle(n,t){if(1&n&&F(0,"dot-suggestions-list-item",7),2&n){const e=y(),i=e.$implicit,r=e.index;g("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function ile(n,t){1&n&&F(0,"div",8)}function rle(n,t){if(1&n&&(ae(0),C(1,nle,1,6,"dot-suggestions-list-item",5),C(2,ile,1,0,"ng-template",null,6,yt),le()),2&n){const e=t.$implicit,i=Pe(3);v(1),g("ngIf","divider"!==e.id)("ngIfElse",i)}}function ole(n,t){if(1&n&&(S(0,"div"),C(1,tle,2,1,"h3",2),S(2,"dot-suggestion-list",null,3),C(4,rle,4,2,"ng-container",4),D()()),2&n){const e=y();v(1),g("ngIf",!!e.title),v(3),g("ngForOf",e.items)}}function sle(n,t){if(1&n){const e=q();S(0,"dot-empty-message",9),P("back",function(){return I(e),x(y().handleBackButton())}),D()}if(2&n){const e=y();g("title",e.noResultsMessage)("showBackBtn",!e.isFilterActive)}}var xi=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(xi||(xi={})),xi))();let Oy=(()=>{class n{constructor(e,i,r){this.suggestionsService=e,this.dotLanguageService=i,this.cd=r,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=Qp,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(e){e.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=xi.BLOCK,this.dotLanguageService.getLanguages().pipe(Wt(1)).subscribe(e=>this.dotLangs=e)}addContentletItem(){this.items=[{label:"Contentlets",icon:"receipt",command:()=>this.loadContentTypes()},...this.items],this.initialItems=this.items}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===xi.CONTENT?xi.CONTENTTYPE:xi.BLOCK,this.filterItems(),!1}filterItems(e=""){switch(this.itemsLoaded){case xi.BLOCK:this.items=this.initialItems.filter(i=>i.label.toLowerCase().includes(e.trim().toLowerCase()));break;case xi.CONTENTTYPE:this.loadContentTypes(e);break;case xi.CONTENT:this.loadContentlets(this.selectedContentType,e)}this.isFilterActive=!!e.length}loadContentTypes(e=""){this.suggestionsService.getContentTypes(e,this.allowedContentTypes).pipe(me(i=>i.map(r=>({label:r.name,icon:r.icon,command:()=>{this.selectedContentType=r,this.itemsLoaded=xi.CONTENT,this.loadContentlets(r)}}))),Wt(1)).subscribe(i=>{this.items=i,this.itemsLoaded=xi.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(e,i=""){this.suggestionsService.getContentlets({contentType:e.variable,filter:i,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Wt(1)).subscribe(r=>{this.items=r.map(o=>{const{languageId:s}=o;return o.language=this.getContentletLanguage(s),{label:o.title,icon:"contentlet/image",data:{contentlet:o},command:()=>{this.onSelectContentlet({payload:o,type:{name:"dotContent"}})}}}),this.items.length?this.title="Select a contentlet":this.noResultsMessage=`No results for ${e.name}`,this.cd.detectChanges()})}getContentletLanguage(e){const{languageCode:i,countryCode:r}=this.dotLangs[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(O(lD),O(aD),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestions"]],viewQuery:function(e,i){if(1&e&&(Ee(F3,5),Ee(F3,5,qe)),2&e){let r;J(r=X())&&(i.list=r.first),J(r=X())&&(i.listElement=r.first)}},hostBindings:function(e,i){1&e&&P("mousedown",function(o){return i.onMouseDownHandler(o)})},inputs:{onSelectContentlet:"onSelectContentlet",items:"items",title:"title",noResultsMessage:"noResultsMessage",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes",contentletIdentifier:"contentletIdentifier"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["emptyBlock",""],[4,"ngIf"],["list",""],[4,"ngFor","ngForOf"],[3,"command","index","label","url","data","disabled",4,"ngIf","ngIfElse"],["divider",""],[3,"command","index","label","url","data","disabled"],[1,"divider"],[3,"title","showBackBtn","back"]],template:function(e,i){if(1&e&&(C(0,ole,5,2,"div",0),C(1,sle,1,2,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf",i.items.length)("ngIfElse",r)}},styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:16px;margin:8px 16px;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.divider[_ngcontent-%COMP%]{border-top:#afb3c0 solid 1px;margin:.5rem 0}']}),n})();const j3={inode:"14dd5ad9-55ae-42a8-a5a7-e259b6d0901a",variantId:"DEFAULT",locked:!1,stInode:"d5ea385d-32ee-4f35-8172-d37f58d9cd7a",contentType:"Image",height:4e3,identifier:"93ca45e0-06d2-4eef-be1d-79bd6bf0fc99",hasTitleImage:!0,sortOrder:0,hostName:"demo.dotcms.com",extension:"jpg",isContent:!0,baseType:"FILEASSETS",archived:!1,working:!0,live:!0,isContentlet:!0,languageId:1,titleImage:"fileAsset",hasLiveVersion:!0,deleted:!1,folder:"",host:"",modDate:"",modUser:"",modUserName:"",owner:"",title:"",url:"",contentTypeIcon:"assessment",__icon__:"Icon"};new Et("menuFloating"),new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),new RegExp(/]*src="[^"]*"[^>]*>/gm);const Qp=1;var pi=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text",n.TABLE_CELL="tableCell"}(pi||(pi={})),pi))();function Lle(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-asset-search",6),P("addAsset",function(r){return I(e),x(y().onSelectAsset(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)("languageId",e.languageId)}}function Ple(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-upload-asset",7),P("uploadedFile",function(r){return I(e),x(y().onSelectAsset(r))})("preventClose",function(r){return I(e),x(y().onPreventClose(r))})("hide",function(r){return I(e),x(y().onHide(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)}}function Rle(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-external-asset",8),P("addAsset",function(r){return I(e),x(y().onSelectAsset(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)}}let G3=(()=>{class n{constructor(){this.languageId=Qp,this.disableTabs=!1}onPreventClose(e){this.preventClose(e),this.disableTabs=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-form"]],inputs:{languageId:"languageId",type:"type",onSelectAsset:"onSelectAsset",preventClose:"preventClose",onHide:"onHide"},decls:8,vars:8,consts:[[1,"tabview-container"],["header","Library","leftIcon","pi pi-images",3,"cache","disabled"],["pTemplate","content"],["leftIcon","pi pi-folder",3,"cache","header","disabled"],["leftIcon","pi pi-link",3,"cache","header","disabled"],[1,"wrapper"],[3,"type","languageId","addAsset"],[3,"type","uploadedFile","preventClose","hide"],[3,"type","addAsset"]],template:function(e,i){1&e&&(S(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),C(3,Lle,2,2,"ng-template",2),D(),S(4,"p-tabPanel",3),C(5,Ple,2,1,"ng-template",2),D(),S(6,"p-tabPanel",4),C(7,Rle,2,1,"ng-template",2),D()()()),2&e&&(v(2),g("cache",!1)("disabled",i.disableTabs),v(2),g("cache",!1)("header","Upload "+i.type)("disabled",i.disableTabs),v(2),g("cache",!1)("header",i.type+" URL")("disabled",i.disableTabs))},styles:["[_nghost-%COMP%]{border:1px solid #afb3c0;display:block}.tabview-container[_ngcontent-%COMP%]{width:720px;background:#ffffff}.wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .p-tabview-nav{padding:0 2rem}[_nghost-%COMP%] .p-tabview-panel{height:25rem}"],changeDetection:0}),n})();class pD{constructor({editor:t,element:e,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:d,selection:h}=l,{empty:p}=h,f=!d.textBetween(c,u).length&&by(l.selection),m=this.element.contains(document.activeElement);return!(!a.hasFocus()&&!m||p||f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;this.preventHide?this.preventHide=!1:a?.relatedTarget&&null!==(l=this.element.parentNode)&&void 0!==l&&l.contains(a.relatedTarget)||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!l?.selection.eq(a.state.selection),u=!l?.doc.eq(a.state.doc);!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var d,h,p;const{state:f,composing:m}=a,{selection:_}=f;if(m||!l&&!c)return;this.createTooltip();const{ranges:T}=_,M=Math.min(...T.map(k=>k.$from.pos)),w=Math.max(...T.map(k=>k.$to.pos));(null===(d=this.shouldShow)||void 0===d?void 0:d.call(this,{editor:this.editor,view:a,state:f,oldState:u,from:M,to:w}))?(null===(h=this.tippy)||void 0===h||h.setProps({getReferenceClientRect:(null===(p=this.tippyOptions)||void 0===p?void 0:p.getReferenceClientRect)||(()=>{if(function Rse(n){return n instanceof Me}(f.selection)){let k=a.nodeDOM(M);const $=k.dataset.nodeViewWrapper?k:k.querySelector("[data-node-view-wrapper]");if($&&(k=$.firstChild),k)return k.getBoundingClientRect()}return function Sd(n,t,e){const r=n.state.doc.content.size,o=Js(t,0,r),s=Js(e,0,r),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),b={top:c,bottom:u,left:d,right:h,width:h-d,height:u-c,x:d,y:c};return{...b,toJSON:()=>b}}(a,M,w)})}),this.show()):this.hide()},this.editor=t,this.element=e,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=ss(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){const{state:i}=t;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(t,e);const o=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,o,s,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Fle=n=>new pt({key:"string"==typeof n.pluginKey?new Et(n.pluginKey):n.pluginKey,view:t=>new pD({view:t,...n})});Ut.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[Fle({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}}),new Et("bubble-image-form");const Ule=function(n,t,e){return{"border-width":n,width:t,height:e}};let mD=(()=>{class n{constructor(){this.borderSize="",this.size=""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(e,i){1&e&&F(0,"div",0),2&e&&g("ngStyle",Hr(1,Ule,i.borderSize,i.size,i.size))},dependencies:[fn],styles:["div[_ngcontent-%COMP%]{border-radius:50%;width:2.5rem;height:2.5rem;display:inline-block;vertical-align:middle;font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid var(--color-palette-primary-op-20);border-left-color:var(--color-palette-primary-500);transform:translateZ(0);animation:_ngcontent-%COMP%_load8 1.1s infinite linear;overflow:hidden}.edit-page-variant-mode [_nghost-%COMP%] div[_ngcontent-%COMP%]{border:.5rem solid var(--color-palette-white-op-20);border-left-color:var(--color-palette-white-op-90)}@keyframes _ngcontent-%COMP%_load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]}),n})();function Yle(n,t){1&n&&ce(0)}function Qle(n,t){if(1&n&&(S(0,"div",8),ln(1,1),C(2,Yle,1,0,"ng-container",6),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.headerTemplate)}}function Zle(n,t){1&n&&ce(0)}function Jle(n,t){if(1&n&&(S(0,"div",9),H(1),C(2,Zle,1,0,"ng-container",6),D()),2&n){const e=y();v(1),xt(" ",e.header," "),v(1),g("ngTemplateOutlet",e.titleTemplate)}}function Xle(n,t){1&n&&ce(0)}function ece(n,t){if(1&n&&(S(0,"div",10),H(1),C(2,Xle,1,0,"ng-container",6),D()),2&n){const e=y();v(1),xt(" ",e.subheader," "),v(1),g("ngTemplateOutlet",e.subtitleTemplate)}}function tce(n,t){1&n&&ce(0)}function nce(n,t){1&n&&ce(0)}function ice(n,t){if(1&n&&(S(0,"div",11),ln(1,2),C(2,nce,1,0,"ng-container",6),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.footerTemplate)}}new pt({state:{init:()=>en.empty,apply(n,t){t=t.map(n.mapping,n.doc);const e=n.getMeta(this);if(e&&e.add){const r=Gn.widget(e.add.pos,e.add.element,{key:e.add.id});t=t.add(n.doc,[r])}else e&&e.remove&&(t=t.remove(t.find(null,null,i=>i.key==e.remove.id)));return t}},props:{decorations(n){return this.getState(n)}}});const rce=["*",[["p-header"]],[["p-footer"]]],oce=["*","p-header","p-footer"];let _D=(()=>{class n{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275cmp=Y({type:n,selectors:[["p-card"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,T_,5),Vt(r,M_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:oce,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(e,i){1&e&&(ai(rce),S(0,"div",0),C(1,Qle,3,1,"div",1),S(2,"div",2),C(3,Jle,3,2,"div",3),C(4,ece,3,2,"div",4),S(5,"div",5),ln(6),C(7,tce,1,0,"ng-container",6),D(),C(8,ice,3,1,"div",7),D()()),2&e&&(Ke(i.styleClass),g("ngClass","p-card p-component")("ngStyle",i.style),v(1),g("ngIf",i.headerFacet||i.headerTemplate),v(2),g("ngIf",i.header||i.titleTemplate),v(1),g("ngIf",i.subheader||i.subtitleTemplate),v(3),g("ngTemplateOutlet",i.contentTemplate),v(1),g("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[Lt,Ge,Zn,fn],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})();const pce=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,fce=tn.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",vt(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[T3({find:pce,type:this.type,getAttributes:n=>{const[,,t,e,i]=n;return{src:e,alt:t,title:i}}})]}}),Y3="language_id",mce=(n,t)=>{const{href:e=null,target:i}=t;return["a",{href:e,target:i},Q3(n,t)]},Q3=(n,t)=>["img",vt(n,t)],Z3=(n,t)=>n.includes(Y3)?n:`${n}?${Y3}=${t}`,gce=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:t,asset:e,title:i,languageId:r}=n;return{data:n,src:Z3(t||e,r),title:i,alt:i}},dr=fce.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:Z3(n.src||n.data?.asset,n.data?.languageId)})},alt:{default:null,parseHTML:n=>n.getAttribute("alt"),renderHTML:n=>({alt:n.alt||n.data?.title})},title:{default:null,parseHTML:n=>n.getAttribute("title"),renderHTML:n=>({title:n.title||n.data?.title})},href:{default:null,parseHTML:n=>n.getAttribute("href"),renderHTML:n=>({href:n.href})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})},target:{default:null,parseHTML:n=>n.getAttribute("target"),renderHTML:n=>({target:n.target})}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addCommands(){return{...this.parent?.(),setImageLink:n=>({commands:t})=>t.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,t)=>({chain:e,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:gce(n),type:dr.name};return e().insertContentAt(t??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:t=null,style:e}=n||{};return["div",{class:"image-container",style:e},t?mce(this.options.HTMLAttributes,n):Q3(this.options.HTMLAttributes,n)]}}),yce=(tn.create({name:"dotVideo",addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},mimeType:{default:null,parseHTML:n=>n.getAttribute("mimeType"),renderHTML:n=>({mimeType:n.mimeType})},width:{default:null,parseHTML:n=>n.getAttribute("width"),renderHTML:n=>({width:n.width})},height:{default:null,parseHTML:n=>n.getAttribute("height"),renderHTML:n=>({height:n.height})},orientation:{default:null,parseHTML:n=>n.getAttribute("orientation"),renderHTML:({height:n,width:t})=>({orientation:n>t?"vertical":"horizontal"})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})}}),parseHTML:()=>[{tag:"video"}],addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group:()=>"block",draggable:!0,addCommands(){return{...this.parent?.(),insertVideo:(n,t)=>({commands:e,state:i})=>{const{selection:r}=i,{head:o}=r;return e.insertContentAt(t??o,{type:this.name,attrs:yce(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",vt(n,{controls:!0})]]}),n=>{if("string"==typeof n)return{src:n};const{assetMetaData:t,asset:e,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=t||{},l=s>o?"vertical":"horizontal";return{src:r||e,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}}),Sce=(tn.create({name:"aiContent",addAttributes:()=>({content:{default:""}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:t})=>t.insertContent({type:this.name,attrs:{content:n}})}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const t=document.createElement("div"),e=document.createElement("div");return e.innerHTML=n.attrs.content||"",t.contentEditable="true",t.classList.add("ai-content-container"),t.append(e),{dom:t}}}),tn.create({name:"loader",addAttributes:()=>({isLoading:{default:!0}}),parseHTML:()=>[{tag:"div.p-d-flex.p-jc-center"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertLoaderNode:n=>({commands:t})=>t.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const t=document.createElement("div");if(t.classList.add("loader-style"),n.attrs.isLoading){const e=document.createElement("div");e.classList.add("p-progress-spinner"),t.append(e)}return{dom:t}}}),["cb"]),Dce=function(n,t,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":t,"p-checkbox-label-focus":e}};function Tce(n,t){if(1&n){const e=q();S(0,"label",7),P("click",function(r){I(e);const o=y(),s=Pe(3);return x(o.onClick(r,s,!0))}),H(1),D()}if(2&n){const e=y();Ke(e.labelStyleClass),g("ngClass",Hr(5,Dce,e.checked(),e.disabled,e.focused)),pe("for",e.inputId),v(1),ve(e.label)}}const Mce=function(n,t,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":t,"p-checkbox-focused":e}},Ece=function(n,t,e){return{"p-highlight":n,"p-disabled":t,"p-focus":e}},Ice={provide:Cn,useExisting:Ue(()=>Ly),multi:!0};let Ly=(()=>{class n{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,i,r){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),r&&i.focus())}updateModel(e){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Oe.equals(r,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(i),this.model=i,this.formControl&&this.formControl.setValue(i)),this.onChange.emit({checked:i,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Oe.contains(this.value,this.model)}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-checkbox"]],viewQuery:function(e,i){if(1&e&&Ee(Sce,5),2&e){let r;J(r=X())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Ie([Ice])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0)(1,"div",1)(2,"input",2,3),P("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),D()(),S(4,"div",4),P("click",function(s){I(r);const a=Pe(3);return x(i.onClick(s,a,!0))}),F(5,"span",5),D()(),C(6,Tce,2,9,"label",6)}2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",Hr(18,Mce,i.checked(),i.disabled,i.focused)),v(2),g("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),pe("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked())("required",i.required),v(2),g("ngClass",Hr(22,Ece,i.checked(),i.disabled,i.focused)),v(1),g("ngClass",i.checked()?i.checkboxIcon:null),v(1),g("ngIf",i.label))},dependencies:[Lt,Ge,fn],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),n})();const Bce=["list"];function Uce(n,t){if(1&n&&F(0,"dot-suggestions-list-item",5),2&n){const e=t.$implicit,i=t.index;g("command",e.command)("index",i)("label",e.label)("url",e.icon)("data",e.data)("page",!0)}}function Hce(n,t){if(1&n&&(S(0,"div")(1,"dot-suggestion-list",null,3),C(3,Uce,1,6,"dot-suggestions-list-item",4),D()()),2&n){const e=y();v(3),g("ngForOf",e.items)}}function $ce(n,t){1&n&&F(0,"dot-suggestion-loading-list")}function Wce(n,t){if(1&n){const e=q();S(0,"dot-empty-message",6),P("back",function(){return I(e),x(y().handleBackButton())}),D()}2&n&&g("title",y().title)("showBackBtn",!0)}let J3=(()=>{class n{constructor(){this.items=[],this.loading=!1,this.back=new R}handleBackButton(){return this.back.emit(!0),!1}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-page"]],viewQuery:function(e,i){if(1&e&&Ee(Bce,5),2&e){let r;J(r=X())&&(i.list=r.first)}},inputs:{items:"items",loading:"loading",title:"title"},outputs:{back:"back"},decls:5,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["list",""],[3,"command","index","label","url","data","page",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","page"],[3,"title","showBackBtn","back"]],template:function(e,i){if(1&e&&(C(0,Hce,4,1,"div",0),C(1,$ce,1,0,"ng-template",null,1,yt),C(3,Wce,1,2,"ng-template",null,2,yt)),2&e){const r=Pe(2),o=Pe(4);g("ngIf",i.items.length)("ngIfElse",i.loading?r:o)}},styles:["[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff}[_nghost-%COMP%] {width:100%;box-shadow:none;padding:0}[_nghost-%COMP%] dotcms-suggestions-list-item{padding:8px}"]}),n})();const Gce=["input"],qce=["suggestions"];function Kce(n,t){1&n&&F(0,"hr",11)}const Yce=function(){return{fontSize:"32px"}};function Qce(n,t){if(1&n&&(S(0,"div",12)(1,"a",13)(2,"span",14),H(3,"language"),D(),S(4,"span",15),H(5),D()(),S(6,"div",16)(7,"div",17),F(8,"p-checkbox",18),D(),S(9,"label",19),H(10,"Open link in new window"),D()()()),2&n){const e=y();v(1),g("href",e.currentLink,zo),v(1),jt(hn(5,Yce)),v(3),ve(e.currentLink),v(3),g("binary",!0)}}function Zce(n,t){if(1&n){const e=q();S(0,"dot-suggestion-page",20,21),P("back",function(){return I(e),x(y().resetForm())}),D()}if(2&n){const e=y();g("items",e.items)("loading",e.loading)("title",e.noResultsTitle)}}function Jce(n,t){if(1&n){const e=q();S(0,"dot-form-actions",22),P("hide",function(r){return I(e),x(y().hide.emit(r))})("remove",function(r){return I(e),x(y().removeLink.emit(r))}),D()}2&n&&g("link",y().currentLink)}const Xce=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};let X3=(()=>{class n{constructor(e,i,r){this.fb=e,this.suggestionsService=i,this.dotLanguageService=r,this.hide=new R(!1),this.removeLink=new R(!1),this.isSuggestionOpen=new R(!1),this.setNodeProps=new R,this.showSuggestions=!1,this.languageId=Qp,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(e){const{target:i}=e;i!==this.input.nativeElement&&e.preventDefault()}get noResultsTitle(){return`No results for ${this.newLink}`}get currentLink(){return this.initialValues.link}get newLink(){return this.form.get("link").value}ngOnInit(){this.form=this.fb.group({...this.initialValues}),this.form.get("link").valueChanges.pipe(qp(500)).subscribe(e=>{e.lengththis.setNodeProps.emit({link:this.currentLink,blank:e})),this.dotLanguageService.getLanguages().pipe(Wt(1)).subscribe(e=>this.dotLangs=e)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const e=this.newLink.length>=this.minChars&&!Py(this.newLink);this.items=e?this.items:[],this.showSuggestions=e,this.loading=e,e&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:e="",blank:i=!0}){this.form.setValue({link:e,blank:i},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(e){const i=this.suggestionsComponent?.items;if(e.stopImmediatePropagation(),"Escape"===e.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!i?.length)return!0;switch(e.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":return this.suggestionsComponent?.updateSelection(e),!1;default:return!1}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:e}}){this.setFormValue({...this.form.value,link:e}),this.submitForm()}searchContentlets({link:e=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:e,currentLanguage:this.languageId}).pipe(Wt(1)).subscribe(i=>{this.items=i.map(r=>{const{languageId:o}=r;return r.language=this.getContentletLanguage(o),{label:r.title,icon:"contentlet/image",data:{contentlet:r},command:()=>{this.onSelection({payload:r,type:{name:"dotContent"}})}}}),this.loading=!1})}getContentletLanguage(e){const{languageCode:i,countryCode:r}=this.dotLangs[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(O(Wh),O(lD),O(aD))},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-link-form"]],viewQuery:function(e,i){if(1&e&&(Ee(Gce,5),Ee(qce,5)),2&e){let r;J(r=X())&&(i.input=r.first),J(r=X())&&(i.suggestionsComponent=r.first)}},hostBindings:function(e,i){1&e&&P("mousedown",function(o){return i.onMouseDownHandler(o)})},inputs:{showSuggestions:"showSuggestions",languageId:"languageId",initialValues:"initialValues"},outputs:{hide:"hide",removeLink:"removeLink",isSuggestionOpen:"isSuggestionOpen",setNodeProps:"setNodeProps"},decls:11,vars:8,consts:[[1,"form-container"],["autocomplete","off",3,"formGroup","keydown","ngSubmit"],[1,"p-inputgroup","search-container"],[1,"p-inputgroup"],["id","editor-input-link","pInputText","","type","text","placeholder","Paste link or search for pages","formControlName","link",3,"input"],["input",""],["pButton","","type","submit","label","ADD",1,"p-button"],["class","divider",4,"ngIf"],["class","info-container",4,"ngIf"],[3,"items","loading","title","back",4,"ngIf"],[3,"link","hide","remove",4,"ngIf"],[1,"divider"],[1,"info-container"],["target","_blank",1,"url-container",3,"href"],[1,"material-icons"],[1,"truncate"],[1,"field-checkbox"],[1,"checkbox-container"],["id","editor-input-checkbox","formControlName","blank",3,"binary"],["for","editor-input-checkbox"],[3,"items","loading","title","back"],["suggestions",""],[3,"link","hide","remove"]],template:function(e,i){1&e&&(S(0,"div",0)(1,"form",1),P("keydown",function(o){return i.onKeyDownEvent(o)})("ngSubmit",function(){return i.submitForm()}),S(2,"div",2)(3,"div",3)(4,"input",4,5),P("input",function(){return i.setLoading()}),D(),F(6,"button",6),D()(),C(7,Kce,1,0,"hr",7),C(8,Qce,11,6,"div",8),D(),C(9,Zce,2,3,"dot-suggestion-page",9),C(10,Jce,1,1,"dot-form-actions",10),D()),2&e&&(v(1),g("formGroup",i.form),v(5),jt(hn(7,Xce)),v(1),g("ngIf",i.showSuggestions||i.currentLink),v(1),g("ngIf",i.currentLink&&!i.showSuggestions),v(1),g("ngIf",i.showSuggestions),v(1),g("ngIf",!i.showSuggestions&&i.currentLink))},styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;width:400px}.form-container[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;max-width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{background:#ffffff;border:1px solid #afb3c0}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .url-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;font-size:16px;width:100%;word-wrap:normal;display:flex;align-items:center;text-decoration:none;gap:8px;color:#14151a}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%]{display:flex;gap:3.2px;min-width:100%;font-size:16px}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:32px;display:flex;align-items:center;justify-content:center}.divider[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebecef;width:100%;margin:0}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();mr(88222),new Et("addLink");const Py=n=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n);new Et("bubble-form");const sj=function(){return{width:"50%"}};function yue(n,t){if(1&n){const e=q();S(0,"div")(1,"div",1)(2,"button",2),P("click",function(){return I(e),x(y().copy())}),D(),S(3,"button",3),P("click",function(){return I(e),x(y().remove.emit(!0))}),D()()()}2&n&&(v(2),jt(hn(4,sj)),v(1),jt(hn(5,sj)))}let vue=(()=>{class n{constructor(){this.remove=new R(!1),this.hide=new R(!1),this.link=""}copy(){navigator.clipboard.writeText(this.link).then(()=>this.hide.emit(!0)).catch(()=>alert("Could not copy link"))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-form-actions"]],inputs:{link:"link"},outputs:{remove:"remove",hide:"hide"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"form-actions"],["pButton","","type","button","label","COPY LINK",1,"p-button-outlined",3,"click"],["pButton","","type","button","label","REMOVE LINK",1,"p-button-outlined","p-button-danger",3,"click"]],template:function(e,i){1&e&&C(0,yue,4,6,"div",0),2&e&&g("ngIf",i.link.length)},dependencies:[Ge,Nr],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]}),n})();function bue(n,t){if(1&n){const e=q();ae(0),S(1,"button",3),P("click",function(){return I(e),x(y().toggleChangeTo.emit())}),H(2),D(),F(3,"div",4),le()}if(2&n){const e=y();v(2),ve(e.selected)}}function Cue(n,t){1&n&&F(0,"div",4)}function wue(n,t){if(1&n){const e=q();ae(0),S(1,"dot-bubble-menu-button",5),P("click",function(){const o=I(e).$implicit;return x(y().command.emit(o))}),D(),C(2,Cue,1,0,"div",6),le()}if(2&n){const e=t.$implicit;v(1),g("active",e.active)("item",e),v(1),g("ngIf",e.divider)}}let aj=(()=>{class n{constructor(){this.items=[],this.command=new R,this.toggleChangeTo=new R}preventDeSelection(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(e,i){1&e&&(S(0,"div",0),P("mousedown",function(o){return i.preventDeSelection(o)}),C(1,bue,4,1,"ng-container",1),C(2,wue,3,3,"ng-container",2),D()),2&e&&(v(1),g("ngIf",i.selected),v(1),g("ngForOf",i.items))},styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:.125rem;box-shadow:0 10px 24px 0 var(--color-palette-black-op-20);display:flex;justify-content:center;padding:5.6px;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:4px;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f3f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #14151a;border-width:0 2px 2px 0;display:inline-block;padding:3.2px;transform:rotate(45deg);margin-left:12px}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f3f3f4;height:100%;margin:0 8px}']}),n})();const Sue=function(n,t){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":t}},Due=function(n){return{"material-icons":n}};let Tue=(()=>{class n{constructor(){this.active=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(e,i){1&e&&(S(0,"button",0)(1,"span",0),H(2),D()()),2&e&&(g("ngClass",lt(3,Sue,i.item.icon,i.active)),v(1),g("ngClass",te(6,Due,i.item.icon)),v(1),ve(i.item.icon||i.item.text))},dependencies:[Lt],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#14151a;display:flex;justify-content:center;align-items:center;cursor:pointer;max-width:auto;width:100%;height:32px;border-radius:.125rem}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f3f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f3f3f4;color:#14151a;border:1px solid #afb3c0}.btn-icon[_ngcontent-%COMP%]{width:32px}"]}),n})();var bD,CD;if(new Et("bubble-menu"),Ut.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:t})=>{const{schema:e}=t.state,{nodes:i}=e;return Boolean(i[n])}})}),tn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",vt(this.options.HTMLAttributes,n),0]}}),tn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",vt(this.options.HTMLAttributes,n),0]}}),typeof WeakMap<"u"){let n=new WeakMap;bD=t=>n.get(t),CD=(t,e)=>(n.set(t,e),e)}else{const n=[];let e=0;bD=i=>{for(let r=0;r(10==e&&(e=0),n[e++]=i,n[e++]=r)}var un=class{constructor(n,t,e,i){this.width=n,this.height=t,this.map=e,this.problems=i}findCell(n){for(let t=0;ti&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(e=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(n),e=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=t*e;c=e){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:b-M});break}const w=r+M*t;for(let N=0;N<_;N++){0==i[w+N]?i[w+N]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:_-N});const k=T&&T[N];if(k){const $=(w+N)%t*2,V=s[$];null==V||V!=k&&1==s[$+1]?(s[$]=k,s[$+1]=1):V==k&&s[$+1]++}}}r+=_,u+=m.nodeSize}const h=(c+1)*t;let p=0;for(;r0;t--)if("row"==n.node(t).type.spec.tableRole)return n.node(0).resolve(n.before(t+1));return null}function Oo(n){const t=n.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function Ry(n){const t=n.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const e=Td(t.$head)||function Wue(n){for(let t=n.nodeAfter,e=n.pos;t;t=t.firstChild,e++){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e)}for(let t=n.nodeBefore,e=n.pos;t;t=t.lastChild,e--){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e-t.nodeSize)}}(t.$head);if(e)return e;throw new RangeError(`No cell found around position ${t.head}`)}function wD(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function SD(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function uj(n,t,e){const i=n.node(-1),r=un.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,t,e);return null==s?null:n.node(0).resolve(o+s)}function Mc(n,t,e=1){const i={...n,colspan:n.colspan-e};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,e),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function dj(n,t,e=1){const i={...n,colspan:n.colspan+e};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=t.pos-r);a.unshift(t.pos-r);const l=a.map(c=>{const u=e.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new NP(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=t}map(n,t){const e=n.resolve(t.map(this.$anchorCell.pos)),i=n.resolve(t.map(this.$headCell.pos));if(wD(e)&&wD(i)&&SD(e,i)){const r=this.$anchorCell.node(-1)!=e.node(-1);return r&&this.isRowSelection()?bt.rowSelection(e,i):r&&this.isColSelection()?bt.colSelection(e,i):new bt(e,i)}return Le.between(e,i)}content(){const n=this.$anchorCell.node(-1),t=un.get(n),e=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-e,this.$headCell.pos-e),r={},o=[];for(let a=i.top;a0||m>0){let _=p.attrs;if(f>0&&(_=Mc(_,0,f)),m>0&&(_=Mc(_,_.colspan-m,m)),h.lefti.bottom){const _={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};p=h.top0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,t=n){const e=n.node(-1),i=un.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(t=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(n){return n instanceof bt&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,t=n){const e=n.node(-1),i=un.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.left<=s.left?(o.left>0&&(n=a.resolve(r+i.map[o.top*i.width])),s.right0&&(t=a.resolve(r+i.map[s.top*i.width])),o.right{t.push(Gn.node(i,i+e.nodeSize,{class:"selectedCell"}))}),en.create(n.doc,t)}var Jue=new Et("fix-tables");function pj(n,t,e,i){const r=n.childCount,o=t.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(e=function Xue(n,t,e,i){const r=un.get(t);if(!r.problems)return i;i||(i=n.tr);const o=[];for(let l=0;l0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const f=[];for(let _=0;_t.width)for(let d=0,h=0;dt.height){const d=[];for(let f=0,m=(t.height-1)*t.width;f=t.width)&&e.nodeAt(t.map[m+f]).type==l.header_cell;d.push(_?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,G.from(d)),p=[];for(let f=t.height;f{if(!r)return!1;const o=e.selection;if(o instanceof bt)return Fy(e,i,Fe.near(o.$headCell,t));if("horiz"!=n&&!o.empty)return!1;const s=yj(r,n,t);if(null==s)return!1;if("horiz"==n)return Fy(e,i,Fe.near(e.doc.resolve(o.head+t),t));{const a=e.doc.resolve(s),l=uj(a,n,t);let c;return c=l?Fe.near(l,1):t<0?Fe.near(e.doc.resolve(a.before(-1)),-1):Fe.near(e.doc.resolve(a.after(-1)),1),Fy(e,i,c)}}}function Vy(n,t){return(e,i,r)=>{if(!r)return!1;const o=e.selection;let s;if(o instanceof bt)s=o;else{const l=yj(r,n,t);if(null==l)return!1;s=new bt(e.doc.resolve(l))}const a=uj(s.$headCell,n,t);return!!a&&Fy(e,i,new bt(s.$anchorCell,a))}}function zy(n,t){const e=n.selection;if(!(e instanceof bt))return!1;if(t){const i=n.tr,r=Oi(n.schema).cell.createAndFill().content;e.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new ie(r,0,0))}),i.docChanged&&t(i)}return!0}function ode(n,t){const i=Td(n.state.doc.resolve(t));return!!i&&(n.dispatch(n.state.tr.setSelection(new bt(i))),!0)}function sde(n,t,e){if(!Oo(n.state))return!1;let i=function ede(n){if(!n.size)return null;let{content:t,openStart:e,openEnd:i}=n;for(;1==t.childCount&&(e>0&&i>0||"table"==t.child(0).type.spec.tableRole);)e--,i--,t=t.child(0).content;const r=t.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if("row"==o)for(let l=0;l=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=r;c=t.length&&t.push(G.empty),e[r]i&&(h=h.type.createChecked(Mc(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let p=1;pr&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(G.from(l))}e=o,t=r}return{width:n,height:t,rows:e}}(i,a.right-a.left,a.bottom-a.top),_j(n.state,n.dispatch,s,a,i),!0}if(i){const o=Ry(n.state),s=o.start(-1);return _j(n.state,n.dispatch,s,un.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function ade(n,t){var e;if(t.ctrlKey||t.metaKey)return;const i=vj(n,t.target);let r;if(t.shiftKey&&n.state.selection instanceof bt)o(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=Td(n.state.selection.$anchor))&&(null==(e=TD(n,t))?void 0:e.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,c){let u=TD(n,c);const d=null==tl.getState(n.state);if(!u||!SD(l,u)){if(!d)return;u=l}const h=new bt(l,u);if(d||!n.state.selection.eq(h)){const p=n.state.tr.setSelection(h);d&&p.setMeta(tl,l.pos),n.dispatch(p)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=tl.getState(n.state)&&n.dispatch(n.state.tr.setMeta(tl,-1))}function a(l){const c=l,u=tl.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(vj(n,c.target)!=i&&(d=TD(n,t),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function yj(n,t,e){if(!(n.state.selection instanceof Le))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((e<0?i.index(r):i.indexAfter(r))!=(e<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){const a=i.before(r);return n.endOfTextblock("vert"==t?e>0?"down":"up":e>0?"right":"left")?a:null}}return null}function vj(n,t){for(;t&&t!=n.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function TD(n,t){const e=n.posAtCoords({left:t.clientX,top:t.clientY});return e&&e?Td(n.state.doc.resolve(e.pos)):null}var lde=class{constructor(n,t){this.node=n,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),MD(n,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,MD(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function MD(n,t,e,i,r,o){var s;let a=0,l=!0,c=t.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[Oi(s.schema).table.name]=(a,l)=>new e(a,t,l),new By(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=ao.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function ude(n,t,e,i,r){const o=ao.getState(n.state);if(o&&!o.dragging){const s=function fde(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=e?a=bj(n,t,"left"):c-t.clientX<=e&&(a=bj(n,t,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=un.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}wj(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function dde(n){const t=ao.getState(n.state);t&&t.activeHandle>-1&&!t.dragging&&wj(n,-1)}(o)},mousedown:(o,s)=>{!function hde(n,t,e){const i=ao.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function pde(n,t,{colspan:e,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=e;if(i)for(let c=0;c{const s=ao.getState(o);if(s&&s.activeHandle>-1)return function yde(n,t){const e=[],i=n.doc.resolve(t),r=i.node(-1);if(!r)return en.empty;const o=un.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l-1&&n.docChanged){let i=n.mapping.map(t.activeHandle,-1);return wD(n.doc.resolve(i))||(i=-1),new By(i,t.dragging)}return t}};function bj(n,t,e){const i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;const{pos:r}=i,o=Td(n.state.doc.resolve(r));if(!o)return-1;if("right"==e)return o.pos;const s=un.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Cj(n,t,e){return Math.max(e,n.startWidth+(t.clientX-n.startX))}function wj(n,t){n.dispatch(n.state.tr.setMeta(ao,{setHandle:t}))}function _de(n){return Array(n).fill(0)}function us(n){const t=n.selection,e=Ry(n),i=e.node(-1),r=e.start(-1),o=un.get(i);return{...t instanceof bt?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(e.pos-r),tableStart:r,map:o,table:i}}function Sj(n,{map:t,tableStart:e,table:i},r){let o=r>0?-1:0;(function que(n,t,e){const i=Oi(t.type.schema).header_cell;for(let r=0;r0&&r0&&t.map[a-1]==l||r0?-1:0;(function Sde(n,t,e){var i;const r=Oi(t.type.schema).header_cell;for(let o=0;o0&&r0&&u==t.map[c-t.width]){const d=e.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(a).map(u+i),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(r0&&e[o]==e[o-1]||i.right0&&e[r]==e[r-n]||i.bottom{var i;const r=t.selection;let o,s;if(r instanceof bt){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function $ue(n){for(let t=n.depth;t>0;t--){const e=n.node(t).type.spec.tableRole;if("cell"===e||"header_cell"===e)return n.node(t)}return null}(r.$from),!o)return!1;s=null==(i=Td(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=us(t),d=t.tr;for(let p=0;pe[i.type.spec.tableRole])(n,t)}function Ij(n,t,e){const i=t.map.cellsInRect({left:0,top:0,right:"row"==n?t.map.width:1,bottom:"column"==n?t.map.height:1});for(let r=0;rr.table.nodeAt(l));for(let l=0;l{const f=p+o.tableStart,m=s.doc.nodeAt(f);m&&s.setNodeMarkup(f,h,m.attrs)}),i(s)}return!0}}Zp("row",{useDeprecatedLogic:!0}),Zp("column",{useDeprecatedLogic:!0});var Ade=Zp("cell",{useDeprecatedLogic:!0});function xj(n){return function(t,e){if(!Oo(t))return!1;const i=function Nde(n,t){if(t<0){const e=n.nodeBefore;if(e)return n.pos-e.nodeSize;for(let i=n.index(-1)-1,r=n.before();i>=0;i--){const o=n.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(n.index()null,apply(t,e){const i=t.getMeta(tl);if(null!=i)return-1==i?null:i;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:Kue,handleDOMEvents:{mousedown:ade},createSelectionBetween:t=>null!=tl.getState(t.state)?t.state.selection:null,handleTripleClick:ode,handleKeyDown:rde,handlePaste:sde},appendTransaction:(t,e,i)=>function Zue(n,t,e){const i=(t||n).selection,r=(t||n).doc;let o,s;if(i instanceof Me&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=bt.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=bt.rowSelection(a,a)}else if(!e){const a=un.get(i.node),l=i.from+1;o=bt.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof Le&&function Yue({$from:n,$to:t}){if(n.pos==t.pos||n.pos=0&&!(n.after(r+1)=0&&!(t.before(o+1)>t.start(o));o--,i--);return e==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=Le.create(r,i.from):i instanceof Le&&function Que({$from:n,$to:t}){let e,i;for(let r=n.depth;r>0;r--){const o=n.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){e=o;break}}for(let r=t.depth;r>0;r--){const o=t.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return e!==i&&0===t.parentOffset}(i)&&(o=Le.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}(i,fj(i,e),n)})}function Oj(n,t,e,i,r,o){let s=0,a=!0,l=t.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:t}=n.state;if(!function Vde(n){return n instanceof bt}(t))return!1;let e=0;return v3(t.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(e+=1)}),e===t.ranges.length&&(n.commands.deleteTable(),!0)};tn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Rde,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",vt(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:t=3,withHeaderRow:e=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function jde(n,t,e,i,r){const o=function Fde(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(e=>{const i=n.nodes[e];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:t})=>function vde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Sj(n.tr,e,e.left))}return!0}(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>function bde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Sj(n.tr,e,e.right))}return!0}(n,t),deleteColumn:()=>({state:n,dispatch:t})=>function wde(n,t){if(!Oo(n))return!1;if(t){const e=us(n),i=n.tr;if(0==e.left&&e.right==e.map.width)return!1;for(let r=e.right-1;Cde(i,e,r),r!=e.left;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=un.get(o)}t(i)}return!0}(n,t),addRowBefore:()=>({state:n,dispatch:t})=>function Dde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Dj(n.tr,e,e.top))}return!0}(n,t),addRowAfter:()=>({state:n,dispatch:t})=>function Tde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Dj(n.tr,e,e.bottom))}return!0}(n,t),deleteRow:()=>({state:n,dispatch:t})=>function Ede(n,t){if(!Oo(n))return!1;if(t){const e=us(n),i=n.tr;if(0==e.top&&e.bottom==e.map.height)return!1;for(let r=e.bottom-1;Mde(i,e,r),r!=e.top;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=un.get(e.table)}t(i)}return!0}(n,t),deleteTable:()=>({state:n,dispatch:t})=>function Lde(n,t){const e=n.selection.$anchor;for(let i=e.depth;i>0;i--)if("table"==e.node(i).type.spec.tableRole)return t&&t(n.tr.delete(e.before(i),e.after(i)).scrollIntoView()),!0;return!1}(n,t),mergeCells:()=>({state:n,dispatch:t})=>Mj(n,t),splitCell:()=>({state:n,dispatch:t})=>Ej(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>Zp("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>Zp("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>Ade(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>!!Mj(n,t)||Ej(n,t),setCellAttribute:(n,t)=>({state:e,dispatch:i})=>function Ode(n,t){return function(e,i){if(!Oo(e))return!1;const r=Ry(e);if(r.nodeAfter.attrs[n]===t)return!1;if(i){const o=e.tr;e.selection instanceof bt?e.selection.forEachCell((s,a)=>{s.attrs[n]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[n]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:t}),i(o)}return!0}}(n,t)(e,i),goToNextCell:()=>({state:n,dispatch:t})=>xj(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>xj(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&fj(n),!0),setCellSelection:n=>({tr:t,dispatch:e})=>{if(e){const i=bt.create(t.doc,n.anchorCell,n.headCell);t.setSelection(i)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Uy,"Mod-Backspace":Uy,Delete:Uy,"Mod-Delete":Uy}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[cde({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Pde({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:Ye(ge(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})}),new Et("floating-button");const Jp=new Et("freeze-scroll"),ehe=(Ut.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Jp,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[ehe]}),new pt({key:Jp,state:{init:()=>({freezeScroll:!1}),apply(n,t,e){const{freezeScroll:i}=n.getMeta(Jp)||{},r=Jp?.getState(e);return"boolean"==typeof i?{freezeScroll:i}:r||t}}}));let the=1;const nhe=Promise.resolve(),Hy={};function Aj(n){return n in Hy&&(delete Hy[n],!0)}const Nj={setImmediate(n){const t=the++;return Hy[t]=!0,nhe.then(()=>Aj(t)&&n()),t},clearImmediate(n){Aj(n)}},ED=new class rhe extends Mo{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=Nj.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(Nj.clearImmediate(e),t.scheduled=void 0)}});function Lj(n){return!!n&&(n instanceof mt||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function Xp(...n){return t=>{let e;return"function"==typeof n[n.length-1]&&(e=n.pop()),t.lift(new ohe(n,e))}}class ohe{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new she(t,this.observables,this.project))}}class she extends yN{constructor(t,e,i){super(t),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class lhe{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new che(t,this.compare,this.keySelector))}}class che extends ut{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:r}=this;e=r?r(t):t}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}const phe=new oe("@ngrx/component-store Initial State");let ef=(()=>{class n{constructor(e){this.destroySubject$=new Ng(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new Ng(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,e&&this.initState(e),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(e){return i=>{let o,r=!0;const a=(Lj(i)?i:_e(i)).pipe(function EG(n,t=0){return function(i){return i.lift(new IG(n,t))}}(gw),Mt(()=>this.assertStateIsInitialized()),Xp(this.stateSubject$),me(([l,c])=>e(c,l)),Mt(l=>this.stateSubject$.next(l)),ci(l=>r?(o=l,To):Ir(()=>l)),Rt(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(e){Ff([e],gw).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(e){"function"!=typeof e?this.initState(e):this.updater(e)()}patchState(e){const i="function"==typeof e?e(this.get()):e;this.updater((r,o)=>({...r,...o}))(i)}get(e){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Wt(1)).subscribe(r=>{i=e?e(r):r}),i}select(...e){const{observablesOrSelectorsObject:i,projector:r,config:o}=function fhe(n){const t=Array.from(n);let e={debounce:!1};if(function mhe(n){return typeof n.debounce<"u"}(t[t.length-1])&&(e={...e,...t.pop()}),1===t.length&&"function"!=typeof t[0])return{observablesOrSelectorsObject:t[0],projector:void 0,config:e};const i=t.pop();return{observablesOrSelectorsObject:t,projector:i,config:e}}(e);return(function ghe(n,t){return Array.isArray(n)&&0===n.length&&t}(i,r)?this.stateSubject$:function e_(...n){let t,e;return la(n[n.length-1])&&(e=n.pop()),"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&ri(n[0])&&(n=n[0]),ua(n,e).lift(new rY(t))}(i)).pipe(o.debounce?function hhe(){return n=>new mt(t=>{let e,i;const r=new ft;return r.add(n.subscribe({complete:()=>{e&&t.next(i),t.complete()},error:o=>{t.error(o)},next:o=>{i=o,e||(e=ED.schedule(()=>{t.next(i),e=void 0}),r.add(e))}})),r})}():n=>n,r?me(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function ahe(n,t){return e=>e.lift(new lhe(n,t))}(),function uhe(n,t,e){let i;return i=n&&"object"==typeof n?n:{bufferSize:n,windowTime:t,refCount:!1,scheduler:e},r=>r.lift(function dhe({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:e,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new Ng(n,t,i),d=r.subscribe(this),s=u.subscribe({next(h){r.next(h)},error(h){a=!0,r.error(h)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&e&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}({refCount:!0,bufferSize:1}),Rt(this.destroy$))}effect(e){const i=new ye;return e(i).pipe(Rt(this.destroy$)).subscribe(),r=>(Lj(r)?r:_e(r)).pipe(Rt(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){ED.schedule(()=>{})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`)}}return n.\u0275fac=function(e){return new(e||n)(U(phe,8))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function OD(n,t,e){return i=>i.pipe(Mt({next:n,complete:e}),ci(r=>(t(r),To)))}const Mhe=(new Et("dotAITextContent"),["headerchkbox"]),Ehe=["filter"];function Ihe(n,t){1&n&&ce(0)}function xhe(n,t){if(1&n&&(S(0,"div",7),ln(1),C(2,Ihe,1,0,"ng-container",8),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.headerTemplate)}}const Rj=function(n){return{"p-checkbox-disabled":n}},Ohe=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}},Fj=function(n){return{"pi pi-check":n}};function khe(n,t){if(1&n){const e=q();S(0,"div",12)(1,"div",13)(2,"input",14),P("focus",function(){return I(e),x(y(2).onHeaderCheckboxFocus())})("blur",function(){return I(e),x(y(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return I(e),x(y(2).toggleAll(r))}),D()(),S(3,"div",15,16),P("click",function(r){return I(e),x(y(2).toggleAll(r))}),F(5,"span",17),D()()}if(2&n){const e=y(2);g("ngClass",te(5,Rj,e.disabled||e.toggleAllDisabled)),v(2),g("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),v(1),g("ngClass",Hr(7,Ohe,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),v(2),g("ngClass",te(11,Fj,e.allChecked))}}function Ahe(n,t){1&n&&ce(0)}const Nhe=function(n){return{options:n}};function Lhe(n,t){if(1&n&&(ae(0),C(1,Ahe,1,0,"ng-container",18),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,Nhe,e.filterOptions))}}function Phe(n,t){if(1&n){const e=q();S(0,"div",20)(1,"input",21,22),P("input",function(r){return I(e),x(y(3).onFilter(r))}),D(),F(3,"span",23),D()}if(2&n){const e=y(3);v(1),g("value",e.filterValue||"")("disabled",e.disabled),pe("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function Rhe(n,t){1&n&&C(0,Phe,4,4,"div",19),2&n&&g("ngIf",y(2).filter)}function Fhe(n,t){if(1&n&&(S(0,"div",7),C(1,khe,6,13,"div",9),C(2,Lhe,2,4,"ng-container",10),C(3,Rhe,1,1,"ng-template",null,11,yt),D()),2&n){const e=Pe(4),i=y();v(1),g("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function jhe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function Vhe(n,t){1&n&&ce(0)}function zhe(n,t){1&n&&ce(0)}const AD=function(n){return{$implicit:n}};function Bhe(n,t){if(1&n&&(S(0,"li",25),C(1,jhe,2,1,"span",3),C(2,Vhe,1,0,"ng-container",18),D(),C(3,zhe,1,0,"ng-container",18)),2&n){const e=t.$implicit,i=y(2),r=Pe(8);v(1),g("ngIf",!i.groupTemplate),v(1),g("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",te(5,AD,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(7,AD,i.getOptionGroupChildren(e)))}}function Uhe(n,t){if(1&n&&(ae(0),C(1,Bhe,4,9,"ng-template",24),le()),2&n){const e=y();v(1),g("ngForOf",e.optionsToRender)}}function Hhe(n,t){1&n&&ce(0)}function $he(n,t){if(1&n&&(ae(0),C(1,Hhe,1,0,"ng-container",18),le()),2&n){const e=y(),i=Pe(8);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,AD,e.optionsToRender))}}const Whe=function(n){return{"p-highlight":n}};function Ghe(n,t){if(1&n&&(S(0,"div",12)(1,"div",28),F(2,"span",17),D()()),2&n){const e=y().$implicit,i=y(2);g("ngClass",te(3,Rj,i.disabled||i.isOptionDisabled(e))),v(1),g("ngClass",te(5,Whe,i.isSelected(e))),v(1),g("ngClass",te(7,Fj,i.isSelected(e)))}}function qhe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.getOptionLabel(e))}}function Khe(n,t){1&n&&ce(0)}const Yhe=function(n,t){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":t}},Qhe=function(n,t){return{$implicit:n,index:t}};function Zhe(n,t){if(1&n){const e=q();S(0,"li",27),P("click",function(r){const s=I(e).$implicit;return x(y(2).onOptionClick(r,s))})("dblclick",function(r){const s=I(e).$implicit;return x(y(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=I(e).$implicit;return x(y(2).onOptionTouchEnd(o))})("keydown",function(r){const s=I(e).$implicit;return x(y(2).onOptionKeyDown(r,s))}),C(1,Ghe,3,9,"div",9),C(2,qhe,2,1,"span",3),C(3,Khe,1,0,"ng-container",18),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(2);g("ngClass",lt(8,Yhe,r.isSelected(e),r.isOptionDisabled(e))),pe("tabindex",r.disabled||r.isOptionDisabled(e)?null:"0")("aria-label",r.getOptionLabel(e))("aria-selected",r.isSelected(e)),v(1),g("ngIf",r.checkbox&&r.multiple),v(1),g("ngIf",!r.itemTemplate),v(1),g("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",lt(11,Qhe,e,i))}}function Jhe(n,t){1&n&&C(0,Zhe,4,14,"li",26),2&n&&g("ngForOf",t.$implicit)}function Xhe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function epe(n,t){1&n&&ce(0,null,30)}function tpe(n,t){if(1&n&&(S(0,"li",29),C(1,Xhe,2,1,"ng-container",10),C(2,epe,2,0,"ng-container",8),D()),2&n){const e=y();v(1),g("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),v(1),g("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function npe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),xt(" ",e.emptyMessageLabel," ")}}function ipe(n,t){1&n&&ce(0,null,31)}function rpe(n,t){if(1&n&&(S(0,"li",29),C(1,npe,2,1,"ng-container",10),C(2,ipe,2,0,"ng-container",8),D()),2&n){const e=y();v(1),g("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),v(1),g("ngTemplateOutlet",e.emptyTemplate)}}function ope(n,t){1&n&&ce(0)}function spe(n,t){if(1&n&&(S(0,"div",32),ln(1,1),C(2,ope,1,0,"ng-container",8),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.footerTemplate)}}const ape=[[["p-header"]],[["p-footer"]]],lpe=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},cpe=["p-header","p-footer"],upe={provide:Cn,useExisting:Ue(()=>jj),multi:!0};let jj=(()=>{class n{constructor(e,i,r,o){this.el=e,this.cd=i,this.filterService=r,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new R,this.onClick=new R,this.onDblClick=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:e=>this.onFilter(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,i):this.onOptionClickMultiple(e,i):this.onOptionClickSingle(e,i),this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onOptionClickSingle(e,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(e.metaKey||e.ctrlKey)&&(this.value=null,o=!0):(this.value=this.getOptionValue(i),o=!0):(this.value=r?null:this.getOptionValue(i),o=!0),o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickMultiple(e,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=e.metaKey||e.ctrlKey;r?(a?this.removeOption(i):this.value=[this.getOptionValue(i)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(i)],o=!0)}else r?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickCheckbox(e,i){this.disabled||this.readonly||(this.isSelected(i)?this.removeOption(i):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(i)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}removeOption(e){this.value=this.value.filter(i=>!Oe.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(Oe.equals(o,r,this.dataKey)){i=!0;break}}else i=Oe.equals(this.value,r,this.dataKey);return i}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of e)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?i++:r++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?i++:r++;else{if(!c)return!1;o++}}return s===i||s===o||o&&s===o+r+i}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ln.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),this._filterValue,this.filterLocale));else this._filteredOptions=null}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}get toggleAllDisabled(){let e=this.optionsToRender;if(!e||0===e.length)return!0;for(let i of e)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.preventDefault())}checkAll(){let i=[];this.optionsToRender.forEach(r=>{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}onOptionKeyDown(e,i){if(this.readonly)return;let r=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(r);o&&o.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,i),e.preventDefault()}}findNextItem(e){let i=e.nextElementSibling;return i?A.hasClass(i,"p-disabled")||A.isHidden(i)||A.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(e){let i=e.previousElementSibling;return i?A.hasClass(i,"p-disabled")||A.isHidden(i)||A.hasClass(i,"p-listbox-item-group")?this.findPrevItem(i):i:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Tt),O(w1),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-listbox"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,T_,5),Vt(r,M_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(Mhe,5),Ee(Ehe,5)),2&e){let r;J(r=X())&&(i.headerCheckboxViewChild=r.first),J(r=X())&&(i.filterViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ie([upe])],ngContentSelectors:cpe,decls:12,vars:18,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-empty-message",4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],["filter",""],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(e,i){1&e&&(ai(ape),S(0,"div",0),C(1,xhe,3,1,"div",1),C(2,Fhe,5,3,"div",1),S(3,"div",0)(4,"ul",2),C(5,Uhe,2,1,"ng-container",3),C(6,$he,2,4,"ng-container",3),C(7,Jhe,1,1,"ng-template",null,4,yt),C(9,tpe,3,3,"li",5),C(10,rpe,3,3,"li",5),D()(),C(11,spe,3,1,"div",6),D()),2&e&&(Ke(i.styleClass),g("ngClass",te(16,lpe,i.disabled))("ngStyle",i.style),v(1),g("ngIf",i.headerFacet||i.headerTemplate),v(1),g("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),v(1),Ke(i.listStyleClass),g("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),v(1),pe("aria-multiselectable",i.multiple),v(1),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",!i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[Lt,Un,Ge,Zn,fn,Xr],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),ppe=(()=>{class n{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();const i=A.getNextFocusableElement(this.el.nativeElement,e.shiftKey);i&&(i.focus(),i.select?.())}}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,i){1&e&&P("keydown.tab",function(o){return i.onkeydown(o)})("keydown.shift.tab",function(o){return i.onkeydown(o)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),n})(),fpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be]}),n})();const mpe=["titlebar"],gpe=["content"],_pe=["footer"];function ype(n,t){if(1&n){const e=q();S(0,"div",11),P("mousedown",function(r){return I(e),x(y(3).initResize(r))}),D()}}function vpe(n,t){if(1&n&&(S(0,"span",18),H(1),D()),2&n){const e=y(4);pe("id",e.id+"-label"),v(1),ve(e.header)}}function bpe(n,t){1&n&&(S(0,"span",18),ln(1,1),D()),2&n&&pe("id",y(4).id+"-label")}function Cpe(n,t){1&n&&ce(0)}const wpe=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function Spe(n,t){if(1&n){const e=q();S(0,"button",19),P("click",function(){return I(e),x(y(4).maximize())})("keydown.enter",function(){return I(e),x(y(4).maximize())}),F(1,"span",20),D()}if(2&n){const e=y(4);g("ngClass",hn(2,wpe)),v(1),g("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const Dpe=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function Tpe(n,t){if(1&n){const e=q();S(0,"button",21),P("click",function(r){return I(e),x(y(4).close(r))})("keydown.enter",function(r){return I(e),x(y(4).close(r))}),F(1,"span",22),D()}if(2&n){const e=y(4);g("ngClass",hn(4,Dpe)),pe("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),v(1),g("ngClass",e.closeIcon)}}function Mpe(n,t){if(1&n){const e=q();S(0,"div",12,13),P("mousedown",function(r){return I(e),x(y(3).initDrag(r))}),C(2,vpe,2,2,"span",14),C(3,bpe,2,1,"span",14),C(4,Cpe,1,0,"ng-container",9),S(5,"div",15),C(6,Spe,2,3,"button",16),C(7,Tpe,2,5,"button",17),D()()}if(2&n){const e=y(3);v(2),g("ngIf",!e.headerFacet&&!e.headerTemplate),v(1),g("ngIf",e.headerFacet),v(1),g("ngTemplateOutlet",e.headerTemplate),v(2),g("ngIf",e.maximizable),v(1),g("ngIf",e.closable)}}function Epe(n,t){1&n&&ce(0)}function Ipe(n,t){1&n&&ce(0)}function xpe(n,t){if(1&n&&(S(0,"div",23,24),ln(2,2),C(3,Ipe,1,0,"ng-container",9),D()),2&n){const e=y(3);v(3),g("ngTemplateOutlet",e.footerTemplate)}}const Ope=function(n,t,e,i){return{"p-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":i}},kpe=function(n,t){return{transform:n,transition:t}},Ape=function(n){return{value:"visible",params:n}};function Npe(n,t){if(1&n){const e=q();S(0,"div",3,4),P("@animation.start",function(r){return I(e),x(y(2).onAnimationStart(r))})("@animation.done",function(r){return I(e),x(y(2).onAnimationEnd(r))}),C(2,ype,1,0,"div",5),C(3,Mpe,8,5,"div",6),S(4,"div",7,8),ln(6),C(7,Epe,1,0,"ng-container",9),D(),C(8,xpe,4,1,"div",10),D()}if(2&n){const e=y(2);Ke(e.styleClass),g("ngClass",va(15,Ope,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",te(23,Ape,lt(20,kpe,e.transformOptions,e.transitionOptions))),pe("aria-labelledby",e.id+"-label"),v(2),g("ngIf",e.resizable),v(1),g("ngIf",e.showHeader),v(1),Ke(e.contentStyleClass),g("ngClass","p-dialog-content")("ngStyle",e.contentStyle),v(3),g("ngTemplateOutlet",e.contentTemplate),v(1),g("ngIf",e.footerFacet||e.footerTemplate)}}const Lpe=function(n,t,e,i,r,o,s,a,l,c){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":n,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":i,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":l,"p-dialog-bottom-right":c}};function Ppe(n,t){if(1&n&&(S(0,"div",1),C(1,Npe,9,25,"div",2),D()),2&n){const e=y();Ke(e.maskStyleClass),g("ngClass",$C(4,Lpe,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),v(1),g("ngIf",e.visible)}}const Rpe=["*",[["p-header"]],[["p-footer"]]],Fpe=["*","p-header","p-footer"],jpe=Pg([Pt({transform:"{{transform}}",opacity:0}),Bi("{{transition}}")]),Vpe=Pg([Bi("{{transition}}",Pt({transform:"{{transform}}",opacity:0}))]);let zj=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.renderer=i,this.zone=r,this.cd=o,this.config=s,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new R,this.onHide=new R,this.visibleChange=new R,this.onResizeInit=new R,this.onResizeEnd=new R,this.onDragEnd=new R,this.onMaximize=new R,this.id=D_(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style={...e},this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=A.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&A.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&A.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?A.addClass(document.body,"p-overflow-hidden"):A.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&($i.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let i in this.breakpoints)e+=`\n @media screen and (max-width: ${i}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[i]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){A.hasClass(e.target,"p-dialog-header-icon")||A.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",A.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let i=A.getFocusableElements(this.container);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);e.shiftKey?-1==r||0===r?i[i.length-1].focus():i[r-1].focus():-1==r||r===i.length-1?i[0].focus():i[r+1].focus()}else i[0].focus()}}onDrag(e){if(this.dragging){let i=A.getOuterWidth(this.container),r=A.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+o,c=a.top+s,u=A.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+i=this.minY&&c+rparseInt(u))&&h.left+lparseInt(d))&&h.top+c{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",i=>{27==i.which&&this.close(i)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):A.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&A.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&A.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(A.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&A.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&$i.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?{...this.originalStyle}:{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(nt),O(Tt),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-dialog"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,T_,5),Vt(r,M_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(mpe,5),Ee(gpe,5),Ee(_pe,5)),2&e){let r;J(r=X())&&(i.headerViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first),J(r=X())&&(i.footerViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:Fpe,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(e,i){1&e&&(ai(Rpe),C(0,Ppe,2,15,"div",0)),2&e&&g("ngIf",i.maskVisible)},dependencies:[Lt,Ge,Zn,fn,ppe,Xr],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[Wl("animation",[Ui("void => visible",[Rg(jpe)]),Ui("visible => void",[Rg(Vpe)])])]},changeDetection:0}),n})(),Bj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be,fpe,Ar,wn]}),n})();function zpe(n,t){1&n&&ce(0)}function Bpe(n,t){if(1&n){const e=q();S(0,"button",5),P("click",function(r){return I(e),x(y(2).onCloseClick(r))})("keydown.enter",function(){return I(e),x(y(2).hide())}),F(1,"span",6),D()}2&n&&pe("aria-label",y(2).ariaCloseLabel)}const Upe=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},Hpe=function(n,t){return{value:n,params:t}};function $pe(n,t){if(1&n){const e=q();S(0,"div",1),P("click",function(r){return I(e),x(y().onOverlayClick(r))})("@animation.start",function(r){return I(e),x(y().onAnimationStart(r))})("@animation.done",function(r){return I(e),x(y().onAnimationEnd(r))}),S(1,"div",2),P("click",function(){return I(e),x(y().onContentClick())})("mousedown",function(){return I(e),x(y().onContentClick())}),ln(2),C(3,zpe,1,0,"ng-container",3),D(),C(4,Bpe,2,1,"button",4),D()}if(2&n){const e=y();Ke(e.styleClass),g("ngClass","p-overlaypanel p-component")("ngStyle",e.style)("@animation",lt(10,Hpe,e.overlayVisible?"open":"close",lt(7,Upe,e.showTransitionOptions,e.hideTransitionOptions))),v(3),g("ngTemplateOutlet",e.contentTemplate),v(1),g("ngIf",e.showCloseIcon)}}const Wpe=["*"];let Gpe=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.dismissable=!0,this.appendTo="body",this.autoZIndex=!0,this.baseZIndex=0,this.focusOnShow=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new R,this.onHide=new R,this.overlayVisible=!1,this.render=!1,this.isOverlayAnimationInProgress=!1,this.selfClick=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template,this.cd.markForCheck()})}bindDocumentClickListener(){!this.documentClickListener&&this.dismissable&&this.zone.runOutsideAngular(()=>{let e=A.isIOS()?"touchstart":"click";this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document",e,r=>{!this.container.contains(r.target)&&this.target!==r.target&&!this.target.contains(r.target)&&!this.selfClick&&this.zone.run(()=>{this.hide()}),this.selfClick=!1,this.cd.markForCheck()})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,i){this.isOverlayAnimationInProgress||(this.overlayVisible?(this.hasTargetChanged(e,i)&&(this.destroyCallback=()=>{this.show(null,i||e.currentTarget||e.target)}),this.hide()):this.show(e,i))}show(e,i){this.isOverlayAnimationInProgress||(this.target=i||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(){this.selfClick=!0}hasTargetChanged(e,i){return null!=this.target&&this.target!==(i||e.currentTarget||e.target)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):A.appendChild(this.container,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}align(){this.autoZIndex&&$i.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay),A.absolutePosition(this.container,this.target);const e=A.getOffset(this.container),i=A.getOffset(this.target);let r=0;e.left{this.container&&this.container.contains(i.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)),this.isOverlayAnimationInProgress=!0}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&&$i.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1}this.isOverlayAnimationInProgress=!1}focus(){let e=A.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onWindowResize(e){this.overlayVisible&&!A.isTouchDevice()&&this.hide()}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new E_(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&$i.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(nt),O(Eo),O(yp))},n.\u0275cmp=Y({type:n,selectors:[["p-overlayPanel"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{dismissable:"dismissable",showCloseIcon:"showCloseIcon",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",ariaCloseLabel:"ariaCloseLabel",baseZIndex:"baseZIndex",focusOnShow:"focusOnShow",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},ngContentSelectors:Wpe,decls:1,vars:1,consts:[[3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],[1,"p-overlaypanel-content",3,"click","mousedown"],[4,"ngTemplateOutlet"],["type","button","class","p-overlaypanel-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],["type","button","pRipple","",1,"p-overlaypanel-close","p-link",3,"click","keydown.enter"],[1,"p-overlaypanel-close-icon","pi","pi-times"]],template:function(e,i){1&e&&(ai(),C(0,$pe,5,13,"div",0)),2&e&&g("ngIf",i.render)},dependencies:[Lt,Ge,Zn,fn,Xr],styles:['.p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:" ";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n'],encapsulation:2,data:{animation:[Wl("animation",[zu("void",Pt({transform:"scaleY(0.8)",opacity:0})),zu("close",Pt({opacity:0})),zu("open",Pt({transform:"translateY(0)",opacity:1})),Ui("void => open",Bi("{{showTransitionParams}}")),Ui("open => close",Bi("{{hideTransitionParams}}"))])]},changeDetection:0}),n})(),Uj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({imports:[Be,Ar,wn,wn]}),n})(),Wy=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.zone=i,this.config=r,this.renderer=o,this.changeDetector=s,this.escape=!0,this.autoHide=!0,this.fitContent=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0,autoHide:!0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...e.tooltipOptions.currentValue},this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){(this.isAutoHide()||!(A.hasClass(e.toElement,"p-tooltip")||A.hasClass(e.toElement,"p-tooltip-arrow")||A.hasClass(e.toElement,"p-tooltip-text")||A.hasClass(e.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?A.appendChild(this.container,this.el.nativeElement):A.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()||this.bindContainerMouseleaveListener()}bindContainerMouseleaveListener(){this.containerMouseleaveListener||(this.containerMouseleaveListener=this.renderer.listen(this.container??this.container.nativeElement,"mouseleave",i=>{this.deactivate()}))}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),A.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?$i.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&$i.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+A.getWindowScrollLeft(),top:e.top+A.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+A.getOuterWidth(this.el.nativeElement),r=e.top+(A.getOuterHeight(this.el.nativeElement)-A.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),i=e.left-A.getOuterWidth(this.container),r=e.top+(A.getOuterHeight(this.el.nativeElement)-A.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),i=e.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=e.top-A.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),i=e.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=e.top+A.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions={...this._tooltipOptions,...e}}getOption(e){return this._tooltipOptions[e]}getTarget(e){return A.hasClass(e,"p-inputwrapper")?A.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=A.getOuterWidth(this.container),s=A.getOuterHeight(this.container),a=A.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new E_(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):A.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&$i.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(nt),O(Eo),O(Vn),O(Tt))},n.\u0275dir=de({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Yn]}),n})();function ND(n){return t=>t.lift(new tfe(n))}class tfe{constructor(t){this.total=t}call(t,e){return e.subscribe(new nfe(t,this.total))}}class nfe extends ut{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}new Et("aiImagePrompt-form"),new Et("aiContentActions-form");const qj={leading:!0,trailing:!1};class pfe{constructor(t,e,i,r){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=r}call(t,e){return e.subscribe(new ffe(t,this.duration,this.scheduler,this.leading,this.trailing))}}class ffe extends ut{constructor(t,e,i,r,o){super(t),this.duration=e,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(mfe,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function mfe(n){const{subscriber:t}=n;t.clearThrottle()}const gfe={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};let Kj=(()=>{class n extends ef{constructor(e,i){super(gfe),this.searchService=e,this.dotLanguageService=i,this.vm$=this.select(({contentlets:r,loading:o,preventScroll:s})=>({contentlets:r,loading:o,preventScroll:s})),this.updateContentlets=this.updater((r,o)=>({...r,contentlets:o})),this.updateAssetType=this.updater((r,o)=>({...r,assetType:o})),this.updatelanguageId=this.updater((r,o)=>({...r,languageId:o})),this.updateLoading=this.updater((r,o)=>({...r,loading:o})),this.updatePreventScroll=this.updater((r,o)=>({...r,preventScroll:o})),this.updateSearch=this.updater((r,o)=>({...r,search:o})),this.searchContentlet=this.effect(r=>r.pipe(Mt(o=>{this.updateLoading(!0),this.updateSearch(o)}),Xp(this.state$),me(([o,s])=>({...s,search:o})),Dn(o=>this.searchContentletsRequest(this.params({...o}),[])))),this.nextBatch=this.effect(r=>r.pipe(Xp(this.state$),me(([o,s])=>({...s,offset:o})),Dn(({contentlets:o,...s})=>this.searchContentletsRequest(this.params(s),o)))),this.dotLanguageService.getLanguages().subscribe(r=>{this.languages=r})}searchContentletsRequest(e,i){return this.searchService.get(e).pipe(me(({jsonObjectView:{contentlets:r}})=>{const o=this.setContentletLanguage(r);return this.updateLoading(!1),this.updatePreventScroll(!r?.length),this.updateContentlets([...i,...o])}))}params({search:e,assetType:i,offset:r=0,languageId:o}){return{query:`+catchall:${e.includes("-")?e:`${e}*`} title:'${e}'^15 +languageId:${o} +baseType:(4 OR 9) +metadata.contenttype:${i||""}/* +deleted:false +working:true`,sortOrder:xy.ASC,limit:20,offset:r}}setContentletLanguage(e){return e.map(i=>({...i,language:this.getLanguage(i.languageId)}))}getLanguage(e){const{languageCode:i,countryCode:r}=this.languages[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(U(Xae),U(aD))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function _fe(n,t){if(1&n&&(S(0,"div",3),F(1,"dot-contentlet-thumbnail",4),D()),2&n){const e=y();v(1),g("contentlet",e.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",e.showVideoThumbnail)}}function yfe(n,t){if(1&n&&(S(0,"h2",5),H(1),D()),2&n){const e=y();v(1),ve((null==e.contentlet?null:e.contentlet.fileName)||(null==e.contentlet?null:e.contentlet.title))}}function vfe(n,t){if(1&n&&(S(0,"div",6)(1,"span",7),H(2),D(),F(3,"dot-state-icon",8),D()),2&n){const e=y();v(2),ve(e.contentlet.language),v(1),g("state",e.contentlet)}}let bfe=(()=>{class n{constructor(e){this.dotMarketingConfigService=e,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(Ju.SHOW_VIDEO_THUMBNAIL)}getImage(e){return`/dA/${e}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}return n.\u0275fac=function(e){return new(e||n)(O(P3))},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card"]],inputs:{contentlet:"contentlet"},decls:4,vars:1,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],["pTemplate","footer"],[1,"thumbnail-container"],[3,"contentlet","cover","iconSize","showVideoThumbnail"],[1,"title"],[1,"state"],[1,"badge"],["size","16px",3,"state"]],template:function(e,i){1&e&&(S(0,"p-card"),C(1,_fe,2,4,"ng-template",0),C(2,yfe,2,1,"h2",1),C(3,vfe,4,2,"ng-template",2),D()),2&e&&(v(2),g("pTemplate","title"))},dependencies:[_D,mn],styles:["[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:1rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0;height:94px;width:94px;min-height:94px;min-width:94px;border-radius:.25rem 0 0 .25rem}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container{padding:10px;width:100%;height:100%;background:#f3f3f4}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail{width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail img{object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-body{flex-grow:1;display:flex;flex-direction:column;overflow:hidden;padding:.75rem .75rem .75rem 0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{flex-grow:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h2{font-size:16px;line-height:140%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}[_nghost-%COMP%] .badge{background:var(--color-palette-primary-100);border-radius:.125rem;color:#14151a;font-size:12px;line-height:140%;padding:.2rem .5rem;display:flex;align-items:center}"],changeDetection:0}),n})(),Cfe=(()=>{class n{constructor(){this.shape="rectangle",this.animation="wave",this.borderRadius=null,this.size=null,this.width="100%",this.height="1rem"}containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":"circle"===this.shape,"p-skeleton-none":"none"===this.animation}}containerStyle(){return this.size?{...this.style,width:this.size,height:this.size,borderRadius:this.borderRadius}:{...this.style,width:this.width,height:this.height,borderRadius:this.borderRadius}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:4,consts:[[3,"ngClass","ngStyle"]],template:function(e,i){1&e&&F(0,"div",0),2&e&&(Ke(i.styleClass),g("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[Lt,fn],styles:['.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n'],encapsulation:2,changeDetection:0}),n})();function wfe(n,t){1&n&&F(0,"p-skeleton",3)}function Sfe(n,t){1&n&&(S(0,"div",4),F(1,"p-skeleton",5)(2,"p-skeleton",6),D())}let Dfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card-skeleton"]],decls:4,vars:0,consts:[["pTemplate","header"],["height","1rem"],["pTemplate","footer"],["shape","square","size","94px"],[1,"state"],["width","2rem","height","1rem"],["shape","circle","size","16px"]],template:function(e,i){1&e&&(S(0,"p-card"),C(1,wfe,1,0,"ng-template",0),F(2,"p-skeleton",1),C(3,Sfe,3,0,"ng-template",2),D())},dependencies:[_D,mn,Cfe],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:.5rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0}[_nghost-%COMP%] .p-card .p-card-body{flex:1;overflow:hidden;padding:.75rem .5rem .75rem 0;display:flex;flex-direction:column}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{flex-grow:1}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}"],changeDetection:0}),n})();function Tfe(n,t){if(1&n){const e=q();S(0,"dot-asset-card",7),P("click",function(){I(e);const r=y().$implicit;return x(y(2).selectedItem.emit(r[0]))}),D()}2&n&&g("contentlet",y().$implicit[0])}function Mfe(n,t){if(1&n){const e=q();S(0,"dot-asset-card",7),P("click",function(){I(e);const r=y().$implicit;return x(y(2).selectedItem.emit(r[1]))}),D()}2&n&&g("contentlet",y().$implicit[1])}function Efe(n,t){if(1&n&&(S(0,"div",5),C(1,Tfe,1,1,"dot-asset-card",6),C(2,Mfe,1,1,"dot-asset-card",6),D()),2&n){const e=t.$implicit;v(1),g("ngIf",e[0]),v(1),g("ngIf",e[1])}}function Ife(n,t){if(1&n){const e=q();S(0,"p-scroller",3),P("onScrollIndexChange",function(r){return I(e),x(y().onScrollIndexChange(r))}),C(1,Efe,3,2,"ng-template",4),D()}if(2&n){const e=y();g("itemSize",110)("items",e.rows)("lazy",!0)}}function xfe(n,t){1&n&&(S(0,"div",5),F(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),D())}function Ofe(n,t){if(1&n&&(S(0,"div",8),C(1,xfe,3,0,"div",9),D()),2&n){const e=y();v(1),g("ngForOf",e.loadingItems)}}function kfe(n,t){if(1&n&&(S(0,"div",10),F(1,"img",11),S(2,"p"),H(3,"No results found, try searching again"),D()()),2&n){const e=y();v(1),g("src",e.icon,zo)}}let Afe=(()=>{class n{constructor(){this.nextBatch=new R,this.selectedItem=new R,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(e){this._offset=e?.length||0,this._itemRows=this.createRowItem(e)}get rows(){return[...this._itemRows]}onScrollIndexChange(e){this.done||e.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(e=[]){const i=[];return e.forEach(r=>{const o=i.length-1;i[o]?.length<2?i[o].push(r):i.push([r])}),i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card-list"]],inputs:{done:"done",loading:"loading",contentlets:"contentlets"},outputs:{nextBatch:"nextBatch",selectedItem:"selectedItem"},decls:5,vars:2,consts:[["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange",4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange"],["pTemplate","item"],[1,"card-list-row"],[3,"contentlet","click",4,"ngIf"],[3,"contentlet","click"],[1,"wrapper","justify-start"],["class","card-list-row",4,"ngFor","ngForOf"],[1,"wrapper"],["width","42px","alt","No results found",3,"src"]],template:function(e,i){if(1&e&&(C(0,Ife,2,3,"p-scroller",0),C(1,Ofe,2,1,"ng-template",null,1,yt),C(3,kfe,4,1,"ng-template",null,2,yt)),2&e){const r=Pe(2),o=Pe(4);g("ngIf",(null==i.rows?null:i.rows.length)&&!i.loading)("ngIfElse",i.loading?r:o)}},dependencies:[Un,Ge,mn,A_,bfe,Dfe],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:20rem;flex-direction:column}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{padding:0 2rem;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-grow:1;height:250px;gap:0 1rem;overflow:hidden}[_nghost-%COMP%] .justify-start[_ngcontent-%COMP%]{justify-content:flex-start}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:1rem 0;font-size:18px}[_nghost-%COMP%] dot-asset-card, [_nghost-%COMP%] dot-asset-card-skeleton{width:calc(50% - .5rem)}[_nghost-%COMP%] .p-scroller-content{padding:0 2rem;max-width:100%}[_nghost-%COMP%] .card-list-row{display:flex;justify-content:space-between;width:100%;min-height:110px;gap:1rem}"],changeDetection:0}),n})();const Nfe=["input"];function Lfe(n,t){if(1&n){const e=q();ae(0),S(1,"dot-asset-card-list",6),P("selectedItem",function(r){return I(e),x(y().addAsset.emit(r))})("nextBatch",function(r){return I(e),x(y().offset$.next(r))}),D(),le()}if(2&n){const e=t.ngIf;v(1),g("contentlets",e.contentlets)("done",e.preventScroll)("loading",e.loading)}}let Pfe=(()=>{class n{constructor(e){this.store=e,this.addAsset=new R,this.vm$=this.store.vm$,this.offset$=new zi(0),this.destroy$=new ye}set languageId(e){this.store.updatelanguageId(e)}set type(e){this.store.updateAssetType(e)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(Rt(this.destroy$),ND(1),function hfe(n,t=wc,e=qj){return i=>i.lift(new pfe(n,t,e.leading,e.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){S_(this.input.nativeElement,"input").pipe(Rt(this.destroy$),qp(450)).subscribe(({target:e})=>{this.store.searchContentlet(e.value)})}ngOnDestroy(){this.destroy$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(O(Kj))},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-search"]],viewQuery:function(e,i){if(1&e&&Ee(Nfe,5),2&e){let r;J(r=X())&&(i.input=r.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Ie([Kj])],decls:8,vars:3,consts:[[1,"search-box"],[1,"p-input-icon-right"],["autofocus","","type","text","pInputText","","placeholder","Search",1,"search"],["input",""],[1,"pi","pi-search"],[4,"ngIf"],[3,"contentlets","done","loading","selectedItem","nextBatch"]],template:function(e,i){1&e&&(ae(0),S(1,"div",0)(2,"span",1),F(3,"input",2,3)(5,"i",4),D()(),le(),C(6,Lfe,2,3,"ng-container",5),We(7,"async")),2&e&&(v(6),g("ngIf",Je(7,1,i.vm$)))},dependencies:[Ge,Na,Afe,zl],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.search-box[_ngcontent-%COMP%]{padding:0 2rem;flex-grow:1;display:flex;align-items:center}.search-box[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();const Rfe=n=>{switch(n.target.error.code){case n.target.error.MEDIA_ERR_ABORTED:return"You aborted the video playback.";case n.target.error.MEDIA_ERR_NETWORK:return"A network error caused the video download to fail part-way.";case n.target.error.MEDIA_ERR_DECODE:return'Video playback aborted due to browser compatibility issues. Try a different browser or visit MDN Video Support for more information.';case n.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return'Invalid URL. Please provide a URL to a .mp4, .webm, .ogv video file, or a YouTube video link. For more info on supported video formats and containers, visit MDN Video Format Support.';default:return'An unknown error occurred. Please contact support'}},Ffe=["input"],Vfe=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;let zfe=(()=>{class n{constructor(e,i){this.fb=e,this.cd=i,this.addAsset=new R,this.disableAction=!1,this.form=this.fb.group({url:["",[Kr.required,Kr.pattern("^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$")]]}),this.form.valueChanges.subscribe(({url:r})=>{this.disableAction=!1,"video"===this.type&&!this.isInvalid&&!r.match(Vfe)&&this.tryToPlayVideo(r)}),requestAnimationFrame(()=>this.input.nativeElement.focus())}get placerHolder(){return"https://example.com/"+("video"===this.type?"video.mp4":"image.jpg")}get error(){return this.form.controls.url?.errors?.message||""}get isInvalid(){return this.form.controls.url?.invalid}onSubmit({url:e}){this.addAsset.emit(e)}tryToPlayVideo(e){const i=document.createElement("video");this.disableAction=!0,i.addEventListener("error",r=>{this.form.controls.url.setErrors({message:Rfe(r)}),this.cd.detectChanges()}),i.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),i.src=`${e}#t=0.1`}}return n.\u0275fac=function(e){return new(e||n)(O(Wh),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-external-asset"]],viewQuery:function(e,i){if(1&e&&Ee(Ffe,5),2&e){let r;J(r=X())&&(i.input=r.first)}},inputs:{type:"type"},outputs:{addAsset:"addAsset"},decls:10,vars:7,consts:[[1,"wrapper",3,"formGroup","ngSubmit"],[1,"form-control"],["dotFieldRequired","","for","url"],["id","url","formControlName","url","autocomplete","off","type","text","pInputText","",3,"placeholder"],["input",""],[1,"footer"],[1,"error-message",3,"innerHTML"],["type","submit","pButton","",3,"disabled"]],template:function(e,i){1&e&&(S(0,"form",0),P("ngSubmit",function(){return i.onSubmit(i.form.value)}),S(1,"div",1)(2,"label",2),H(3),D(),F(4,"input",3,4),D(),S(6,"div",5),F(7,"span",6),S(8,"button",7),H(9,"Insert"),D()()()),2&e&&(g("formGroup",i.form),v(3),xt("Insert ",i.type," URL"),v(1),g("placeholder",i.placerHolder),v(3),Si("hide",!i.isInvalid||i.form.pristine),g("innerHTML",i.error||"Enter a valid url",pu),v(1),g("disabled",i.form.invalid||i.disableAction))},dependencies:[zs,qr,$n,js,Yr,Jn,Nr,Na],styles:["[_nghost-%COMP%]{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end;flex-direction:column;padding:2rem;gap:1rem}.form-control[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.75rem}.footer[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.813rem;text-align:left;max-width:30rem}.hide[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0}),n})();const Bfe=Wl("shakeit",[zu("shakestart",Pt({transform:"scale(1.1)"})),zu("shakeend",Pt({transform:"scale(1)"})),Ui("shakestart => shakeend",Bi("1000ms ease-in",function KG(n){return{type:5,steps:n}}([Pt({transform:"translate3d(-2px, 0, 0)",offset:.1}),Pt({transform:"translate3d(4px, 0, 0)",offset:.2}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.3}),Pt({transform:"translate3d(4px, 0, 0)",offset:.4}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.5}),Pt({transform:"translate3d(4px, 0, 0)",offset:.6}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.7}),Pt({transform:"translate3d(4px, 0, 0)",offset:.8}),Pt({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function LD(n){return!ri(n)&&n-parseFloat(n)+1>=0}function Ufe(n){const{index:t,period:e,subscriber:i}=n;if(i.next(t),!i.closed){if(-1===e)return i.complete();n.index=t+1,this.schedule(n,e)}}function Hfe(n,t){1&n&&F(0,"span",11),2&n&&g("innerHTML",y(2).$implicit.summary,pu)}function $fe(n,t){1&n&&F(0,"span",12),2&n&&g("innerHTML",y(2).$implicit.detail,pu)}function Wfe(n,t){if(1&n&&(ae(0),C(1,Hfe,1,1,"span",9),C(2,$fe,1,1,"span",10),le()),2&n){const e=y().$implicit;v(1),g("ngIf",e.summary),v(1),g("ngIf",e.detail)}}function Gfe(n,t){if(1&n&&(S(0,"span",15),H(1),D()),2&n){const e=y(2).$implicit;v(1),ve(e.summary)}}function qfe(n,t){if(1&n&&(S(0,"span",16),H(1),D()),2&n){const e=y(2).$implicit;v(1),ve(e.detail)}}function Kfe(n,t){if(1&n&&(C(0,Gfe,2,1,"span",13),C(1,qfe,2,1,"span",14)),2&n){const e=y().$implicit;g("ngIf",e.summary),v(1),g("ngIf",e.detail)}}function Yfe(n,t){if(1&n){const e=q();S(0,"button",17),P("click",function(){I(e);const r=y().index;return x(y(2).removeMessage(r))}),F(1,"i",18),D()}}const Qfe=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},Zfe=function(n){return{value:"visible",params:n}},Jfe=function(n,t,e,i){return{"pi-info-circle":n,"pi-check":t,"pi-exclamation-triangle":e,"pi-times-circle":i}};function Xfe(n,t){if(1&n&&(S(0,"div",4)(1,"div",5),F(2,"span",6),C(3,Wfe,3,2,"ng-container",1),C(4,Kfe,2,2,"ng-template",null,7,yt),C(6,Yfe,2,0,"button",8),D()()),2&n){const e=t.$implicit,i=Pe(5),r=y(2);Ke("p-message p-message-"+e.severity),g("@messageAnimation",te(12,Zfe,lt(9,Qfe,r.showTransitionOptions,r.hideTransitionOptions))),v(2),Ke("p-message-icon pi"+(e.icon?" "+e.icon:"")),g("ngClass",va(14,Jfe,"info"===e.severity,"success"===e.severity,"warn"===e.severity,"error"===e.severity)),v(1),g("ngIf",!r.escape)("ngIfElse",i),v(3),g("ngIf",r.closable)}}function eme(n,t){if(1&n&&(ae(0),C(1,Xfe,7,19,"div",3),le()),2&n){const e=y();v(1),g("ngForOf",e.messages)}}function tme(n,t){1&n&&ce(0)}function nme(n,t){if(1&n&&(S(0,"div",19)(1,"div",5),C(2,tme,1,0,"ng-container",20),D()()),2&n){const e=y();g("ngClass","p-message p-message-"+e.severity),v(2),g("ngTemplateOutlet",e.contentTemplate)}}let ime=(()=>{class n{constructor(e,i,r){this.messageService=e,this.el=i,this.cd=r,this.closable=!0,this.enableService=!0,this.escape=!0,this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)",this.valueChange=new R,this.timerSubscriptions=[]}set value(e){this.messages=e,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e){e instanceof Array||(e=[e]);const i=e.filter(r=>this.key===r.key);this.messages=this.messages?[...this.messages,...i]:[...i],this.startMessageLifes(i),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let e=this.el.nativeElement.parentElement;return!(!e||!e.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(e){this.messages=this.messages.filter((i,r)=>r!==e),this.valueChange.emit(this.messages)}get icon(){const e=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(e){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(e=>e.unsubscribe())}startMessageLifes(e){e?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(e){const i=function Qj(n=0,t,e){let i=-1;return LD(t)?i=Number(t)<1?1:Number(t):la(t)&&(e=t),la(e)||(e=wc),new mt(r=>{const o=LD(n)?n:+n-e.now();return e.schedule(Ufe,o,{index:0,period:i,subscriber:r})})}(e.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==e),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(e){return new(e||n)(O(mJ,8),O(qe),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-messages"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:5,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"ngClass"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[1,"p-message-close-icon","pi","pi-times"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(e,i){if(1&e&&(S(0,"div",0),C(1,eme,2,1,"ng-container",1),C(2,nme,3,2,"ng-template",null,2,yt),D()),2&e){const r=Pe(3);Ke(i.styleClass),g("ngStyle",i.style),v(1),g("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[Lt,Un,Ge,Zn,fn,Xr],styles:[".p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}\n"],encapsulation:2,data:{animation:[Wl("messageAnimation",[Ui(":enter",[Pt({opacity:0,transform:"translateY(-25%)"}),Bi("{{showTransitionParams}}")]),Ui(":leave",[Bi("{{hideTransitionParams}}",Pt({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})();function rme(n,t){if(1&n&&(S(0,"div",5),H(1),D()),2&n){const e=y(2);As("display",null!=e.value&&0!==e.value?"flex":"none"),v(1),ya("",e.value,"",e.unit,"")}}function ome(n,t){if(1&n&&(S(0,"div",3),C(1,rme,2,4,"div",4),D()),2&n){const e=y();As("width",e.value+"%")("background",e.color),v(1),g("ngIf",e.showValue)}}function sme(n,t){if(1&n&&(S(0,"div",6),F(1,"div",7),D()),2&n){const e=y();v(1),As("background",e.color)}}const ame=function(n,t){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":t}};let lme=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode",color:"color"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(e,i){1&e&&(S(0,"div",0),C(1,ome,2,5,"div",1),C(2,sme,2,2,"div",2),D()),2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",lt(7,ame,"determinate"===i.mode,"indeterminate"===i.mode)),pe("aria-valuenow",i.value),v(1),g("ngIf","determinate"===i.mode),v(1),g("ngIf","indeterminate"===i.mode))},dependencies:[Lt,Ge,fn],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),n})();const cme=["advancedfileinput"],ume=["basicfileinput"],dme=["content"];function hme(n,t){if(1&n){const e=q();S(0,"p-button",17),P("onClick",function(){return I(e),x(y(2).upload())}),D()}if(2&n){const e=y(2);g("label",e.uploadButtonLabel)("icon",e.uploadIcon)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.uploadStyleClass)}}function pme(n,t){if(1&n){const e=q();S(0,"p-button",17),P("onClick",function(){return I(e),x(y(2).clear())}),D()}if(2&n){const e=y(2);g("label",e.cancelButtonLabel)("icon",e.cancelIcon)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cancelStyleClass)}}function fme(n,t){1&n&&ce(0)}function mme(n,t){1&n&&F(0,"p-progressBar",18),2&n&&g("value",y(2).progress)("showValue",!1)}function gme(n,t){if(1&n){const e=q();S(0,"img",26),P("error",function(r){return I(e),x(y(5).imageError(r))}),D()}if(2&n){const e=y().$implicit,i=y(4);g("src",e.objectURL,zo)("width",i.previewWidth)}}function _me(n,t){if(1&n){const e=q();S(0,"div",22)(1,"div"),C(2,gme,1,2,"img",23),D(),S(3,"div",24),H(4),D(),S(5,"div"),H(6),D(),S(7,"div")(8,"button",25),P("click",function(r){const s=I(e).index;return x(y(4).remove(r,s))}),D()()()}if(2&n){const e=t.$implicit,i=y(4);v(2),g("ngIf",i.isImage(e)),v(2),ve(e.name),v(2),ve(i.formatSize(e.size)),v(2),Ke(i.removeStyleClass),g("disabled",i.uploading)}}function yme(n,t){if(1&n&&(S(0,"div"),C(1,_me,9,6,"div",21),D()),2&n){const e=y(3);v(1),g("ngForOf",e.files)}}function vme(n,t){}function bme(n,t){if(1&n&&(S(0,"div"),C(1,vme,0,0,"ng-template",27),D()),2&n){const e=y(3);v(1),g("ngForOf",e.files)("ngForTemplate",e.fileTemplate)}}function Cme(n,t){if(1&n&&(S(0,"div",19),C(1,yme,2,1,"div",20),C(2,bme,2,2,"div",20),D()),2&n){const e=y(2);v(1),g("ngIf",!e.fileTemplate),v(1),g("ngIf",e.fileTemplate)}}function wme(n,t){1&n&&ce(0)}const Sme=function(n,t){return{"p-focus":n,"p-disabled":t}},Dme=function(n){return{$implicit:n}};function Tme(n,t){if(1&n){const e=q();S(0,"div",2)(1,"div",3)(2,"span",4),P("focus",function(){return I(e),x(y().onFocus())})("blur",function(){return I(e),x(y().onBlur())})("click",function(){return I(e),x(y().choose())})("keydown.enter",function(){return I(e),x(y().choose())}),S(3,"input",5,6),P("change",function(r){return I(e),x(y().onFileSelect(r))}),D(),F(5,"span",7),S(6,"span",8),H(7),D()(),C(8,hme,1,4,"p-button",9),C(9,pme,1,4,"p-button",9),C(10,fme,1,0,"ng-container",10),D(),S(11,"div",11,12),P("dragenter",function(r){return I(e),x(y().onDragEnter(r))})("dragleave",function(r){return I(e),x(y().onDragLeave(r))})("drop",function(r){return I(e),x(y().onDrop(r))}),C(13,mme,1,2,"p-progressBar",13),F(14,"p-messages",14),C(15,Cme,3,2,"div",15),C(16,wme,1,0,"ng-container",16),D()()}if(2&n){const e=y();Ke(e.styleClass),g("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",e.style),v(2),Ke(e.chooseStyleClass),g("ngClass",lt(24,Sme,e.focus,e.disabled||e.isChooseDisabled())),v(1),g("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),pe("title",""),v(2),Ke(e.chooseIcon),g("ngClass","p-button-icon p-button-icon-left"),v(2),ve(e.chooseButtonLabel),v(1),g("ngIf",!e.auto&&e.showUploadButton),v(1),g("ngIf",!e.auto&&e.showCancelButton),v(1),g("ngTemplateOutlet",e.toolbarTemplate),v(3),g("ngIf",e.hasFiles()),v(1),g("value",e.msgs)("enableService",!1),v(1),g("ngIf",e.hasFiles()),v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",te(27,Dme,e.files))}}function Mme(n,t){if(1&n&&(S(0,"span",8),H(1),D()),2&n){const e=y(2);v(1),ve(e.basicButtonLabel)}}function Eme(n,t){if(1&n){const e=q();S(0,"input",33,34),P("change",function(r){return I(e),x(y(2).onFileSelect(r))})("focus",function(){return I(e),x(y(2).onFocus())})("blur",function(){return I(e),x(y(2).onBlur())}),D()}if(2&n){const e=y(2);g("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled)}}const Ime=function(n,t,e,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":t,"p-focus":e,"p-disabled":i}};function xme(n,t){if(1&n){const e=q();S(0,"div",28),F(1,"p-messages",14),S(2,"span",29),P("mouseup",function(){return I(e),x(y().onBasicUploaderClick())})("keydown",function(r){return I(e),x(y().onBasicKeydown(r))}),F(3,"span",30),C(4,Mme,2,1,"span",31),C(5,Eme,2,3,"input",32),D()()}if(2&n){const e=y();v(1),g("value",e.msgs)("enableService",!1),v(1),Ke(e.styleClass),g("ngClass",va(9,Ime,!e.basicButtonLabel,e.hasFiles(),e.focus,e.disabled))("ngStyle",e.style),v(1),g("ngClass",e.hasFiles()&&!e.auto?e.uploadIcon:e.chooseIcon),v(1),g("ngIf",e.basicButtonLabel),v(1),g("ngIf",!e.hasFiles())}}let Ome=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.sanitizer=i,this.zone=r,this.http=o,this.cd=s,this.config=a,this.method="post",this.invalidFileSizeMessageSummary="{0}: Invalid file size, ",this.invalidFileSizeMessageDetail="maximum upload size is {0}.",this.invalidFileTypeMessageSummary="{0}: Invalid file type, ",this.invalidFileTypeMessageDetail="allowed file types: {0}.",this.invalidFileLimitMessageDetail="limit is {0} at most.",this.invalidFileLimitMessageSummary="Maximum number of files exceeded, ",this.previewWidth=50,this.chooseIcon="pi pi-plus",this.uploadIcon="pi pi-upload",this.cancelIcon="pi pi-times",this.showUploadButton=!0,this.showCancelButton=!0,this.mode="advanced",this.onBeforeUpload=new R,this.onSend=new R,this.onUpload=new R,this.onError=new R,this.onClear=new R,this.onRemove=new R,this.onSelect=new R,this.onProgress=new R,this.uploadHandler=new R,this.onImageError=new R,this._files=[],this.progress=0,this.uploadedFileCount=0}set files(e){this._files=[];for(let i=0;i{switch(e.getType()){case"file":default:this.fileTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"toolbar":this.toolbarTemplate=e.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&this.content.nativeElement.addEventListener("dragover",this.onDragOver.bind(this))})}choose(){this.advancedFileInput.nativeElement.click()}onFileSelect(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",e.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(e){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(e.type)===this.getTypeClass(r):e.type==r||this.getFileExtension(e).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return-1!==e.indexOf("*")}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case rn.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case rn.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case rn.UploadProgress:i.loaded&&(this.progress=Math.round(100*i.loaded/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress})}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit()}isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0}onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(A.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||A.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){A.removeClass(this.content.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){if(0==e)return"0 B";let s=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,s)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][s]}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput.nativeElement.click()}onBasicKeydown(e){switch(e.code){case"Space":case"Enter":this.onBasicUploaderClick(),e.preventDefault()}}imageError(e){this.onImageError.emit(e)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(Ln.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Ln.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Ln.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(H0),O(nt),O(Er),O(Tt),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-fileUpload"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(cme,5),Ee(ume,5),Ee(dme,5)),2&e){let r;J(r=X())&&(i.advancedFileInput=r.first),J(r=X())&&(i.basicFileInput=r.first),J(r=X())&&(i.content=r.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass"],[1,"p-button-label"],["type","button",3,"label","icon","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"label","icon","disabled","styleClass","onClick"],[3,"value","showValue"],[1,"p-fileupload-files"],[4,"ngIf"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","icon","pi pi-times","pButton","",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","mouseup","keydown"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(e,i){1&e&&(C(0,Tme,17,29,"div",0),C(1,xme,6,14,"div",1)),2&e&&(g("ngIf","advanced"===i.mode),v(1),g("ngIf","basic"===i.mode))},dependencies:[Lt,Un,Ge,Zn,fn,Nr,ed,lme,ime,Xr],styles:[".p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}\n"],encapsulation:2,changeDetection:0}),n})();function kme(n,t){if(1&n&&(ae(0),F(1,"img",3),le()),2&n){const e=y();v(1),g("src",e.src||e.file.objectURL,zo)("alt",e.file.name)}}function Ame(n,t){if(1&n&&(ae(0),S(1,"video",4),F(2,"source",5),D(),le()),2&n){const e=y();v(2),g("src",e.src||e.file.objectURL,zo)}}function Nme(n,t){1&n&&(S(0,"p"),H(1,"Select an accepted asset type"),D())}let Lme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-preview"]],inputs:{type:"type",file:"file",src:"src"},decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"src","alt"],["controls","","preload","metadata"],[3,"src"]],template:function(e,i){1&e&&(ae(0,0),C(1,kme,2,2,"ng-container",1),C(2,Ame,3,1,"ng-container",1),C(3,Nme,2,0,"p",2),le()),2&e&&(g("ngSwitch",i.type),v(1),g("ngSwitchCase","image"),v(1),g("ngSwitchCase","video"))},dependencies:[Fs,Vl,Rh],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}"],changeDetection:0}),n})();function Pme(n,t){if(1&n){const e=q();S(0,"p-fileUpload",2),P("onSelect",function(r){return I(e),x(y().onSelectFile(r.files))}),D()}2&n&&g("accept",y().type+"/*")("customUpload",!0)}function Rme(n,t){if(1&n&&F(0,"dot-asset-preview",11),2&n){const e=y(2);g("type",e.type)("file",e.file)("src",e.src)}}function Fme(n,t){if(1&n&&(S(0,"span",13),H(1),D()),2&n){const e=y(3);v(1),ve(e.error)}}function jme(n,t){1&n&&C(0,Fme,2,1,"ng-template",null,12,yt)}function Vme(n,t){if(1&n){const e=q();S(0,"div",3),C(1,Rme,1,3,"dot-asset-preview",4),C(2,jme,2,0,null,5),D(),S(3,"div",6)(4,"div",7),F(5,"dot-spinner",8),S(6,"span",9),P("@shakeit.done",function(r){return I(e),x(y().shakeEnd(r))}),H(7),D()(),S(8,"button",10),P("click",function(){return I(e),x(y().cancelAction())}),H(9," Cancel "),D()()}if(2&n){const e=y();v(1),g("ngIf","UPLOAD"===e.status),v(1),g("ngIf","ERROR"===e.status),v(3),g("size","30px"),v(1),g("@shakeit",e.animation),v(1),xt(" ",e.errorMessage," ")}}var ds=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(ds||(ds={})),ds))();let zme=(()=>{class n{constructor(e,i,r,o){this.sanitizer=e,this.dotUploadFileService=i,this.cd=r,this.el=o,this.uploadedFile=new R,this.preventClose=new R,this.hide=new R,this.status=ds.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(e){const i=!this.el.nativeElement.contains(e);this.status===ds.UPLOAD&&i&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(e){const i=e[0],r=new FileReader;this.preventClose.emit(!0),r.onload=o=>this.setFile(i,o.target.result),r.readAsArrayBuffer(i)}cancelAction(){this.file=null,this.status=ds.SELECT,this.cancelUploading(),this.hide.emit(!0)}shakeEnd(){this.animation="shakeend"}shakeMe(){"shakestart"!==this.animation&&(this.animation="shakestart")}uploadFile(){this.controller=new AbortController,this.status=ds.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Wt(1),ci(e=>this.handleError(e))).subscribe(e=>{const i=e[0];this.uploadedFile.emit(i[Object.keys(i)[0]]),this.status=ds.SELECT})}setFile(e,i){const r=new Blob([new Uint8Array(i)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(r)),this.file=e,this.status=ds.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(e){return this.status=ds.ERROR,this.preventClose.emit(!1),this.error=e?.error?.errors[0]||e.error,console.error(e),Ir(e)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}return n.\u0275fac=function(e){return new(e||n)(O(H0),O(Kp),O(Tt),O(qe))},n.\u0275cmp=Y({type:n,selectors:[["dot-upload-asset"]],hostBindings:function(e,i){1&e&&P("click",function(o){return i.onClick(o.target)},0,AE)},inputs:{type:"type"},outputs:{uploadedFile:"uploadedFile",preventClose:"preventClose",hide:"hide"},decls:3,vars:2,consts:[["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect",4,"ngIf","ngIfElse"],["preview",""],["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect"],[1,"preview-container"],[3,"type","file","src",4,"ngIf"],[4,"ngIf"],[1,"action-container"],[1,"loading-message"],[3,"size"],[1,"warning"],["data-test-id","back-btn","pButton","",1,"p-button-outlined",3,"click"],[3,"type","file","src"],["errorTemplate",""],[1,"error"]],template:function(e,i){if(1&e&&(C(0,Pme,1,2,"p-fileUpload",0),C(1,Vme,10,5,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf","SELECT"===i.status)("ngIfElse",r)}},dependencies:[Ge,mD,Nr,Ome,Lme],styles:["[_nghost-%COMP%]{height:100%;width:100%;padding:1rem;gap:1rem;display:flex;justify-content:center;align-items:center;flex-direction:column}[_nghost-%COMP%] .error[_ngcontent-%COMP%]{color:#d82b2e;font-size:1.25rem;max-width:100%;white-space:pre-wrap}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-grow:1;justify-content:center;overflow:hidden;width:100%;flex-direction:column}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;height:-moz-fit-content;height:fit-content;justify-content:space-between;width:100%}[_nghost-%COMP%] .loading-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem}[_nghost-%COMP%] .warning[_ngcontent-%COMP%]{display:block;font-style:normal;text-align:center;color:#14151a}"],data:{animation:[Bfe]},changeDetection:0}),n})();new class gge extends Mo{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});function c_e(n,t){1&n&&ce(0)}function u_e(n,t){if(1&n&&(ae(0),C(1,c_e,1,0,"ng-container",3),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)}}function d_e(n,t){if(1&n&&(S(0,"div",1),ln(1),C(2,u_e,2,1,"ng-container",2),D()),2&n){const e=y();g("hidden",!e.selected),pe("id",e.id)("aria-hidden",!e.selected)("aria-labelledby",e.id+"-label"),v(2),g("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}const x4=["*"],h_e=["content"],p_e=["navbar"],f_e=["prevBtn"],m_e=["nextBtn"],g_e=["inkbar"];function __e(n,t){if(1&n){const e=q();S(0,"button",12,13),P("click",function(){return I(e),x(y().navBackward())}),F(2,"span",14),D()}}function y_e(n,t){1&n&&F(0,"span",24),2&n&&g("ngClass",y(3).$implicit.leftIcon)}function v_e(n,t){1&n&&F(0,"span",25),2&n&&g("ngClass",y(3).$implicit.rightIcon)}function b_e(n,t){if(1&n&&(ae(0),C(1,y_e,1,1,"span",21),S(2,"span",22),H(3),D(),C(4,v_e,1,1,"span",23),le()),2&n){const e=y(2).$implicit;v(1),g("ngIf",e.leftIcon),v(2),ve(e.header),v(1),g("ngIf",e.rightIcon)}}function C_e(n,t){1&n&&ce(0)}function w_e(n,t){if(1&n){const e=q();S(0,"span",26),P("click",function(r){I(e);const o=y(2).$implicit;return x(y().close(r,o))}),D()}}const S_e=function(n,t){return{"p-highlight":n,"p-disabled":t}};function D_e(n,t){if(1&n){const e=q();S(0,"li",16)(1,"a",17),P("click",function(r){I(e);const o=y().$implicit;return x(y().open(r,o))})("keydown.enter",function(r){I(e);const o=y().$implicit;return x(y().open(r,o))}),C(2,b_e,5,3,"ng-container",18),C(3,C_e,1,0,"ng-container",19),C(4,w_e,1,0,"span",20),D()()}if(2&n){const e=y().$implicit;Ke(e.headerStyleClass),g("ngClass",lt(16,S_e,e.selected,e.disabled))("ngStyle",e.headerStyle),v(1),g("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),pe("id",e.id+"-label")("aria-selected",e.selected)("aria-controls",e.id)("aria-selected",e.selected)("tabindex",e.disabled?null:"0"),v(1),g("ngIf",!e.headerTemplate),v(1),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",e.closable)}}function T_e(n,t){1&n&&C(0,D_e,5,19,"li",15),2&n&&g("ngIf",!t.$implicit.closed)}function M_e(n,t){if(1&n){const e=q();S(0,"button",27,28),P("click",function(){return I(e),x(y().navForward())}),F(2,"span",29),D()}}const E_e=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let I_e=0,O4=(()=>{class n{constructor(e,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+I_e++,this.tabView=e}ngAfterContentInit(){this.templates.forEach(e=>{"header"===e.getType()?this.headerTemplate=e.template:this.contentTemplate=e.template})}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(e){return new(e||n)(O(Ue(()=>k4)),O(ir),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-tabPanel"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:x4,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(e,i){1&e&&(ai(),C(0,d_e,3,5,"div",0)),2&e&&g("ngIf",!i.closed)},dependencies:[Ge,Zn],encapsulation:2}),n})(),k4=(()=>{class n{constructor(e,i){this.el=e,this.cd=i,this.orientation="top",this.onChange=new R,this.onClose=new R,this.activeIndexChange=new R,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(e=>{this.initTabs()})}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe()}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(null!=this.activeIndex&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}open(e,i){if(i.disabled)e&&e.preventDefault();else{if(!i.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,i.selected=!0;let o=this.findTabIndex(i);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}}close(e,i){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:e,index:this.findTabIndex(i)})),e.stopPropagation()}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}updateInkBar(){if(this.navbar){const e=A.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!e)return;this.inkbar.nativeElement.style.width=A.getWidth(e)+"px",this.inkbar.nativeElement.style.left=A.getOffset(e).left-A.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=e,o=A.getWidth(e);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((e,i)=>i?e+A.getWidth(i):e,0)}navBackward(){const e=this.content.nativeElement,i=A.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-i;e.scrollLeft=r<=0?0:r}navForward(){const e=this.content.nativeElement,i=A.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+i,o=e.scrollWidth-i;e.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-tabView"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,O4,4),2&e){let o;J(o=X())&&(i.tabPanels=o)}},viewQuery:function(e,i){if(1&e&&(Ee(h_e,5),Ee(p_e,5),Ee(f_e,5),Ee(m_e,5),Ee(g_e,5)),2&e){let r;J(r=X())&&(i.content=r.first),J(r=X())&&(i.navbar=r.first),J(r=X())&&(i.prevBtn=r.first),J(r=X())&&(i.nextBtn=r.first),J(r=X())&&(i.inkbar=r.first)}},hostAttrs:[1,"p-element"],inputs:{orientation:"orientation",style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:x4,decls:13,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],[1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet"],["class","p-tabview-close pi pi-times",3,"click",4,"ngIf"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-close","pi","pi-times",3,"click"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(e,i){1&e&&(ai(),S(0,"div",0)(1,"div",1),C(2,__e,3,0,"button",2),S(3,"div",3,4),P("scroll",function(o){return i.onScroll(o)}),S(5,"ul",5,6),C(7,T_e,1,1,"ng-template",7),F(8,"li",8,9),D()(),C(10,M_e,3,0,"button",10),D(),S(11,"div",11),ln(12),D()()),2&e&&(Ke(i.styleClass),g("ngClass",te(7,E_e,i.scrollable))("ngStyle",i.style),v(2),g("ngIf",i.scrollable&&!i.backwardIsDisabled),v(5),g("ngForOf",i.tabs),v(3),g("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[Lt,Un,Ge,Zn,fn,Wy,Xr],styles:[".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"],encapsulation:2,changeDetection:0}),n})();function O_e(n,t){1&n&&(S(0,"div",1),F(1,"div",2),S(2,"div",3)(3,"div",4)(4,"div"),F(5,"span",5)(6,"span",6),D(),S(7,"div",7),F(8,"span",8)(9,"span",9),D()()()())}Fn(G3,[mn,k4,O4,zfe,Pfe,zme],[]),Fn(Oy,[Un,Ge,L3,sD,M3],[]);let k_e=(()=>{class n{constructor(){this.items=Array(4).fill(0)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-loading-list"]],decls:1,vars:1,consts:[["class","card",4,"ngFor","ngForOf"],[1,"card"],[1,"image","skeleton"],[1,"body"],[1,"data-wrapper"],[1,"title","skeleton"],[1,"subtitle","skeleton"],[1,"state"],[1,"circle","skeleton"],[1,"meta","skeleton"]],template:function(e,i){1&e&&C(0,O_e,10,0,"div",0),2&e&&g("ngForOf",i.items)},dependencies:[Un],styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1s linear infinite alternate}.card[_ngcontent-%COMP%]{width:100%;max-height:80px;box-sizing:border-box;display:flex;gap:1rem;padding:8px;background-color:#fff;cursor:pointer}.image[_ngcontent-%COMP%]{min-width:64px;min-height:64px;background:#14151a}.body[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:100%;display:flex;flex-direction:column;justify-content:space-between}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:80%;overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;background-color:#14151a;height:12px;border-radius:5px;margin-bottom:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:85%;height:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;align-items:center}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:16px;height:16px;background:#000;border-radius:100%;margin-right:.5rem}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{width:30px;height:10px;background:#000;border-radius:4px}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-color:#ccc}to{background-color:#f2f2f2}}"]}),n})();Fn(aj,[Un,Ge,Tue],[]),Fn(X3,[Ge,zs,qr,$n,js,Yr,Jn,Ly,Nr,Na,vue,J3],[]),Fn(J3,[Un,Ge,L3,sD,k_e,M3],[]);class L_e extends TypeError{constructor(t,e){const{message:r,explanation:o,...s}=t,{path:a}=t,l=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??l),null!=o&&(this.cause=l),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>[t,...e()]}}Ut.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const t=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?t.textBetween(0,t.content.size,void 0," ").length:t.nodeSize},this.storage.words=n=>{const t=n?.node||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new pt({key:new Et("characterCount"),filterTransaction:(n,t)=>{const e=this.options.limit;if(!n.docChanged||0===e||null==e)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:n.doc});if(r<=e||i>e&&r>e&&r<=i)return!0;if(i>e&&r>e&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-e),s),!(this.storage.characters({node:n.doc})>e)}})]}});const U_e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,H_e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,xc=(Yi.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:t})=>t.setMark(this.name,n),toggleHighlight:n=>({commands:t})=>t.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[bc({find:U_e,type:this.type})]},addPasteRules(){return[Xa({find:H_e,type:this.type})]}}),(n,t)=>{for(const e in t)n[e]=t[e];return n}),GD="numeric",qD="ascii",KD="alpha",Zy="asciinumeric",Jy="alphanumeric",YD="domain",W4="whitespace";function Y_e(n,t){return n in t||(t[n]=[]),t[n]}function Oc(n,t,e){t[GD]&&(t[Zy]=!0,t[Jy]=!0),t[qD]&&(t[Zy]=!0,t[KD]=!0),t[Zy]&&(t[Jy]=!0),t[KD]&&(t[Jy]=!0),t[Jy]&&(t[YD]=!0),t.emoji&&(t[YD]=!0);for(const i in t){const r=Y_e(i,e);r.indexOf(n)<0&&r.push(n)}}function pr(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}pr.groups={},pr.prototype={accepts(){return!!this.t},go(n){const t=this,e=t.j[n];if(e)return e;for(let i=0;i=0&&(e[i]=!0);return e}(s.t,i),e);Oc(o,l,i)}else e&&Oc(o,e,i);s.t=o}return r.j[n]=s,s}};const Se=(n,t,e,i,r)=>n.ta(t,e,i,r),co=(n,t,e,i,r)=>n.tr(t,e,i,r),G4=(n,t,e,i,r)=>n.ts(t,e,i,r),Z=(n,t,e,i,r)=>n.tt(t,e,i,r),ta="WORD",QD="UWORD",hf="LOCALHOST",JD="UTLD",Xy="SCHEME",Id="SLASH_SCHEME",xd="OPENBRACE",pf="OPENBRACKET",ff="OPENANGLEBRACKET",mf="OPENPAREN",kc="CLOSEBRACE",Od="CLOSEBRACKET",kd="CLOSEANGLEBRACKET",Ac="CLOSEPAREN",ev="AMPERSAND",tv="APOSTROPHE",nv="ASTERISK",il="AT",iv="BACKSLASH",rv="BACKTICK",ov="CARET",rl="COLON",tT="COMMA",sv="DOLLAR",hs="DOT",av="EQUALS",nT="EXCLAMATION",ps="HYPHEN",lv="PERCENT",cv="PIPE",uv="PLUS",dv="POUND",hv="QUERY",iT="QUOTE",rT="SEMI",fs="SLASH",gf="TILDE",pv="UNDERSCORE",fv="SYM";var Y4=Object.freeze({__proto__:null,WORD:ta,UWORD:QD,LOCALHOST:hf,TLD:"TLD",UTLD:JD,SCHEME:Xy,SLASH_SCHEME:Id,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:xd,OPENBRACKET:pf,OPENANGLEBRACKET:ff,OPENPAREN:mf,CLOSEBRACE:kc,CLOSEBRACKET:Od,CLOSEANGLEBRACKET:kd,CLOSEPAREN:Ac,AMPERSAND:ev,APOSTROPHE:tv,ASTERISK:nv,AT:il,BACKSLASH:iv,BACKTICK:rv,CARET:ov,COLON:rl,COMMA:tT,DOLLAR:sv,DOT:hs,EQUALS:av,EXCLAMATION:nT,HYPHEN:ps,PERCENT:lv,PIPE:cv,PLUS:uv,POUND:dv,QUERY:hv,QUOTE:iT,SEMI:rT,SLASH:fs,TILDE:gf,UNDERSCORE:pv,EMOJI:"EMOJI",SYM:fv});const Nc=/[a-z]/,mv=/\p{L}/u,gv=/\p{Emoji}/u,_v=/\d/,oT=/\s/;let yv=null,vv=null;function ol(n,t,e,i,r){let o;const s=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(e.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)e.pop();i+=o}else e.push(n[i]),i++}return t}const Ad={defaultProtocol:"http",events:null,format:J4,formatHref:J4,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function bv(n,t){void 0===t&&(t=null);let e=xc({},Ad);n&&(e=xc(e,n instanceof bv?n.o:n));const i=e.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,t,e){const i=null!=t;let r=this.o[n];return r&&("object"==typeof r?(r=e.t in r?r[e.t]:Ad[n],"function"==typeof r&&i&&(r=r(t,e))):"function"==typeof r&&i&&(r=r(t,e.t,e)),r)},getObj(n,t,e){let i=this.o[n];return"function"==typeof i&&null!=t&&(i=i(t,e.t,e)),i},render(n){const t=n.render(this);return(this.get("render",null,n)||this.defaultRender)(t,n.t,n)}},Cv.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const t=this.toString(),e=n.get("truncate",t,this),i=n.get("format",t,this);return e&&i.length>e?i.substring(0,e)+"\u2026":i},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return void 0===n&&(n=Ad.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const t=this,e=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",e,this),r=n.get("tagName",e,t),o=this.toFormattedString(n),s={},a=n.get("className",e,t),l=n.get("target",e,t),c=n.get("rel",e,t),u=n.getObj("attributes",e,t),d=n.getObj("events",e,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&xc(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const sT=_f("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),aT=_f("text"),X4=_f("nl"),sl=_f("url",{isLink:!0,toHref(n){return void 0===n&&(n=Ad.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==hf&&n[1].t===rl}}),ni=n=>new pr(n);function lT(n,t,e){return new n(t.slice(e[0].s,e[e.length-1].e),e)}const yf=typeof console<"u"&&console&&console.warn||(()=>{}),wt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function e5(n,t){if(void 0===t&&(t=!1),wt.initialized&&yf(`linkifyjs: already initialized - will not register custom scheme "${n}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');wt.customSchemes.push([n,t])}function t5(n){return wt.initialized||function sye(){wt.scanner=function eye(n){void 0===n&&(n=[]);const t={};pr.groups=t;const e=new pr;null==yv&&(yv=Z4("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==vv&&(vv=Z4("\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u062a\u0635\u0627\u0644\u0627\u062a6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2")),Z(e,"'",tv),Z(e,"{",xd),Z(e,"[",pf),Z(e,"<",ff),Z(e,"(",mf),Z(e,"}",kc),Z(e,"]",Od),Z(e,">",kd),Z(e,")",Ac),Z(e,"&",ev),Z(e,"*",nv),Z(e,"@",il),Z(e,"`",rv),Z(e,"^",ov),Z(e,":",rl),Z(e,",",tT),Z(e,"$",sv),Z(e,".",hs),Z(e,"=",av),Z(e,"!",nT),Z(e,"-",ps),Z(e,"%",lv),Z(e,"|",cv),Z(e,"+",uv),Z(e,"#",dv),Z(e,"?",hv),Z(e,'"',iT),Z(e,"/",fs),Z(e,";",rT),Z(e,"~",gf),Z(e,"_",pv),Z(e,"\\",iv);const i=co(e,_v,"NUM",{[GD]:!0});co(i,_v,i);const r=co(e,Nc,ta,{[qD]:!0});co(r,Nc,r);const o=co(e,mv,QD,{[KD]:!0});co(o,Nc),co(o,mv,o);const s=co(e,oT,"WS",{[W4]:!0});Z(e,"\n","NL",{[W4]:!0}),Z(s,"\n"),co(s,oT,s);const a=co(e,gv,"EMOJI",{emoji:!0});co(a,gv,a),Z(a,"\ufe0f",a);const l=Z(a,"\u200d");co(l,gv,a);const c=[[Nc,r]],u=[[Nc,null],[mv,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?f[YD]=!0:Nc.test(h)?_v.test(h)?f[Zy]=!0:f[qD]=!0:f[GD]=!0,G4(e,h,h,f)}return G4(e,"localhost",hf,{ascii:!0}),e.jd=new pr(fv),{start:e,tokens:xc({groups:t},Y4)}}(wt.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(lT(aT,t,s)),s=[]),r-=h,u-=h;const p=d.t,f=e.slice(r-u,r);o.push(lT(p,t,f))}}return s.length>0&&o.push(lT(aT,t,s)),o}(wt.parser.start,n,function tye(n,t){const e=function nye(n){const t=[],e=n.length;let i=0;for(;i56319||i+1===e||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=e.length,r=[];let o=0,s=0;for(;s=0&&(d+=e[s].length,h++),c+=e[s].length,o+=e[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return r}(wt.scanner.start,n))}function uT(n,t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),t&&"object"==typeof t){if(e)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);e=t,t=null}const i=new bv(e),r=t5(n),o=[];for(let s=0;s{const r=t.some(u=>u.docChanged)&&!e.doc.eq(i.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function Mse(n,t){const e=new B1(n);return t.forEach(i=>{i.steps.forEach(r=>{e.step(r)})}),e}(e.doc,[...t]),{mapping:l}=a;return function Ase(n){const{mapping:t,steps:e}=n,i=[];return t.maps.forEach((r,o)=>{const s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=e[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),d=t.invert().map(c,-1),h=t.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function kse(n){const t=function Ose(n,t=JSON.stringify){const e={};return n.filter(i=>{const r=t(i);return!Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=!0)})}(n);return 1===t.length?t:t.filter((e,i)=>!t.filter((o,s)=>s!==i).some(o=>e.oldRange.from>=o.oldRange.from&&e.oldRange.to<=o.oldRange.to&&e.newRange.from>=o.newRange.from&&e.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{Ty(u.from,u.to,e.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const T=Ty(l.map(m.from),l.map(m.to),i.doc).filter(V=>V.mark.type===n.type);if(!T.length)return;const M=T[0],w=e.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(M.from,M.to,void 0," "),k=n5(w),$=n5(N);k&&!$&&s.removeMark(M.from,M.to,n.type)});const h=function Ise(n,t,e){const i=[];return n.nodesBetween(t.from,t.to,(r,o)=>{e(r)&&i.push({node:r,pos:o})}),i}(i.doc,d,m=>m.isTextblock);let p,f;if(h.length>1?(p=h[0],f=i.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):h.length&&i.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(p=h[0],f=i.doc.textBetween(p.pos,d.to,void 0," ")),p&&f){const m=f.split(" ").filter(T=>""!==T);if(m.length<=0)return!1;const _=m[m.length-1],b=p.pos+f.lastIndexOf(_);if(!_)return!1;uT(_).filter(T=>T.isLink).filter(T=>!n.validate||n.validate(T.value)).map(T=>({...T,from:b+T.start+1,to:b+T.end+1})).forEach(T=>{s.addMark(T.from,T.to,n.type.create({href:T.href}))})}}),s.steps.length?s:void 0}})}Yi.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?e5(n.scheme,n.optionalSlashes):e5(n)})},onDestroy(){!function oye(){pr.groups={},wt.scanner=null,wt.parser=null,wt.tokenQueue=[],wt.pluginQueue=[],wt.customSchemes=[],wt.initialized=!1}()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:n}){return["a",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:t})=>t().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:t})=>t().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Xa({find:n=>uT(n).filter(t=>!this.options.validate||this.options.validate(t.value)).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:n=>{var t;return{href:null===(t=n.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(aye({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function lye(n){return new pt({key:new Et("handleClickLink"),props:{handleClick:(t,e,i)=>{var r,o,s;if(0!==i.button)return!1;const a=function w3(n,t){const e=Sy("string"==typeof t?t:t.name,n.schema);return"node"===e?function xse(n,t){const e=ti(t,n.schema),{from:i,to:r}=n.selection,o=[];n.doc.nodesBetween(i,r,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===e.name);return s?{...s.attrs}:{}}(n,t):"mark"===e?Dy(n,t):{}}(t.state,n.type.name),l=null===(r=i.target)||void 0===r?void 0:r.closest("a"),c=null!==(o=l?.href)&&void 0!==o?o:a.href,u=null!==(s=l?.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function cye(n){return new pt({key:new Et("handlePasteLink"),props:{handlePaste:(t,e,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=uT(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),Yi.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Yi.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),tn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",vt(this.options.HTMLAttributes,n),0]}}),Ut.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:t})=>!!this.options.alignments.includes(n)&&this.options.types.every(e=>t.updateAttributes(e,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(t=>n.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Yi.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});const gye=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,_ye=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,r5=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Cye=(tn.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:n=>({commands:t})=>!!(n=>n.match(gye))(n.src)&&t.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[rae({find:_ye,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const t=(n=>{const{url:t,allowFullscreen:e,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:h,modestBranding:p,nocookie:f,origin:m,playlist:_,progressBarColor:b,startAt:T}=n;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const $=t.split("/").pop();return $?`${r5(f)}${$}`:null}const w=/v=([-\w]+)/gm.exec(t);if(!w||!w[1])return null;let N=`${r5(f)}${w[1]}`;const k=[];return!1===e&&k.push("fs=0"),i&&k.push("autoplay=1"),r&&k.push(`cc_lang_pref=${r}`),o&&k.push("cc_load_policy=1"),s||k.push("controls=0"),a&&k.push("disablekb=1"),l&&k.push("enablejsapi=1"),c&&k.push(`end=${c}`),u&&k.push(`hl=${u}`),d&&k.push(`iv_load_policy=${d}`),h&&k.push("loop=1"),p&&k.push("modestbranding=1"),m&&k.push(`origin=${m}`),_&&k.push(`playlist=${_}`),T&&k.push(`start=${T}`),b&&k.push(`color=${b}`),k.length&&(N+=`?${k.join("&")}`),N})({url:n.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:n.start||0});return n.src=t,["div",{"data-youtube-video":""},["iframe",vt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},n)]]}}),/^\s*>\s$/),wye=tn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[$p({find:Cye,type:this.type})]}}),Sye=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Dye=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,Tye=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Mye=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Eye=Yi.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[bc({find:Sye,type:this.type}),bc({find:Tye,type:this.type})]},addPasteRules(){return[Xa({find:Dye,type:this.type}),Xa({find:Mye,type:this.type})]}}),Iye=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),o5=Yi.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Dy(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),s5=/^\s*([-+*])\s$/,xye=tn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Iye.name,this.editor.getAttributes(o5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=$p({find:s5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=$p({find:s5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(o5.name),editor:this.editor})),[n]}}),Oye=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,kye=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,Aye=Yi.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[bc({find:Oye,type:this.type})]},addPasteRules(){return[Xa({find:kye,type:this.type})]}}),Nye=/^```([a-z]+)?[\s\n]$/,Lye=/^~~~([a-z]+)?[\s\n]$/,Pye=tn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var t;const{languageClassPrefix:e}=this.options;return[...(null===(t=n.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(s=>s.startsWith(e)).map(s=>s.replace(e,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:t}){return["pre",vt(this.options.HTMLAttributes,t),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:t})=>t.setNode(this.name,n),toggleCodeBlock:n=>({commands:t})=>t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:t}=this.editor.state.selection;return!(!n||t.parent.type.name!==this.name)&&!(1!==t.pos&&t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=n,{selection:e}=t,{$from:i,empty:r}=e;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=n,{selection:e,doc:i}=t,{$from:r,empty:o}=e;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;const a=r.after();return void 0!==a&&!i.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[iD({find:Nye,type:this.type,getAttributes:n=>({language:n[1]})}),iD({find:Lye,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new pt({key:new Et("codeBlockVSCodeHandler"),props:{handlePaste:(n,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const e=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!e||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(Le.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(e.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),Rye=tn.create({name:"doc",topNode:!0,content:"block+"});function Fye(n={}){return new pt({view:t=>new jye(t,n)})}class jye{constructor(t,e){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=e.width)&&void 0!==i?i:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,t=this.editorView.state.doc.resolve(this.cursorPos),e=!t.parent.inlineContent;if(e){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!i){let a=this.editorView.coordsAtPos(this.cursorPos);i={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o,s,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",e),this.element.classList.toggle("prosemirror-dropcursor-inline",!e),!r||r==document.body&&"static"==getComputedStyle(r).position)o=-pageXOffset,s=-pageYOffset;else{let a=r.getBoundingClientRect();o=a.left-r.scrollLeft,s=a.top-r.scrollTop}this.element.style.left=i.left-o+"px",this.element.style.top=i.top-s+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let s=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=IP(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=a&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const Vye=Ut.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Fye(this.options)]}});class Sn extends Fe{constructor(t){super(t,t)}map(t,e){let i=t.resolve(e.map(this.head));return Sn.valid(i)?new Sn(i):Fe.near(i)}content(){return ie.empty}eq(t){return t instanceof Sn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new Sn(t.resolve(e.pos))}getBookmark(){return new dT(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function zye(n){for(let t=n.depth;t>=0;t--){let e=n.index(t),i=n.node(t);if(0!=e)for(let r=i.child(e-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t)||!function Bye(n){for(let t=n.depth;t>=0;t--){let e=n.indexAfter(t),i=n.node(t);if(e!=i.childCount)for(let r=i.child(e);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t))return!1;let i=e.type.spec.allowGapCursor;if(null!=i)return i;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,i=!1){e:for(;;){if(!i&&Sn.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(e>0?t.indexAfter(s)0){o=a.child(e>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;r+=e;let l=t.doc.resolve(r);if(Sn.valid(l))return l}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Me.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),i=!1;continue e}break}o=s,r+=e;let a=t.doc.resolve(r);if(Sn.valid(a))return a}return null}}}Sn.prototype.visible=!1,Sn.findFrom=Sn.findGapCursorFrom,Fe.jsonID("gapcursor",Sn);class dT{constructor(t){this.pos=t}map(t){return new dT(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return Sn.valid(e)?new Sn(e):Fe.near(e)}}const Hye=LS({ArrowLeft:wv("horiz",-1),ArrowRight:wv("horiz",1),ArrowUp:wv("vert",-1),ArrowDown:wv("vert",1)});function wv(n,t){const e="vert"==n?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof Le){if(!o.endOfTextblock(e)||0==a.depth)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let c=Sn.findGapCursorFrom(a,t,l);return!!c&&(r&&r(i.tr.setSelection(new Sn(c))),!0)}}function $ye(n,t,e){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(t);if(!Sn.valid(i))return!1;let r=n.posAtCoords({left:e.clientX,top:e.clientY});return!(r&&r.inside>-1&&Me.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new Sn(i))),0))}function Wye(n,t){if("insertCompositionText"!=t.inputType||!(n.state.selection instanceof Sn))return!1;let{$from:e}=n.state.selection,i=e.parent.contentMatchAt(e.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=G.empty;for(let s=i.length-1;s>=0;s--)r=G.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(e.pos,e.pos,new ie(r,0,0));return o.setSelection(Le.near(o.doc.resolve(e.pos+1))),n.dispatch(o),!1}function Gye(n){if(!(n.selection instanceof Sn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",en.create(n.doc,[Gn.widget(n.selection.head,t,{key:"gapcursor"})])}const qye=Ut.create({name:"gapCursor",addProseMirrorPlugins:()=>[new pt({props:{decorations:Gye,createSelectionBetween:(n,t,e)=>t.pos==e.pos&&Sn.valid(e)?new Sn(e):null,handleClick:$ye,handleKeyDown:Hye,handleDOMEvents:{beforeinput:Wye}}})],extendNodeSchema(n){var t;return{allowGapCursor:null!==(t=Ye(ge(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==t?t:null}}}),Kye=tn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",vt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:t,state:e,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=e;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(h=>a.includes(h.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Yye=tn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:t}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,vt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.setNode(this.name,n),toggleHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,t)=>({...n,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(n=>iD({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var fi=function(){};fi.prototype.append=function(t){return t.length?(t=fi.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},fi.prototype.prepend=function(t){return t.length?fi.from(t).append(this):this},fi.prototype.appendInner=function(t){return new Qye(this,t)},fi.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?fi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},fi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},fi.prototype.forEach=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length),e<=i?this.forEachInner(t,e,i,0):this.forEachInvertedInner(t,e,i,0)},fi.prototype.map=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},e,i),r},fi.from=function(t){return t instanceof fi?t:t&&t.length?new a5(t):fi.empty};var a5=function(n){function t(i){n.call(this),this.values=i}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new t(r.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(fi);fi.empty=new a5([]);var Qye=function(n){function t(e,i){n.call(this),this.left=e,this.right=i,this.length=e.length+i.length,this.depth=Math.max(e.depth,i.depth)+1}return n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return ia&&!1===this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a))return!1},t.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&!1===this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(fi);const l5=fi;class ko{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=t.tr,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(i,h+1),o=r.maps.length),o--,void u.push(d);if(r){u.push(new ms(d.map));let f,p=d.step.map(r.slice(o));p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],c.push(new ms(f,void 0,void 0,c.length+u.length))),o--,f&&r.appendMap(f,o)}else s.maybeStep(d.step);return d.selection?(a=r?d.selection.map(r.slice(o)):d.selection,l=new ko(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,e,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;uXye&&(a=function Jye(n,t){let e;return n.forEach((i,r)=>{if(i.selection&&0==t--)return e=r,!1}),n.slice(e)}(a,c),s-=c),new ko(a.append(o),s)}remapping(t,e){let i=new od;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0)},t,e),i}addMaps(t){return 0==this.eventCount?this:new ko(this.items.append(t.map(e=>new ms(e))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=e;this.items.forEach(h=>{let p=o.getMirror(--l);if(null==p)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=t.steps[p].invert(t.docs[p]),_=h.selection&&h.selection.map(o.slice(l+1,p));_&&a++,i.push(new ms(f,m,_))}else i.push(new ms(f))},r);let c=[];for(let h=e;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),i=e.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(e.slice(i)),c=l&&l.getMap();if(i--,c&&e.appendMap(c,i),l){let u=s.selection&&s.selection.map(e.slice(i));u&&o++;let h,d=new ms(c.invert(),l,u),p=r.length-1;(h=r.length&&r[p].merge(d))?r[p]=h:r.push(d)}}else s.map&&i--},this.items.length,0),new ko(l5.from(r.reverse()),o)}}ko.empty=new ko(l5.empty,0);class ms{constructor(t,e,i,r){this.map=t,this.step=e,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new ms(e.getMap().invert(),e,this.selection)}}}class al{constructor(t,e,i,r,o){this.done=t,this.undone=e,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const Xye=20;function c5(n){let t=[];return n.forEach((e,i,r,o)=>t.push(r,o)),t}function hT(n,t){if(!n)return null;let e=[];for(let i=0;inew al(ko.empty,ko.empty,null,0,-1),apply:(t,e,i)=>function eve(n,t,e,i){let o,r=e.getMeta(gs);if(r)return r.historyState;e.getMeta(h5)&&(n=new al(n.done,n.undone,null,0,-1));let s=e.getMeta("appendedTransaction");if(0==e.steps.length)return n;if(s&&s.getMeta(gs))return s.getMeta(gs).redo?new al(n.done.addTransform(e,void 0,i,Dv(t)),n.undone,c5(e.mapping.maps[e.steps.length-1]),n.prevTime,n.prevComposition):new al(n.done,n.undone.addTransform(e,void 0,i,Dv(t)),null,n.prevTime,n.prevComposition);if(!1===e.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=e.getMeta("rebased"))?new al(n.done.rebased(e,o),n.undone.rebased(e,o),hT(n.prevRanges,e.mapping),n.prevTime,n.prevComposition):new al(n.done.addMaps(e.mapping.maps),n.undone.addMaps(e.mapping.maps),hT(n.prevRanges,e.mapping),n.prevTime,n.prevComposition);{let a=e.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(e.time||0)-i.newGroupDelay||!function tve(n,t){if(!t)return!1;if(!n.docChanged)return!0;let e=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=t[o]&&(e=!0)}),e}(e,n.prevRanges)),c=s?hT(n.prevRanges,e.mapping):c5(e.mapping.maps[e.steps.length-1]);return new al(n.done.addTransform(e,l?t.selection.getBookmark():void 0,i,Dv(t)),ko.empty,c,e.time,a??n.prevComposition)}}(e,i,t,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(t,e){let i=e.inputType,r="historyUndo"==i?p5:"historyRedo"==i?f5:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const p5=(n,t)=>{let e=gs.getState(n);return!(!e||0==e.done.eventCount||(t&&u5(e,n,t,!1),0))},f5=(n,t)=>{let e=gs.getState(n);return!(!e||0==e.undone.eventCount||(t&&u5(e,n,t,!0),0))},ive=Ut.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:t})=>p5(n,t),redo:()=>({state:n,dispatch:t})=>f5(n,t)}),addProseMirrorPlugins(){return[nve(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),rve=tn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",vt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{var i;if(e){const{$to:r}=t.selection,o=r.end();if(r.nodeAfter)t.setSelection(Le.create(t.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(t.insert(o,s),t.setSelection(Le.create(t.doc,o)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[T3({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),ove=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,sve=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,ave=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,lve=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,cve=Yi.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[bc({find:ove,type:this.type}),bc({find:ave,type:this.type})]},addPasteRules(){return[Xa({find:sve,type:this.type}),Xa({find:lve,type:this.type})]}}),uve=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),dve=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),m5=Yi.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Dy(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),g5=/^(\d+)\.\s$/,hve=tn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const{start:t,...e}=n;return 1===t?["ol",vt(this.options.HTMLAttributes,e),0]:["ol",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(dve.name,this.editor.getAttributes(m5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=$p({find:g5,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=$p({find:g5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(m5.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[n]}}),pve=tn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),fve=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,mve=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,gve=Yi.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[bc({find:fve,type:this.type})]},addPasteRules(){return[Xa({find:mve,type:this.type})]}}),_ve=tn.create({name:"text",group:"inline"});Ut.create({name:"starterKit",addExtensions(){var n,t,e,i,r,o,s,a,l,c,u,d,h,p,f,m,_,b;const T=[];return!1!==this.options.blockquote&&T.push(wye.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&T.push(Eye.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&T.push(xye.configure(null===(e=this.options)||void 0===e?void 0:e.bulletList)),!1!==this.options.code&&T.push(Aye.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&T.push(Pye.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&T.push(Rye.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&T.push(Vye.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&T.push(qye.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&T.push(Kye.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&T.push(Yye.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&T.push(ive.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&T.push(rve.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&T.push(cve.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&T.push(uve.configure(null===(p=this.options)||void 0===p?void 0:p.listItem)),!1!==this.options.orderedList&&T.push(hve.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&T.push(pve.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&T.push(gve.configure(null===(_=this.options)||void 0===_?void 0:_.strike)),!1!==this.options.text&&T.push(_ve.configure(null===(b=this.options)||void 0===b?void 0:b.text)),T}});var vf=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(vf||(vf={})),vf))();function yve(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}Ut.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new pt({key:new Et("dotPlaceholder"),props:{decorations:({doc:n,selection:t})=>{const e=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!e)return null;const o=n.type.createAndFill(),s=o?.sameMarkup(n)&&null===o.content.findDiffStart(n.content);return n.descendants((a,l)=>{if((i>=l&&i<=l+a.nodeSize||!this.options.showOnlyCurrent)&&!a.isLeaf&&!a.childCount){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const h=Gn.widget(l,((n,t,e)=>{const i=document.createElement("button");i.classList.add("add-button"),i.style.position="absolute",i.style.left="-45px",i.style.top="-2px";const r=document.createElement("div");return r.style.position="relative",r.setAttribute("draggable","false"),0===n&&t.type.name===pi.HEADING&&(i.style.top=vf.TOP_INITIAL),0!==n&&t.type.name===pi.HEADING&&(i.style.top=vf.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),e.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),p=Gn.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===pi.HEADING?`${yve(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(p),r.push(h)}return this.options.includeChildren}),en.create(n,r)}}})]}});class Ove{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new fT(t,this.delay,this.scheduler))}}class fT extends ut{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,r=t.scheduler,o=t.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(t,s)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(fT.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new kve(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(or.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(or.createComplete()),this.unsubscribe()}}class kve{constructor(t,e){this.time=t,this.notification=e}}let bf=(()=>{class n{constructor(){this._accept=[],this._acceptSanitized=[]}get accept(){return this._accept}get maxFileSize(){return this._maxFileSize}setMaxFileSize(e){this._maxFileSize=e}setAccept(e){this._accept=e,this._acceptSanitized=e?.filter(i=>"*/*"!==i).map(i=>i.toLowerCase().replace(/\*/g,""))}isValidType({extension:e,mimeType:i}){if(0===this._acceptSanitized?.length)return!0;const r=e?.replace(".","");return this._acceptSanitized.some(o=>i?.includes(o)||o?.includes(`.${r}`))}isValidSize(e){return!this._maxFileSize||e<=this._maxFileSize}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const Ave=["editorRef"],Nve=function(n){return{"binary-field__code-editor--disabled":n}},Lve=function(n){return{"editor-mode__helper--visible":n}},Pve={theme:"vs",minimap:{enabled:!1},cursorBlinking:"solid",overviewRulerBorder:!1,mouseWheelZoom:!1,lineNumbers:"on",roundedSelection:!1,automaticLayout:!0,language:"text"};let Rve=(()=>{class n{constructor(){this.fileName="",this.fileContent="",this.tempFileUploaded=new R,this.cancel=new R,this.cd=se(Tt),this.dotUploadService=se(_p),this.dotMessageService=se(ka),this.dotBinaryFieldValidatorService=se(bf),this.extension="",this.invalidFileMessage="",this.form=new Da({name:new Vs("",[Kr.required,Kr.pattern(/^[^.]+\.[^.]+$/)]),content:new Vs("")}),this.editorOptions=Pve,this.mimeType=""}get name(){return this.form.get("name")}get content(){return this.form.get("content")}ngOnInit(){this.setFormValues(),this.name.valueChanges.pipe(qp(350)).subscribe(e=>this.setEditorLanguage(e)),this.invalidFileMessage=this.dotMessageService.get("dot.binary.field.error.type.file.not.supported.message",this.dotBinaryFieldValidatorService.accept.join(", "))}onEditorInit(){this.editor=this.editorRef.editor,this.fileName&&this.setEditorLanguage(this.fileName)}onSubmit(){if(this.name.invalid)return void this.markControlInvalid(this.name);const e=new File([this.content.value],this.name.value,{type:this.mimeType});this.uploadFile(e)}setFormValues(){this.name.setValue(this.fileName),this.content.setValue(this.fileContent)}markControlInvalid(e){e.markAsDirty(),e.updateValueAndValidity(),this.cd.detectChanges()}uploadFile(e){const i=Kt(this.dotUploadService.uploadFile({file:e}));this.disableEditor(),i.subscribe(r=>{this.enableEditor(),this.tempFileUploaded.emit({...r,content:this.content.value})})}setEditorLanguage(e=""){const i=e?.includes(".")?e.split(".").pop():"",{id:r,mimetypes:o,extensions:s}=this.getLanguage(i)||{};this.mimeType=o?.[0],this.extension=s?.[0];const a=this.dotBinaryFieldValidatorService.isValidType({extension:this.extension,mimeType:this.mimeType});i&&!a&&this.name.setErrors({invalidExtension:this.invalidFileMessage}),this.updateEditorLanguage(r),this.cd.detectChanges()}getLanguage(e){return monaco.languages.getLanguages().find(i=>i.extensions?.includes(`.${e}`))}updateEditorLanguage(e="text"){this.editorOptions={...this.editorOptions,language:e}}disableEditor(){this.form.disable(),this.editor.updateOptions({readOnly:!0})}enableEditor(){this.form.enable(),this.editor.updateOptions({readOnly:!1})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-dot-binary-field-editor"]],viewQuery:function(e,i){if(1&e&&Ee(Ave,7),2&e){let r;J(r=X())&&(i.editorRef=r.first)}},inputs:{fileName:"fileName",fileContent:"fileContent"},outputs:{tempFileUploaded:"tempFileUploaded",cancel:"cancel"},standalone:!0,features:[Zt],decls:20,vars:20,consts:[[1,"editor-mode__form",3,"formGroup","ngSubmit"],[1,"editor-mode__input-container"],["data-testId","editor-label","for","file-name",1,"p-label-input-required"],["id","file-name","type","text","pInputText","","formControlName","name","autocomplete","off","pInputText","","placeholder","Ex. template.html"],[1,"error-message"],["data-testId","error-message",3,"patternErrorMessage","field"],[1,"binary-field__editor-container"],["formControlName","content","data-testId","code-editor",1,"binary-field__code-editor",3,"ngClass","options","init"],["editorRef",""],[1,"editor-mode__helper",3,"ngClass"],[1,"pi","pi-info-circle"],[1,"editor-mode__actions"],["styleClass","p-button-outlined","type","button","aria-label","Cancel button","data-testId","cancel-button",3,"label","click"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label"]],template:function(e,i){1&e&&(S(0,"form",0),P("ngSubmit",function(){return i.onSubmit()}),S(1,"div",1)(2,"label",2),H(3),We(4,"dm"),D(),F(5,"input",3),S(6,"div",4),F(7,"dot-field-validation-message",5),D()(),S(8,"div",6)(9,"ngx-monaco-editor",7,8),P("init",function(){return i.onEditorInit()}),D(),S(11,"div",9),F(12,"i",10),S(13,"small"),H(14),D()()(),S(15,"div",11)(16,"p-button",12),P("click",function(){return i.cancel.emit()}),We(17,"dm"),D(),F(18,"p-button",13),We(19,"dm"),D()()),2&e&&(g("formGroup",i.form),v(3),ve(Je(4,10,"dot.binary.field.action.create.new.file.label")),v(4),g("patternErrorMessage","dot.binary.field.error.type.file.not.extension")("field",i.form.get("name")),v(2),g("ngClass",te(16,Nve,i.form.disabled))("options",i.editorOptions),v(2),g("ngClass",te(18,Lve,i.mimeType)),v(3),xt("Mime Type: ",i.mimeType,""),v(2),g("label",Je(17,12,"dot.common.cancel")),v(2),g("label",Je(19,14,"dot.common.save")))},dependencies:[Be,Lt,Mg,u2,Hl,zs,qr,$n,js,Wn,Yr,Jn,rc,Na,di,ed,Zo,S1],styles:[".binary-field__editor-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;flex-direction:column;flex:1;width:100%;gap:.5rem}.binary-field__code-editor[_ngcontent-%COMP%]{border:1px solid #d1d4db;display:block;flex-grow:1;width:100%;min-height:20rem;border-radius:.375rem;overflow:auto}.binary-field__code-editor--disabled[_ngcontent-%COMP%]{background-color:#f3f3f4;opacity:.5}.binary-field__code-editor--disabled[_ngcontent-%COMP%] .monaco-mouse-cursor-text, .binary-field__code-editor--disabled[_ngcontent-%COMP%] .overflow-guard{cursor:not-allowed}.editor-mode__form[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.editor-mode__input-container[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;flex-direction:column}.editor-mode__input[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}.editor-mode__actions[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;align-items:center;justify-content:flex-end}.editor-mode__helper[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:.5rem;color:#6c7389;font-weight:.813rem;visibility:hidden}.editor-mode__helper--visible[_ngcontent-%COMP%]{visibility:visible}.error-message[_ngcontent-%COMP%]{min-height:1.5rem;justify-content:flex-start;display:flex}"],changeDetection:0}),n})();function Fve(n,t){if(1&n&&(S(0,"div",14)(1,"code"),H(2),D()()),2&n){const e=y();v(2),ve(e.file.content)}}function jve(n,t){if(1&n&&(S(0,"div",19),F(1,"i",21),S(2,"span"),H(3),D()()),2&n){const e=y(2);v(3),ya("",e.file.width,"px, ",e.file.height,"px")}}function Vve(n,t){if(1&n&&(S(0,"div",15),F(1,"dot-content-thumbnail",16),D(),S(2,"div",17)(3,"span",12),H(4),D(),C(5,jve,4,2,"div",18),S(6,"div",19),F(7,"i",20),S(8,"span"),H(9),We(10,"number"),We(11,"dm"),D()()()),2&n){const e=y();v(1),g("dotThumbanilOptions",e.dotThumbnailOptions),v(3),ve(e.file.name),v(1),g("ngIf",e.file.width&&e.file.height),v(4),ya("",Hm(10,5,e.file.fileSize,"1.0-2")," ",Je(11,8,"dot.binary.field.file.bytes"),"")}}function zve(n,t){if(1&n){const e=q();S(0,"p-button",22),P("click",function(){return I(e),x(y().onEdit())}),We(1,"dm"),D()}2&n&&g("label",Je(1,1,"dot.common.edit"))}function Bve(n,t){if(1&n){const e=q();S(0,"p-button",23),P("click",function(){return I(e),x(y().onEdit())}),D()}}function Uve(n,t){if(1&n&&(S(0,"div"),H(1),We(2,"dm"),S(3,"span"),H(4),D()()),2&n){const e=y();v(1),xt(" ",Je(2,3,"dot.binary.field.file.dimension"),": "),v(3),ya("",e.file.width,"px, ",e.file.height,"px")}}function Hve(n,t){if(1&n&&(S(0,"div"),H(1),We(2,"dm"),S(3,"span"),H(4),D()()),2&n){const e=y();v(1),xt(" ",Je(2,2,"dot.binary.field.file.size"),": "),v(3),xt("",e.file.fileSize," Bytes")}}const $ve=function(n){return{"preview-container--fade":n}};var na=(()=>(function(n){n.image="image",n.text="text",n.unknown="unknown"}(na||(na={})),na))();let Wve=(()=>{class n{constructor(){this.editImage=new R,this.editFile=new R,this.removeFile=new R,this.EDITABLE_FILE_FUNCTION_MAP={[na.image]:()=>this.editableImage,[na.text]:()=>!!this.file?.content,[na.unknown]:()=>!!this.file?.content},this.isEditable=!1}get dotThumbnailOptions(){return{tempUrl:this.file.url,inode:this.file.inode,name:this.file.name,contentType:this.file.mimeType,iconSize:"48px",titleImage:this.file.name}}ngOnChanges(){this.setIsEditable()}onEdit(){this.contenttype!==na.image?this.editFile.emit():this.editImage.emit()}setIsEditable(){const e=this.file.mimeType?.split("/")[0];this.contenttype=na[e]||na.unknown,this.isEditable=this.EDITABLE_FILE_FUNCTION_MAP[this.contenttype]()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-binary-field-preview"]],inputs:{file:"file",editableImage:"editableImage"},outputs:{editImage:"editImage",editFile:"editFile",removeFile:"removeFile"},standalone:!0,features:[Yn,Zt],decls:19,vars:13,consts:[[1,"preview-container",3,"ngClass"],["class","preview-code_container",4,"ngIf","ngIfElse"],["contentThumnail",""],[1,"preview-metadata__actions"],["styleClass","p-button-link p-button-sm p-button-secondary","data-testId","remove-button","icon","pi pi-trash",3,"label","click"],["severity","secondary","styleClass","p-button-outlined p-button-sm p-button-secondary","data-testId","edit-button","icon","pi pi-pencil",3,"label","click",4,"ngIf"],[1,"preview-metadata__action--responsive"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","edit-button-responsive","icon","pi pi-pencil",3,"click",4,"ngIf"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","infor-button-responsive","icon","pi pi-info",3,"click"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","remove-button-responsive","icon","pi pi-trash",3,"click"],["op",""],[1,"preview-metadata__responsive"],[1,"preview-metadata_header"],[4,"ngIf"],[1,"preview-code_container"],[1,"preview-image__container"],[3,"dotThumbanilOptions"],[1,"preview-metadata__container"],["class","preview-metadata",4,"ngIf"],[1,"preview-metadata"],[1,"pi","pi-file"],[1,"pi","pi-arrows-alt"],["severity","secondary","styleClass","p-button-outlined p-button-sm p-button-secondary","data-testId","edit-button","icon","pi pi-pencil",3,"label","click"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","edit-button-responsive","icon","pi pi-pencil",3,"click"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0),C(1,Fve,3,1,"div",1),C(2,Vve,12,10,"ng-template",null,2,yt),S(4,"div",3)(5,"p-button",4),P("click",function(){return i.removeFile.emit()}),We(6,"dm"),D(),C(7,zve,2,3,"p-button",5),D(),S(8,"div",6),C(9,Bve,1,0,"p-button",7),S(10,"p-button",8),P("click",function(s){return I(r),x(Pe(13).toggle(s))}),D(),S(11,"p-button",9),P("click",function(){return i.removeFile.emit()}),D()()(),S(12,"p-overlayPanel",null,10)(14,"div",11)(15,"span",12),H(16),D(),C(17,Uve,5,5,"div",13),C(18,Hve,5,4,"div",13),D()()}if(2&e){const r=Pe(3);g("ngClass",te(11,$ve,i.file.content)),v(1),g("ngIf",i.file.content)("ngIfElse",r),v(4),g("label",Je(6,9,"dot.common.remove")),v(2),g("ngIf",i.isEditable),v(2),g("ngIf",i.isEditable),v(7),ve(i.file.name),v(1),g("ngIf",i.file.width&&i.file.height),v(1),g("ngIf",i.file.fileSize)}},dependencies:[Be,Lt,Ge,Ak,di,ed,UJ,I_,Uj,Gpe,Zo],styles:['[_nghost-%COMP%]{display:block;width:100%;height:100%}.preview-container[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-start;justify-content:center;height:100%;width:100%;position:relative;container-type:inline-size;container-name:preview}.preview-container[_ngcontent-%COMP%]:only-child{gap:0}.preview-code_container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%;-webkit-user-select:none;user-select:none}.preview-image__container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:#f3f3f4}.preview-container--fade[_ngcontent-%COMP%]:after{content:"";background:linear-gradient(0deg,rgb(255,255,255) 0%,rgba(255,255,255,0) 100%);position:absolute;width:100%;height:50%;bottom:0;left:0;border-radius:.375rem}.preview-metadata__container[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%]{flex-grow:1;padding:.5rem;display:none;justify-content:top;flex-direction:column;height:100%;min-width:8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;gap:.75rem}.preview-metadata__container[_ngcontent-%COMP%] .preview-metadata_header[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%] .preview-metadata_header[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;margin:0;color:#14151a}.preview-metadata__container[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6c7389}.preview-metadata__responsive[_ngcontent-%COMP%]{display:flex;padding:0;max-width:20rem}.preview-metadata[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:.5rem}.preview-metadata__actions[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;display:none;justify-content:flex-end;align-items:center;gap:.5rem;width:100%;z-index:100}.preview-metadata__action--responsive[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;display:flex;flex-direction:column;gap:.5rem}code[_ngcontent-%COMP%]{background:#ffffff;color:var(--color-palette-primary-500);height:100%;width:100%;white-space:pre-wrap;overflow:hidden}@container preview (min-width: 376px){.preview-metadata__container[_ngcontent-%COMP%], .preview-metadata__actions[_ngcontent-%COMP%]{display:flex}.preview-metadata__action--responsive[_ngcontent-%COMP%]{display:none}.preview-image__container[_ngcontent-%COMP%]{height:100%;max-width:17.5rem}.preview-overlay__container[_ngcontent-%COMP%]{display:none}}'],changeDetection:0}),n})();const Gve=["*"];let qve=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-binary-field-ui-message"]],inputs:{uiMessage:"uiMessage"},standalone:!0,features:[Zt],ngContentSelectors:Gve,decls:6,vars:6,consts:[["data-testId","ui-message-icon-container",1,"icon-container",3,"ngClass"],["data-testId","ui-message-icon",2,"font-size","2rem","width","auto",3,"ngClass"],[1,"text"],["data-testId","ui-message-span",3,"innerHTML"]],template:function(e,i){1&e&&(ai(),S(0,"div",0),F(1,"i",1),D(),S(2,"div",2),F(3,"span",3),We(4,"dm"),ln(5),D()),2&e&&(g("ngClass",i.uiMessage.severity),v(1),g("ngClass",i.uiMessage.icon),v(2),g("innerHTML",Hm(4,3,i.uiMessage.message,i.uiMessage.args),pu))},dependencies:[Be,Lt,Zo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;height:100%;padding:1rem}.icon-container[_ngcontent-%COMP%]{border-radius:50%;padding:1rem}.icon-container.info[_ngcontent-%COMP%]{color:var(--color-palette-secondary-500);background:var(--color-palette-secondary-200)}.icon-container.error[_ngcontent-%COMP%]{color:#ffb444;background:#fff8ec}.text[_ngcontent-%COMP%]{text-align:center;line-height:140%}"],changeDetection:0}),n})(),y5=(()=>{class n extends ef{constructor(e,i){super({tempFile:null,isLoading:!1,error:""}),this.dotUploadService=e,this.dotBinaryFieldValidatorService=i,this.vm$=this.select(r=>r),this.tempFile$=this.select(({tempFile:r})=>r),this.error$=this.select(({error:r})=>r),this.setTempFile=this.updater((r,o)=>({...r,tempFile:o,isLoading:!1,error:""})),this.setIsLoading=this.updater((r,o)=>({...r,isLoading:o})),this.setError=this.updater((r,o)=>({...r,isLoading:!1,error:o})),this.uploadFileByUrl=this.effect(r=>r.pipe(Mt(()=>this.setIsLoading(!0)),xn(({url:o,signal:s})=>this.uploadTempFile(o,s)))),this.setMaxFileSize(this.dotBinaryFieldValidatorService.maxFileSize)}uploadTempFile(e,i){return Kt(this.dotUploadService.uploadFile({file:e,maxSize:this._maxFileSize?`${this._maxFileSize}MB`:"",signal:i})).pipe(OD(r=>{this.isValidType(r)?this.setTempFile(r):this.setError("dot.binary.field.import.from.url.error.file.not.supported.message")},r=>{i.aborted?this.setIsLoading(!1):this.setError(r.message)}))}setMaxFileSize(e){this._maxFileSize=this._maxFileSize=e/1048576}isValidType(e){const{fileName:i,mimeType:r}=e,o=i.split(".").pop();return this.dotBinaryFieldValidatorService.isValidType({extension:o,mimeType:r})}}return n.\u0275fac=function(e){return new(e||n)(U(_p),U(bf))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function Kve(n,t){if(1&n&&(F(0,"dot-field-validation-message",12),We(1,"dm")),2&n){const e=y(2);g("message",Je(1,2,"dot.binary.field.action.import.from.url.error.message"))("field",e.form.get("url"))}}const Yve=function(n){return[n]};function Qve(n,t){if(1&n&&(S(0,"small",13),H(1),We(2,"dm"),D()),2&n){const e=y().ngIf,i=y();v(1),xt(" ",Hm(2,1,e.error,te(4,Yve,i.acceptTypes))," ")}}function Zve(n,t){1&n&&(F(0,"p-button",14),We(1,"dm")),2&n&&g("label",Je(1,2,"dot.common.import"))("icon","pi pi-download")}function Jve(n,t){1&n&&F(0,"p-button",15),2&n&&g("icon","pi pi-spin pi-spinner")}const Xve=function(){return{width:"6.85rem"}};function ebe(n,t){if(1&n){const e=q();S(0,"form",1),P("ngSubmit",function(){return I(e),x(y().onSubmit())}),S(1,"div",2)(2,"label",3),H(3),We(4,"dm"),D(),S(5,"input",4),P("focus",function(){return I(e),x(y().handleFocus())}),D(),S(6,"div",5),C(7,Kve,2,4,"dot-field-validation-message",6),C(8,Qve,3,6,"ng-template",null,7,yt),D()(),S(10,"div",8)(11,"p-button",9),P("click",function(){return I(e),x(y().cancelUpload())}),We(12,"dm"),D(),S(13,"div"),C(14,Zve,2,4,"p-button",10),C(15,Jve,1,1,"ng-template",null,11,yt),D()()()}if(2&n){const e=t.ngIf,i=Pe(9),r=Pe(16);g("formGroup",y().form),v(3),ve(Je(4,9,"dot.binary.field.action.import.from.url")),v(4),g("ngIf",!e.error)("ngIfElse",i),v(4),g("label",Je(12,11,"dot.common.cancel")),v(2),jt(hn(13,Xve)),v(1),g("ngIf",!e.isLoading)("ngIfElse",r)}}let tbe=(()=>{class n{constructor(){this.tempFileUploaded=new R,this.cancel=new R,this.store=se(y5),this.dotBinaryFieldValidatorService=se(bf),this.validators=[Kr.required,Kr.pattern(/^(ftp|http|https):\/\/[^ "]+$/)],this.form=new Da({url:new Vs("",this.validators)}),this.vm$=this.store.vm$.pipe(Mt(({isLoading:e})=>this.toggleForm(e))),this.tempFileChanged$=this.store.tempFile$,this.destroy$=new ye}get acceptTypes(){return this.dotBinaryFieldValidatorService.accept.join(",")}ngOnInit(){this.tempFileChanged$.pipe(Rt(this.destroy$),$t(e=>null!==e)).subscribe(e=>{this.tempFileUploaded.emit(e)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.abortController?.abort()}onSubmit(){if(this.form.invalid)return;const e=this.form.get("url").value;this.abortController=new AbortController,this.store.uploadFileByUrl({url:e,signal:this.abortController.signal}),this.form.reset({url:e})}cancelUpload(){this.abortController?.abort(),this.cancel.emit()}handleFocus(){this.store.setError("")}toggleForm(e){e?this.form.disable():this.form.enable()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-dot-binary-field-url-mode"]],outputs:{tempFileUploaded:"tempFileUploaded",cancel:"cancel"},standalone:!0,features:[Ie([y5]),Zt],decls:2,vars:3,consts:[["class","url-mode__form","data-testId","form",3,"formGroup","ngSubmit",4,"ngIf"],["data-testId","form",1,"url-mode__form",3,"formGroup","ngSubmit"],[1,"url-mode__input-container"],["for","url-input"],["id","url-input","type","text","autocomplete","off","formControlName","url","pInputText","","placeholder","https://www.dotcms.com/image.png","aria-label","URL input field","data-testId","url-input",3,"focus"],[1,"error-messsage__container"],["data-testId","error-message",3,"message","field",4,"ngIf","ngIfElse"],["serverError",""],[1,"url-mode__actions"],["styleClass","p-button-outlined","type","button","aria-label","Cancel button","data-testId","cancel-button",3,"label","click"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label","icon",4,"ngIf","ngIfElse"],["loadingButton",""],["data-testId","error-message",3,"message","field"],["data-testId","error-msg",1,"p-invalid"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label","icon"],["type","button","aria-label","Loading button","data-testId","loading-button",3,"icon"]],template:function(e,i){1&e&&(C(0,ebe,17,14,"form",0),We(1,"async")),2&e&&g("ngIf",Je(1,1,i.vm$))},dependencies:[Be,Ge,zl,Hl,zs,qr,$n,js,Wn,Yr,Jn,di,ed,rc,Na,Zo,S1],styles:["[_nghost-%COMP%] {display:block;width:32rem}[_nghost-%COMP%] .p-button{width:100%}[_nghost-%COMP%] .error-messsage__container{min-height:1.5rem}.url-mode__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;justify-content:center;align-items:flex-start}.url-mode__input-container[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;flex-direction:column}.url-mode__actions[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;align-items:center;justify-content:flex-end}"],changeDetection:0}),n})();var ia=(()=>(function(n){n.DROPZONE="DROPZONE",n.URL="URL",n.EDITOR="EDITOR"}(ia||(ia={})),ia))(),Fr=(()=>(function(n){n.INIT="INIT",n.UPLOADING="UPLOADING",n.PREVIEW="PREVIEW"}(Fr||(Fr={})),Fr))(),Nd=(()=>(function(n){n.DEFAULT="DEFAULT",n.SERVER_ERROR="SERVER_ERROR"}(Nd||(Nd={})),Nd))();let v5=(()=>{class n{constructor(){this.subject=new zi(null)}editedImage(){return this.subject.asObservable()}openImageEditor({inode:e,tempId:i,variable:r}){this.variable=r;const o=new CustomEvent(`binaryField-open-image-editor-${r}`,{detail:{inode:e,tempId:i,variable:r}});document.dispatchEvent(o),this.listenToEditedImage(),this.listenToCloseImageEditor()}listenToEditedImage(){document.addEventListener(`binaryField-tempfile-${this.variable}`,this.handleNewImage.bind(this))}listenToCloseImageEditor(){document.addEventListener(`binaryField-close-image-editor-${this.variable}`,this.removeListener.bind(this))}removeListener(){document.removeEventListener(`binaryField-tempfile-${this.variable}`,this.handleNewImage.bind(this)),document.removeEventListener(`binaryField-close-image-editor-${this.variable}`,this.removeListener.bind(this))}handleNewImage({detail:e}){this.subject.next(e.tempFile),this.removeListener()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const nbe={DEFAULT:{message:"dot.binary.field.drag.and.drop.message",severity:"info",icon:"pi pi-upload"},SERVER_ERROR:{message:"dot.binary.field.drag.and.drop.error.server.error.message",severity:"error",icon:"pi pi-exclamation-triangle"},FILE_TYPE_MISMATCH:{message:"dot.binary.field.drag.and.drop.error.file.not.supported.message",severity:"error",icon:"pi pi-exclamation-triangle"},MAX_FILE_SIZE_EXCEEDED:{message:"dot.binary.field.drag.and.drop.error.file.maxsize.exceeded.message",severity:"error",icon:"pi pi-exclamation-triangle"},MULTIPLE_FILES_DROPPED:{message:"dot.binary.field.drag.and.drop.error.multiple.files.dropped.message",severity:"error",icon:"pi pi-exclamation-triangle"}},Tv=(n,...t)=>({...nbe[n],args:t}),ibe={file:null,value:null,mode:ia.DROPZONE,status:Fr.INIT,dropZoneActive:!1,uiMessage:Tv(Nd.DEFAULT),isEnterprise:!1};let b5=(()=>{class n extends ef{constructor(e,i,r){super(ibe),this.dotUploadService=e,this.dotLicenseService=i,this.http=r,this._maxFileSizeInMB=0,this.vm$=this.select(o=>({...o,isLoading:o.status===Fr.UPLOADING})),this.value$=this.select(o=>o.value),this.setDropZoneActive=this.updater((o,s)=>({...o,dropZoneActive:s})),this.setTempFile=this.updater((o,s)=>({...o,status:Fr.PREVIEW,value:s.id,file:this.getFileFromTempFile(s),tempFile:s})),this.setFile=this.updater((o,s)=>({...o,status:Fr.PREVIEW,file:s})),this.setValue=this.updater((o,s)=>({...o,value:s})),this.setUiMessage=this.updater((o,s)=>({...o,uiMessage:s})),this.setMode=this.updater((o,s)=>({...o,mode:s})),this.setStatus=this.updater((o,s)=>({...o,status:s})),this.setIsEnterprise=this.updater((o,s)=>({...o,isEnterprise:s})),this.setUploading=this.updater(o=>({...o,dropZoneActive:!1,uiMessage:Tv(Nd.DEFAULT),status:Fr.UPLOADING})),this.setError=this.updater((o,s)=>({...o,uiMessage:s,status:Fr.INIT,tempFile:null})),this.invalidFile=this.updater((o,s)=>({...o,dropZoneActive:!1,uiMessage:s,status:Fr.INIT})),this.removeFile=this.updater(o=>({...o,file:null,value:"",status:Fr.INIT})),this.handleUploadFile=this.effect(o=>o.pipe(Mt(()=>this.setUploading()),xn(s=>Kt(this.dotUploadService.uploadFile({file:s,maxSize:this._maxFileSizeInMB?`${this._maxFileSizeInMB}MB`:"",signal:null})).pipe(OD(a=>this.setTempFile(a),()=>this.setError(Tv(Nd.SERVER_ERROR))))))),this.setFileAndContent=this.effect(o=>o.pipe(Mt(()=>this.setUploading()),xn(s=>{const{url:a,mimeType:l}=s;return(this.shouldGetFileContent(l)?this.getFileContent(a):_e("")).pipe(Mt(u=>{this.setFile({...s,content:u})}))}))),this.dotLicenseService.isEnterprise().subscribe(o=>{this.setIsEnterprise(o)})}setMaxFileSize(e){this._maxFileSizeInMB=e/1048576}shouldGetFileContent(e){return e.includes("text")||e.includes("json")}getFileContent(e){return this.http.get(e,{responseType:"text"})}getFileFromTempFile({length:e,thumbnailUrl:i,referenceUrl:r,fileName:o,mimeType:s,content:a=""}){return{url:i||r,fileSize:e,mimeType:s,name:o,content:a}}}return n.\u0275fac=function(e){return new(e||n)(U(_p),U(RL),U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const rbe=["inputFile"],obe=function(n){return{"binary-field__drop-zone--active":n}};function sbe(n,t){if(1&n){const e=q();ae(0),S(1,"div",9)(2,"dot-drop-zone",10),P("fileDragOver",function(){return I(e),x(y(2).setDropZoneActiveState(!0))})("fileDragLeave",function(){return I(e),x(y(2).setDropZoneActiveState(!1))})("fileDropped",function(r){return I(e),x(y(2).handleFileDrop(r))}),S(3,"dot-binary-field-ui-message",11)(4,"button",12),P("click",function(){return I(e),x(y(2).openFilePicker())}),H(5),We(6,"dm"),D()()(),S(7,"input",13,14),P("change",function(r){return I(e),x(y(2).handleFileSelection(r))}),D()(),S(9,"div",15)(10,"p-button",16),P("click",function(){I(e);const r=y(2);return x(r.openDialog(r.BinaryFieldMode.URL))}),We(11,"dm"),D(),S(12,"p-button",17),P("click",function(){I(e);const r=y(2);return x(r.openDialog(r.BinaryFieldMode.EDITOR))}),We(13,"dm"),D()(),le()}if(2&n){const e=y().ngIf,i=y();v(1),g("ngClass",te(14,obe,e.dropZoneActive)),v(1),g("accept",i.accept)("maxFileSize",i.maxFileSize),v(1),g("uiMessage",e.uiMessage),v(2),xt(" ",Je(6,8,"dot.binary.field.action.choose.file")," "),v(2),g("accept",i.accept.join(",")),v(3),g("label",Je(11,10,"dot.binary.field.action.import.from.url")),v(2),g("label",Je(13,12,"dot.binary.field.action.create.new.file"))}}function abe(n,t){1&n&&F(0,"dot-spinner",18)}function lbe(n,t){if(1&n){const e=q();S(0,"dot-binary-field-preview",19),P("removeFile",function(){return I(e),x(y(2).removeFile())})("editFile",function(){return I(e),x(y(2).onEditFile())})("editImage",function(){return I(e),x(y(2).onEditImage())}),D()}if(2&n){const e=y().ngIf;g("file",e.file)("editableImage",e.isEnterprise)}}function cbe(n,t){if(1&n){const e=q();S(0,"dot-dot-binary-field-url-mode",20),P("tempFileUploaded",function(r){return I(e),x(y(2).setTempFile(r))})("cancel",function(){return I(e),x(y(2).closeDialog())}),D()}}function ube(n,t){if(1&n){const e=q();S(0,"dot-dot-binary-field-editor",21),P("tempFileUploaded",function(r){return I(e),x(y(2).setTempFile(r))})("cancel",function(){return I(e),x(y(2).closeDialog())}),D()}if(2&n){const e=y().ngIf;g("fileName",null==e.file?null:e.file.name)("fileContent",null==e.file?null:e.file.content)}}const dbe=function(n,t){return{"binary-field__container--uploading":n,"binary-field__container--empty":t}},hbe=function(){return{}};function pbe(n,t){if(1&n){const e=q();S(0,"div",1),C(1,sbe,14,16,"ng-container",2),C(2,abe,1,0,"dot-spinner",3),C(3,lbe,1,2,"dot-binary-field-preview",4),S(4,"p-dialog",5),P("visibleChange",function(r){return I(e),x(y().dialogOpen=r)}),We(5,"dm"),ae(6,6),C(7,cbe,1,0,"dot-dot-binary-field-url-mode",7),C(8,ube,1,2,"dot-dot-binary-field-editor",8),le(),D()()}if(2&n){const e=t.ngIf,i=y();g("ngClass",lt(20,dbe,e.status===i.BinaryFieldStatus.UPLOADING,e.status===i.BinaryFieldStatus.INIT)),v(1),g("ngIf",e.status===i.BinaryFieldStatus.INIT),v(1),g("ngIf",e.status===i.BinaryFieldStatus.UPLOADING),v(1),g("ngIf",e.status===i.BinaryFieldStatus.PREVIEW),v(1),jt(e.mode===i.BinaryFieldMode.EDITOR?i.dialogFullScreenStyles:hn(23,hbe)),g("visible",i.dialogOpen)("keepInViewport",!1)("modal",!0)("header",Je(5,18,i.dialogHeaderMap[e.mode]))("draggable",!1)("resizable",!1)("closeOnEscape",!1)("appendTo","body")("maskStyleClass","p-dialog-mask-transparent"),v(2),g("ngSwitch",e.mode),v(1),g("ngSwitchCase",i.BinaryFieldMode.URL),v(1),g("ngSwitchCase",i.BinaryFieldMode.EDITOR)}}let Mv=(()=>{class n{constructor(e,i,r,o,s){this.dotBinaryFieldStore=e,this.dotMessageService=i,this.dotBinaryFieldEditImageService=r,this.DotBinaryFieldValidatorService=o,this.cd=s,this.valueUpdated=new R,this.dialogFullScreenStyles={height:"90%",width:"90%"},this.dialogHeaderMap={[ia.URL]:"dot.binary.field.dialog.import.from.url.header",[ia.EDITOR]:"dot.binary.field.dialog.create.new.file.header"},this.BinaryFieldStatus=Fr,this.BinaryFieldMode=ia,this.vm$=this.dotBinaryFieldStore.vm$,this.tempId="",this.dialogOpen=!1,this.dotMessageService.init()}get variable(){return this.field.variable}get metaDataKey(){const{baseType:e}=this.contentlet;return"FILEASSET"===e?"metaData":this.variable+"MetaData"}get maxFileSize(){return this.DotBinaryFieldValidatorService.maxFileSize}get accept(){return this.DotBinaryFieldValidatorService.accept}ngOnInit(){this.dotBinaryFieldStore.value$.pipe(ND(1)).subscribe(e=>{this.tempId=e,this.valueUpdated.emit(e),this.onChange&&(this.onChange(e),this.onTouched())}),this.dotBinaryFieldEditImageService.editedImage().pipe($t(e=>!!e),Mt(()=>this.dotBinaryFieldStore.setStatus(Fr.UPLOADING)),function xve(n,t=wc){const i=function Ive(n){return n instanceof Date&&!isNaN(+n)}(n)?+n-t.now():Math.abs(n);return r=>r.lift(new Ove(i,t))}(500)).subscribe(e=>this.setTempFile(e)),this.dotBinaryFieldStore.setMaxFileSize(this.maxFileSize)}ngAfterViewInit(){this.setFieldVariables(),this.existFileMetadata()&&this.setPreviewFile(),this.cd.detectChanges()}writeValue(){}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnDestroy(){this.dotBinaryFieldEditImageService.removeListener()}openDialog(e){this.dialogOpen=!0,this.dotBinaryFieldStore.setMode(e)}closeDialog(){this.dialogOpen=!1,this.dotBinaryFieldStore.setMode(ia.DROPZONE)}openFilePicker(){this.inputFile.nativeElement.click()}handleFileSelection(e){this.dotBinaryFieldStore.handleUploadFile(e.target.files[0])}removeFile(){this.dotBinaryFieldStore.removeFile()}setTempFile(e){this.dotBinaryFieldStore.setTempFile(e),this.closeDialog()}onEditFile(){this.openDialog(ia.EDITOR)}onEditImage(){this.dotBinaryFieldEditImageService.openImageEditor({inode:this.contentlet?.inode,tempId:this.tempId,variable:this.field.variable})}setDropZoneActiveState(e){this.dotBinaryFieldStore.setDropZoneActive(e)}handleFileDrop({validity:e,file:i}){e.valid?this.dotBinaryFieldStore.handleUploadFile(i):this.handleFileDropError(e)}setPreviewFile(){const{titleImage:e,inode:i,[this.metaDataKey]:r,[this.variable]:o}=this.contentlet,{contentType:s}=r;this.dotBinaryFieldStore.setFileAndContent({inode:i,titleImage:e,mimeType:s,url:o,...r})}setFieldVariables(){const{accept:e,maxFileSize:i=0}=this.getFieldVariables();this.DotBinaryFieldValidatorService.setAccept(e?e.split(","):[]),this.DotBinaryFieldValidatorService.setMaxFileSize(Number(i))}getFieldVariables(){return this.field?.fieldVariables.reduce((e,{key:i,value:r})=>({...e,[i]:r}),{})}handleFileDropError({errorsType:e}){const i={[Aa.FILE_TYPE_MISMATCH]:this.accept.join(", "),[Aa.MAX_FILE_SIZE_EXCEEDED]:`${this.maxFileSize} bytes`},r=e[0],o=Tv(r,i[r]);this.dotBinaryFieldStore.invalidFile(o)}existFileMetadata(){return!!this.contentlet&&!!this.contentlet[this.metaDataKey]}}return n.\u0275fac=function(e){return new(e||n)(O(b5),O(ka),O(v5),O(bf),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-edit-content-binary-field"]],viewQuery:function(e,i){if(1&e&&Ee(rbe,5),2&e){let r;J(r=X())&&(i.inputFile=r.first)}},inputs:{field:"field",contentlet:"contentlet"},outputs:{valueUpdated:"valueUpdated"},standalone:!0,features:[Ie([b5,RL,v5,bf,{multi:!0,provide:Cn,useExisting:Ue(()=>n)}]),Zt],decls:2,vars:3,consts:[["class","binary-field__container",3,"ngClass",4,"ngIf"],[1,"binary-field__container",3,"ngClass"],[4,"ngIf"],["data-testId","loading",4,"ngIf"],["data-testId","preview",3,"file","editableImage","removeFile","editFile","editImage",4,"ngIf"],[3,"visible","keepInViewport","modal","header","draggable","resizable","closeOnEscape","appendTo","maskStyleClass","visibleChange"],[3,"ngSwitch"],["data-testId","url-mode",3,"tempFileUploaded","cancel",4,"ngSwitchCase"],["data-testId","editor-mode",3,"fileName","fileContent","tempFileUploaded","cancel",4,"ngSwitchCase"],[1,"binary-field__drop-zone",3,"ngClass"],["data-testId","dropzone",3,"accept","maxFileSize","fileDragOver","fileDragLeave","fileDropped"],[3,"uiMessage"],["type","button","data-testId","choose-file-btn",1,"binary-field__drop-zone-btn",3,"click"],["type","file","data-testId","binary-field__file-input",3,"accept","change"],["inputFile",""],[1,"binary-field__actions"],["data-testId","action-url-btn","styleClass","p-button-link p-button-secondary p-button-sm","icon","pi pi-link",3,"label","click"],["data-testId","action-editor-btn","styleClass","p-button-link p-button-secondary p-button-sm","icon","pi pi-code",3,"label","click"],["data-testId","loading"],["data-testId","preview",3,"file","editableImage","removeFile","editFile","editImage"],["data-testId","url-mode",3,"tempFileUploaded","cancel"],["data-testId","editor-mode",3,"fileName","fileContent","tempFileUploaded","cancel"]],template:function(e,i){1&e&&(C(0,pbe,9,24,"div",0),We(1,"async")),2&e&&g("ngIf",Je(1,1,i.vm$))},dependencies:[Be,Lt,Ge,Fs,Vl,zl,di,ed,Bj,zj,DJ,Mg,Zo,qve,I_,mD,Og,Rve,rc,tbe,Wve],styles:["[_nghost-%COMP%]{display:block;container-type:inline-size;container-name:binaryField}.binary-field__container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;border-radius:.375rem;border:1.5px solid #d1d4db;padding:.5rem;height:12.5rem;min-width:12.5rem}.binary-field__container--uploading[_ngcontent-%COMP%]{border:1.5px dashed #d1d4db}.binary-field__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;justify-content:center;align-items:flex-start}.binary-field__actions[_ngcontent-%COMP%] .p-button[_ngcontent-%COMP%]{display:inline-flex;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center}.binary-field__drop-zone[_ngcontent-%COMP%]{border:1.5px dashed #afb3c0;border-radius:.375rem;margin-right:.5rem;height:100%;flex:1;overflow:auto}.binary-field__drop-zone-btn[_ngcontent-%COMP%]{border:none;background:none;color:var(--color-palette-primary-500);text-decoration:underline;font-size:1rem;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;padding:revert;cursor:pointer}.binary-field__drop-zone--active[_ngcontent-%COMP%]{border-radius:.375rem;border-color:var(--color-palette-secondary-500);background:#ffffff;box-shadow:0 0 4px #14151a0a,0 8px 16px #14151a14}input[type=file][_ngcontent-%COMP%]{display:none}@container binaryField (max-width: 306px){.binary-field__container--empty[_ngcontent-%COMP%]{height:auto;flex-direction:column;justify-content:center;align-items:flex-start}.binary-field__drop-zone[_ngcontent-%COMP%]{width:100%;margin:0;margin-bottom:.5rem}}"],changeDetection:0}),n})();const fbe=["container"],mbe=["inputfield"],gbe=["contentWrapper"];function _be(n,t){if(1&n){const e=q();S(0,"i",8),P("click",function(){return I(e),x(y(2).clear())}),D()}}function ybe(n,t){if(1&n){const e=q();S(0,"button",9),P("click",function(r){I(e),y();const o=Pe(1);return x(y().onButtonClick(r,o))}),D()}if(2&n){const e=y(2);g("icon",e.icon)("disabled",e.disabled),pe("aria-label",e.iconAriaLabel)}}function vbe(n,t){if(1&n){const e=q();S(0,"input",4,5),P("focus",function(r){return I(e),x(y().onInputFocus(r))})("keydown",function(r){return I(e),x(y().onInputKeydown(r))})("click",function(){return I(e),x(y().onInputClick())})("blur",function(r){return I(e),x(y().onInputBlur(r))})("input",function(r){return I(e),x(y().onUserInput(r))}),D(),C(2,_be,1,0,"i",6),C(3,ybe,1,3,"button",7)}if(2&n){const e=y();Ke(e.inputStyleClass),g("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),pe("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),v(2),g("ngIf",e.showClear&&!e.disabled&&null!=e.value),v(1),g("ngIf",e.showIcon)}}function bbe(n,t){1&n&&ce(0)}function Cbe(n,t){if(1&n){const e=q();S(0,"button",30),P("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(4).onPrevButtonClick(r))}),F(1,"span",31),D()}}function wbe(n,t){if(1&n){const e=q();S(0,"button",32),P("click",function(r){return I(e),x(y(4).switchToMonthView(r))})("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))}),H(1),D()}if(2&n){const e=y().$implicit,i=y(3);g("disabled",i.switchViewButtonDisabled()),v(1),xt(" ",i.getMonthName(e.month)," ")}}function Sbe(n,t){if(1&n){const e=q();S(0,"button",33),P("click",function(r){return I(e),x(y(4).switchToYearView(r))})("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))}),H(1),D()}if(2&n){const e=y().$implicit,i=y(3);g("disabled",i.switchViewButtonDisabled()),v(1),xt(" ",i.getYear(e)," ")}}function Dbe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(5);v(1),ya("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function Tbe(n,t){1&n&&ce(0)}const C5=function(n){return{$implicit:n}};function Mbe(n,t){if(1&n&&(S(0,"span",34),C(1,Dbe,2,2,"ng-container",13),C(2,Tbe,1,0,"ng-container",35),D()),2&n){const e=y(4);v(1),g("ngIf",!e.decadeTemplate),v(1),g("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",te(3,C5,e.yearPickerValues))}}function Ebe(n,t){if(1&n&&(S(0,"th",41)(1,"span"),H(2),D()()),2&n){const e=y(5);v(2),ve(e.getTranslation("weekHeader"))}}function Ibe(n,t){if(1&n&&(S(0,"th",42)(1,"span"),H(2),D()()),2&n){const e=t.$implicit;v(2),ve(e)}}function xbe(n,t){if(1&n&&(S(0,"td",45)(1,"span",46),H(2),D()()),2&n){const e=y().index,i=y(2).$implicit;v(2),xt(" ",i.weekNumbers[e]," ")}}function Obe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2).$implicit;v(1),ve(e.day)}}function kbe(n,t){1&n&&ce(0)}const w5=function(n,t){return{"p-highlight":n,"p-disabled":t}};function Abe(n,t){if(1&n){const e=q();ae(0),S(1,"span",48),P("click",function(r){I(e);const o=y().$implicit;return x(y(6).onDateSelect(r,o))})("keydown",function(r){I(e);const o=y().$implicit,s=y(3).index;return x(y(3).onDateCellKeydown(r,o,s))}),C(2,Obe,2,1,"ng-container",13),C(3,kbe,1,0,"ng-container",35),D(),le()}if(2&n){const e=y().$implicit,i=y(6);v(1),g("ngClass",lt(4,w5,i.isSelected(e),!e.selectable)),v(1),g("ngIf",!i.dateTemplate),v(1),g("ngTemplateOutlet",i.dateTemplate)("ngTemplateOutletContext",te(7,C5,e))}}const Nbe=function(n,t){return{"p-datepicker-other-month":n,"p-datepicker-today":t}};function Lbe(n,t){if(1&n&&(S(0,"td",47),C(1,Abe,4,9,"ng-container",13),D()),2&n){const e=t.$implicit,i=y(6);g("ngClass",lt(2,Nbe,e.otherMonth,e.today)),v(1),g("ngIf",!e.otherMonth||i.showOtherMonths)}}function Pbe(n,t){if(1&n&&(S(0,"tr"),C(1,xbe,3,1,"td",43),C(2,Lbe,2,5,"td",44),D()),2&n){const e=t.$implicit,i=y(5);v(1),g("ngIf",i.showWeek),v(1),g("ngForOf",e)}}function Rbe(n,t){if(1&n&&(S(0,"div",36)(1,"table",37)(2,"thead")(3,"tr"),C(4,Ebe,3,1,"th",38),C(5,Ibe,3,1,"th",39),D()(),S(6,"tbody"),C(7,Pbe,3,2,"tr",40),D()()()),2&n){const e=y().$implicit,i=y(3);v(4),g("ngIf",i.showWeek),v(1),g("ngForOf",i.weekDays),v(2),g("ngForOf",e.dates)}}function Fbe(n,t){if(1&n){const e=q();S(0,"div",20)(1,"div",21),C(2,Cbe,2,0,"button",22),S(3,"div",23),C(4,wbe,2,2,"button",24),C(5,Sbe,2,2,"button",25),C(6,Mbe,3,5,"span",26),D(),S(7,"button",27),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).onNextButtonClick(r))}),F(8,"span",28),D()(),C(9,Rbe,8,3,"div",29),D()}if(2&n){const e=t.index,i=y(3);v(2),g("ngIf",0===e),v(2),g("ngIf","date"===i.currentView),v(1),g("ngIf","year"!==i.currentView),v(1),g("ngIf","year"===i.currentView),v(1),As("display",1===i.numberOfMonths||e===i.numberOfMonths-1?"inline-flex":"none"),v(2),g("ngIf","date"===i.currentView)}}function jbe(n,t){if(1&n){const e=q();S(0,"span",51),P("click",function(r){const s=I(e).index;return x(y(4).onMonthSelect(r,s))})("keydown",function(r){const s=I(e).index;return x(y(4).onMonthCellKeydown(r,s))}),H(1),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(4);g("ngClass",lt(2,w5,r.isMonthSelected(i),r.isMonthDisabled(i))),v(1),xt(" ",e," ")}}function Vbe(n,t){if(1&n&&(S(0,"div",49),C(1,jbe,2,5,"span",50),D()),2&n){const e=y(3);v(1),g("ngForOf",e.monthPickerValues())}}const zbe=function(n){return{"p-highlight":n}};function Bbe(n,t){if(1&n){const e=q();S(0,"span",54),P("click",function(r){const s=I(e).$implicit;return x(y(4).onYearSelect(r,s))})("keydown",function(r){const s=I(e).$implicit;return x(y(4).onYearCellKeydown(r,s))}),H(1),D()}if(2&n){const e=t.$implicit,i=y(4);g("ngClass",te(2,zbe,i.isYearSelected(e))),v(1),xt(" ",e," ")}}function Ube(n,t){if(1&n&&(S(0,"div",52),C(1,Bbe,2,4,"span",53),D()),2&n){const e=y(3);v(1),g("ngForOf",e.yearPickerValues())}}function Hbe(n,t){if(1&n&&(ae(0),S(1,"div",16),C(2,Fbe,10,7,"div",17),D(),C(3,Vbe,2,1,"div",18),C(4,Ube,2,1,"div",19),le()),2&n){const e=y(2);v(2),g("ngForOf",e.months),v(1),g("ngIf","month"===e.currentView),v(1),g("ngIf","year"===e.currentView)}}function $be(n,t){1&n&&(ae(0),H(1,"0"),le())}function Wbe(n,t){1&n&&(ae(0),H(1,"0"),le())}function Gbe(n,t){if(1&n&&(S(0,"div",60)(1,"span"),H(2),D()()),2&n){const e=y(3);v(2),ve(e.timeSeparator)}}function qbe(n,t){1&n&&(ae(0),H(1,"0"),le())}function Kbe(n,t){if(1&n){const e=q();S(0,"div",65)(1,"button",57),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(3).incrementSecond(r))})("keydown.space",function(r){return I(e),x(y(3).incrementSecond(r))})("mousedown",function(r){return I(e),x(y(3).onTimePickerElementMouseDown(r,2,1))})("mouseup",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(3).onTimePickerElementMouseLeave())}),F(2,"span",58),D(),S(3,"span"),C(4,qbe,2,0,"ng-container",13),H(5),D(),S(6,"button",57),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(3).decrementSecond(r))})("keydown.space",function(r){return I(e),x(y(3).decrementSecond(r))})("mousedown",function(r){return I(e),x(y(3).onTimePickerElementMouseDown(r,2,-1))})("mouseup",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(3).onTimePickerElementMouseLeave())}),F(7,"span",59),D()()}if(2&n){const e=y(3);v(4),g("ngIf",e.currentSecond<10),v(1),ve(e.currentSecond)}}function Ybe(n,t){if(1&n){const e=q();S(0,"div",66)(1,"button",67),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).toggleAMPM(r))})("keydown.enter",function(r){return I(e),x(y(3).toggleAMPM(r))}),F(2,"span",58),D(),S(3,"span"),H(4),D(),S(5,"button",67),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).toggleAMPM(r))})("keydown.enter",function(r){return I(e),x(y(3).toggleAMPM(r))}),F(6,"span",59),D()()}if(2&n){const e=y(3);v(4),ve(e.pm?"PM":"AM")}}function Qbe(n,t){if(1&n){const e=q();S(0,"div",55)(1,"div",56)(2,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).incrementHour(r))})("keydown.space",function(r){return I(e),x(y(2).incrementHour(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,0,1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(3,"span",58),D(),S(4,"span"),C(5,$be,2,0,"ng-container",13),H(6),D(),S(7,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).decrementHour(r))})("keydown.space",function(r){return I(e),x(y(2).decrementHour(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,0,-1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(8,"span",59),D()(),S(9,"div",60)(10,"span"),H(11),D()(),S(12,"div",61)(13,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).incrementMinute(r))})("keydown.space",function(r){return I(e),x(y(2).incrementMinute(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,1,1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(14,"span",58),D(),S(15,"span"),C(16,Wbe,2,0,"ng-container",13),H(17),D(),S(18,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).decrementMinute(r))})("keydown.space",function(r){return I(e),x(y(2).decrementMinute(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,1,-1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(19,"span",59),D()(),C(20,Gbe,3,1,"div",62),C(21,Kbe,8,2,"div",63),C(22,Ybe,7,1,"div",64),D()}if(2&n){const e=y(2);v(5),g("ngIf",e.currentHour<10),v(1),ve(e.currentHour),v(5),ve(e.timeSeparator),v(5),g("ngIf",e.currentMinute<10),v(1),ve(e.currentMinute),v(3),g("ngIf",e.showSeconds),v(1),g("ngIf",e.showSeconds),v(1),g("ngIf","12"==e.hourFormat)}}const S5=function(n){return[n]};function Zbe(n,t){if(1&n){const e=q();S(0,"div",68)(1,"button",69),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(2).onTodayButtonClick(r))}),D(),S(2,"button",69),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(2).onClearButtonClick(r))}),D()()}if(2&n){const e=y(2);v(1),g("label",e.getTranslation("today"))("ngClass",te(4,S5,e.todayButtonStyleClass)),v(1),g("label",e.getTranslation("clear"))("ngClass",te(6,S5,e.clearButtonStyleClass))}}function Jbe(n,t){1&n&&ce(0)}const Xbe=function(n,t,e,i,r,o){return{"p-datepicker p-component":!0,"p-datepicker-inline":n,"p-disabled":t,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":i,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}},D5=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},eCe=function(n){return{value:"visibleTouchUI",params:n}},tCe=function(n){return{value:"visible",params:n}};function nCe(n,t){if(1&n){const e=q();S(0,"div",10,11),P("@overlayAnimation.start",function(r){return I(e),x(y().onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){return I(e),x(y().onOverlayAnimationDone(r))})("click",function(r){return I(e),x(y().onOverlayClick(r))}),ln(2),C(3,bbe,1,0,"ng-container",12),C(4,Hbe,5,3,"ng-container",13),C(5,Qbe,23,8,"div",14),C(6,Zbe,3,8,"div",15),ln(7,1),C(8,Jbe,1,0,"ng-container",12),D()}if(2&n){const e=y();Ke(e.panelStyleClass),g("ngStyle",e.panelStyle)("ngClass",function eO(n,t,e,i,r,o,s,a,l){const c=Ri()+n,u=W(),d=Ur(u,c,e,i,r,o);return Nl(u,c+4,s,a)||d?Ho(u,c+6,l?t.call(l,e,i,r,o,s,a):t(e,i,r,o,s,a)):yh(u,c+6)}(11,Xbe,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?te(21,eCe,lt(18,D5,e.showTransitionOptions,e.hideTransitionOptions)):te(26,tCe,lt(23,D5,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),v(3),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",!e.timeOnly),v(1),g("ngIf",(e.showTime||e.timeOnly)&&"date"===e.currentView),v(1),g("ngIf",e.showButtonBar),v(2),g("ngTemplateOutlet",e.footerTemplate)}}const iCe=[[["p-header"]],[["p-footer"]]],rCe=function(n,t,e,i){return{"p-calendar":!0,"p-calendar-w-btn":n,"p-calendar-timeonly":t,"p-calendar-disabled":e,"p-focus":i}},oCe=["p-header","p-footer"],sCe={provide:Cn,useExisting:Ue(()=>T5),multi:!0};let T5=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.showClear=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new R,this.onBlur=new R,this.onClose=new R,this.onSelect=new R,this.onClear=new R,this.onInput=new R,this.onTodayClick=new R,this.onClearClick=new R,this.onMonthChange=new R,this.onYearChange=new R,this.onClickOutside=new R,this.onShow=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(l,c){return"12"==this.hourFormat?12===l?c?12:0:c?l+12:l:l}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const i=e.split(":"),r=parseInt(i[0]),o=parseInt(i[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=D_();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=A.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let r=e;r<=i;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(Ln.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(i[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(i+r);return e}createMonths(e,i){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=i+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let i=new Date(e.getTime());i.setDate(i.getDate()+4-(i.getDay()||7));let r=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((r-i.getTime())/864e5)/7)+1}createMonth(e,i){let r=[],o=this.getFirstDayOfMonthIndex(e,i),s=this.getDaysCountInMonth(e,i),a=this.getDaysCountInPrevMonth(e,i),l=1,c=new Date,u=[],d=Math.ceil((s+o)/7);for(let h=0;hs){let m=this.getNextMonthAndYear(e,i);p.push({day:l-s,month:m.month,year:m.year,otherMonth:!0,today:this.isToday(c,l-s,m.month,m.year),selectable:this.isSelectable(l-s,m.month,m.year,!0)})}else p.push({day:l,month:e,year:i,today:this.isToday(c,l,e,i),selectable:this.isSelectable(l,e,i,!1)});l++}this.showWeek&&u.push(this.getWeekNumber(new Date(p[0].year,p[0].month,p[0].day))),r.push(p)}return{month:e,year:i,dates:r,weekNumbers:u}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,i){!this.disabled&&i.selectable?(this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,i)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,i){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){"year"===this.view?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let i=new Date(e.year,e.month,e.day);if(this.showTime&&(i.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=i:(r=i,o=null),this.updateModel([r,o])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;this.value&&(i=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(i);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let r=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,i){let r,o;return 0===e?(r=11,o=i-1):(r=e-1,o=i),{month:r,year:o}}getNextMonthAndYear(e,i){let r,o;return 11===e?(r=0,o=i+1):(r=e+1,o=i),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let r of this.value)if(i=this.isDateEquals(r,e),i)break;return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()&&!this.isMultipleSelection()){const[i,r]=this.isRangeSelection()?this.value:[this.value,this.value],o=new Date(this.currentYear,e,1);return o>=i&&o<=(r??i)}return!1}isMonthDisabled(e){for(let i=1;i=s.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,i,r,o){return e.getDate()===i&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,i,r,o){let s=!0,a=!0,l=!0,c=!0;return!(o&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(A.getFocusableElements(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,r){const o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=A.index(s),l=s.parentElement.nextElementSibling;l?A.hasClass(l.children[a].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(l.children[a].children[0].tabIndex="0",l.children[a].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{o.tabIndex="-1";let a=A.index(s),l=s.parentElement.previousElementSibling;if(l){let c=l.children[a].children[0];A.hasClass(c,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(c.tabIndex="0",c.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let l=a.children[0];A.hasClass(l,"p-disabled")||A.hasClass(l.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let l=a.children[0];A.hasClass(l,"p-disabled")?this.navigateToMonth(!1,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=A.index(r);let a=o[40===e.which?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,i),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=A.index(r);let a=o[40===e.which?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,i){if(e)if(1===this.numberOfMonths||0===i)this.navigationState={backward:!0},this.navBackward(event);else{let o=A.find(this.contentViewChild.nativeElement.children[i-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(1===this.numberOfMonths||i===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let o=A.findSingle(this.contentViewChild.nativeElement.children[i+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?A.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():A.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let i;i=A.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else e=A.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){const e=this.contentViewChild?.nativeElement;let i;if("month"===this.currentView){let r=A.find(e,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),o=A.findSingle(e,".p-monthpicker .p-monthpicker-month.p-highlight");r.forEach(s=>s.tabIndex=-1),i=o||r[0],0===r.length&&A.find(e,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if("year"===this.currentView){let r=A.find(e,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),o=A.findSingle(e,".p-yearpicker .p-yearpicker-year.p-highlight");r.forEach(s=>s.tabIndex=-1),i=o||r[0],0===r.length&&A.find(e,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(i=A.findSingle(e,"span.p-highlight"),!i){let r=A.findSingle(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");i=r||A.findSingle(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}i&&(i.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.disabled||i.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=A.getFocusableElements(this.contentViewChild.nativeElement);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==r||0===r)if(this.focusTrap)i[i.length-1].focus();else{if(-1===r)return this.hideOverlay();if(0===r)return}else i[r-1].focus();else if(-1==r||r===i.length-1){if(!this.focusTrap&&-1!=r)return this.hideOverlay();i[0].focus()}else i[r+1].focus()}else i[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,i,r,o){let s=this.value;const a=this.convertTo24Hour(e,o);this.isRangeSelection()&&(s=this.value[1]||this.value[0]),this.isMultipleSelection()&&(s=this.value[this.value.length-1]);const l=s?s.toDateString():null;return!(this.minDate&&l&&this.minDate.toDateString()===l&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>i||this.minDate.getMinutes()===i&&this.minDate.getSeconds()>r))||this.maxDate&&l&&this.maxDate.toDateString()===l&&(this.maxDate.getHours()=24?r-24:r:"12"==this.hourFormat&&(this.currentHour<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,i,r){this.disabled||(this.repeat(e,null,i,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,r,o){let s=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:1===o?this.incrementHour(e):this.decrementHour(e);break;case 1:1===o?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===o?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=this.currentHour-this.stepHour,r=this.pm;"24"==this.hourFormat?i=i<0?24+i:i:"12"==this.hourFormat&&(12===this.currentHour&&(r=!this.pm),i=i<=0?12+i:i),this.validateTime(i,this.currentMinute,this.currentSecond,r)&&(this.currentHour=i,this.pm=r),e.preventDefault()}incrementMinute(e){let i=this.currentMinute+this.stepMinute;i=i>59?i-60:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}decrementMinute(e){let i=this.currentMinute-this.stepMinute;i=i<0?60+i:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const i=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,i)&&(this.pm=i,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let r=this.parseValueFromString(i);this.isValidSelection(r)&&(this.updateModel(r),this.updateUI())}catch{this.updateModel(this.keepInvalid?i:null)}this.filled=null!=i&&i.length,this.onInput.emit(e)}isValidSelection(e){let i=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(i=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(i=e.length>1&&e[1]>e[0]),i}parseValueFromString(e){if(!e||0===e.trim().length)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);i=[];for(let o of r)i.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");i=[];for(let o=0;o{this.disableModality()}),document.body.appendChild(this.mask),A.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(A.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){if(!this.mask)return;document.body.removeChild(this.mask);let i,e=document.body.children;for(let r=0;r{const d=r+1{let p=""+d;if(o(u))for(;p.lengtho(u)?p[d]:h[d];let l="",c=!1;if(e)for(r=0;r11&&12!=r&&(r-=12),i+="12"==this.hourFormat&&0===r?12:r<10?"0"+r:r,i+=":",i+=o<10?"0"+o:o,this.showSeconds&&(i+=":",i+=s<10?"0"+s:s),"12"==this.hourFormat&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":");if(i.length!==(this.showSeconds?3:2))throw"Invalid time";let o=parseInt(i[0]),s=parseInt(i[1]),a=this.showSeconds?parseInt(i[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||"12"==this.hourFormat&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==o&&this.pm?o+=12:!this.pm&&12===o&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,i){if(null==i||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let r,o,s,f,a=0,l="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),c=-1,u=-1,d=-1,h=-1,p=!1,m=M=>{let w=r+1{let w=m(M),N="@"===M?14:"!"===M?20:"y"===M&&w?4:"o"===M?3:2,$=new RegExp("^\\d{"+("y"===M?N:1)+","+N+"}"),V=e.substring(a).match($);if(!V)throw"Missing number at position "+a;return a+=V[0].length,parseInt(V[0],10)},b=(M,w,N)=>{let k=-1,$=m(M)?N:w,V=[];for(let he=0;he<$.length;he++)V.push([he,$[he]]);V.sort((he,De)=>-(he[1].length-De[1].length));for(let he=0;he{if(e.charAt(a)!==i.charAt(r))throw"Unexpected literal at position "+a;a++};for("month"===this.view&&(d=1),r=0;r-1)for(u=1,d=h;o=this.getDaysCountInMonth(c,u-1),!(d<=o);)u++,d-=o;if("year"===this.view&&(u=-1===u?1:u,d=-1===d?1:d),f=this.daylightSavingAdjust(new Date(c,u-1,d)),f.getFullYear()!==c||f.getMonth()+1!==u||f.getDate()!==d)throw"Invalid date";return f}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let i=new Date,r={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(r=>!(!r.breakpoint||!r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new E_(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return A.hasClass(e.target,"p-datepicker-prev")||A.hasClass(e.target,"p-datepicker-prev-icon")||A.hasClass(e.target,"p-datepicker-next")||A.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!A.isTouchDevice()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&$i.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(nt),O(Eo),O(yp))},n.\u0275cmp=Y({type:n,selectors:[["p-calendar"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(fbe,5),Ee(mbe,5),Ee(gbe,5)),2&e){let r;J(r=X())&&(i.containerViewChild=r.first),J(r=X())&&(i.inputfieldViewChild=r.first),J(r=X())&&(i.content=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,i){2&e&&Si("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus)("p-calendar-clearable",i.showClear&&!i.disabled)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Ie([sCe])],ngContentSelectors:oCe,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["class","p-calendar-clear-icon pi pi-times",3,"click",4,"ngIf"],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],[1,"p-calendar-clear-icon","pi","pi-times",3,"click"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,i){1&e&&(ai(iCe),S(0,"span",0,1),C(2,vbe,4,17,"ng-template",2),C(3,nCe,9,28,"div",3),D()),2&e&&(Ke(i.styleClass),g("ngClass",va(6,rCe,i.showIcon,i.timeOnly,i.disabled,i.focus))("ngStyle",i.style),v(2),g("ngIf",!i.inline),v(1),g("ngIf",i.inline||i.overlayVisible))},dependencies:[Lt,Un,Ge,Zn,fn,Nr,Xr],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-calendar-clearable{position:relative}\n"],encapsulation:2,data:{animation:[Wl("overlayAnimation",[zu("visibleTouchUI",Pt({transform:"translate(-50%,-50%)",opacity:1})),Ui("void => visible",[Pt({opacity:0,transform:"scaleY(0.8)"}),Bi("{{showTransitionParams}}",Pt({opacity:1,transform:"*"}))]),Ui("visible => void",[Bi("{{hideTransitionParams}}",Pt({opacity:0}))]),Ui("void => visibleTouchUI",[Pt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Bi("{{showTransitionParams}}")]),Ui("visibleTouchUI => void",[Bi("{{hideTransitionParams}}",Pt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),n})();function uCe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y();v(1),ve(e.label)}}function dCe(n,t){1&n&&ce(0)}const Cf=function(n){return{height:n}},hCe=function(n,t){return{"p-highlight":n,"p-disabled":t}},pCe=function(n){return{"p-highlight":n}},x5=function(n){return{"pi pi-check":n}},wf=function(n){return{$implicit:n}},fCe=["container"],mCe=["overlay"],gCe=["filterInput"],_Ce=["in"],yCe=["items"],vCe=["scroller"];function bCe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),ve(e.valuesAsString||"empty")}}function CCe(n,t){if(1&n){const e=q();S(0,"span",20),P("click",function(r){I(e);const o=y().$implicit;return x(y(3).removeChip(o,r))}),D()}}function wCe(n,t){if(1&n&&(S(0,"div",16,17)(2,"span",18),H(3),D(),C(4,CCe,1,0,"span",19),D()),2&n){const e=t.$implicit,i=y(3);v(3),ve(i.findLabelByValue(e)),v(1),g("ngIf",!i.disabled)}}function SCe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(3);v(1),ve(e.placeholder||e.defaultLabel||"empty")}}function DCe(n,t){if(1&n&&(ae(0),C(1,wCe,5,2,"div",15),C(2,SCe,2,1,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngForOf",e.value),v(1),g("ngIf",!e.value||0===e.value.length)}}function TCe(n,t){if(1&n&&(ae(0),C(1,bCe,2,1,"ng-container",7),C(2,DCe,3,2,"ng-container",7),le()),2&n){const e=y();v(1),g("ngIf","comma"===e.display),v(1),g("ngIf","chip"===e.display)}}function MCe(n,t){1&n&&ce(0)}function ECe(n,t){if(1&n){const e=q();S(0,"i",21),P("click",function(r){return I(e),x(y().clear(r))}),D()}}function ICe(n,t){1&n&&ce(0)}function xCe(n,t){1&n&&ce(0)}const O5=function(n){return{options:n}};function OCe(n,t){if(1&n&&(ae(0),C(1,xCe,1,0,"ng-container",8),le()),2&n){const e=y(3);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,O5,e.filterOptions))}}const kCe=function(n){return{"p-checkbox-disabled":n}},ACe=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}};function NCe(n,t){if(1&n){const e=q();S(0,"div",36)(1,"div",2)(2,"input",37),P("focus",function(){return I(e),x(y(4).onHeaderCheckboxFocus())})("blur",function(){return I(e),x(y(4).onHeaderCheckboxBlur())})("keydown.space",function(r){return I(e),x(y(4).toggleAll(r))}),D()(),S(3,"div",38),P("click",function(r){return I(e),x(y(4).toggleAll(r))}),F(4,"span",39),D()()}if(2&n){const e=y(4);g("ngClass",te(6,kCe,e.disabled||e.toggleAllDisabled)),v(2),g("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),v(1),g("ngClass",Hr(8,ACe,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),pe("aria-checked",e.allChecked),v(1),g("ngClass",te(12,x5,e.allChecked))}}function LCe(n,t){if(1&n){const e=q();S(0,"div",40)(1,"input",41,42),P("input",function(r){return I(e),x(y(4).onFilterInputChange(r))}),D(),F(3,"span",43),D()}if(2&n){const e=y(4);v(1),g("value",e.filterValue||"")("disabled",e.disabled),pe("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function PCe(n,t){if(1&n){const e=q();C(0,NCe,5,14,"div",32),C(1,LCe,4,5,"div",33),S(2,"button",34),P("click",function(r){return I(e),x(y(3).close(r))}),F(3,"span",35),D()}if(2&n){const e=y(3);g("ngIf",e.showToggleAll&&!e.selectionLimit),v(1),g("ngIf",e.filter)}}function RCe(n,t){if(1&n&&(S(0,"div",28),ln(1),C(2,ICe,1,0,"ng-container",29),C(3,OCe,2,4,"ng-container",30),C(4,PCe,4,2,"ng-template",null,31,yt),D()),2&n){const e=Pe(5),i=y(2);v(2),g("ngTemplateOutlet",i.headerTemplate),v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function FCe(n,t){1&n&&ce(0)}const k5=function(n,t){return{$implicit:n,options:t}};function jCe(n,t){if(1&n&&C(0,FCe,1,0,"ng-container",8),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(6))("ngTemplateOutletContext",lt(2,k5,e,i))}}function VCe(n,t){1&n&&ce(0)}function zCe(n,t){if(1&n&&C(0,VCe,1,0,"ng-container",8),2&n){const e=t.options;g("ngTemplateOutlet",y(4).loaderTemplate)("ngTemplateOutletContext",te(2,O5,e))}}function BCe(n,t){1&n&&(ae(0),C(1,zCe,1,4,"ng-template",46),le())}function UCe(n,t){if(1&n){const e=q();S(0,"p-scroller",44,45),P("onLazyLoad",function(r){return I(e),x(y(2).onLazyLoad.emit(r))}),C(2,jCe,1,5,"ng-template",14),C(3,BCe,2,0,"ng-container",7),D()}if(2&n){const e=y(2);jt(te(9,Cf,e.scrollHeight)),g("items",e.optionsToRender)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function HCe(n,t){1&n&&ce(0)}const $Ce=function(){return{}};function WCe(n,t){if(1&n&&(ae(0),C(1,HCe,1,0,"ng-container",8),le()),2&n){y();const e=Pe(6),i=y();v(1),g("ngTemplateOutlet",e)("ngTemplateOutletContext",lt(3,k5,i.optionsToRender,hn(2,$Ce)))}}function GCe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(4);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function qCe(n,t){1&n&&ce(0)}function KCe(n,t){1&n&&ce(0)}function YCe(n,t){if(1&n&&(S(0,"li",52),C(1,GCe,2,1,"span",7),C(2,qCe,1,0,"ng-container",8),D(),C(3,KCe,1,0,"ng-container",8)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y(2);g("ngStyle",te(6,Cf,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,wf,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(10,wf,o.getOptionGroupChildren(e)))}}function QCe(n,t){if(1&n&&(ae(0),C(1,YCe,4,12,"ng-template",51),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function ZCe(n,t){1&n&&ce(0)}function JCe(n,t){if(1&n&&(ae(0),C(1,ZCe,1,0,"ng-container",8),le()),2&n){const e=y().$implicit,i=Pe(5);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,wf,e))}}function XCe(n,t){if(1&n){const e=q();S(0,"p-multiSelectItem",53),P("onClick",function(r){return I(e),x(y(4).onOptionClick(r))})("onKeydown",function(r){return I(e),x(y(4).onOptionKeydown(r))}),D()}if(2&n){const e=t.$implicit,i=y(2).options,r=y(2);g("option",e)("selected",r.isSelected(e))("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)("itemSize",i.itemSize)}}function e0e(n,t){1&n&&C(0,XCe,1,6,"ng-template",51),2&n&&g("ngForOf",t.$implicit)}function t0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function n0e(n,t){1&n&&ce(0,null,55)}function i0e(n,t){if(1&n&&(S(0,"li",54),C(1,t0e,2,1,"ng-container",30),C(2,n0e,2,0,"ng-container",29),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,Cf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),v(1),g("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function r0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyMessageLabel," ")}}function o0e(n,t){1&n&&ce(0,null,56)}function s0e(n,t){if(1&n&&(S(0,"li",54),C(1,r0e,2,1,"ng-container",30),C(2,o0e,2,0,"ng-container",29),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,Cf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function a0e(n,t){if(1&n&&(S(0,"ul",47,48),C(2,QCe,2,1,"ng-container",7),C(3,JCe,2,4,"ng-container",7),C(4,e0e,1,1,"ng-template",null,49,yt),C(6,i0e,3,6,"li",50),C(7,s0e,3,6,"li",50),D()),2&n){const e=t.options,i=y(2);jt(e.contentStyle),g("ngClass",e.contentStyleClass),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",!i.hasFilter()&&i.isEmpty())}}function l0e(n,t){1&n&&ce(0)}function c0e(n,t){if(1&n&&(S(0,"div",57),ln(1,1),C(2,l0e,1,0,"ng-container",29),D()),2&n){const e=y(2);v(2),g("ngTemplateOutlet",e.footerTemplate)}}const u0e=function(){return["p-multiselect-panel p-component"]};function d0e(n,t){if(1&n){const e=q();S(0,"div",22),P("keydown",function(r){return I(e),x(y().onKeydown(r))}),C(1,RCe,6,3,"div",23),S(2,"div",24),C(3,UCe,4,11,"p-scroller",25),C(4,WCe,2,6,"ng-container",7),C(5,a0e,8,7,"ng-template",null,26,yt),D(),C(7,c0e,3,1,"div",27),D()}if(2&n){const e=y();Ke(e.panelStyleClass),g("ngClass",hn(10,u0e))("ngStyle",e.panelStyle),v(1),g("ngIf",e.showHeader),v(1),As("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),v(1),g("ngIf",e.virtualScroll),v(1),g("ngIf",!e.virtualScroll),v(3),g("ngIf",e.footerFacet||e.footerTemplate)}}const h0e=[[["p-header"]],[["p-footer"]]],p0e=function(n,t,e,i){return{"p-multiselect p-component":!0,"p-multiselect-open":n,"p-multiselect-chip":t,"p-focus":e,"p-disabled":i}},f0e=function(n,t){return{"p-placeholder":n,"p-multiselect-label-empty":t}},m0e=function(){return{"p-multiselect-trigger":!0}},g0e=["p-header","p-footer"],_0e={provide:Cn,useExisting:Ue(()=>A5),multi:!0};let y0e=(()=>{class n{constructor(){this.onClick=new R,this.onKeydown=new R}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected})}onOptionKeydown(e){this.onKeydown.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick",onKeydown:"onKeydown"},decls:6,vars:20,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","click","keydown"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(S(0,"li",0),P("click",function(o){return i.onOptionClick(o)})("keydown",function(o){return i.onOptionKeydown(o)}),S(1,"div",1)(2,"div",2),F(3,"span",3),D()(),C(4,uCe,2,1,"span",4),C(5,dCe,1,0,"ng-container",5),D()),2&e&&(g("ngStyle",te(9,Cf,i.itemSize+"px"))("ngClass",lt(11,hCe,i.selected,i.disabled)),pe("aria-label",i.label)("tabindex",i.disabled?null:"0"),v(2),g("ngClass",te(14,pCe,i.selected)),v(1),g("ngClass",te(16,x5,i.selected)),v(1),g("ngIf",!i.template),v(1),g("ngTemplateOutlet",i.template)("ngTemplateOutletContext",te(18,wf,i.option)))},dependencies:[Lt,Ge,Zn,fn,Xr],encapsulation:2}),n})(),A5=(()=>{class n{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=l,this.filter=!0,this.displaySelectedLabel=!0,this.maxSelectedLabels=3,this.selectedItemsLabel="ellipsis",this.showToggleAll=!0,this.emptyFilterMessage="",this.emptyMessage="",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.showHeader=!0,this.scrollHeight="200px",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.display="comma",this.autocomplete="on",this.showClear=!1,this.onChange=new R,this.onFilter=new R,this.onFocus=new R,this.onBlur=new R,this.onClick=new R,this.onClear=new R,this.onPanelShow=new R,this.onPanelHide=new R,this.onLazyLoad=new R,this.onRemove=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}set defaultLabel(e){this._defaultLabel=e,this.updateLabel()}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e,this.updateLabel()}get placeholder(){return this._placeholder}get options(){return this._options}set options(e){this._options=e,this.updateLabel()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}ngOnInit(){this.updateLabel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):e&&null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):e&&null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}isOptionDisabled(e){return(this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled)||this.maxSelectionLimitReached&&!this.isSelected(e)}writeValue(e){this.value=e,this.updateLabel(),this.updateFilledState(),this.checkSelectionLimit(),this.cd.markForCheck()}checkSelectionLimit(){this.maxSelectionLimitReached=!(!this.selectionLimit||!this.value||this.value.length!==this.selectionLimit)}updateFilledState(){this.filled=this.value&&this.value.length>0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e){let i=e.option;if(this.isOptionDisabled(i))return;let r=this.getOptionValue(i),o=this.findSelectionIndex(r);-1!=o?(this.value=this.value.filter((s,a)=>a!=o),this.onRemove.emit({newValue:this.value,removed:r}),this.selectionLimit&&(this.maxSelectionLimitReached=!1)):((!this.selectionLimit||!this.value||this.value.length{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}show(){this.overlayVisible||(this.overlayVisible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck())}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild.nativeElement),this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();break;case"void":this.onModelTouched()}}hide(){this.overlayVisible=!1,this.resetFilterOnHide&&this.resetFilter(),this.onPanelHide.emit(),this.cd.markForCheck()}resetFilter(){this.filterInputChild&&this.filterInputChild.nativeElement&&(this.filterInputChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateLabel(),this.updateFilledState(),this.onClear.emit(),this.onModelChange(this.value),e.stopPropagation()}onMouseclick(e,i){this.disabled||this.readonly||e.target.isSameNode(this.accessibleViewChild.nativeElement)||(this.onClick.emit(e),!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!A.hasClass(e.target,"p-multiselect-token-icon")&&(this.overlayVisible?this.hide():this.show(),i.focus()))}removeChip(e,i){this.value=this.value.filter(r=>!Oe.equals(r,e,this.dataKey)),this.onModelChange(this.value),this.checkSelectionLimit(),this.onChange.emit({originalEvent:i,value:this.value,itemValue:e}),this.updateLabel(),this.updateFilledState()}onInputFocus(e){this.focus=!0,this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focus=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onOptionKeydown(e){if(!this.readonly)switch(e.originalEvent.which){case 40:var i=this.findNextItem(e.originalEvent.target.parentElement);i&&i.focus(),e.originalEvent.preventDefault();break;case 38:var r=this.findPrevItem(e.originalEvent.target.parentElement);r&&r.focus(),e.originalEvent.preventDefault();break;case 13:this.onOptionClick(e),e.originalEvent.preventDefault();break;case 27:case 9:this.hide()}}findNextItem(e){let i=e.nextElementSibling;return i?A.hasClass(i.children[0],"p-disabled")||A.isHidden(i.children[0])||A.hasClass(i,"p-multiselect-item-group")?this.findNextItem(i):i.children[0]:null}findPrevItem(e){let i=e.previousElementSibling;return i?A.hasClass(i.children[0],"p-disabled")||A.isHidden(i.children[0])||A.hasClass(i,"p-multiselect-item-group")?this.findPrevItem(i):i.children[0]:null}onKeydown(e){switch(e.which){case 40:!this.overlayVisible&&e.altKey&&(this.show(),e.preventDefault());break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.hide()}}updateLabel(){if(this.value&&this.options&&this.value.length&&this.displaySelectedLabel){let e="";for(let i=0;i0&&(e+=", "),e+=r)}if(this.value.length<=this.maxSelectedLabels||"ellipsis"===this.selectedItemsLabel)this.valuesAsString=e;else{let i=/{(.*?)}/;this.valuesAsString=i.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(i)[0],this.value.length+""):this.selectedItemsLabel}}else this.valuesAsString=this.placeholder||this.defaultLabel}findLabelByValue(e){if(this.group){let i=null;for(let r=0;r0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilterInputChange(e){this._filterValue=e.target.value,this.activateFilter(),this.onFilter.emit({originalEvent:e,filter:this._filterValue}),this.cd.detectChanges()}activateFilter(){if(this.hasFilter()&&this._options){let e=(this.filterBy||this.optionLabel||"label").split(",");if(this.group){let i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this.filterService.filter(this.options,e,this._filterValue,this.filterMatchMode,this.filterLocale)}else this._filteredOptions=null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(nt),O(w1),O(Eo),O(yp))},n.\u0275cmp=Y({type:n,selectors:[["p-multiSelect"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,M_,5),Vt(r,T_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Ee(fCe,5),Ee(mCe,5),Ee(gCe,5),Ee(_Ce,5),Ee(yCe,5),Ee(vCe,5)),2&e){let r;J(r=X())&&(i.containerViewChild=r.first),J(r=X())&&(i.overlayViewChild=r.first),J(r=X())&&(i.filterInputChild=r.first),J(r=X())&&(i.accessibleViewChild=r.first),J(r=X())&&(i.itemsViewChild=r.first),J(r=X())&&(i.scroller=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,i){2&e&&Si("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus||i.overlayVisible)("p-multiselect-clearable",i.showClear&&!i.disabled)},inputs:{style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",label:"label",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue",itemSize:"itemSize"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove"},features:[Ie([_0e])],ngContentSelectors:g0e,decls:15,vars:41,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","readonly","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[1,"p-multiselect-label",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-multiselect-clear-icon pi pi-times",3,"click",4,"ngIf"],[3,"ngClass"],[1,"p-multiselect-trigger-icon",3,"ngClass"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],["class","p-multiselect-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-multiselect-token-icon","pi","pi-times-circle",3,"click"],[1,"p-multiselect-clear-icon","pi","pi-times",3,"click"],[3,"ngClass","ngStyle","keydown"],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["class","p-multiselect-footer",4,"ngIf"],[1,"p-multiselect-header"],[4,"ngTemplateOutlet"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link",3,"click"],[1,"p-multiselect-close-icon","pi","pi-times"],[1,"p-checkbox","p-component",3,"ngClass"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-multiselect-filter-container"],["type","text","role","textbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input"],["filterInput",""],[1,"p-multiselect-filter-icon","pi","pi-search"],[3,"items","itemSize","autoSize","tabindex","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["items",""],["itemslist",""],["class","p-multiselect-empty-message",3,"ngStyle",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"p-multiselect-item-group",3,"ngStyle"],[3,"option","selected","label","disabled","template","itemSize","onClick","onKeydown"],[1,"p-multiselect-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(e,i){if(1&e){const r=q();ai(h0e),S(0,"div",0,1),P("click",function(s){I(r);const a=Pe(4);return x(i.onMouseclick(s,a))}),S(2,"div",2)(3,"input",3,4),P("focus",function(s){return i.onInputFocus(s)})("blur",function(s){return i.onInputBlur(s)})("keydown",function(s){return i.onKeydown(s)}),D()(),S(5,"div",5)(6,"div",6),C(7,TCe,3,2,"ng-container",7),C(8,MCe,1,0,"ng-container",8),D(),C(9,ECe,1,0,"i",9),D(),S(10,"div",10),F(11,"span",11),D(),S(12,"p-overlay",12,13),P("visibleChange",function(s){return i.overlayVisible=s})("onAnimationStart",function(s){return i.onOverlayAnimationStart(s)})("onHide",function(){return i.hide()}),C(14,d0e,8,11,"ng-template",14),D()()}2&e&&(Ke(i.styleClass),g("ngClass",va(30,p0e,i.overlayVisible,"chip"===i.display,i.focus,i.disabled))("ngStyle",i.style),v(3),g("disabled",i.disabled),pe("label",i.label)("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-expanded",i.overlayVisible)("aria-labelledby",i.ariaLabelledBy),v(2),g("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass),v(1),g("ngClass",lt(35,f0e,i.valuesAsString===(i.defaultLabel||i.placeholder),!(null!=i.valuesAsString&&0!==i.valuesAsString.length||null!=i.placeholder&&0!==i.placeholder.length))),v(1),g("ngIf",!i.selectedItemsTemplate),v(1),g("ngTemplateOutlet",i.selectedItemsTemplate)("ngTemplateOutletContext",te(38,wf,i.value)),v(1),g("ngIf",null!=i.value&&i.filled&&!i.disabled&&i.showClear),v(1),g("ngClass",hn(40,m0e)),v(1),g("ngClass",i.dropdownIcon),v(1),g("visible",i.overlayVisible)("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("autoZIndex",i.autoZIndex)("baseZIndex",i.baseZIndex)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions))},dependencies:[Lt,Un,Ge,Zn,fn,k_,mn,Wy,Xr,A_,y0e],styles:[".p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-chip .p-multiselect-label{display:flex}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}\n"],encapsulation:2,changeDetection:0}),n})();const b0e=["rb"],C0e=function(n,t,e){return{"p-radiobutton-label":!0,"p-radiobutton-label-active":n,"p-disabled":t,"p-radiobutton-label-focus":e}};function w0e(n,t){if(1&n){const e=q();S(0,"label",4),P("click",function(r){return I(e),x(y().select(r))}),H(1),D()}if(2&n){const e=y(),i=Pe(3);Ke(e.labelStyleClass),g("ngClass",Hr(5,C0e,i.checked,e.disabled,e.focused)),pe("for",e.inputId),v(1),ve(e.label)}}const S0e=function(n,t,e){return{"p-radiobutton p-component":!0,"p-radiobutton-checked":n,"p-radiobutton-disabled":t,"p-radiobutton-focused":e}},D0e=function(n,t,e){return{"p-radiobutton-box":!0,"p-highlight":n,"p-disabled":t,"p-focus":e}},T0e={provide:Cn,useExisting:Ue(()=>L5),multi:!0};let M0e=(()=>{class n{constructor(){this.accessors=[]}add(e,i){this.accessors.push([e,i])}remove(e){this.accessors=this.accessors.filter(i=>i[1]!==e)}select(e){this.accessors.forEach(i=>{this.isSameGroup(i,e)&&i[1]!==e&&i[1].writeValue(e.value)})}isSameGroup(e,i){return!!e[0].control&&e[0].control.root===i.control.control.root&&e[1].name===i.name}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),L5=(()=>{class n{constructor(e,i,r){this.cd=e,this.injector=i,this.registry=r,this.onClick=new R,this.onFocus=new R,this.onBlur=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}ngOnInit(){this.control=this.injector.get(Go),this.checkName(),this.registry.add(this.control,this)}handleClick(e,i,r){e.preventDefault(),!this.disabled&&(this.select(e),r&&i.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}onChange(e){this.select(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Ci),O(M0e))},n.\u0275cmp=Y({type:n,selectors:[["p-radioButton"]],viewQuery:function(e,i){if(1&e&&Ee(b0e,5),2&e){let r;J(r=X())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Ie([T0e])],decls:7,vars:23,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","change","focus","blur"],["rb",""],[3,"ngClass","click"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0)(1,"div",1)(2,"input",2,3),P("change",function(s){return i.onChange(s)})("focus",function(s){return i.onInputFocus(s)})("blur",function(s){return i.onInputBlur(s)}),D()(),S(4,"div",4),P("click",function(s){I(r);const a=Pe(3);return x(i.handleClick(s,a,!0))}),F(5,"span",5),D()(),C(6,w0e,2,9,"label",6)}2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",Hr(15,S0e,i.checked,i.disabled,i.focused)),v(2),g("checked",i.checked)("disabled",i.disabled),pe("id",i.inputId)("name",i.name)("value",i.value)("tabindex",i.tabindex)("aria-checked",i.checked)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy),v(2),g("ngClass",Hr(19,D0e,i.checked,i.disabled,i.focused)),v(2),g("ngIf",i.label))},dependencies:[Lt,Ge,fn],encapsulation:2,changeDetection:0}),n})();function x0e(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y();let i;v(1),ve(null!==(i=e.label)&&void 0!==i?i:"empty")}}function O0e(n,t){1&n&&ce(0)}const Sf=function(n){return{height:n}},k0e=function(n,t){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":t}},mT=function(n){return{$implicit:n}},A0e=["container"],N0e=["filter"],L0e=["in"],P0e=["editableInput"],R0e=["items"],F0e=["scroller"],j0e=["overlay"];function V0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),ve(e.label||"empty")}}function z0e(n,t){1&n&&ce(0)}const B0e=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function U0e(n,t){if(1&n&&(S(0,"span",14),C(1,V0e,2,1,"ng-container",15),C(2,z0e,1,0,"ng-container",16),D()),2&n){const e=y();g("ngClass",te(9,B0e,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),pe("id",e.labelId),v(1),g("ngIf",!e.selectedItemTemplate),v(1),g("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",te(11,mT,e.selectedOption))}}const H0e=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function $0e(n,t){if(1&n&&(S(0,"span",17),H(1),D()),2&n){const e=y();g("ngClass",te(2,H0e,null==e.placeholder||0===e.placeholder.length)),v(1),ve(e.placeholder||"empty")}}function W0e(n,t){if(1&n){const e=q();S(0,"input",18,19),P("input",function(r){return I(e),x(y().onEditableInputChange(r))})("focus",function(r){return I(e),x(y().onEditableInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))}),D()}if(2&n){const e=y();g("disabled",e.disabled),pe("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function G0e(n,t){if(1&n){const e=q();S(0,"i",20),P("click",function(r){return I(e),x(y().clear(r))}),D()}}function q0e(n,t){1&n&&ce(0)}function K0e(n,t){1&n&&ce(0)}const R5=function(n){return{options:n}};function Y0e(n,t){if(1&n&&(ae(0),C(1,K0e,1,0,"ng-container",16),le()),2&n){const e=y(3);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,R5,e.filterOptions))}}function Q0e(n,t){if(1&n){const e=q();S(0,"div",30)(1,"input",31,32),P("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return I(e),x(y(3).onKeydown(r,!1))})("input",function(r){return I(e),x(y(3).onFilterInputChange(r))}),D(),F(3,"span",33),D()}if(2&n){const e=y(3);v(1),g("value",e.filterValue||""),pe("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function Z0e(n,t){if(1&n&&(S(0,"div",27),P("click",function(i){return i.stopPropagation()}),C(1,Y0e,2,4,"ng-container",28),C(2,Q0e,4,4,"ng-template",null,29,yt),D()),2&n){const e=Pe(3),i=y(2);v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function J0e(n,t){1&n&&ce(0)}const F5=function(n,t){return{$implicit:n,options:t}};function X0e(n,t){if(1&n&&C(0,J0e,1,0,"ng-container",16),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(7))("ngTemplateOutletContext",lt(2,F5,e,i))}}function ewe(n,t){1&n&&ce(0)}function twe(n,t){if(1&n&&C(0,ewe,1,0,"ng-container",16),2&n){const e=t.options;g("ngTemplateOutlet",y(4).loaderTemplate)("ngTemplateOutletContext",te(2,R5,e))}}function nwe(n,t){1&n&&(ae(0),C(1,twe,1,4,"ng-template",36),le())}function iwe(n,t){if(1&n){const e=q();S(0,"p-scroller",34,35),P("onLazyLoad",function(r){return I(e),x(y(2).onLazyLoad.emit(r))}),C(2,X0e,1,5,"ng-template",13),C(3,nwe,2,0,"ng-container",15),D()}if(2&n){const e=y(2);jt(te(8,Sf,e.scrollHeight)),g("items",e.optionsToDisplay)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function rwe(n,t){1&n&&ce(0)}const owe=function(){return{}};function swe(n,t){if(1&n&&(ae(0),C(1,rwe,1,0,"ng-container",16),le()),2&n){y();const e=Pe(7),i=y();v(1),g("ngTemplateOutlet",e)("ngTemplateOutletContext",lt(3,F5,i.optionsToDisplay,hn(2,owe)))}}function awe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(4);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function lwe(n,t){1&n&&ce(0)}function cwe(n,t){1&n&&ce(0)}const j5=function(n,t){return{$implicit:n,selectedOption:t}};function uwe(n,t){if(1&n&&(S(0,"li",42),C(1,awe,2,1,"span",15),C(2,lwe,1,0,"ng-container",16),D(),C(3,cwe,1,0,"ng-container",16)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y(2);g("ngStyle",te(6,Sf,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,mT,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",lt(10,j5,o.getOptionGroupChildren(e),o.selectedOption))}}function dwe(n,t){if(1&n&&(ae(0),C(1,uwe,4,13,"ng-template",41),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function hwe(n,t){1&n&&ce(0)}function pwe(n,t){if(1&n&&(ae(0),C(1,hwe,1,0,"ng-container",16),le()),2&n){const e=y().$implicit,i=Pe(5),r=y(2);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",lt(2,j5,e,r.selectedOption))}}function fwe(n,t){if(1&n){const e=q();S(0,"p-dropdownItem",43),P("onClick",function(r){return I(e),x(y(4).onItemClick(r))}),D()}if(2&n){const e=t.$implicit,i=y().selectedOption,r=y(3);g("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function mwe(n,t){1&n&&C(0,fwe,1,5,"ng-template",41),2&n&&g("ngForOf",t.$implicit)}function gwe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function _we(n,t){1&n&&ce(0,null,45)}function ywe(n,t){if(1&n&&(S(0,"li",44),C(1,gwe,2,1,"ng-container",28),C(2,_we,2,0,"ng-container",22),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,Sf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),v(1),g("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function vwe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyMessageLabel," ")}}function bwe(n,t){1&n&&ce(0,null,46)}function Cwe(n,t){if(1&n&&(S(0,"li",44),C(1,vwe,2,1,"ng-container",28),C(2,bwe,2,0,"ng-container",22),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,Sf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function wwe(n,t){if(1&n&&(S(0,"ul",37,38),C(2,dwe,2,1,"ng-container",15),C(3,pwe,2,5,"ng-container",15),C(4,mwe,1,1,"ng-template",null,39,yt),C(6,ywe,3,6,"li",40),C(7,Cwe,3,6,"li",40),D()),2&n){const e=t.options,i=y(2);jt(e.contentStyle),g("ngClass",e.contentStyleClass),pe("id",i.listId),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.filterValue&&i.isEmpty()),v(1),g("ngIf",!i.filterValue&&i.isEmpty())}}function Swe(n,t){1&n&&ce(0)}function Dwe(n,t){if(1&n&&(S(0,"div",21),C(1,q0e,1,0,"ng-container",22),C(2,Z0e,4,2,"div",23),S(3,"div",24),C(4,iwe,4,10,"p-scroller",25),C(5,swe,2,6,"ng-container",15),C(6,wwe,8,8,"ng-template",null,26,yt),D(),C(8,Swe,1,0,"ng-container",22),D()),2&n){const e=y();Ke(e.panelStyleClass),g("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),v(1),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",e.filter),v(1),As("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),v(1),g("ngIf",e.virtualScroll),v(1),g("ngIf",!e.virtualScroll),v(3),g("ngTemplateOutlet",e.footerTemplate)}}const Twe=function(n,t,e,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":t,"p-focus":e,"p-dropdown-clearable":i}},Mwe={provide:Cn,useExisting:Ue(()=>V5),multi:!0};let Ewe=(()=>{class n{constructor(){this.onClick=new R}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(S(0,"li",0),P("click",function(o){return i.onOptionClick(o)}),C(1,x0e,2,1,"span",1),C(2,O0e,1,0,"ng-container",2),D()),2&e&&(g("ngStyle",te(8,Sf,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",lt(10,k0e,i.selected,i.disabled)),pe("aria-label",i.label)("aria-selected",i.selected),v(1),g("ngIf",!i.template),v(1),g("ngTemplateOutlet",i.template)("ngTemplateOutletContext",te(13,mT,i.option)))},dependencies:[Lt,Ge,Zn,fn,Xr],encapsulation:2}),n})(),V5=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.overlayDirection="end",this.onChange=new R,this.onFilter=new R,this.onFocus=new R,this.onBlur=new R,this.onClick=new R,this.onShow=new R,this.onHide=new R,this.onClear=new R,this.onLazyLoad=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.id=D_()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Oe.isNotEmpty(this.value)&&!this.editable&&(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return"number"==typeof this.selectedOption&&(this.selectedOption=this.selectedOption.toString()),this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ln.EMPTY_FILTER_MESSAGE)}get filled(){return"string"==typeof this.value?!!this.value:this.value||null!=this.value||null!=this.value}get isVisibleClearIcon(){return null!=this.value&&""!==this.value&&this.showClear&&!this.disabled}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):e&&void 0!==e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}isOptionDisabled(e){return this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):e&&void 0!==e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&A.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(e){this.selectedOption=this.findOption(e,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.group?this.optionsToDisplay[0].items[0]:this.optionsToDisplay[0],this.value=this.getOptionValue(this.selectedOption),this.onModelChange(this.value)),this.selectedOptionUpdated=!0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onMouseclick(e){this.disabled||this.readonly||this.isInputClick(e)||(this.onClick.emit(e),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(e){return A.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(e){this.focused=!0,this.hide(),this.onFocus.emit(e)}onEditableInputChange(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){if("visible"===e.toState){if(this.itemsWrapper=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller.setContentEl(this.itemsViewChild.nativeElement),this.options&&this.options.length)if(this.virtualScroll){const i=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;-1!==i&&this.scroller.scrollToIndex(i)}else{let i=A.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}"void"===e.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&17!==e.which&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{class n{constructor(e){this.injector=e}ngDoBootstrap(){try{e1e.forEach(({tag:e,component:i})=>{if(customElements.get(e))return;const r=function GG(n,t){const e=function VG(n,t){return t.get(kl).resolveComponentFactory(n).inputs}(n,t.injector),i=t.strategyFactory||new HG(n,t.injector),r=function jG(n){const t={};return n.forEach(({propName:e,templateName:i})=>{t[function NG(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}(i)]=e}),t}(e);class o extends WG{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||t.injector);e.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(r),e.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(i,{injector:this.injector});customElements.define(e,r)})}catch(e){console.error(e)}}}return n.\u0275fac=function(e){return new(e||n)(U(Ci))},n.\u0275mod=we({type:n}),n.\u0275inj=Ae({providers:[ka,_p],imports:[nA,qK,Og,Mv,Mg]}),n})();z$().bootstrapModule(t1e).catch(n=>console.error(n))},88222:(Zi,oa,mr)=>{Zi=mr.nmd(Zi);var ki="__lodash_hash_undefined__",ho=9007199254740991,ri="[object Arguments]",cl="[object Array]",ul="[object Boolean]",ft="[object Date]",Rd="[object Error]",dl="[object Function]",ut="[object Map]",Fd="[object Number]",sa="[object Object]",aa="[object Promise]",Fc="[object RegExp]",hl="[object Set]",mt="[object String]",po="[object WeakMap]",jd="[object ArrayBuffer]",pl="[object DataView]",CT=/^\[object .+?Constructor\]$/,Hv=/^(?:0|[1-9]\d*)$/,Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht[ri]=Ht[cl]=Ht[jd]=Ht[ul]=Ht[pl]=Ht[ft]=Ht[Rd]=Ht[dl]=Ht[ut]=Ht[Fd]=Ht[sa]=Ht[Fc]=Ht[hl]=Ht[mt]=Ht[po]=!1;var Vd="object"==typeof global&&global&&global.Object===Object&&global,Af="object"==typeof self&&self&&self.Object===Object&&self,gr=Vd||Af||Function("return this")(),Nf=oa&&!oa.nodeType&&oa,Lf=Nf&&Zi&&!Zi.nodeType&&Zi,Vc=Lf&&Lf.exports===Nf,zd=Vc&&Vd.process,Pf=function(){try{return zd&&zd.binding&&zd.binding("util")}catch{}}(),Rf=Pf&&Pf.isTypedArray;function fl(E,L){for(var B=-1,re=null==E?0:E.length;++Byn))return!1;var Ct=Ve.get(E);if(Ct&&Ve.get(L))return Ct==L;var Rn=-1,yr=!0,Y=2&B?new ht:void 0;for(Ve.set(E,L),Ve.set(L,E);++Rn-1},fo.prototype.set=function OT(E,L){var B=this.__data__,re=Wc(B,E);return re<0?(++this.size,B.push([E,L])):B[re][1]=L,this},da.prototype.clear=function Yv(){this.size=0,this.__data__={hash:new ws,map:new(bs||fo),string:new ws}},da.prototype.delete=function kT(E){var L=It(this,E).delete(E);return this.size-=L?1:0,L},da.prototype.get=function Qv(E){return It(this,E).get(E)},da.prototype.has=function AT(E){return It(this,E).has(E)},da.prototype.set=function Ji(E,L){var B=It(this,E),re=B.size;return B.set(E,L),this.size+=B.size==re?0:1,this},ht.prototype.add=ht.prototype.push=function NT(E){return this.__data__.set(E,ki),this},ht.prototype.has=function LT(E){return this.__data__.has(E)},Ss.prototype.clear=function K(){this.__data__=new fo,this.size=0},Ss.prototype.delete=function PT(E){var L=this.__data__,B=L.delete(E);return this.size=L.size,B},Ss.prototype.get=function Ae(E){return this.__data__.get(E)},Ss.prototype.has=function $c(E){return this.__data__.has(E)},Ss.prototype.set=function Zv(E,L){var B=this.__data__;if(B instanceof fo){var re=B.__data__;if(!bs||re.length<199)return re.push([E,L]),this.size=++B.size,this;B=this.__data__=new da(re)}return B.set(E,L),this.size=B.size,this};var FT=Uf?function(E){return null==E?[]:(E=Object(E),function Ff(E,L){for(var B=-1,re=null==E?0:E.length,Te=0,Ve=[];++B-1&&E%1==0&&E-1&&E%1==0&&E<=ho}function ma(E){var L=typeof E;return null!=E&&("object"==L||"function"==L)}function Cl(E){return null!=E&&"object"==typeof E}var qf=Rf?function ml(E){return function(L){return E(L)}}(Rf):function ke(E){return Cl(E)&&Qc(E.length)&&!!Ht[ha(E)]};function rb(E){return function U(E){return null!=E&&Qc(E.length)&&!bl(E)}(E)?function Hf(E,L){var B=Kc(E),re=!B&&fa(E),Te=!B&&!re&&Yc(E),Ve=!B&&!re&&!Te&&qf(E),Yt=B||re||Te||Ve,yn=Yt?function wT(E,L){for(var B=-1,re=Array(E);++B{var ii={"./ar-DZ/_lib/formatDistance/index.js":[28066,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,8592,9493],"./ar-DZ/_lib/formatRelative/index.js":[89786,8592],"./ar-DZ/_lib/localize/index.js":[36207,8592,4373],"./ar-DZ/_lib/match/index.js":[53371,8592,2877],"./ar-DZ/index.js":[76327,8592,4288],"./ar-EG/_lib/formatDistance/index.js":[95932,8592],"./ar-EG/_lib/formatLong/index.js":[46023,8592,3639],"./ar-EG/_lib/formatRelative/index.js":[74621,8592],"./ar-EG/_lib/localize/index.js":[93376,8592,1378],"./ar-EG/_lib/match/index.js":[76456,8592,9284],"./ar-EG/index.js":[30830,8592,8477],"./ar-MA/_lib/formatDistance/index.js":[25565,8592],"./ar-MA/_lib/formatLong/index.js":[81783,8592,7236],"./ar-MA/_lib/formatRelative/index.js":[90030,8592],"./ar-MA/_lib/localize/index.js":[60503,8592,7995],"./ar-MA/_lib/match/index.js":[83427,8592,8213],"./ar-MA/index.js":[96094,8592,9736],"./ar-SA/_lib/formatDistance/index.js":[3797,8592],"./ar-SA/_lib/formatLong/index.js":[73212,8592,9090],"./ar-SA/_lib/formatRelative/index.js":[79009,8592],"./ar-SA/_lib/localize/index.js":[12535,8592,124],"./ar-SA/_lib/match/index.js":[14710,8592,2912],"./ar-SA/index.js":[54370,8592,6562],"./ar-TN/_lib/formatDistance/index.js":[56566,8592],"./ar-TN/_lib/formatLong/index.js":[4585,8592,3753],"./ar-TN/_lib/formatRelative/index.js":[5374,8592],"./ar-TN/_lib/localize/index.js":[85963,8592,4843],"./ar-TN/_lib/match/index.js":[13401,8592,2581],"./ar-TN/index.js":[37373,8592,6426],"./be-tarask/_lib/formatDistance/index.js":[82665,8592],"./be-tarask/_lib/formatLong/index.js":[9662,8592,5806],"./be-tarask/_lib/formatRelative/index.js":[4653,4,8592],"./be-tarask/_lib/localize/index.js":[40591,8592,1283],"./be-tarask/_lib/match/index.js":[34412,8592,9938],"./be-tarask/index.js":[27840,4,8592,7840],"./de-AT/_lib/localize/index.js":[44821,8592,8300],"./de-AT/index.js":[21782,8592,243],"./en-AU/_lib/formatLong/index.js":[65493,8592,6237],"./en-AU/index.js":[87747,8592,1128],"./en-CA/_lib/formatDistance/index.js":[80780,8592],"./en-CA/_lib/formatLong/index.js":[26153,8592,7747],"./en-CA/index.js":[21413,8592,7555],"./en-GB/_lib/formatLong/index.js":[33819,8592,4547],"./en-GB/index.js":[33035,8592,1228],"./en-IE/index.js":[61959,8592,463],"./en-IN/_lib/formatLong/index.js":[20862,8592,3191],"./en-IN/index.js":[82873,8592,8757],"./en-NZ/_lib/formatLong/index.js":[36336,8592,3197],"./en-NZ/index.js":[26041,8592,5966],"./en-US/_lib/formatDistance/index.js":[39563,9563],"./en-US/_lib/formatLong/index.js":[66929,6929],"./en-US/_lib/formatRelative/index.js":[21656,1656],"./en-US/_lib/localize/index.js":[31098,9350],"./en-US/_lib/match/index.js":[53239,3239],"./en-US/index.js":[33338,3338],"./en-ZA/_lib/formatLong/index.js":[9221,8592,6951],"./en-ZA/index.js":[11543,8592,4093],"./fa-IR/_lib/formatDistance/index.js":[76726,8592],"./fa-IR/_lib/formatLong/index.js":[10749,8592,7612],"./fa-IR/_lib/formatRelative/index.js":[7220,8592],"./fa-IR/_lib/localize/index.js":[72441,8592,9371],"./fa-IR/_lib/match/index.js":[81488,8592,7743],"./fa-IR/index.js":[84996,8592,5974],"./fr-CA/_lib/formatLong/index.js":[85947,8592,4367],"./fr-CA/index.js":[73723,8592,1688],"./fr-CH/_lib/formatLong/index.js":[27414,8592,3603],"./fr-CH/_lib/formatRelative/index.js":[66155,8592],"./fr-CH/index.js":[24565,8592,4087],"./it-CH/_lib/formatLong/index.js":[31519,8592,6685],"./it-CH/index.js":[87736,8592,2324],"./ja-Hira/_lib/formatDistance/index.js":[84703,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,8592,7336],"./ja-Hira/_lib/formatRelative/index.js":[93381,8592],"./ja-Hira/_lib/localize/index.js":[35710,8592,3665],"./ja-Hira/_lib/match/index.js":[69417,8592,3148],"./ja-Hira/index.js":[12944,8592,1464],"./nl-BE/_lib/formatDistance/index.js":[16129,8592],"./nl-BE/_lib/formatLong/index.js":[17657,8592,3039],"./nl-BE/_lib/formatRelative/index.js":[89811,8592],"./nl-BE/_lib/localize/index.js":[58816,8592,1681],"./nl-BE/_lib/match/index.js":[28333,8592,2237],"./nl-BE/index.js":[70296,8592,4862],"./pt-BR/_lib/formatDistance/index.js":[52638,8592],"./pt-BR/_lib/formatLong/index.js":[33247,8592,4753],"./pt-BR/_lib/formatRelative/index.js":[25492,8592],"./pt-BR/_lib/localize/index.js":[81046,8592,2258],"./pt-BR/_lib/match/index.js":[63770,8592,9792],"./pt-BR/index.js":[47569,8592,1100],"./sr-Latn/_lib/formatDistance/index.js":[69014,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,8592,275],"./sr-Latn/_lib/formatRelative/index.js":[42428,8592],"./sr-Latn/_lib/localize/index.js":[92773,8592,7136],"./sr-Latn/_lib/match/index.js":[7766,8592,3177],"./sr-Latn/index.js":[99064,8592,2152],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,8592,160],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,8592,2654],"./uz-Cyrl/_lib/match/index.js":[75798,8592,1360],"./uz-Cyrl/index.js":[14527,8592,8932],"./zh-CN/_lib/formatDistance/index.js":[33437,8592],"./zh-CN/_lib/formatLong/index.js":[91583,8592,485],"./zh-CN/_lib/formatRelative/index.js":[95629,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,8592,9169],"./zh-CN/_lib/match/index.js":[71362,8592,7103],"./zh-CN/index.js":[86335,8592,8664],"./zh-HK/_lib/formatDistance/index.js":[37348,8592],"./zh-HK/_lib/formatLong/index.js":[60924,8592,3215],"./zh-HK/_lib/formatRelative/index.js":[22164,8592],"./zh-HK/_lib/localize/index.js":[39264,8592,1780],"./zh-HK/_lib/match/index.js":[50358,8592,5641],"./zh-HK/index.js":[59277,8592,2336],"./zh-TW/_lib/formatDistance/index.js":[31613,8592],"./zh-TW/_lib/formatLong/index.js":[1239,8592,248],"./zh-TW/_lib/formatRelative/index.js":[13240,8592],"./zh-TW/_lib/localize/index.js":[29850,8592,9886],"./zh-TW/_lib/match/index.js":[38819,8592,8041],"./zh-TW/index.js":[74565,8592,8978]};function ki(an){if(!mr.o(ii,an))return Promise.resolve().then(()=>{var ri=new Error("Cannot find module '"+an+"'");throw ri.code="MODULE_NOT_FOUND",ri});var gi=ii[an],ho=gi[0];return Promise.all(gi.slice(1).map(mr.e)).then(()=>mr.t(ho,23))}ki.keys=()=>Object.keys(ii),ki.id=13131,Zi.exports=ki},71213:(Zi,oa,mr)=>{var ii={"./_lib/buildFormatLongFn/index.js":[88995,7,8995],"./_lib/buildLocalizeFn/index.js":[77579,7,7579],"./_lib/buildMatchFn/index.js":[84728,7,4728],"./_lib/buildMatchPatternFn/index.js":[27223,7,7223],"./af/_lib/formatDistance/index.js":[55864,7,8592],"./af/_lib/formatLong/index.js":[25358,7,8592,9848],"./af/_lib/formatRelative/index.js":[25892,7,8592],"./af/_lib/localize/index.js":[18874,7,8592,459],"./af/_lib/match/index.js":[22146,7,8592,4568],"./af/index.js":[72399,7,8592,6595],"./ar-DZ/_lib/formatDistance/index.js":[28066,7,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,7,8592,9493],"./ar-DZ/_lib/formatRelative/index.js":[89786,7,8592],"./ar-DZ/_lib/localize/index.js":[36207,7,8592,4373],"./ar-DZ/_lib/match/index.js":[53371,7,8592,2877],"./ar-DZ/index.js":[76327,7,8592,4288],"./ar-EG/_lib/formatDistance/index.js":[95932,7,8592],"./ar-EG/_lib/formatLong/index.js":[46023,7,8592,3639],"./ar-EG/_lib/formatRelative/index.js":[74621,7,8592],"./ar-EG/_lib/localize/index.js":[93376,7,8592,1378],"./ar-EG/_lib/match/index.js":[76456,7,8592,9284],"./ar-EG/index.js":[30830,7,8592,8477],"./ar-MA/_lib/formatDistance/index.js":[25565,7,8592],"./ar-MA/_lib/formatLong/index.js":[81783,7,8592,7236],"./ar-MA/_lib/formatRelative/index.js":[90030,7,8592],"./ar-MA/_lib/localize/index.js":[60503,7,8592,7995],"./ar-MA/_lib/match/index.js":[83427,7,8592,8213],"./ar-MA/index.js":[96094,7,8592,9736],"./ar-SA/_lib/formatDistance/index.js":[3797,7,8592],"./ar-SA/_lib/formatLong/index.js":[73212,7,8592,9090],"./ar-SA/_lib/formatRelative/index.js":[79009,7,8592],"./ar-SA/_lib/localize/index.js":[12535,7,8592,124],"./ar-SA/_lib/match/index.js":[14710,7,8592,2912],"./ar-SA/index.js":[54370,7,8592,6562],"./ar-TN/_lib/formatDistance/index.js":[56566,7,8592],"./ar-TN/_lib/formatLong/index.js":[4585,7,8592,3753],"./ar-TN/_lib/formatRelative/index.js":[5374,7,8592],"./ar-TN/_lib/localize/index.js":[85963,7,8592,4843],"./ar-TN/_lib/match/index.js":[13401,7,8592,2581],"./ar-TN/index.js":[37373,7,8592,6426],"./ar/_lib/formatDistance/index.js":[91118,7,8592],"./ar/_lib/formatLong/index.js":[90899,7,8592,319],"./ar/_lib/formatRelative/index.js":[18739,7,8592],"./ar/_lib/localize/index.js":[64620,7,8592,9521],"./ar/_lib/match/index.js":[32101,7,8592,6574],"./ar/index.js":[91780,7,8592,7519],"./az/_lib/formatDistance/index.js":[2541,7,8592],"./az/_lib/formatLong/index.js":[6246,7,8592,1481],"./az/_lib/formatRelative/index.js":[33557,7,8592],"./az/_lib/localize/index.js":[89347,7,8592,38],"./az/_lib/match/index.js":[75242,7,8592,5991],"./az/index.js":[170,7,8592,6265],"./be-tarask/_lib/formatDistance/index.js":[82665,7,8592],"./be-tarask/_lib/formatLong/index.js":[9662,7,8592,5806],"./be-tarask/_lib/formatRelative/index.js":[4653,7,4,8592],"./be-tarask/_lib/localize/index.js":[40591,7,8592,1283],"./be-tarask/_lib/match/index.js":[34412,7,8592,9938],"./be-tarask/index.js":[27840,7,4,8592,7840],"./be/_lib/formatDistance/index.js":[9006,7,8592],"./be/_lib/formatLong/index.js":[58343,7,8592,193],"./be/_lib/formatRelative/index.js":[20369,7,4,8592],"./be/_lib/localize/index.js":[30768,7,8592,36],"./be/_lib/match/index.js":[35637,7,8592,7910],"./be/index.js":[94646,7,4,8592,4646],"./bg/_lib/formatDistance/index.js":[54037,7,8592],"./bg/_lib/formatLong/index.js":[44221,7,8592,8416],"./bg/_lib/formatRelative/index.js":[24925,7,8592,9491],"./bg/_lib/localize/index.js":[60958,7,8592,7265],"./bg/_lib/match/index.js":[99124,7,8592,4480],"./bg/index.js":[90948,7,8592,6516],"./bn/_lib/formatDistance/index.js":[5190,7,8592,9310],"./bn/_lib/formatLong/index.js":[10846,7,8592,6590],"./bn/_lib/formatRelative/index.js":[90009,7,8592],"./bn/_lib/localize/index.js":[32143,9,8592,6288],"./bn/_lib/match/index.js":[71701,7,8592,9531],"./bn/index.js":[76982,7,8592,1832],"./bs/_lib/formatDistance/index.js":[3504,7,8592],"./bs/_lib/formatLong/index.js":[47625,7,8592,8960],"./bs/_lib/formatRelative/index.js":[69642,7,8592],"./bs/_lib/localize/index.js":[19781,7,8592,5350],"./bs/_lib/match/index.js":[98469,7,8592,7403],"./bs/index.js":[21670,7,8592,6919],"./ca/_lib/formatDistance/index.js":[78470,7,8592],"./ca/_lib/formatLong/index.js":[37682,7,8592,1927],"./ca/_lib/formatRelative/index.js":[73019,7,8592],"./ca/_lib/localize/index.js":[94354,7,8592,6716],"./ca/_lib/match/index.js":[87821,7,8592,4111],"./ca/index.js":[59800,7,8592,2376],"./cs/_lib/formatDistance/index.js":[84712,7,8592],"./cs/_lib/formatLong/index.js":[25366,7,8592,3353],"./cs/_lib/formatRelative/index.js":[30404,7,8592],"./cs/_lib/localize/index.js":[1944,7,8592,7884],"./cs/_lib/match/index.js":[8302,7,8592,4925],"./cs/index.js":[27463,7,8592,9494],"./cy/_lib/formatDistance/index.js":[53860,7,8592],"./cy/_lib/formatLong/index.js":[5355,7,8592,6718],"./cy/_lib/formatRelative/index.js":[11612,7,8592],"./cy/_lib/localize/index.js":[79008,7,8592,6502],"./cy/_lib/match/index.js":[69946,7,8592,9797],"./cy/index.js":[87955,7,8592,7039],"./da/_lib/formatDistance/index.js":[32439,7,8592],"./da/_lib/formatLong/index.js":[40114,7,8592,8688],"./da/_lib/formatRelative/index.js":[33452,7,8592],"./da/_lib/localize/index.js":[22653,7,8592,2710],"./da/_lib/match/index.js":[1416,7,8592,7195],"./da/index.js":[11295,7,8592,2630],"./de-AT/_lib/localize/index.js":[44821,7,8592,8300],"./de-AT/index.js":[21782,7,8592,243],"./de/_lib/formatDistance/index.js":[98815,7,8592],"./de/_lib/formatLong/index.js":[47173,7,8592,4801],"./de/_lib/formatRelative/index.js":[5278,7,8592],"./de/_lib/localize/index.js":[54552,7,8592,6131],"./de/_lib/match/index.js":[31871,7,8592,5131],"./de/index.js":[94086,7,8592,9616],"./el/_lib/formatDistance/index.js":[39298,7,8592],"./el/_lib/formatLong/index.js":[94460,7,8592,2027],"./el/_lib/formatRelative/index.js":[72435,7,8592],"./el/_lib/localize/index.js":[674,7,8592,7538],"./el/_lib/match/index.js":[40588,7,8592,2187],"./el/index.js":[26106,7,8592,5382],"./en-AU/_lib/formatLong/index.js":[65493,7,8592,6237],"./en-AU/index.js":[87747,7,8592,1128],"./en-CA/_lib/formatDistance/index.js":[80780,7,8592],"./en-CA/_lib/formatLong/index.js":[26153,7,8592,7747],"./en-CA/index.js":[21413,7,8592,7555],"./en-GB/_lib/formatLong/index.js":[33819,7,8592,4547],"./en-GB/index.js":[33035,7,8592,1228],"./en-IE/index.js":[61959,7,8592,463],"./en-IN/_lib/formatLong/index.js":[20862,7,8592,3191],"./en-IN/index.js":[82873,7,8592,8757],"./en-NZ/_lib/formatLong/index.js":[36336,7,8592,3197],"./en-NZ/index.js":[26041,7,8592,5966],"./en-US/_lib/formatDistance/index.js":[39563,7,9563],"./en-US/_lib/formatLong/index.js":[66929,7,6929],"./en-US/_lib/formatRelative/index.js":[21656,7,1656],"./en-US/_lib/localize/index.js":[31098,7,9350],"./en-US/_lib/match/index.js":[53239,7,3239],"./en-US/index.js":[33338,7,3338],"./en-ZA/_lib/formatLong/index.js":[9221,7,8592,6951],"./en-ZA/index.js":[11543,7,8592,4093],"./eo/_lib/formatDistance/index.js":[43549,7,8592],"./eo/_lib/formatLong/index.js":[25567,7,8592,8118],"./eo/_lib/formatRelative/index.js":[30410,7,8592],"./eo/_lib/localize/index.js":[27249,7,8592,1634],"./eo/_lib/match/index.js":[75687,7,8592,8199],"./eo/index.js":[63574,7,8592,1411],"./es/_lib/formatDistance/index.js":[66660,7,8592],"./es/_lib/formatLong/index.js":[39055,7,8592,8248],"./es/_lib/formatRelative/index.js":[63774,7,8592],"./es/_lib/localize/index.js":[38835,7,8592,7568],"./es/_lib/match/index.js":[38662,7,8592,6331],"./es/index.js":[23413,7,8592,7412],"./et/_lib/formatDistance/index.js":[64334,7,8592],"./et/_lib/formatLong/index.js":[32045,7,8592,7372],"./et/_lib/formatRelative/index.js":[47074,7,8592],"./et/_lib/localize/index.js":[42462,7,8592,6778],"./et/_lib/match/index.js":[85999,7,8592,7670],"./et/index.js":[65861,7,8592,8138],"./eu/_lib/formatDistance/index.js":[91793,7,8592],"./eu/_lib/formatLong/index.js":[17350,7,8592,2069],"./eu/_lib/formatRelative/index.js":[25688,7,8592],"./eu/_lib/localize/index.js":[28061,7,8592,8759],"./eu/_lib/match/index.js":[11113,7,8592,7462],"./eu/index.js":[29618,7,8592,7969],"./fa-IR/_lib/formatDistance/index.js":[76726,7,8592],"./fa-IR/_lib/formatLong/index.js":[10749,7,8592,7612],"./fa-IR/_lib/formatRelative/index.js":[7220,7,8592],"./fa-IR/_lib/localize/index.js":[72441,7,8592,9371],"./fa-IR/_lib/match/index.js":[81488,7,8592,7743],"./fa-IR/index.js":[84996,7,8592,5974],"./fi/_lib/formatDistance/index.js":[97929,7,8592],"./fi/_lib/formatLong/index.js":[63741,7,8592,694],"./fi/_lib/formatRelative/index.js":[23234,7,8592],"./fi/_lib/localize/index.js":[5936,7,8592,1090],"./fi/_lib/match/index.js":[157,7,8592,5464],"./fi/index.js":[3596,7,8592,4420],"./fr-CA/_lib/formatLong/index.js":[85947,7,8592,4367],"./fr-CA/index.js":[73723,7,8592,1688],"./fr-CH/_lib/formatLong/index.js":[27414,7,8592,3603],"./fr-CH/_lib/formatRelative/index.js":[66155,7,8592],"./fr-CH/index.js":[24565,7,8592,4087],"./fr/_lib/formatDistance/index.js":[26839,7,8592],"./fr/_lib/formatLong/index.js":[32554,7,8592,7586],"./fr/_lib/formatRelative/index.js":[15328,7,8592],"./fr/_lib/localize/index.js":[29821,7,8592,6409],"./fr/_lib/match/index.js":[57047,7,8592,7405],"./fr/index.js":[34153,7,8592,5146],"./fy/_lib/formatDistance/index.js":[60373,7,8592],"./fy/_lib/formatLong/index.js":[97771,7,8592,7654],"./fy/_lib/formatRelative/index.js":[33851,7,8592],"./fy/_lib/localize/index.js":[86993,7,8592,6579],"./fy/_lib/match/index.js":[48603,7,8592,5284],"./fy/index.js":[73434,7,8592,7176],"./gd/_lib/formatDistance/index.js":[45690,7,8592],"./gd/_lib/formatLong/index.js":[2660,7,8592,2e3],"./gd/_lib/formatRelative/index.js":[30700,7,8592],"./gd/_lib/localize/index.js":[40751,7,8592,8987],"./gd/_lib/match/index.js":[40421,7,8592,8809],"./gd/index.js":[48569,7,8592,296],"./gl/_lib/formatDistance/index.js":[35871,7,8592],"./gl/_lib/formatLong/index.js":[30449,7,8592,359],"./gl/_lib/formatRelative/index.js":[95563,7,8592],"./gl/_lib/localize/index.js":[61905,7,8592,594],"./gl/_lib/match/index.js":[33150,7,8592,5012],"./gl/index.js":[96508,7,8592,4612],"./gu/_lib/formatDistance/index.js":[88210,7,8592],"./gu/_lib/formatLong/index.js":[63333,7,8592,7308],"./gu/_lib/formatRelative/index.js":[89348,7,8592],"./gu/_lib/localize/index.js":[50143,7,8592,6108],"./gu/_lib/match/index.js":[50932,7,8592,7091],"./gu/index.js":[75732,7,8592,6971],"./he/_lib/formatDistance/index.js":[42191,7,8592],"./he/_lib/formatLong/index.js":[13925,7,8592,7992],"./he/_lib/formatRelative/index.js":[11481,7,8592],"./he/_lib/localize/index.js":[19661,7,8592,5989],"./he/_lib/match/index.js":[41291,7,8592,5362],"./he/index.js":[86517,7,8592,340],"./hi/_lib/formatDistance/index.js":[52573,7,8592,9170],"./hi/_lib/formatLong/index.js":[30535,7,8592,9664],"./hi/_lib/formatRelative/index.js":[65379,7,8592],"./hi/_lib/localize/index.js":[35423,9,8592,383],"./hi/_lib/match/index.js":[78198,7,8592,652],"./hi/index.js":[29562,7,8592,2592],"./hr/_lib/formatDistance/index.js":[7652,7,8592],"./hr/_lib/formatLong/index.js":[29577,7,8592,6290],"./hr/_lib/formatRelative/index.js":[27603,7,8592],"./hr/_lib/localize/index.js":[12512,7,8592,5734],"./hr/_lib/match/index.js":[83880,7,8592,8808],"./hr/index.js":[41499,7,8592,9108],"./ht/_lib/formatDistance/index.js":[17743,7,8592],"./ht/_lib/formatLong/index.js":[50596,7,8592,1669],"./ht/_lib/formatRelative/index.js":[66473,7,8592],"./ht/_lib/localize/index.js":[98942,7,8592,5217],"./ht/_lib/match/index.js":[18649,7,8592,4042],"./ht/index.js":[91792,7,8592,6132],"./hu/_lib/formatDistance/index.js":[74406,7,8592],"./hu/_lib/formatLong/index.js":[53971,7,8592,7275],"./hu/_lib/formatRelative/index.js":[48580,7,8592],"./hu/_lib/localize/index.js":[6998,7,8592,8730],"./hu/_lib/match/index.js":[69897,7,8592,4330],"./hu/index.js":[85980,7,8592,7955],"./hy/_lib/formatDistance/index.js":[50897,7,8592],"./hy/_lib/formatLong/index.js":[11837,7,8592,1408],"./hy/_lib/formatRelative/index.js":[3543,7,8592],"./hy/_lib/localize/index.js":[90151,7,8592,81],"./hy/_lib/match/index.js":[97177,7,8592,4931],"./hy/index.js":[83268,7,8592,5803],"./id/_lib/formatDistance/index.js":[70846,7,8592],"./id/_lib/formatLong/index.js":[53405,7,8592,7106],"./id/_lib/formatRelative/index.js":[97180,7,8592],"./id/_lib/localize/index.js":[35645,7,8592,4320],"./id/_lib/match/index.js":[87601,7,8592,3434],"./id/index.js":[90146,7,8592,3963],"./is/_lib/formatDistance/index.js":[2370,7,8592],"./is/_lib/formatLong/index.js":[74096,7,8592,1427],"./is/_lib/formatRelative/index.js":[42141,7,8592],"./is/_lib/localize/index.js":[12161,7,8592,5221],"./is/_lib/match/index.js":[20798,7,8592,4321],"./is/index.js":[84111,7,8592,5121],"./it-CH/_lib/formatLong/index.js":[31519,7,8592,6685],"./it-CH/index.js":[87736,7,8592,2324],"./it/_lib/formatDistance/index.js":[40358,7,8592],"./it/_lib/formatLong/index.js":[29588,7,8592,7173],"./it/_lib/formatRelative/index.js":[91403,7,8592,5096],"./it/_lib/localize/index.js":[62007,7,8592,5232],"./it/_lib/match/index.js":[94070,7,8592,4604],"./it/index.js":[93722,7,8592,6815],"./ja-Hira/_lib/formatDistance/index.js":[84703,7,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,7,8592,7336],"./ja-Hira/_lib/formatRelative/index.js":[93381,7,8592],"./ja-Hira/_lib/localize/index.js":[35710,7,8592,3665],"./ja-Hira/_lib/match/index.js":[69417,7,8592,3148],"./ja-Hira/index.js":[12944,7,8592,1464],"./ja/_lib/formatDistance/index.js":[68018,7,8592],"./ja/_lib/formatLong/index.js":[45602,7,8592,1264],"./ja/_lib/formatRelative/index.js":[65297,7,8592],"./ja/_lib/localize/index.js":[77420,7,8592,800],"./ja/_lib/match/index.js":[83926,7,8592,4403],"./ja/index.js":[89251,7,8592,6422],"./ka/_lib/formatDistance/index.js":[39442,7,8592],"./ka/_lib/formatLong/index.js":[960,7,8592,6634],"./ka/_lib/formatRelative/index.js":[18861,7,8592],"./ka/_lib/localize/index.js":[85798,7,8592,599],"./ka/_lib/match/index.js":[55077,7,8592,3545],"./ka/index.js":[34010,7,8592,1289],"./kk/_lib/formatDistance/index.js":[44502,7,8592],"./kk/_lib/formatLong/index.js":[79591,7,8592,1473],"./kk/_lib/formatRelative/index.js":[80876,7,8592,1098],"./kk/_lib/localize/index.js":[16163,7,8592,9023],"./kk/_lib/match/index.js":[11079,7,8592,1038],"./kk/index.js":[61615,7,8592,9444],"./km/_lib/formatDistance/index.js":[69355,7,8592],"./km/_lib/formatLong/index.js":[64335,7,8592,5713],"./km/_lib/formatRelative/index.js":[68462,7,8592],"./km/_lib/localize/index.js":[32885,7,8592,5727],"./km/_lib/match/index.js":[49242,7,8592,3286],"./km/index.js":[98510,7,8592,2044],"./kn/_lib/formatDistance/index.js":[93557,7,8592],"./kn/_lib/formatLong/index.js":[19335,7,8592,2367],"./kn/_lib/formatRelative/index.js":[19080,7,8592],"./kn/_lib/localize/index.js":[83848,7,8592,61],"./kn/_lib/match/index.js":[36809,7,8592,4054],"./kn/index.js":[99517,7,8592,1417],"./ko/_lib/formatDistance/index.js":[21540,7,8592],"./ko/_lib/formatLong/index.js":[47237,7,8592,5780],"./ko/_lib/formatRelative/index.js":[91078,7,8592],"./ko/_lib/localize/index.js":[89409,7,8592,1075],"./ko/_lib/match/index.js":[38567,7,8592,9545],"./ko/index.js":[15058,7,8592,404],"./lb/_lib/formatDistance/index.js":[81904,7,8592],"./lb/_lib/formatLong/index.js":[53103,7,8592,5735],"./lb/_lib/formatRelative/index.js":[64861,7,8592],"./lb/_lib/localize/index.js":[13317,7,8592,8947],"./lb/_lib/match/index.js":[72652,7,8592,6123],"./lb/index.js":[61953,7,8592,9937],"./lt/_lib/formatDistance/index.js":[55348,7,8592],"./lt/_lib/formatLong/index.js":[18290,7,8592,5214],"./lt/_lib/formatRelative/index.js":[53257,7,8592],"./lt/_lib/localize/index.js":[62395,7,8592,6006],"./lt/_lib/match/index.js":[5825,7,8592,8766],"./lt/index.js":[35901,7,8592,1422],"./lv/_lib/formatDistance/index.js":[28910,7,8592],"./lv/_lib/formatLong/index.js":[86421,7,8592,2624],"./lv/_lib/formatRelative/index.js":[60151,7,8592,3746],"./lv/_lib/localize/index.js":[44960,7,8592,406],"./lv/_lib/match/index.js":[4876,7,8592,4139],"./lv/index.js":[82008,7,8592,2537],"./mk/_lib/formatDistance/index.js":[38992,7,8592],"./mk/_lib/formatLong/index.js":[7479,7,8592,6156],"./mk/_lib/formatRelative/index.js":[41655,7,8592,903],"./mk/_lib/localize/index.js":[23458,7,8592,4893],"./mk/_lib/match/index.js":[82975,7,8592,9858],"./mk/index.js":[21880,7,8592,2683],"./mn/_lib/formatDistance/index.js":[61341,7,8592],"./mn/_lib/formatLong/index.js":[19732,7,8592,5992],"./mn/_lib/formatRelative/index.js":[98225,7,8592],"./mn/_lib/localize/index.js":[89576,7,8592,4261],"./mn/_lib/match/index.js":[33306,7,8592,5055],"./mn/index.js":[31937,7,8592,4446],"./ms/_lib/formatDistance/index.js":[97808,7,8592],"./ms/_lib/formatLong/index.js":[61962,7,8592,6623],"./ms/_lib/formatRelative/index.js":[68530,7,8592],"./ms/_lib/localize/index.js":[13241,7,8592,3368],"./ms/_lib/match/index.js":[67079,7,8592,9302],"./ms/index.js":[25098,7,8592,5705],"./mt/_lib/formatDistance/index.js":[14611,7,8592],"./mt/_lib/formatLong/index.js":[65011,7,8592,1161],"./mt/_lib/formatRelative/index.js":[44521,7,8592],"./mt/_lib/localize/index.js":[69408,7,8592,6433],"./mt/_lib/match/index.js":[29726,7,8592,4216],"./mt/index.js":[12811,7,8592,1911],"./nb/_lib/formatDistance/index.js":[59968,7,8592],"./nb/_lib/formatLong/index.js":[20511,7,8592,5168],"./nb/_lib/formatRelative/index.js":[11639,7,8592],"./nb/_lib/localize/index.js":[94249,7,8592,4378],"./nb/_lib/match/index.js":[63498,7,8592,9691],"./nb/index.js":[61295,7,8592,2392],"./nl-BE/_lib/formatDistance/index.js":[16129,7,8592],"./nl-BE/_lib/formatLong/index.js":[17657,7,8592,3039],"./nl-BE/_lib/formatRelative/index.js":[89811,7,8592],"./nl-BE/_lib/localize/index.js":[58816,7,8592,1681],"./nl-BE/_lib/match/index.js":[28333,7,8592,2237],"./nl-BE/index.js":[70296,7,8592,4862],"./nl/_lib/formatDistance/index.js":[57117,7,8592],"./nl/_lib/formatLong/index.js":[57197,7,8592,2377],"./nl/_lib/formatRelative/index.js":[62818,7,8592],"./nl/_lib/localize/index.js":[67706,7,8592,3283],"./nl/_lib/match/index.js":[61430,7,8592,9229],"./nl/index.js":[80775,7,8592,9354],"./nn/_lib/formatDistance/index.js":[4563,7,8592],"./nn/_lib/formatLong/index.js":[89212,7,8592,169],"./nn/_lib/formatRelative/index.js":[2565,7,8592],"./nn/_lib/localize/index.js":[28456,7,8592,4340],"./nn/_lib/match/index.js":[51571,7,8592,9185],"./nn/index.js":[34632,7,8592,7506],"./oc/_lib/formatDistance/index.js":[16585,7,8592],"./oc/_lib/formatLong/index.js":[96725,7,8592,415],"./oc/_lib/formatRelative/index.js":[7548,7,8592],"./oc/_lib/localize/index.js":[93417,7,8592,5746],"./oc/_lib/match/index.js":[18145,7,8592,7829],"./oc/index.js":[68311,7,8592,7250],"./pl/_lib/formatDistance/index.js":[62056,7,8592],"./pl/_lib/formatLong/index.js":[47448,7,8592,5539],"./pl/_lib/formatRelative/index.js":[65991,7,8592,6160],"./pl/_lib/localize/index.js":[4306,7,8592,3498],"./pl/_lib/match/index.js":[76075,7,8592,7768],"./pl/index.js":[8554,7,8592,9134],"./pt-BR/_lib/formatDistance/index.js":[52638,7,8592],"./pt-BR/_lib/formatLong/index.js":[33247,7,8592,4753],"./pt-BR/_lib/formatRelative/index.js":[25492,7,8592],"./pt-BR/_lib/localize/index.js":[81046,7,8592,2258],"./pt-BR/_lib/match/index.js":[63770,7,8592,9792],"./pt-BR/index.js":[47569,7,8592,1100],"./pt/_lib/formatDistance/index.js":[55488,7,8592],"./pt/_lib/formatLong/index.js":[5133,7,8592,2741],"./pt/_lib/formatRelative/index.js":[7493,7,8592],"./pt/_lib/localize/index.js":[58360,7,8592,3713],"./pt/_lib/match/index.js":[37200,7,8592,7033],"./pt/index.js":[24239,7,8592,3530],"./ro/_lib/formatDistance/index.js":[18199,7,8592],"./ro/_lib/formatLong/index.js":[84311,7,8592,173],"./ro/_lib/formatRelative/index.js":[97974,7,8592],"./ro/_lib/localize/index.js":[64729,7,8592,470],"./ro/_lib/match/index.js":[9202,7,8592,9975],"./ro/index.js":[51055,7,8592,5563],"./ru/_lib/formatDistance/index.js":[90650,7,8592],"./ru/_lib/formatLong/index.js":[12580,7,8592,9390],"./ru/_lib/formatRelative/index.js":[15994,7,8592,1338],"./ru/_lib/localize/index.js":[66943,7,8592,6325],"./ru/_lib/match/index.js":[86374,7,8592,7339],"./ru/index.js":[27413,7,8592,9896],"./sk/_lib/formatDistance/index.js":[32882,7,8592],"./sk/_lib/formatLong/index.js":[95087,7,8592,6050],"./sk/_lib/formatRelative/index.js":[35507,7,8592,3951],"./sk/_lib/localize/index.js":[37369,7,8592,3264],"./sk/_lib/match/index.js":[74329,7,8592,9460],"./sk/index.js":[17065,7,8592,5064],"./sl/_lib/formatDistance/index.js":[57613,7,8592],"./sl/_lib/formatLong/index.js":[66302,7,8592,2857],"./sl/_lib/formatRelative/index.js":[92131,7,8592],"./sl/_lib/localize/index.js":[2942,7,8592,6363],"./sl/_lib/match/index.js":[36326,7,8592,7341],"./sl/index.js":[62166,7,8592,2157],"./sq/_lib/formatDistance/index.js":[82569,7,8592],"./sq/_lib/formatLong/index.js":[32784,7,8592,314],"./sq/_lib/formatRelative/index.js":[44390,7,8592],"./sq/_lib/localize/index.js":[26425,7,8592,9930],"./sq/_lib/match/index.js":[72140,7,8592,1445],"./sq/index.js":[70797,7,8592,8556],"./sr-Latn/_lib/formatDistance/index.js":[69014,7,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,7,8592,275],"./sr-Latn/_lib/formatRelative/index.js":[42428,7,8592],"./sr-Latn/_lib/localize/index.js":[92773,7,8592,7136],"./sr-Latn/_lib/match/index.js":[7766,7,8592,3177],"./sr-Latn/index.js":[99064,7,8592,2152],"./sr/_lib/formatDistance/index.js":[55503,7,8592],"./sr/_lib/formatLong/index.js":[13465,7,8592,232],"./sr/_lib/formatRelative/index.js":[25743,7,8592],"./sr/_lib/localize/index.js":[30172,7,8592,5864],"./sr/_lib/match/index.js":[81613,7,8592,7316],"./sr/index.js":[15930,7,8592,5831],"./sv/_lib/formatDistance/index.js":[81387,7,8592],"./sv/_lib/formatLong/index.js":[20660,7,8592,5204],"./sv/_lib/formatRelative/index.js":[43502,7,8592],"./sv/_lib/localize/index.js":[32384,7,8592,4345],"./sv/_lib/match/index.js":[69940,7,8592,7105],"./sv/index.js":[81413,7,8592,5396],"./ta/_lib/formatDistance/index.js":[66840,7,8592],"./ta/_lib/formatLong/index.js":[49391,7,8592,5892],"./ta/_lib/formatRelative/index.js":[99284,7,8592],"./ta/_lib/localize/index.js":[61290,7,8592,6239],"./ta/_lib/match/index.js":[33749,7,8592,4720],"./ta/index.js":[21486,7,8592,7983],"./te/_lib/formatDistance/index.js":[38,7,8592],"./te/_lib/formatLong/index.js":[34703,7,8592,4094],"./te/_lib/formatRelative/index.js":[46611,7,8592],"./te/_lib/localize/index.js":[86184,7,8592,118],"./te/_lib/match/index.js":[17208,7,8592,7193],"./te/index.js":[52492,7,8592,7183],"./th/_lib/formatDistance/index.js":[32939,7,8592],"./th/_lib/formatLong/index.js":[96146,7,8592,8475],"./th/_lib/formatRelative/index.js":[97294,7,8592],"./th/_lib/localize/index.js":[44204,7,8592,6203],"./th/_lib/match/index.js":[59829,7,8592,2626],"./th/index.js":[74785,7,8592,4008],"./tr/_lib/formatDistance/index.js":[77216,7,8592],"./tr/_lib/formatLong/index.js":[68379,7,8592,5102],"./tr/_lib/formatRelative/index.js":[93999,7,8592],"./tr/_lib/localize/index.js":[8830,7,8592,7157],"./tr/_lib/match/index.js":[58828,7,8592,3128],"./tr/index.js":[63131,7,8592,8302],"./ug/_lib/formatDistance/index.js":[69442,7,8592],"./ug/_lib/formatLong/index.js":[36922,7,8592,5002],"./ug/_lib/formatRelative/index.js":[20290,7,8592],"./ug/_lib/localize/index.js":[82490,7,8592,6604],"./ug/_lib/match/index.js":[85282,7,8592,8004],"./ug/index.js":[60182,7,8592,6934],"./uk/_lib/formatDistance/index.js":[10017,7,8592],"./uk/_lib/formatLong/index.js":[26136,7,8592,8806],"./uk/_lib/formatRelative/index.js":[88271,7,4,8592],"./uk/_lib/localize/index.js":[10954,7,8592,1193],"./uk/_lib/match/index.js":[71680,7,8592,6954],"./uk/index.js":[12509,7,4,8592,2509],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,7,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,7,8592,160],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,7,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,7,8592,2654],"./uz-Cyrl/_lib/match/index.js":[75798,7,8592,1360],"./uz-Cyrl/index.js":[14527,7,8592,8932],"./uz/_lib/formatDistance/index.js":[27197,7,8592],"./uz/_lib/formatLong/index.js":[27810,7,8592,4328],"./uz/_lib/formatRelative/index.js":[22175,7,8592],"./uz/_lib/localize/index.js":[6881,7,8592,6425],"./uz/_lib/match/index.js":[19263,7,8592,2880],"./uz/index.js":[44203,7,8592,6896],"./vi/_lib/formatDistance/index.js":[61664,7,8592],"./vi/_lib/formatLong/index.js":[42296,7,8592,3405],"./vi/_lib/formatRelative/index.js":[55191,7,8592],"./vi/_lib/localize/index.js":[67431,7,8592,5843],"./vi/_lib/match/index.js":[98442,7,8592,3319],"./vi/index.js":[48875,7,8592,6677],"./zh-CN/_lib/formatDistance/index.js":[33437,7,8592],"./zh-CN/_lib/formatLong/index.js":[91583,7,8592,485],"./zh-CN/_lib/formatRelative/index.js":[95629,7,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,7,8592,9169],"./zh-CN/_lib/match/index.js":[71362,7,8592,7103],"./zh-CN/index.js":[86335,7,8592,8664],"./zh-HK/_lib/formatDistance/index.js":[37348,7,8592],"./zh-HK/_lib/formatLong/index.js":[60924,7,8592,3215],"./zh-HK/_lib/formatRelative/index.js":[22164,7,8592],"./zh-HK/_lib/localize/index.js":[39264,7,8592,1780],"./zh-HK/_lib/match/index.js":[50358,7,8592,5641],"./zh-HK/index.js":[59277,7,8592,2336],"./zh-TW/_lib/formatDistance/index.js":[31613,7,8592],"./zh-TW/_lib/formatLong/index.js":[1239,7,8592,248],"./zh-TW/_lib/formatRelative/index.js":[13240,7,8592],"./zh-TW/_lib/localize/index.js":[29850,7,8592,9886],"./zh-TW/_lib/match/index.js":[38819,7,8592,8041],"./zh-TW/index.js":[74565,7,8592,8978]};function ki(an){if(!mr.o(ii,an))return Promise.resolve().then(()=>{var ri=new Error("Cannot find module '"+an+"'");throw ri.code="MODULE_NOT_FOUND",ri});var gi=ii[an],ho=gi[0];return Promise.all(gi.slice(2).map(mr.e)).then(()=>mr.t(ho,16|gi[1]))}ki.keys=()=>Object.keys(ii),ki.id=71213,Zi.exports=ki}},Zi=>{Zi(Zi.s=92988)}]); \ No newline at end of file +var runtime=function(c){"use strict";var l,M=Object.prototype,p=M.hasOwnProperty,w=Object.defineProperty||function(r,t,e){r[t]=e.value},O="function"==typeof Symbol?Symbol:{},L=O.iterator||"@@iterator",z=O.asyncIterator||"@@asyncIterator",_=O.toStringTag||"@@toStringTag";function v(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{v({},"")}catch{v=function(t,e,o){return t[e]=o}}function R(r,t,e,o){var i=Object.create((t&&t.prototype instanceof j?t:j).prototype),a=new I(o||[]);return w(i,"_invoke",{value:H(r,e,a)}),i}function k(r,t,e){try{return{type:"normal",arg:r.call(t,e)}}catch(o){return{type:"throw",arg:o}}}c.wrap=R;var Y="suspendedStart",q="executing",b="completed",s={};function j(){}function S(){}function d(){}var N={};v(N,L,function(){return this});var T=Object.getPrototypeOf,E=T&&T(T(A([])));E&&E!==M&&p.call(E,L)&&(N=E);var g=d.prototype=j.prototype=Object.create(N);function D(r){["next","throw","return"].forEach(function(t){v(r,t,function(e){return this._invoke(t,e)})})}function G(r,t){function e(i,a,u,h){var f=k(r[i],r,a);if("throw"!==f.type){var C=f.arg,m=C.value;return m&&"object"==typeof m&&p.call(m,"__await")?t.resolve(m.__await).then(function(y){e("next",y,u,h)},function(y){e("throw",y,u,h)}):t.resolve(m).then(function(y){C.value=y,u(C)},function(y){return e("throw",y,u,h)})}h(f.arg)}var o;w(this,"_invoke",{value:function n(i,a){function u(){return new t(function(h,f){e(i,a,h,f)})}return o=o?o.then(u,u):u()}})}function H(r,t,e){var o=Y;return function(i,a){if(o===q)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return $()}for(e.method=i,e.arg=a;;){var u=e.delegate;if(u){var h=W(u,e);if(h){if(h===s)continue;return h}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(o===Y)throw o=b,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);o=q;var f=k(r,t,e);if("normal"===f.type){if(o=e.done?b:"suspendedYield",f.arg===s)continue;return{value:f.arg,done:e.done}}"throw"===f.type&&(o=b,e.method="throw",e.arg=f.arg)}}}function W(r,t){var e=t.method,o=r.iterator[e];if(o===l)return t.delegate=null,"throw"===e&&r.iterator.return&&(t.method="return",t.arg=l,W(r,t),"throw"===t.method)||"return"!==e&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+e+"' method")),s;var n=k(o,r.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var i=n.arg;return i?i.done?(t[r.resultName]=i.value,t.next=r.nextLoc,"return"!==t.method&&(t.method="next",t.arg=l),t.delegate=null,s):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function J(r){var t={tryLoc:r[0]};1 in r&&(t.catchLoc=r[1]),2 in r&&(t.finallyLoc=r[2],t.afterLoc=r[3]),this.tryEntries.push(t)}function P(r){var t=r.completion||{};t.type="normal",delete t.arg,r.completion=t}function I(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(J,this),this.reset(!0)}function A(r){if(r){var t=r[L];if(t)return t.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var e=-1,o=function n(){for(;++e=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return e("end");if(n.tryLoc<=this.prev){var a=p.call(n,"catchLoc"),u=p.call(n,"finallyLoc");if(a&&u){if(this.prev=0;--e){var o=this.tryEntries[e];if(o.tryLoc<=this.prev&&p.call(o,"finallyLoc")&&this.prev=0;--t){var e=this.tryEntries[t];if(e.finallyLoc===r)return this.complete(e.completion,e.afterLoc),P(e),s}},catch:function(r){for(var t=this.tryEntries.length-1;t>=0;--t){var e=this.tryEntries[t];if(e.tryLoc===r){var o=e.completion;if("throw"===o.type){var n=o.arg;P(e)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(r,t,e){return this.delegate={iterator:A(r),resultName:t,nextLoc:e},"next"===this.method&&(this.arg=l),s}},c}("object"==typeof module?module.exports:{});try{regeneratorRuntime=runtime}catch{"object"==typeof globalThis?globalThis.regeneratorRuntime=runtime:Function("r","regeneratorRuntime = r")(runtime)}(()=>{"use strict";var e,_={},v={};function r(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={id:e,loaded:!1,exports:{}};return _[e](t,t.exports,r),t.loaded=!0,t.exports}r.m=_,e=[],r.O=(n,t,i,f)=>{if(!t){var a=1/0;for(o=0;o=f)&&Object.keys(r.O).every(b=>r.O[b](t[d]))?t.splice(d--,1):(s=!1,f0&&e[o-1][2]>f;o--)e[o]=e[o-1];e[o]=[t,i,f]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},(()=>{var n,e=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__;r.t=function(t,i){if(1&i&&(t=this(t)),8&i||"object"==typeof t&&t&&(4&i&&t.__esModule||16&i&&"function"==typeof t.then))return t;var f=Object.create(null);r.r(f);var o={};n=n||[null,e({}),e([]),e(e)];for(var a=2&i&&t;"object"==typeof a&&!~n.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(s=>o[s]=()=>t[s]);return o.default=()=>t,r.d(f,o),f}})(),r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>(8592===e?"common":e)+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="dotcms-binary-field-builder:";r.l=(t,i,f,o)=>{if(e[t])e[t].push(i);else{var a,s;if(void 0!==f)for(var d=document.getElementsByTagName("script"),u=0;u{a.onerror=a.onload=null,clearTimeout(p);var y=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),y&&y.forEach(h=>h(b)),g)return g(b)},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)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={3666:0};r.f.j=(i,f)=>{var o=r.o(e,i)?e[i]:void 0;if(0!==o)if(o)f.push(o[2]);else if(3666!=i){var a=new Promise((l,c)=>o=e[i]=[l,c]);f.push(o[2]=a);var s=r.p+r.u(i),d=new Error;r.l(s,l=>{if(r.o(e,i)&&(0!==(o=e[i])&&(e[i]=void 0),o)){var c=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;d.message="Loading chunk "+i+" failed.\n("+c+": "+p+")",d.name="ChunkLoadError",d.type=c,d.request=p,o[1](d)}},"chunk-"+i,i)}else e[i]=0},r.O.j=i=>0===e[i];var n=(i,f)=>{var d,u,[o,a,s]=f,l=0;if(o.some(p=>0!==e[p])){for(d in a)r.o(a,d)&&(r.m[d]=a[d]);if(s)var c=s(r)}for(i&&i(f);l{!function(e){const n=e.performance;function i(I){n&&n.mark&&n.mark(I)}function r(I,_){n&&n.measure&&n.measure(I,_)}i("Zone");const c=e.__Zone_symbol_prefix||"__zone_symbol__";function u(I){return c+I}const f=!0===e[u("forceDuplicateZoneCheck")];if(e.Zone){if(f||"function"!=typeof e.Zone.__symbol__)throw new Error("Zone already loaded.");return e.Zone}let p=(()=>{class I{constructor(t,o){this._parent=t,this._name=o?o.name||"unnamed":"",this._properties=o&&o.properties||{},this._zoneDelegate=new T(this,this._parent&&this._parent._zoneDelegate,o)}static assertZonePatched(){if(e.Promise!==K.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 t=I.current;for(;t.parent;)t=t.parent;return t}static get current(){return G.zone}static get currentTask(){return te}static __load_patch(t,o,y=!1){if(K.hasOwnProperty(t)){if(!y&&f)throw Error("Already loaded patch: "+t)}else if(!e["__Zone_disable_"+t]){const P="Zone:"+t;i(P),K[t]=o(e,I,le),r(P,P)}}get parent(){return this._parent}get name(){return this._name}get(t){const o=this.getZoneWith(t);if(o)return o._properties[t]}getZoneWith(t){let o=this;for(;o;){if(o._properties.hasOwnProperty(t))return o;o=o._parent}return null}fork(t){if(!t)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,t)}wrap(t,o){if("function"!=typeof t)throw new Error("Expecting function got: "+t);const y=this._zoneDelegate.intercept(this,t,o),P=this;return function(){return P.runGuarded(y,this,arguments,o)}}run(t,o,y,P){G={parent:G,zone:this};try{return this._zoneDelegate.invoke(this,t,o,y,P)}finally{G=G.parent}}runGuarded(t,o=null,y,P){G={parent:G,zone:this};try{try{return this._zoneDelegate.invoke(this,t,o,y,P)}catch(J){if(this._zoneDelegate.handleError(this,J))throw J}}finally{G=G.parent}}runTask(t,o,y){if(t.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");if(t.state===H&&(t.type===R||t.type===M))return;const P=t.state!=X;P&&t._transitionTo(X,Z),t.runCount++;const J=te;te=t,G={parent:G,zone:this};try{t.type==M&&t.data&&!t.data.isPeriodic&&(t.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,t,o,y)}catch(l){if(this._zoneDelegate.handleError(this,l))throw l}}finally{t.state!==H&&t.state!==Y&&(t.type==R||t.data&&t.data.isPeriodic?P&&t._transitionTo(Z,X):(t.runCount=0,this._updateTaskCount(t,-1),P&&t._transitionTo(H,X,H))),G=G.parent,te=J}}scheduleTask(t){if(t.zone&&t.zone!==this){let y=this;for(;y;){if(y===t.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${t.zone.name}`);y=y.parent}}t._transitionTo(W,H);const o=[];t._zoneDelegates=o,t._zone=this;try{t=this._zoneDelegate.scheduleTask(this,t)}catch(y){throw t._transitionTo(Y,W,H),this._zoneDelegate.handleError(this,y),y}return t._zoneDelegates===o&&this._updateTaskCount(t,1),t.state==W&&t._transitionTo(Z,W),t}scheduleMicroTask(t,o,y,P){return this.scheduleTask(new m(v,t,o,y,P,void 0))}scheduleMacroTask(t,o,y,P,J){return this.scheduleTask(new m(M,t,o,y,P,J))}scheduleEventTask(t,o,y,P,J){return this.scheduleTask(new m(R,t,o,y,P,J))}cancelTask(t){if(t.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(t.zone||z).name+"; Execution: "+this.name+")");t._transitionTo(A,Z,X);try{this._zoneDelegate.cancelTask(this,t)}catch(o){throw t._transitionTo(Y,A),this._zoneDelegate.handleError(this,o),o}return this._updateTaskCount(t,-1),t._transitionTo(H,A),t.runCount=0,t}_updateTaskCount(t,o){const y=t._zoneDelegates;-1==o&&(t._zoneDelegates=null);for(let P=0;PI.hasTask(t,o),onScheduleTask:(I,_,t,o)=>I.scheduleTask(t,o),onInvokeTask:(I,_,t,o,y,P)=>I.invokeTask(t,o,y,P),onCancelTask:(I,_,t,o)=>I.cancelTask(t,o)};class T{constructor(_,t,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=_,this._parentDelegate=t,this._forkZS=o&&(o&&o.onFork?o:t._forkZS),this._forkDlgt=o&&(o.onFork?t:t._forkDlgt),this._forkCurrZone=o&&(o.onFork?this.zone:t._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:t._interceptZS),this._interceptDlgt=o&&(o.onIntercept?t:t._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this.zone:t._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:t._invokeZS),this._invokeDlgt=o&&(o.onInvoke?t:t._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this.zone:t._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:t._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?t:t._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this.zone:t._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:t._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?t:t._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this.zone:t._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:t._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?t:t._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this.zone:t._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:t._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?t:t._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this.zone:t._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;const y=o&&o.onHasTask;(y||t&&t._hasTaskZS)&&(this._hasTaskZS=y?o:g,this._hasTaskDlgt=t,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=_,o.onScheduleTask||(this._scheduleTaskZS=g,this._scheduleTaskDlgt=t,this._scheduleTaskCurrZone=this.zone),o.onInvokeTask||(this._invokeTaskZS=g,this._invokeTaskDlgt=t,this._invokeTaskCurrZone=this.zone),o.onCancelTask||(this._cancelTaskZS=g,this._cancelTaskDlgt=t,this._cancelTaskCurrZone=this.zone))}fork(_,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,_,t):new p(_,t)}intercept(_,t,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,_,t,o):t}invoke(_,t,o,y,P){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,_,t,o,y,P):t.apply(o,y)}handleError(_,t){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,_,t)}scheduleTask(_,t){let o=t;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,_,t),o||(o=t);else if(t.scheduleFn)t.scheduleFn(t);else{if(t.type!=v)throw new Error("Task is missing scheduleFn.");d(t)}return o}invokeTask(_,t,o,y){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,_,t,o,y):t.callback.apply(o,y)}cancelTask(_,t){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,_,t);else{if(!t.cancelFn)throw Error("Task is not cancelable");o=t.cancelFn(t)}return o}hasTask(_,t){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,_,t)}catch(o){this.handleError(_,o)}}_updateTaskCount(_,t){const o=this._taskCounts,y=o[_],P=o[_]=y+t;if(P<0)throw new Error("More tasks executed then were scheduled.");0!=y&&0!=P||this.hasTask(this.zone,{microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:_})}}class m{constructor(_,t,o,y,P,J){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=_,this.source=t,this.data=y,this.scheduleFn=P,this.cancelFn=J,!o)throw new Error("callback is not defined");this.callback=o;const l=this;this.invoke=_===R&&y&&y.useG?m.invokeTask:function(){return m.invokeTask.call(e,l,this,arguments)}}static invokeTask(_,t,o){_||(_=this),re++;try{return _.runCount++,_.zone.runTask(_,t,o)}finally{1==re&&L(),re--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(H,W)}_transitionTo(_,t,o){if(this._state!==t&&this._state!==o)throw new Error(`${this.type} '${this.source}': can not transition to '${_}', expecting state '${t}'${o?" or '"+o+"'":""}, was '${this._state}'.`);this._state=_,_==H&&(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 D=u("setTimeout"),S=u("Promise"),O=u("then");let E,F=[],V=!1;function d(I){if(0===re&&0===F.length)if(E||e[S]&&(E=e[S].resolve(0)),E){let _=E[O];_||(_=E.then),_.call(E,L)}else e[D](L,0);I&&F.push(I)}function L(){if(!V){for(V=!0;F.length;){const I=F;F=[];for(let _=0;_G,onUnhandledError:B,microtaskDrainDone:B,scheduleMicroTask:d,showUncaughtError:()=>!p[u("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:B,patchMethod:()=>B,bindArguments:()=>[],patchThen:()=>B,patchMacroTask:()=>B,patchEventPrototype:()=>B,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>B,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>B,wrapWithCurrentZone:()=>B,filterProperties:()=>[],attachOriginToPatched:()=>B,_redefineProperty:()=>B,patchCallbacks:()=>B};let G={parent:null,zone:new p(null,null)},te=null,re=0;function B(){}r("Zone","Zone"),e.Zone=p}(typeof window<"u"&&window||typeof self<"u"&&self||global);const fe=Object.getOwnPropertyDescriptor,be=Object.defineProperty,ye=Object.getPrototypeOf,lt=Object.create,ut=Array.prototype.slice,De="addEventListener",Ze="removeEventListener",Oe=Zone.__symbol__(De),Ie=Zone.__symbol__(Ze),se="true",ie="false",ge=Zone.__symbol__("");function Le(e,n){return Zone.current.wrap(e,n)}function Me(e,n,i,r,c){return Zone.current.scheduleMacroTask(e,n,i,r,c)}const x=Zone.__symbol__,we=typeof window<"u",de=we?window:void 0,$=we&&de||"object"==typeof self&&self||global,ht=[null];function Ae(e,n){for(let i=e.length-1;i>=0;i--)"function"==typeof e[i]&&(e[i]=Le(e[i],n+"_"+i));return e}function Fe(e){return!e||!1!==e.writable&&!("function"==typeof e.get&&typeof e.set>"u")}const Be=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Pe=!("nw"in $)&&typeof $.process<"u"&&"[object process]"==={}.toString.call($.process),He=!Pe&&!Be&&!(!we||!de.HTMLElement),Ue=typeof $.process<"u"&&"[object process]"==={}.toString.call($.process)&&!Be&&!(!we||!de.HTMLElement),Re={},qe=function(e){if(!(e=e||$.event))return;let n=Re[e.type];n||(n=Re[e.type]=x("ON_PROPERTY"+e.type));const i=this||e.target||$,r=i[n];let c;return He&&i===de&&"error"===e.type?(c=r&&r.call(this,e.message,e.filename,e.lineno,e.colno,e.error),!0===c&&e.preventDefault()):(c=r&&r.apply(this,arguments),null!=c&&!c&&e.preventDefault()),c};function We(e,n,i){let r=fe(e,n);if(!r&&i&&fe(i,n)&&(r={enumerable:!0,configurable:!0}),!r||!r.configurable)return;const c=x("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete r.writable,delete r.value;const u=r.get,f=r.set,p=n.substr(2);let g=Re[p];g||(g=Re[p]=x("ON_PROPERTY"+p)),r.set=function(T){let m=this;!m&&e===$&&(m=$),m&&(m[g]&&m.removeEventListener(p,qe),f&&f.apply(m,ht),"function"==typeof T?(m[g]=T,m.addEventListener(p,qe,!1)):m[g]=null)},r.get=function(){let T=this;if(!T&&e===$&&(T=$),!T)return null;const m=T[g];if(m)return m;if(u){let D=u&&u.call(this);if(D)return r.set.call(this,D),"function"==typeof T.removeAttribute&&T.removeAttribute(n),D}return null},be(e,n,r),e[c]=!0}function Xe(e,n,i){if(n)for(let r=0;rfunction(f,p){const g=i(f,p);return g.cbIdx>=0&&"function"==typeof p[g.cbIdx]?Me(g.name,p[g.cbIdx],g,c):u.apply(f,p)})}function ae(e,n){e[x("OriginalDelegate")]=n}let Ye=!1,je=!1;function mt(){if(Ye)return je;Ye=!0;try{const e=de.navigator.userAgent;(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/")||-1!==e.indexOf("Edge/"))&&(je=!0)}catch{}return je}Zone.__load_patch("ZoneAwarePromise",(e,n,i)=>{const r=Object.getOwnPropertyDescriptor,c=Object.defineProperty,f=i.symbol,p=[],g=!0===e[f("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],T=f("Promise"),m=f("then");i.onUnhandledError=l=>{if(i.showUncaughtError()){const s=l&&l.rejection;s?console.error("Unhandled Promise rejection:",s instanceof Error?s.message:s,"; Zone:",l.zone.name,"; Task:",l.task&&l.task.source,"; Value:",s,s instanceof Error?s.stack:void 0):console.error(l)}},i.microtaskDrainDone=()=>{for(;p.length;){const l=p.shift();try{l.zone.runGuarded(()=>{throw l.throwOriginal?l.rejection:l})}catch(s){O(s)}}};const S=f("unhandledPromiseRejectionHandler");function O(l){i.onUnhandledError(l);try{const s=n[S];"function"==typeof s&&s.call(this,l)}catch{}}function F(l){return l&&l.then}function V(l){return l}function E(l){return t.reject(l)}const d=f("state"),L=f("value"),z=f("finally"),H=f("parentPromiseValue"),W=f("parentPromiseState"),X=null,A=!0,Y=!1;function M(l,s){return a=>{try{G(l,s,a)}catch(h){G(l,!1,h)}}}const le=f("currentTaskTrace");function G(l,s,a){const h=function(){let l=!1;return function(a){return function(){l||(l=!0,a.apply(null,arguments))}}}();if(l===a)throw new TypeError("Promise resolved with itself");if(l[d]===X){let w=null;try{("object"==typeof a||"function"==typeof a)&&(w=a&&a.then)}catch(N){return h(()=>{G(l,!1,N)})(),l}if(s!==Y&&a instanceof t&&a.hasOwnProperty(d)&&a.hasOwnProperty(L)&&a[d]!==X)re(a),G(l,a[d],a[L]);else if(s!==Y&&"function"==typeof w)try{w.call(a,h(M(l,s)),h(M(l,!1)))}catch(N){h(()=>{G(l,!1,N)})()}else{l[d]=s;const N=l[L];if(l[L]=a,l[z]===z&&s===A&&(l[d]=l[W],l[L]=l[H]),s===Y&&a instanceof Error){const k=n.currentTask&&n.currentTask.data&&n.currentTask.data.__creationTrace__;k&&c(a,le,{configurable:!0,enumerable:!1,writable:!0,value:k})}for(let k=0;k{try{const b=l[L],C=!!a&&z===a[z];C&&(a[H]=b,a[W]=N);const j=s.run(k,void 0,C&&k!==E&&k!==V?[]:[b]);G(a,!0,j)}catch(b){G(a,!1,b)}},a)}const _=function(){};class t{static toString(){return"function ZoneAwarePromise() { [native code] }"}static resolve(s){return G(new this(null),A,s)}static reject(s){return G(new this(null),Y,s)}static race(s){let a,h,w=new this((b,C)=>{a=b,h=C});function N(b){a(b)}function k(b){h(b)}for(let b of s)F(b)||(b=this.resolve(b)),b.then(N,k);return w}static all(s){return t.allWithCallback(s)}static allSettled(s){return(this&&this.prototype instanceof t?this:t).allWithCallback(s,{thenCallback:h=>({status:"fulfilled",value:h}),errorCallback:h=>({status:"rejected",reason:h})})}static allWithCallback(s,a){let h,w,N=new this((j,U)=>{h=j,w=U}),k=2,b=0;const C=[];for(let j of s){F(j)||(j=this.resolve(j));const U=b;try{j.then(Q=>{C[U]=a?a.thenCallback(Q):Q,k--,0===k&&h(C)},Q=>{a?(C[U]=a.errorCallback(Q),k--,0===k&&h(C)):w(Q)})}catch(Q){w(Q)}k++,b++}return k-=2,0===k&&h(C),N}constructor(s){const a=this;if(!(a instanceof t))throw new Error("Must be an instanceof Promise.");a[d]=X,a[L]=[];try{s&&s(M(a,A),M(a,Y))}catch(h){G(a,!1,h)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return t}then(s,a){let h=this.constructor[Symbol.species];(!h||"function"!=typeof h)&&(h=this.constructor||t);const w=new h(_),N=n.current;return this[d]==X?this[L].push(N,w,s,a):B(this,N,w,s,a),w}catch(s){return this.then(null,s)}finally(s){let a=this.constructor[Symbol.species];(!a||"function"!=typeof a)&&(a=t);const h=new a(_);h[z]=z;const w=n.current;return this[d]==X?this[L].push(w,h,s,s):B(this,w,h,s,s),h}}t.resolve=t.resolve,t.reject=t.reject,t.race=t.race,t.all=t.all;const o=e[T]=e.Promise;e.Promise=t;const y=f("thenPatched");function P(l){const s=l.prototype,a=r(s,"then");if(a&&(!1===a.writable||!a.configurable))return;const h=s.then;s[m]=h,l.prototype.then=function(w,N){return new t((b,C)=>{h.call(this,b,C)}).then(w,N)},l[y]=!0}return i.patchThen=P,o&&(P(o),ce(e,"fetch",l=>function J(l){return function(s,a){let h=l.apply(s,a);if(h instanceof t)return h;let w=h.constructor;return w[y]||P(w),h}}(l))),Promise[n.__symbol__("uncaughtPromiseErrors")]=p,t}),Zone.__load_patch("toString",e=>{const n=Function.prototype.toString,i=x("OriginalDelegate"),r=x("Promise"),c=x("Error"),u=function(){if("function"==typeof this){const T=this[i];if(T)return"function"==typeof T?n.call(T):Object.prototype.toString.call(T);if(this===Promise){const m=e[r];if(m)return n.call(m)}if(this===Error){const m=e[c];if(m)return n.call(m)}}return n.call(this)};u[i]=n,Function.prototype.toString=u;const f=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":f.call(this)}});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 Et={useG:!0},ee={},$e={},Je=new RegExp("^"+ge+"(\\w+)(true|false)$"),xe=x("propagationStopped");function Ke(e,n){const i=(n?n(e):e)+ie,r=(n?n(e):e)+se,c=ge+i,u=ge+r;ee[e]={},ee[e][ie]=c,ee[e][se]=u}function Tt(e,n,i){const r=i&&i.add||De,c=i&&i.rm||Ze,u=i&&i.listeners||"eventListeners",f=i&&i.rmAll||"removeAllListeners",p=x(r),g="."+r+":",T="prependListener",m="."+T+":",D=function(E,d,L){if(E.isRemoved)return;const z=E.callback;"object"==typeof z&&z.handleEvent&&(E.callback=W=>z.handleEvent(W),E.originalDelegate=z),E.invoke(E,d,[L]);const H=E.options;H&&"object"==typeof H&&H.once&&d[c].call(d,L.type,E.originalDelegate?E.originalDelegate:E.callback,H)},S=function(E){if(!(E=E||e.event))return;const d=this||E.target||e,L=d[ee[E.type][ie]];if(L)if(1===L.length)D(L[0],d,E);else{const z=L.slice();for(let H=0;Hfunction(c,u){c[xe]=!0,r&&r.apply(c,u)})}function gt(e,n,i,r,c){const u=Zone.__symbol__(r);if(n[u])return;const f=n[u]=n[r];n[r]=function(p,g,T){return g&&g.prototype&&c.forEach(function(m){const D=`${i}.${r}::`+m,S=g.prototype;if(S.hasOwnProperty(m)){const O=e.ObjectGetOwnPropertyDescriptor(S,m);O&&O.value?(O.value=e.wrapWithCurrentZone(O.value,D),e._redefineProperty(g.prototype,m,O)):S[m]&&(S[m]=e.wrapWithCurrentZone(S[m],D))}else S[m]&&(S[m]=e.wrapWithCurrentZone(S[m],D))}),f.call(n,p,g,T)},e.attachOriginToPatched(n[r],f)}const Ve=["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],wt=["encrypted","waitingforkey","msneedkey","mozinterruptbegin","mozinterruptend"],et=["load"],tt=["blur","error","focus","load","resize","scroll","messageerror"],St=["bounce","finish","start"],nt=["loadstart","progress","abort","error","load","progress","timeout","loadend","readystatechange"],_e=["upgradeneeded","complete","abort","success","error","blocked","versionchange","close"],Dt=["close","error","open","message"],Zt=["error","message"],me=["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"].concat(["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],["autocomplete","autocompleteerror"],["toggle"],["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],Ve,["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"]);function rt(e,n,i){if(!i||0===i.length)return n;const r=i.filter(u=>u.target===e);if(!r||0===r.length)return n;const c=r[0].ignoreProperties;return n.filter(u=>-1===c.indexOf(u))}function q(e,n,i,r){e&&Xe(e,rt(e,n,i),r)}Zone.__load_patch("util",(e,n,i)=>{i.patchOnProperties=Xe,i.patchMethod=ce,i.bindArguments=Ae,i.patchMacroTask=pt;const r=n.__symbol__("BLACK_LISTED_EVENTS"),c=n.__symbol__("UNPATCHED_EVENTS");e[c]&&(e[r]=e[c]),e[r]&&(n[r]=n[c]=e[r]),i.patchEventPrototype=yt,i.patchEventTarget=Tt,i.isIEOrEdge=mt,i.ObjectDefineProperty=be,i.ObjectGetOwnPropertyDescriptor=fe,i.ObjectCreate=lt,i.ArraySlice=ut,i.patchClass=ke,i.wrapWithCurrentZone=Le,i.filterProperties=rt,i.attachOriginToPatched=ae,i._redefineProperty=Object.defineProperty,i.patchCallbacks=gt,i.getGlobalObjects=()=>({globalSources:$e,zoneSymbolEventNames:ee,eventNames:me,isBrowser:He,isMix:Ue,isNode:Pe,TRUE_STR:se,FALSE_STR:ie,ZONE_SYMBOL_PREFIX:ge,ADD_EVENT_LISTENER_STR:De,REMOVE_EVENT_LISTENER_STR:Ze})});const Ne=x("zoneTask");function Ee(e,n,i,r){let c=null,u=null;i+=r;const f={};function p(T){const m=T.data;return m.args[0]=function(){return T.invoke.apply(this,arguments)},m.handleId=c.apply(e,m.args),T}function g(T){return u.call(e,T.data.handleId)}c=ce(e,n+=r,T=>function(m,D){if("function"==typeof D[0]){const S={isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?D[1]||0:void 0,args:D},O=D[0];D[0]=function(){try{return O.apply(this,arguments)}finally{S.isPeriodic||("number"==typeof S.handleId?delete f[S.handleId]:S.handleId&&(S.handleId[Ne]=null))}};const F=Me(n,D[0],S,p,g);if(!F)return F;const V=F.data.handleId;return"number"==typeof V?f[V]=F:V&&(V[Ne]=F),V&&V.ref&&V.unref&&"function"==typeof V.ref&&"function"==typeof V.unref&&(F.ref=V.ref.bind(V),F.unref=V.unref.bind(V)),"number"==typeof V||V?V:F}return T.apply(e,D)}),u=ce(e,i,T=>function(m,D){const S=D[0];let O;"number"==typeof S?O=f[S]:(O=S&&S[Ne],O||(O=S)),O&&"string"==typeof O.type?"notScheduled"!==O.state&&(O.cancelFn&&O.data.isPeriodic||0===O.runCount)&&("number"==typeof S?delete f[S]:S&&(S[Ne]=null),O.zone.cancelTask(O)):T.apply(e,D)})}Zone.__load_patch("legacy",e=>{const n=e[Zone.__symbol__("legacyPatch")];n&&n()}),Zone.__load_patch("queueMicrotask",(e,n,i)=>{i.patchMethod(e,"queueMicrotask",r=>function(c,u){n.current.scheduleMicroTask("queueMicrotask",u[0])})}),Zone.__load_patch("timers",e=>{const n="set",i="clear";Ee(e,n,i,"Timeout"),Ee(e,n,i,"Interval"),Ee(e,n,i,"Immediate")}),Zone.__load_patch("requestAnimationFrame",e=>{Ee(e,"request","cancel","AnimationFrame"),Ee(e,"mozRequest","mozCancel","AnimationFrame"),Ee(e,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",(e,n)=>{const i=["alert","prompt","confirm"];for(let r=0;rfunction(g,T){return n.current.run(u,e,T,p)})}),Zone.__load_patch("EventTarget",(e,n,i)=>{(function Mt(e,n){n.patchEventPrototype(e,n)})(e,i),function Lt(e,n){if(Zone[n.symbol("patchEventTarget")])return;const{eventNames:i,zoneSymbolEventNames:r,TRUE_STR:c,FALSE_STR:u,ZONE_SYMBOL_PREFIX:f}=n.getGlobalObjects();for(let g=0;g{ke("MutationObserver"),ke("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",(e,n,i)=>{ke("IntersectionObserver")}),Zone.__load_patch("FileReader",(e,n,i)=>{ke("FileReader")}),Zone.__load_patch("on_property",(e,n,i)=>{!function Ot(e,n){if(Pe&&!Ue||Zone[e.symbol("patchEvents")])return;const i=typeof WebSocket<"u",r=n.__Zone_ignore_on_properties;if(He){const f=window,p=function _t(){try{const e=de.navigator.userAgent;if(-1!==e.indexOf("MSIE ")||-1!==e.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:f,ignoreProperties:["error"]}]:[];q(f,me.concat(["messageerror"]),r&&r.concat(p),ye(f)),q(Document.prototype,me,r),typeof f.SVGElement<"u"&&q(f.SVGElement.prototype,me,r),q(Element.prototype,me,r),q(HTMLElement.prototype,me,r),q(HTMLMediaElement.prototype,wt,r),q(HTMLFrameSetElement.prototype,Ve.concat(tt),r),q(HTMLBodyElement.prototype,Ve.concat(tt),r),q(HTMLFrameElement.prototype,et,r),q(HTMLIFrameElement.prototype,et,r);const g=f.HTMLMarqueeElement;g&&q(g.prototype,St,r);const T=f.Worker;T&&q(T.prototype,Zt,r)}const c=n.XMLHttpRequest;c&&q(c.prototype,nt,r);const u=n.XMLHttpRequestEventTarget;u&&q(u&&u.prototype,nt,r),typeof IDBIndex<"u"&&(q(IDBIndex.prototype,_e,r),q(IDBRequest.prototype,_e,r),q(IDBOpenDBRequest.prototype,_e,r),q(IDBDatabase.prototype,_e,r),q(IDBTransaction.prototype,_e,r),q(IDBCursor.prototype,_e,r)),i&&q(WebSocket.prototype,Dt,r)}(i,e)}),Zone.__load_patch("customElements",(e,n,i)=>{!function It(e,n){const{isBrowser:i,isMix:r}=n.getGlobalObjects();(i||r)&&e.customElements&&"customElements"in e&&n.patchCallbacks(n,e.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(e,i)}),Zone.__load_patch("XHR",(e,n)=>{!function g(T){const m=T.XMLHttpRequest;if(!m)return;const D=m.prototype;let O=D[Oe],F=D[Ie];if(!O){const v=T.XMLHttpRequestEventTarget;if(v){const M=v.prototype;O=M[Oe],F=M[Ie]}}const V="readystatechange",E="scheduled";function d(v){const M=v.data,R=M.target;R[u]=!1,R[p]=!1;const K=R[c];O||(O=R[Oe],F=R[Ie]),K&&F.call(R,V,K);const le=R[c]=()=>{if(R.readyState===R.DONE)if(!M.aborted&&R[u]&&v.state===E){const te=R[n.__symbol__("loadfalse")];if(0!==R.status&&te&&te.length>0){const re=v.invoke;v.invoke=function(){const B=R[n.__symbol__("loadfalse")];for(let I=0;Ifunction(v,M){return v[r]=0==M[2],v[f]=M[1],H.apply(v,M)}),Z=x("fetchTaskAborting"),X=x("fetchTaskScheduling"),A=ce(D,"send",()=>function(v,M){if(!0===n.current[X]||v[r])return A.apply(v,M);{const R={target:v,url:v[f],isPeriodic:!1,args:M,aborted:!1},K=Me("XMLHttpRequest.send",L,R,d,z);v&&!0===v[p]&&!R.aborted&&K.state===E&&K.invoke()}}),Y=ce(D,"abort",()=>function(v,M){const R=function S(v){return v[i]}(v);if(R&&"string"==typeof R.type){if(null==R.cancelFn||R.data&&R.data.aborted)return;R.zone.cancelTask(R)}else if(!0===n.current[Z])return Y.apply(v,M)})}(e);const i=x("xhrTask"),r=x("xhrSync"),c=x("xhrListener"),u=x("xhrScheduled"),f=x("xhrURL"),p=x("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",e=>{e.navigator&&e.navigator.geolocation&&function dt(e,n){const i=e.constructor.name;for(let r=0;r{const g=function(){return p.apply(this,Ae(arguments,i+"."+c))};return ae(g,p),g})(u)}}}(e.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",(e,n)=>{function i(r){return function(c){Qe(e,r).forEach(f=>{const p=e.PromiseRejectionEvent;if(p){const g=new p(r,{promise:c.promise,reason:c.rejection});f.invoke(g)}})}}e.PromiseRejectionEvent&&(n[x("unhandledPromiseRejectionHandler")]=i("unhandledrejection"),n[x("rejectionHandledHandler")]=i("rejectionhandled"))})}},Se=>{Se(Se.s=88583)}]);(self.webpackChunkdotcms_binary_field_builder=self.webpackChunkdotcms_binary_field_builder||[]).push([[179],{2514:(Zi,oa,mr)=>{"use strict";function ri(n){return"function"==typeof n}let ki=!1;const an={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else ki&&console.log("RxJS: Back to a better error behavior. Thank you. <3");ki=n},get useDeprecatedSynchronousErrorHandling(){return ki}};function gi(n){setTimeout(()=>{throw n},0)}const ho={closed:!0,next(n){},error(n){if(an.useDeprecatedSynchronousErrorHandling)throw n;gi(n)},complete(){}},oi=Array.isArray||(n=>n&&"number"==typeof n.length);function ll(n){return null!==n&&"object"==typeof n}const cl=(()=>{function n(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((e,i)=>`${i+1}) ${e.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return n.prototype=Object.create(Error.prototype),n})();class ft{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let t;if(this.closed)return;let{_parentOrParents:e,_ctorUnsubscribe:i,_unsubscribe:r,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,e instanceof ft)e.remove(this);else if(null!==e)for(let s=0;st.concat(e instanceof cl?e.errors:e),[])}ft.EMPTY=((n=new ft).closed=!0,n);const ul="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class ut extends ft{constructor(t,e,i){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=ho;break;case 1:if(!t){this.destination=ho;break}if("object"==typeof t){t instanceof ut?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new Fd(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new Fd(this,t,e,i)}}[ul](){return this}static create(t,e,i){const r=new ut(t,e,i);return r.syncErrorThrowable=!1,r}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class Fd extends ut{constructor(t,e,i,r){super(),this._parentSubscriber=t;let o,s=this;ri(e)?o=e:e&&(o=e.next,i=e.error,r=e.complete,e!==ho&&(s=Object.create(e),ri(s.unsubscribe)&&this.add(s.unsubscribe.bind(s)),s.unsubscribe=this.unsubscribe.bind(this))),this._context=s,this._next=o,this._error=i,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;an.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:i}=an;if(this._error)i&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)i?(e.syncErrorValue=t,e.syncErrorThrown=!0):gi(t),this.unsubscribe();else{if(this.unsubscribe(),i)throw t;gi(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);an.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(i){if(this.unsubscribe(),an.useDeprecatedSynchronousErrorHandling)throw i;gi(i)}}__tryOrSetError(t,e,i){if(!an.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,i)}catch(r){return an.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=r,t.syncErrorThrown=!0,!0):(gi(r),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const aa="function"==typeof Symbol&&Symbol.observable||"@@observable";function Fc(n){return n}let mt=(()=>{class n{constructor(e){this._isScalar=!1,e&&(this._subscribe=e)}lift(e){const i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){const{operator:o}=this,s=function sa(n,t,e){if(n){if(n instanceof ut)return n;if(n[ul])return n[ul]()}return n||t||e?new ut(n,t,e):new ut(ho)}(e,i,r);if(s.add(o?o.call(s,this.source):this.source||an.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),an.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s}_trySubscribe(e){try{return this._subscribe(e)}catch(i){an.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=i),function Vv(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof ut?e:null}return!0}(e)?e.error(i):console.warn(i)}}forEach(e,i){return new(i=If(i))((r,o)=>{let s;s=this.subscribe(a=>{try{e(a)}catch(l){o(l),s&&s.unsubscribe()}},o,r)})}_subscribe(e){const{source:i}=this;return i&&i.subscribe(e)}[aa](){return this}pipe(...e){return 0===e.length?this:function dl(n){return 0===n.length?Fc:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}(e)(this)}toPromise(e){return new(e=If(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function If(n){if(n||(n=an.Promise||Promise),!n)throw new Error("no Promise impl found");return n}const po=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class jd extends ft{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const i=e.indexOf(this.subscriber);-1!==i&&e.splice(i,1)}}class hl extends ut{constructor(t){super(t),this.destination=t}}let ye=(()=>{class n extends mt{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[ul](){return new hl(this)}lift(e){const i=new xf(this,this);return i.operator=e,i}next(e){if(this.closed)throw new po;if(!this.isStopped){const{observers:i}=this,r=i.length,o=i.slice();for(let s=0;snew xf(t,e),n})();class xf extends ye{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):ft.EMPTY}}function la(n){return n&&"function"==typeof n.schedule}function me(n,t){return function(i){if("function"!=typeof n)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return i.lift(new zv(n,t))}}class zv{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new Bv(t,this.project,this.thisArg))}}class Bv extends ut{constructor(t,e,i){super(t),this.project=e,this.count=0,this.thisArg=i||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}const Of=n=>t=>{for(let e=0,i=n.length;en&&"number"==typeof n.length&&"function"!=typeof n;function kf(n){return!!n&&"function"!=typeof n.subscribe&&"function"==typeof n.then}const gr=n=>{if(n&&"function"==typeof n[aa])return(n=>t=>{const e=n[aa]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)})(n);if(Vd(n))return Of(n);if(kf(n))return(n=>t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,gi),t))(n);if(n&&"function"==typeof n[Vc])return(n=>t=>{const e=n[Vc]();for(;;){let i;try{i=e.next()}catch(r){return t.error(r),t}if(i.done){t.complete();break}if(t.next(i.value),t.closed)break}return"function"==typeof e.return&&t.add(()=>{e.return&&e.return()}),t})(n);{const e=`You provided ${ll(n)?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`;throw new TypeError(e)}};function zc(n,t){return new mt(e=>{const i=new ft;let r=0;return i.add(t.schedule(function(){r!==n.length?(e.next(n[r++]),e.closed||i.add(this.schedule())):e.complete()})),i})}function Rf(n,t){if(null!=n){if(function Lf(n){return n&&"function"==typeof n[aa]}(n))return function Af(n,t){return new mt(e=>{const i=new ft;return i.add(t.schedule(()=>{const r=n[aa]();i.add(r.subscribe({next(o){i.add(t.schedule(()=>e.next(o)))},error(o){i.add(t.schedule(()=>e.error(o)))},complete(){i.add(t.schedule(()=>e.complete()))}}))})),i})}(n,t);if(kf(n))return function Nf(n,t){return new mt(e=>{const i=new ft;return i.add(t.schedule(()=>n.then(r=>{i.add(t.schedule(()=>{e.next(r),i.add(t.schedule(()=>e.complete()))}))},r=>{i.add(t.schedule(()=>e.error(r)))}))),i})}(n,t);if(Vd(n))return zc(n,t);if(function Pf(n){return n&&"function"==typeof n[Vc]}(n)||"string"==typeof n)return function zd(n,t){if(!n)throw new Error("Iterable cannot be null");return new mt(e=>{const i=new ft;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(t.schedule(()=>{r=n[Vc](),i.add(t.schedule(function(){if(e.closed)return;let o,s;try{const a=r.next();o=a.value,s=a.done}catch(a){return void e.error(a)}s?e.complete():(e.next(o),this.schedule())}))})),i})}(n,t)}throw new TypeError((null!==n&&typeof n||n)+" is not observable")}function Yt(n,t){return t?Rf(n,t):n instanceof mt?n:new mt(gr(n))}class pl extends ut{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class fl extends ut{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function ml(n,t){if(t.closed)return;if(n instanceof mt)return n.subscribe(t);let e;try{e=gr(n)(t)}catch(i){t.error(i)}return e}function Tn(n,t,e=Number.POSITIVE_INFINITY){return"function"==typeof t?i=>i.pipe(Tn((r,o)=>Yt(n(r,o)).pipe(me((s,a)=>t(r,s,o,a))),e)):("number"==typeof t&&(e=t),i=>i.lift(new Wv(n,e)))}class Wv{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new Gv(t,this.project,this.concurrent))}}class Gv extends fl{constructor(t,e,i=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=i,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function ua(n,t){return t?zc(n,t):new mt(Of(n))}function ys(...n){let t=Number.POSITIVE_INFINITY,e=null,i=n[n.length-1];return la(i)?(e=n.pop(),n.length>1&&"number"==typeof n[n.length-1]&&(t=n.pop())):"number"==typeof i&&(t=n.pop()),null===e&&1===n.length&&n[0]instanceof mt?n[0]:function ca(n=Number.POSITIVE_INFINITY){return Tn(Fc,n)}(t)(ua(n,e))}function gl(){return function(t){return t.lift(new Vr(t))}}class Vr{constructor(t){this.connectable=t}call(t,e){const{connectable:i}=this;i._refCount++;const r=new Ff(t,i),o=e.subscribe(r);return r.closed||(r.connection=i.connect()),o}}class Ff extends ut{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:i}=this,r=t._connection;this.connection=null,r&&(!i||r===i)&&r.unsubscribe()}}class Bc extends mt{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new ft,t.add(this.source.subscribe(new jf(this.getSubject(),this))),t.closed&&(this._connection=null,t=ft.EMPTY)),t}refCount(){return gl()(this)}}const qv=(()=>{const n=Bc.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:n._subscribe},_isComplete:{value:n._isComplete,writable:!0},getSubject:{value:n.getSubject},connect:{value:n.connect},refCount:{value:n.refCount}}})();class jf extends hl{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}class Kv{constructor(t,e){this.subjectFactory=t,this.selector=e}call(t,e){const{selector:i}=this,r=this.subjectFactory(),o=i(r).subscribe(t);return o.add(e.subscribe(r)),o}}function vs(){return new ye}function Ft(n){for(let t in n)if(n[t]===Ft)return t;throw Error("Could not find renamed property on target object.")}function Hd(n,t){for(const e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function At(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(At).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;const t=n.toString();if(null==t)return""+t;const e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function bs(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}const $d=Ft({__forward_ref__:Ft});function $e(n){return n.__forward_ref__=$e,n.toString=function(){return At(this())},n}function xe(n){return Cs(n)?n():n}function Cs(n){return"function"==typeof n&&n.hasOwnProperty($d)&&n.__forward_ref__===$e}function Wd(n){return n&&!!n.\u0275providers}const Uc="https://g.co/ng/security#xss";class j extends Error{constructor(t,e){super(function Hc(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}}function je(n){return"string"==typeof n?n:null==n?"":String(n)}function $c(n,t){throw new j(-201,!1)}function Ji(n,t){null==n&&function ht(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}(t,n,null,"!=")}function K(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function ke(n){return{providers:n.providers||[],imports:n.imports||[]}}function Wc(n){return Uf(n,_l)||Uf(n,Hf)}function Uf(n,t){return n.hasOwnProperty(t)?n[t]:null}function ha(n){return n&&(n.hasOwnProperty(qc)||n.hasOwnProperty(eb))?n[qc]:null}const _l=Ft({\u0275prov:Ft}),qc=Ft({\u0275inj:Ft}),Hf=Ft({ngInjectableDef:Ft}),eb=Ft({ngInjectorDef:Ft});var Ae=(()=>((Ae=Ae||{})[Ae.Default=0]="Default",Ae[Ae.Host=1]="Host",Ae[Ae.Self=2]="Self",Ae[Ae.SkipSelf=4]="SkipSelf",Ae[Ae.Optional=8]="Optional",Ae))();let Gd;function Xi(n){const t=Gd;return Gd=n,t}function Wf(n,t,e){const i=Wc(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&Ae.Optional?null:void 0!==t?t:void $c(At(n))}const It=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),er={},qd="__NG_DI_FLAG__",Kc="ngTempTokenPath",ib=/\n/gm,Lo="__source";let pa;function fa(n){const t=pa;return pa=n,t}function Yc(n,t=Ae.Default){if(void 0===pa)throw new j(-203,!1);return null===pa?Wf(n,void 0,t):pa.get(n,t&Ae.Optional?null:void 0,t)}function U(n,t=Ae.Default){return(function $f(){return Gd}()||Yc)(xe(n),t)}function re(n,t=Ae.Default){return U(n,vl(t))}function vl(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function Zc(n){const t=[];for(let e=0;e((_r=_r||{})[_r.OnPush=0]="OnPush",_r[_r.Default=1]="Default",_r))(),B=(()=>(function(n){n[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom"}(B||(B={})),B))();const oe={},Te=[],Ve=Ft({\u0275cmp:Ft}),Qt=Ft({\u0275dir:Ft}),yn=Ft({\u0275pipe:Ft}),kn=Ft({\u0275mod:Ft}),Ct=Ft({\u0275fac:Ft}),Rn=Ft({__NG_ELEMENT_ID__:Ft});let yr=0;function Y(n){return Po(()=>{const e=!0===n.standalone,i={},r={type:n.type,providersResolver:null,decls:n.decls,vars:n.vars,factory:null,template:n.template||null,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:i,inputs:null,outputs:null,exportAs:n.exportAs||null,onPush:n.changeDetection===_r.OnPush,directiveDefs:null,pipeDefs:null,standalone:e,dependencies:e&&n.dependencies||null,getStandaloneInjector:null,selectors:n.selectors||Te,viewQuery:n.viewQuery||null,features:n.features||null,data:n.data||{},encapsulation:n.encapsulation||B.Emulated,id:"c"+yr++,styles:n.styles||Te,_:null,setInput:null,schemas:n.schemas||null,tView:null,findHostDirectiveDefs:null,hostDirectives:null},o=n.dependencies,s=n.features;return r.inputs=Kd(n.inputs,i),r.outputs=Kd(n.outputs),s&&s.forEach(a=>a(r)),r.directiveDefs=o?()=>("function"==typeof o?o():o).map(Ni).filter(mo):null,r.pipeDefs=o?()=>("function"==typeof o?o():o).map(Li).filter(mo):null,r})}function Fn(n,t,e){const i=n.\u0275cmp;i.directiveDefs=()=>("function"==typeof t?t():t).map(Ni),i.pipeDefs=()=>("function"==typeof e?e():e).map(Li)}function Ni(n){return Nt(n)||_i(n)}function mo(n){return null!==n}function Ce(n){return Po(()=>({type:n.type,bootstrap:n.bootstrap||Te,declarations:n.declarations||Te,imports:n.imports||Te,exports:n.exports||Te,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function Kd(n,t){if(null==n)return oe;const e={};for(const i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}const de=Y;function vn(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Nt(n){return n[Ve]||null}function _i(n){return n[Qt]||null}function Li(n){return n[yn]||null}function br(n){return Array.isArray(n)&&"object"==typeof n[1]}function _o(n){return Array.isArray(n)&&!0===n[1]}function lb(n){return 0!=(4&n.flags)}function Jd(n){return n.componentOffset>-1}function Zf(n){return 1==(1&n.flags)}function yo(n){return null!==n.template}function J5(n){return 0!=(256&n[2])}function wl(n,t){return n.hasOwnProperty(Ct)?n[Ct]:null}class qT{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}}function Yn(){return KT}function KT(n){return n.type.prototype.ngOnChanges&&(n.setInput=nV),tV}function tV(){const n=QT(this),t=n?.current;if(t){const e=n.previous;if(e===oe)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function nV(n,t,e,i){const r=this.declaredInputs[e],o=QT(n)||function iV(n,t){return n[YT]=t}(n,{previous:oe,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new qT(l&&l.currentValue,t,a===oe),n[i]=t}Yn.ngInherit=!0;const YT="__ngSimpleChanges__";function QT(n){return n[YT]||null}function si(n){for(;Array.isArray(n);)n=n[0];return n}function Jf(n,t){return si(t[n])}function Cr(n,t){return si(t[n.index])}function XT(n,t){return n.data[t]}function iu(n,t){return n[t]}function wr(n,t){const e=t[n];return br(e)?e:e[0]}function Xf(n){return 64==(64&n[2])}function ga(n,t){return null==t?null:n[t]}function eM(n){n[18]=0}function ub(n,t){n[5]+=t;let e=n,i=n[3];for(;null!==i&&(1===t&&1===e[5]||-1===t&&0===e[5]);)i[5]+=t,e=i,i=i[3]}const We={lFrame:uM(null),bindingsEnabled:!0};function nM(){return We.bindingsEnabled}function W(){return We.lFrame.lView}function _t(){return We.lFrame.tView}function I(n){return We.lFrame.contextLView=n,n[8]}function x(n){return We.lFrame.contextLView=null,n}function ai(){let n=iM();for(;null!==n&&64===n.type;)n=n.parent;return n}function iM(){return We.lFrame.currentTNode}function Fo(n,t){const e=We.lFrame;e.currentTNode=n,e.isParent=t}function db(){return We.lFrame.isParent}function hb(){We.lFrame.isParent=!1}function Ri(){const n=We.lFrame;let t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function ru(){return We.lFrame.bindingIndex++}function Es(n){const t=We.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function gV(n,t){const e=We.lFrame;e.bindingIndex=e.bindingRootIndex=n,pb(t)}function pb(n){We.lFrame.currentDirectiveIndex=n}function aM(){return We.lFrame.currentQueryIndex}function mb(n){We.lFrame.currentQueryIndex=n}function yV(n){const t=n[1];return 2===t.type?t.declTNode:1===t.type?n[6]:null}function lM(n,t,e){if(e&Ae.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&Ae.Host||(r=yV(o),null===r||(o=o[15],10&r.type))););if(null===r)return!1;t=r,n=o}const i=We.lFrame=cM();return i.currentTNode=t,i.lView=n,!0}function gb(n){const t=cM(),e=n[1];We.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function cM(){const n=We.lFrame,t=null===n?null:n.child;return null===t?uM(n):t}function uM(n){const t={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:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function dM(){const n=We.lFrame;return We.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}const hM=dM;function _b(){const n=dM();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function Fi(){return We.lFrame.selectedIndex}function Sl(n){We.lFrame.selectedIndex=n}function hn(){const n=We.lFrame;return XT(n.tView,n.selectedIndex)}function em(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e=i)break}else t[l]<0&&(n[18]+=65536),(a>11>16&&(3&n[2])===t){n[2]+=2048;try{o.call(a)}finally{}}}else try{o.call(a)}finally{}}class eh{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}}function wb(n,t,e){let i=0;for(;it){s=o-1;break}}}for(;o>16}(n),i=t;for(;e>0;)i=i[15],e--;return i}let Sb=!0;function om(n){const t=Sb;return Sb=n,t}let OV=0;const jo={};function sm(n,t){const e=bM(n,t);if(-1!==e)return e;const i=t[1];i.firstCreatePass&&(n.injectorIndex=t.length,Db(i.data,n),Db(t,null),Db(i.blueprint,null));const r=Tb(n,t),o=n.injectorIndex;if(_M(r)){const s=im(r),a=rm(r,t),l=a[1].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function Db(n,t){n.push(0,0,0,0,0,0,0,0,t)}function bM(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function Tb(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=EM(r),null===i)return-1;if(e++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return-1}function Mb(n,t,e){!function kV(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(Rn)&&(i=e[Rn]),null==i&&(i=e[Rn]=OV++);const r=255&i;t.data[n+(r>>5)]|=1<=0?255&t:PV:t}(e);if("function"==typeof o){if(!lM(t,n,i))return i&Ae.Host?CM(r,0,i):wM(t,e,i,r);try{const s=o(i);if(null!=s||i&Ae.Optional)return s;$c()}finally{hM()}}else if("number"==typeof o){let s=null,a=bM(n,t),l=-1,c=i&Ae.Host?t[16][6]:null;for((-1===a||i&Ae.SkipSelf)&&(l=-1===a?Tb(n,t):t[a+8],-1!==l&&MM(i,!1)?(s=t[1],a=im(l),t=rm(l,t)):a=-1);-1!==a;){const u=t[1];if(TM(o,a,u.data)){const d=NV(a,t,e,s,i,c);if(d!==jo)return d}l=t[a+8],-1!==l&&MM(i,t[1].data[a+8]===c)&&TM(o,a,t)?(s=u,a=im(l),t=rm(l,t)):a=-1}}return r}function NV(n,t,e,i,r,o){const s=t[1],a=s.data[n+8],u=am(a,s,e,null==i?Jd(a)&&Sb:i!=s&&0!=(3&a.type),r&Ae.Host&&o===a);return null!==u?Dl(t,s,u,a):jo}function am(n,t,e,i,r){const o=n.providerIndexes,s=t.data,a=1048575&o,l=n.directiveStart,u=o>>20,h=r?a+u:n.directiveEnd;for(let p=i?a:a+u;p=l&&f.type===e)return p}if(r){const p=s[l];if(p&&yo(p)&&p.type===e)return l}return null}function Dl(n,t,e,i){let r=n[e];const o=t.data;if(function MV(n){return n instanceof eh}(r)){const s=r;s.resolving&&function ws(n,t){const e=t?`. Dependency path: ${t.join(" > ")} > ${n}`:"";throw new j(-200,`Circular dependency in DI detected for ${n}${e}`)}(function gt(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():je(n)}(o[e]));const a=om(s.canSeeViewProviders);s.resolving=!0;const l=s.injectImpl?Xi(s.injectImpl):null;lM(n,i,Ae.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function DV(n,t,e){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){const s=KT(t);(e.preOrderHooks||(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks||(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks||(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks||(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&Xi(l),om(a),s.resolving=!1,hM()}}return r}function TM(n,t,e){return!!(e[t+(n>>5)]&1<{const t=Eb(xe(n));return t&&t()}:wl(n)}function EM(n){const t=n[1],e=t.type;return 2===e?t.declTNode:1===e?n[6]:null}const lu="__parameters__";function uu(n,t,e){return Po(()=>{const i=function Ib(n){return function(...e){if(n){const i=n(...e);for(const r in i)this[r]=i[r]}}}(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;const s=new r(...o);return a.annotation=s,a;function a(l,c,u){const d=l.hasOwnProperty(lu)?l[lu]:Object.defineProperty(l,lu,{value:[]})[lu];for(;d.length<=u;)d.push(null);return(d[u]=d[u]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}class se{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=K({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Tl(n,t){n.forEach(e=>Array.isArray(e)?Tl(e,t):t(e))}function xM(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function cm(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function rh(n,t){const e=[];for(let i=0;i=0?n[1|i]=e:(i=~i,function zV(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function Ob(n,t){const e=du(n,t);if(e>=0)return n[1|e]}function du(n,t){return function OM(n,t,e){let i=0,r=n.length>>e;for(;r!==i;){const o=i+(r-i>>1),s=n[o<t?r=o:i=o+1}return~(r<({token:n})),-1),oh=ma(uu("Optional"),8),sh=ma(uu("SkipSelf"),4);var tr=(()=>((tr=tr||{})[tr.Important=1]="Important",tr[tr.DashCase=2]="DashCase",tr))();const Pb=new Map;let lz=0;const Fb="__ngContext__";function bi(n,t){br(t)?(n[Fb]=t[20],function uz(n){Pb.set(n[20],n)}(t)):n[Fb]=t}function Vb(n,t){return undefined(n,t)}function uh(n){const t=n[3];return _o(t)?t[3]:t}function zb(n){return QM(n[13])}function Bb(n){return QM(n[4])}function QM(n){for(;null!==n&&!_o(n);)n=n[4];return n}function pu(n,t,e,i,r){if(null!=i){let o,s=!1;_o(i)?o=i:br(i)&&(s=!0,i=i[0]);const a=si(i);0===n&&null!==e?null==r?nE(t,e,a):Ml(t,e,a,r||null,!0):1===n&&null!==e?Ml(t,e,a,r||null,!0):2===n?function Kb(n,t,e){const i=fm(n,t);i&&function Oz(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}(t,a,s):3===n&&t.destroyNode(a),null!=o&&function Nz(n,t,e,i,r){const o=e[7];o!==si(e)&&pu(t,n,i,o,r);for(let a=10;a0&&(n[e-1][4]=i[4]);const o=cm(n,10+t);!function wz(n,t){dh(n,t,t[11],2,null,null),t[0]=null,t[6]=null}(i[1],i);const s=o[19];null!==s&&s.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-65}return i}function XM(n,t){if(!(128&t[2])){const e=t[11];e.destroyNode&&dh(n,t,e,3,null,null),function Tz(n){let t=n[13];if(!t)return Wb(n[1],n);for(;t;){let e=null;if(br(t))e=t[13];else{const i=t[10];i&&(e=i)}if(!e){for(;t&&!t[4]&&t!==n;)br(t)&&Wb(t[1],t),t=t[3];null===t&&(t=n),br(t)&&Wb(t[1],t),e=t&&t[4]}t=e}}(t)}}function Wb(n,t){if(!(128&t[2])){t[2]&=-65,t[2]|=128,function xz(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{const s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o-1){const{encapsulation:o}=n.data[i.directiveStart+r];if(o===B.None||o===B.Emulated)return null}return Cr(i,e)}}(n,t.parent,e)}function Ml(n,t,e,i,r){n.insertBefore(t,e,i,r)}function nE(n,t,e){n.appendChild(t,e)}function iE(n,t,e,i,r){null!==i?Ml(n,t,e,i,r):nE(n,t,e)}function fm(n,t){return n.parentNode(t)}function rE(n,t,e){return sE(n,t,e)}let _m,Zb,ym,sE=function oE(n,t,e){return 40&n.type?Cr(n,e):null};function mm(n,t,e,i){const r=eE(n,i,t),o=t[11],a=rE(i.parent||t[6],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;ln,createScript:n=>n,createScriptURL:n=>n})}catch{}return _m}()?.createHTML(n)||n}function pE(n){return function Jb(){if(void 0===ym&&(ym=null,It.trustedTypes))try{ym=It.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return ym}()?.createHTML(n)||n}class Il{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Uc})`}}class zz extends Il{getTypeName(){return"HTML"}}class Bz extends Il{getTypeName(){return"Style"}}class Uz extends Il{getTypeName(){return"Script"}}class Hz extends Il{getTypeName(){return"URL"}}class $z extends Il{getTypeName(){return"ResourceURL"}}function Dr(n){return n instanceof Il?n.changingThisBreaksApplicationSecurity:n}function Vo(n,t){const e=function Wz(n){return n instanceof Il&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${Uc})`)}return e===t}class Zz{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(El(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}}class Jz{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const e=this.inertDocument.createElement("html");this.inertDocument.appendChild(e);const i=this.inertDocument.createElement("body");e.appendChild(i)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=El(t),e;const i=this.inertDocument.createElement("body");return i.innerHTML=El(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(i),i}stripCustomNsAttrs(t){const e=t.attributes;for(let r=e.length-1;0"),!0}endElement(t){const e=t.nodeName.toLowerCase();Xb.hasOwnProperty(e)&&!_E.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(CE(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const iB=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,rB=/([^\#-~ |!])/g;function CE(n){return n.replace(/&/g,"&").replace(iB,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(rB,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let bm;function wE(n,t){let e=null;try{bm=bm||function gE(n){const t=new Jz(n);return function Xz(){try{return!!(new window.DOMParser).parseFromString(El(""),"text/html")}catch{return!1}}()?new Zz(t):t}(n);let i=t?String(t):"";e=bm.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=bm.getInertBodyElement(i)}while(i!==o);return El((new nB).sanitizeChildren(tC(e)||e))}finally{if(e){const i=tC(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function tC(n){return"content"in n&&function oB(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var Zt=(()=>((Zt=Zt||{})[Zt.NONE=0]="NONE",Zt[Zt.HTML=1]="HTML",Zt[Zt.STYLE=2]="STYLE",Zt[Zt.SCRIPT=3]="SCRIPT",Zt[Zt.URL=4]="URL",Zt[Zt.RESOURCE_URL=5]="RESOURCE_URL",Zt))();function fu(n){const t=ph();return t?pE(t.sanitize(Zt.HTML,n)||""):Vo(n,"HTML")?pE(Dr(n)):wE(function hE(){return void 0!==Zb?Zb:typeof document<"u"?document:void 0}(),je(n))}function zo(n){const t=ph();return t?t.sanitize(Zt.URL,n)||"":Vo(n,"URL")?Dr(n):vm(je(n))}function ph(){const n=W();return n&&n[12]}const Cm=new se("ENVIRONMENT_INITIALIZER"),DE=new se("INJECTOR",-1),TE=new se("INJECTOR_DEF_TYPES");class ME{get(t,e=er){if(e===er){const i=new Error(`NullInjectorError: No provider for ${At(t)}!`);throw i.name="NullInjectorError",i}return e}}function hB(...n){return{\u0275providers:EE(0,n),\u0275fromNgModule:!0}}function EE(n,...t){const e=[],i=new Set;let r;return Tl(t,o=>{const s=o;iC(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&IE(r,e),e}function IE(n,t){for(let e=0;e{t.push(o)})}}function iC(n,t,e,i){if(!(n=xe(n)))return!1;let r=null,o=ha(n);const s=!o&&Nt(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{const l=n.ngModule;if(o=ha(l),!o)return!1;r=l}const a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){const l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(const c of l)iC(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{Tl(o.imports,u=>{iC(u,t,e,i)&&(c||(c=[]),c.push(u))})}finally{}void 0!==c&&IE(c,t)}if(!a){const c=wl(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Te},{provide:TE,useValue:r,multi:!0},{provide:Cm,useValue:()=>U(r),multi:!0})}const l=o.providers;null==l||a||rC(l,u=>{t.push(u)})}}return r!==n&&void 0!==n.providers}function rC(n,t){for(let e of n)Wd(e)&&(e=e.\u0275providers),Array.isArray(e)?rC(e,t):t(e)}const pB=Ft({provide:String,useValue:Ft});function oC(n){return null!==n&&"object"==typeof n&&pB in n}function xl(n){return"function"==typeof n}const sC=new se("Set Injector scope."),wm={},mB={};let aC;function Sm(){return void 0===aC&&(aC=new ME),aC}class Bo{}class kE extends Bo{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,cC(t,s=>this.processProvider(s)),this.records.set(DE,mu(void 0,this)),r.has("environment")&&this.records.set(Bo,mu(void 0,this));const o=this.records.get(sC);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(TE.multi,Te,Ae.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(const t of this._ngOnDestroyHooks)t.ngOnDestroy();for(const t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();const e=fa(this),i=Xi(void 0);try{return t()}finally{fa(e),Xi(i)}}get(t,e=er,i=Ae.Default){this.assertNotDestroyed(),i=vl(i);const r=fa(this),o=Xi(void 0);try{if(!(i&Ae.SkipSelf)){let a=this.records.get(t);if(void 0===a){const l=function bB(n){return"function"==typeof n||"object"==typeof n&&n instanceof se}(t)&&Wc(t);a=l&&this.injectableDefInScope(l)?mu(lC(t),wm):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&Ae.Self?Sm():this.parent).get(t,e=i&Ae.Optional&&e===er?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[Kc]=s[Kc]||[]).unshift(At(t)),r)throw s;return function Gf(n,t,e,i){const r=n[Kc];throw t[Lo]&&r.unshift(t[Lo]),n.message=function ob(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&"\u0275"==n.charAt(1)?n.slice(2):n;let r=At(t);if(Array.isArray(t))r=t.map(At).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):At(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(ib,"\n ")}`}("\n"+n.message,r,e,i),n.ngTokenPath=r,n[Kc]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{Xi(o),fa(r)}}resolveInjectorInitializers(){const t=fa(this),e=Xi(void 0);try{const i=this.get(Cm.multi,Te,Ae.Self);for(const r of i)r()}finally{fa(t),Xi(e)}}toString(){const t=[],e=this.records;for(const i of e.keys())t.push(At(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new j(205,!1)}processProvider(t){let e=xl(t=xe(t))?t:xe(t&&t.provide);const i=function _B(n){return oC(n)?mu(void 0,n.useValue):mu(AE(n),wm)}(t);if(xl(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=mu(void 0,wm,!0),r.factory=()=>Zc(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===wm&&(e.value=mB,e.value=e.factory()),"object"==typeof e.value&&e.value&&function vB(n){return null!==n&&"object"==typeof n&&"function"==typeof n.ngOnDestroy}(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}injectableDefInScope(t){if(!t.providedIn)return!1;const e=xe(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}}function lC(n){const t=Wc(n),e=null!==t?t.factory:wl(n);if(null!==e)return e;if(n instanceof se)throw new j(204,!1);if(n instanceof Function)return function gB(n){const t=n.length;if(t>0)throw rh(t,"?"),new j(204,!1);const e=function Gc(n){const t=n&&(n[_l]||n[Hf]);if(t){const e=function Xv(n){if(n.hasOwnProperty("name"))return n.name;const t=(""+n).match(/^function\s*([^\s(]+)/);return null===t?"":t[1]}(n);return console.warn(`DEPRECATED: DI is instantiating a token "${e}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${e}" class.`),t}return null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new j(204,!1)}function AE(n,t,e){let i;if(xl(n)){const r=xe(n);return wl(r)||lC(r)}if(oC(n))i=()=>xe(n.useValue);else if(function OE(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...Zc(n.deps||[]));else if(function xE(n){return!(!n||!n.useExisting)}(n))i=()=>U(xe(n.useExisting));else{const r=xe(n&&(n.useClass||n.provide));if(!function yB(n){return!!n.deps}(n))return wl(r)||lC(r);i=()=>new r(...Zc(n.deps))}return i}function mu(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function cC(n,t){for(const e of n)Array.isArray(e)?cC(e,t):e&&Wd(e)?cC(e.\u0275providers,t):t(e)}class CB{}class NE{}class SB{resolveComponentFactory(t){throw function wB(n){const t=Error(`No component factory found for ${At(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}}let Ol=(()=>{class n{}return n.NULL=new SB,n})();function DB(){return gu(ai(),W())}function gu(n,t){return new qe(Cr(n,t))}let qe=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=DB,n})();function TB(n){return n instanceof qe?n.nativeElement:n}class fh{}let Vn=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function MB(){const n=W(),e=wr(ai().index,n);return(br(e)?e:n)[11]}(),n})(),EB=(()=>{class n{}return n.\u0275prov=K({token:n,providedIn:"root",factory:()=>null}),n})();class _u{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const IB=new _u("15.1.1"),uC={};function hC(n){return n.ngOriginalError}class yu{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&hC(t);for(;e&&hC(e);)e=hC(e);return e||null}}function pC(n){return n.ownerDocument.defaultView}function RE(n,t,e){let i=n.length;for(;;){const r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){const o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}const FE="ng-template";function jB(n,t,e){let i=0;for(;io?"":r[d+1].toLowerCase();const p=8&i?h:null;if(p&&-1!==RE(p,c,0)||2&i&&c!==h){if(vo(i))return!1;s=!0}}}}else{if(!s&&!vo(i)&&!vo(l))return!1;if(s&&vo(l))continue;s=!1,i=l|1&i}}return vo(i)||s}function vo(n){return 0==(1&n)}function BB(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!vo(s)&&(t+=zE(o,r),r=""),i=s,o=o||!vo(i);e++}return""!==r&&(t+=zE(o,r)),t}const Ge={};function v(n){BE(_t(),W(),Fi()+n,!1)}function BE(n,t,e,i){if(!i)if(3==(3&t[2])){const o=n.preOrderCheckHooks;null!==o&&tm(t,o,e)}else{const o=n.preOrderHooks;null!==o&&nm(t,o,0,e)}Sl(e)}function WE(n,t=null,e=null,i){const r=GE(n,t,e,i);return r.resolveInjectorInitializers(),r}function GE(n,t=null,e=null,i,r=new Set){const o=[e||Te,hB(n)];return i=i||("object"==typeof n?void 0:At(n)),new kE(o,t||Sm(),i||null,r)}let Ci=(()=>{class n{static create(e,i){if(Array.isArray(e))return WE({name:""},i,e,"");{const r=e.name??"";return WE({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=er,n.NULL=new ME,n.\u0275prov=K({token:n,providedIn:"any",factory:()=>U(DE)}),n.__NG_ELEMENT_ID__=-1,n})();function O(n,t=Ae.Default){const e=W();return null===e?U(n,t):SM(ai(),e,xe(n),t)}function eI(n,t){const e=n.contentQueries;if(null!==e)for(let i=0;i22&&BE(n,t,22,!1),e(i,r)}finally{Sl(o)}}function bC(n,t,e){if(lb(t)){const r=t.directiveEnd;for(let o=t.directiveStart;o0;){const e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,mh(n,e,r.hostVars,Ge),r)}function Uo(n,t,e,i,r,o){const s=Cr(n,t);!function MC(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{const a=null==s?je(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}(t[11],s,o,n.value,e,i,r)}function A8(n,t,e,i,r,o){const s=o[t];if(null!==s){const a=i.setInput;for(let l=0;l0&&EC(e)}}function EC(n){for(let i=zb(n);null!==i;i=Bb(i))for(let r=10;r0&&EC(o)}const e=n[1].components;if(null!==e)for(let i=0;i0&&EC(r)}}function F8(n,t){const e=wr(t,n),i=e[1];(function j8(n,t){for(let e=t.length;e-1&&($b(t,i),cm(e,i))}this._attachedToViewContainer=!1}XM(this._lView[1],this._lView)}onDestroy(t){iI(this._lView[1],this._lView,null,t)}markForCheck(){IC(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-65}reattach(){this._lView[2]|=64}detectChanges(){Im(this._lView[1],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new j(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null,function Dz(n,t){dh(n,t,t[11],2,null,null)}(this._lView[1],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new j(902,!1);this._appRef=t}}class V8 extends gh{constructor(t){super(t),this._view=t}detectChanges(){const t=this._view;Im(t[1],t,t[8],!1)}checkNoChanges(){}get context(){return null}}class fI extends Ol{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=Nt(t);return new _h(e,this.ngModule)}}function mI(n){const t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}class B8{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=vl(i);const r=this.injector.get(t,uC,i);return r!==uC||e===uC?r:this.parentInjector.get(t,e,i)}}class _h extends NE{get inputs(){return mI(this.componentDef.inputs)}get outputs(){return mI(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=function qB(n){return n.map(GB).join(",")}(t.selectors),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof Bo?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);const s=o?new B8(t,o):t,a=s.get(fh,null);if(null===a)throw new j(407,!1);const l=s.get(EB,null),c=a.createRenderer(null,this.componentDef),u=this.componentDef.selectors[0][0]||"div",d=i?function _8(n,t,e){return n.selectRootElement(t,e===B.ShadowDom)}(c,i,this.componentDef.encapsulation):Hb(c,u,function z8(n){const t=n.toLowerCase();return"svg"===t?"svg":"math"===t?"math":null}(u)),h=this.componentDef.onPush?288:272,p=SC(0,null,null,1,0,null,null,null,null,null),f=Tm(null,p,null,h,null,null,a,c,l,s,null);let m,_;gb(f);try{const b=this.componentDef;let T,M=null;b.findHostDirectiveDefs?(T=[],M=new Map,b.findHostDirectiveDefs(b,T,M),T.push(b)):T=[b];const w=function H8(n,t){const e=n[1];return n[22]=t,Cu(e,22,2,"#host",null)}(f,d),N=function $8(n,t,e,i,r,o,s,a){const l=r[1];!function W8(n,t,e,i){for(const r of n)t.mergedAttrs=th(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(xm(t,t.mergedAttrs,!0),null!==e&&dE(i,e,t))}(i,n,t,s);const c=o.createRenderer(t,e),u=Tm(r,nI(e),null,e.onPush?32:16,r[n.index],n,o,c,a||null,null,null);return l.firstCreatePass&&TC(l,n,i.length-1),Em(r,u),r[n.index]=u}(w,d,b,T,f,a,c);_=XT(p,22),d&&function q8(n,t,e,i){if(i)wb(n,e,["ng-version",IB.full]);else{const{attrs:r,classes:o}=function KB(n){const t=[],e=[];let i=1,r=2;for(;i0&&uE(n,e,o.join(" "))}}(c,b,d,i),void 0!==e&&function K8(n,t,e){const i=n.projection=[];for(let r=0;r=0;i--){const r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=th(r.hostAttrs,e=th(e,r.hostAttrs))}}(i)}function kC(n){return n===oe?{}:n===Te?[]:n}function Z8(n,t){const e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function J8(n,t){const e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function X8(n,t){const e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}let km=null;function kl(){if(!km){const n=It.Symbol;if(n&&n.iterator)km=n.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;es(si(w[i.index])):i.index;let M=null;if(!s&&a&&(M=function p9(n,t,e,i){const r=n.cleanup;if(null!=r)for(let o=0;ol?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==M)(M.__ngLastListenerFn__||M).__ngNextListenerFn__=o,M.__ngLastListenerFn__=o,h=!1;else{o=NI(i,t,u,o,!1);const w=e.listen(_,r,o);d.push(o,w),c&&c.push(r,T,b,b+1)}}else o=NI(i,t,u,o,!1);const p=i.outputs;let f;if(h&&null!==p&&(f=p[r])){const m=f.length;if(m)for(let _=0;_-1?wr(n.index,t):t);let l=AI(t,0,i,s),c=o.__ngNextListenerFn__;for(;c;)l=AI(t,0,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function y(n=1){return function vV(n){return(We.lFrame.contextLView=function bV(n,t){for(;n>0;)t=t[15],n--;return t}(n,We.lFrame.contextLView))[8]}(n)}function f9(n,t){let e=null;const i=function UB(n){const t=n.attrs;if(null!=t){const e=t.indexOf(5);if(!(1&e))return t[e+1]}return null}(n);for(let r=0;r>17&32767}function PC(n){return 2|n}function Nl(n){return(131068&n)>>2}function RC(n,t){return-131069&n|t<<2}function FC(n){return 1|n}function UI(n,t,e,i,r){const o=n[e+1],s=null===t;let a=i?_a(o):Nl(o),l=!1;for(;0!==a&&(!1===l||s);){const u=n[a+1];b9(n[a],t)&&(l=!0,n[a+1]=i?FC(u):PC(u)),a=i?_a(u):Nl(u)}l&&(n[e+1]=i?PC(o):FC(o))}function b9(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&du(n,t)>=0}const zn={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function HI(n){return n.substring(zn.key,zn.keyEnd)}function C9(n){return n.substring(zn.value,zn.valueEnd)}function $I(n,t){const e=zn.textEnd;return e===t?-1:(t=zn.keyEnd=function D9(n,t,e){for(;t32;)t++;return t}(n,zn.key=t,e),ku(n,t,e))}function WI(n,t){const e=zn.textEnd;let i=zn.key=ku(n,t,e);return e===i?-1:(i=zn.keyEnd=function T9(n,t,e){let i;for(;t=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=qI(n,i,e),i=zn.value=ku(n,i,e),i=zn.valueEnd=function M9(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),qI(n,i,e))}function GI(n){zn.key=0,zn.keyEnd=0,zn.value=0,zn.valueEnd=0,zn.textEnd=n.length}function ku(n,t,e){for(;t=0;e=WI(t,e))ZI(n,HI(t),C9(t))}function Ke(n){Co(Sr,$o,n,!0)}function $o(n,t){for(let e=function w9(n){return GI(n),$I(n,ku(n,0,zn.textEnd))}(t);e>=0;e=$I(t,e))Sr(n,HI(t),!0)}function bo(n,t,e,i){const r=W(),o=_t(),s=Es(2);o.firstUpdatePass&&QI(o,n,s,i),t!==Ge&&wi(r,s,t)&&JI(o,o.data[Fi()],r,r[11],n,r[s+1]=function L9(n,t){return null==n||("string"==typeof t?n+=t:"object"==typeof n&&(n=At(Dr(n)))),n}(t,e),i,s)}function Co(n,t,e,i){const r=_t(),o=Es(2);r.firstUpdatePass&&QI(r,null,o,i);const s=W();if(e!==Ge&&wi(s,o,e)){const a=r.data[Fi()];if(ex(a,i)&&!YI(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=bs(l,e||"")),NC(r,a,s,e,i)}else!function N9(n,t,e,i,r,o,s,a){r===Ge&&(r=Te);let l=0,c=0,u=0=n.expandoStartIndex}function QI(n,t,e,i){const r=n.data;if(null===r[e+1]){const o=r[Fi()],s=YI(n,e);ex(o,i)&&null===t&&!s&&(t=!1),t=function I9(n,t,e,i){const r=function fb(n){const t=We.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}(n);let o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=bh(e=jC(null,n,t,e,i),t.attrs,i),o=null);else{const s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=jC(r,n,t,e,i),null===o){let l=function x9(n,t,e){const i=e?t.classBindings:t.styleBindings;if(0!==Nl(i))return n[_a(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=jC(null,n,t,l[1],i),l=bh(l,t.attrs,i),function O9(n,t,e,i){n[_a(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function k9(n,t,e){let i;const r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0)&&(c=!0)):u=e,r)if(0!==l){const h=_a(n[a+1]);n[i+1]=Pm(h,a),0!==h&&(n[h+1]=RC(n[h+1],i)),n[a+1]=function g9(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=Pm(a,0),0!==a&&(n[a+1]=RC(n[a+1],i)),a=i;else n[i+1]=Pm(l,0),0===a?a=i:n[l+1]=RC(n[l+1],i),l=i;c&&(n[i+1]=PC(n[i+1])),UI(n,u,i,!0),UI(n,u,i,!1),function v9(n,t,e,i,r){const o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&du(o,t)>=0&&(e[i+1]=FC(e[i+1]))}(t,u,n,i,o),s=Pm(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function jC(n,t,e,i,r){let o=null;const s=e.directiveEnd;let a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a0;){const l=n[r],c=Array.isArray(l),u=c?l[1]:l,d=null===u;let h=e[r+1];h===Ge&&(h=d?Te:void 0);let p=d?Ob(h,i):u===i?h:void 0;if(c&&!Rm(p)&&(p=Ob(l,i)),Rm(p)&&(a=p,s))return a;const f=n[r+1];r=s?_a(f):Nl(f)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=Ob(l,i))}return a}function Rm(n){return void 0!==n}function ex(n,t){return 0!=(n.flags&(t?8:16))}function H(n,t=""){const e=W(),i=_t(),r=n+22,o=i.firstCreatePass?Cu(i,r,1,t,null):i.data[r],s=e[r]=function Ub(n,t){return n.createText(t)}(e[11],t);mm(i,e,s,o),Fo(o,!1)}function ve(n){return xt("",n,""),ve}function xt(n,t,e){const i=W(),r=function Su(n,t,e,i){return wi(n,ru(),e)?t+je(e)+i:Ge}(i,n,t,e);return r!==Ge&&Os(i,Fi(),r),xt}function ya(n,t,e,i,r){const o=W(),s=Du(o,n,t,e,i,r);return s!==Ge&&Os(o,Fi(),s),ya}const Ll=void 0;var eU=["en",[["a","p"],["AM","PM"],Ll],[["AM","PM"],Ll,Ll],[["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"]],Ll,[["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"]],Ll,[["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}",Ll,"{1} 'at' {0}",Ll],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function X9(n){const e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}];let Au={};function ji(n){const t=function tU(n){return n.toLowerCase().replace(/_/g,"-")}(n);let e=bx(t);if(e)return e;const i=t.split("-")[0];if(e=bx(i),e)return e;if("en"===i)return eU;throw new j(701,!1)}function bx(n){return n in Au||(Au[n]=It.ng&&It.ng.common&&It.ng.common.locales&&It.ng.common.locales[n]),Au[n]}var ue=(()=>((ue=ue||{})[ue.LocaleId=0]="LocaleId",ue[ue.DayPeriodsFormat=1]="DayPeriodsFormat",ue[ue.DayPeriodsStandalone=2]="DayPeriodsStandalone",ue[ue.DaysFormat=3]="DaysFormat",ue[ue.DaysStandalone=4]="DaysStandalone",ue[ue.MonthsFormat=5]="MonthsFormat",ue[ue.MonthsStandalone=6]="MonthsStandalone",ue[ue.Eras=7]="Eras",ue[ue.FirstDayOfWeek=8]="FirstDayOfWeek",ue[ue.WeekendRange=9]="WeekendRange",ue[ue.DateFormat=10]="DateFormat",ue[ue.TimeFormat=11]="TimeFormat",ue[ue.DateTimeFormat=12]="DateTimeFormat",ue[ue.NumberSymbols=13]="NumberSymbols",ue[ue.NumberFormats=14]="NumberFormats",ue[ue.CurrencyCode=15]="CurrencyCode",ue[ue.CurrencySymbol=16]="CurrencySymbol",ue[ue.CurrencyName=17]="CurrencyName",ue[ue.Currencies=18]="Currencies",ue[ue.Directionality=19]="Directionality",ue[ue.PluralCase=20]="PluralCase",ue[ue.ExtraData=21]="ExtraData",ue))();const Nu="en-US";let Cx=Nu;function BC(n,t,e,i,r){if(n=xe(n),Array.isArray(n))for(let o=0;o>20;if(xl(n)||!n.multi){const p=new eh(l,r,O),f=HC(a,t,r?u:u+h,d);-1===f?(Mb(sm(c,s),o,a),UC(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(p),s.push(p)):(e[f]=p,s[f]=p)}else{const p=HC(a,t,u+h,d),f=HC(a,t,u,u+h),_=f>=0&&e[f];if(r&&!_||!r&&!(p>=0&&e[p])){Mb(sm(c,s),o,a);const b=function JU(n,t,e,i,r){const o=new eh(n,e,O);return o.multi=[],o.index=t,o.componentProviders=0,Gx(o,r,i&&!e),o}(r?ZU:QU,e.length,r,i,l);!r&&_&&(e[f].providerFactory=b),UC(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(b),s.push(b)}else UC(o,n,p>-1?p:f,Gx(e[r?f:p],l,!r&&i));!r&&i&&_&&e[f].componentProviders++}}}function UC(n,t,e,i){const r=xl(t),o=function fB(n){return!!n.useClass}(t);if(r||o){const l=(o?xe(t.useClass):t).prototype.ngOnDestroy;if(l){const c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){const u=c.indexOf(e);-1===u?c.push(e,[i,l]):c[u+1].push(i,l)}else c.push(e,l)}}}function Gx(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function HC(n,t,e,i){for(let r=e;r{e.providersResolver=(i,r)=>function YU(n,t,e){const i=_t();if(i.firstCreatePass){const r=yo(n);BC(e,i.data,i.blueprint,r,!0),BC(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}class Lu{}class qx{}class Kx extends Lu{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new fI(this);const i=function vr(n,t){const e=n[kn]||null;if(!e&&!0===t)throw new Error(`Type ${At(n)} does not have '\u0275mod' property.`);return e}(t);this._bootstrapComponents=function xs(n){return n instanceof Function?n():n}(i.bootstrap),this._r3Injector=GE(t,e,[{provide:Lu,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],At(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class WC extends qx{constructor(t){super(),this.moduleType=t}create(t){return new Kx(this.moduleType,t)}}class eH extends Lu{constructor(t,e,i){super(),this.componentFactoryResolver=new fI(this),this.instance=null;const r=new kE([...t,{provide:Lu,useValue:this},{provide:Ol,useValue:this.componentFactoryResolver}],e||Sm(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}}let tH=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){const i=EE(0,e.type),r=i.length>0?function Bm(n,t,e=null){return new eH(n,t,e).injector}([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(const e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=K({token:n,providedIn:"environment",factory:()=>new n(U(Bo))}),n})();function $t(n){n.getStandaloneInjector=t=>t.get(tH).getOrCreateStandaloneInjector(n)}function pn(n,t,e){const i=Ri()+n,r=W();return r[i]===Ge?Ho(r,i,e?t.call(e):t()):yh(r,i)}function te(n,t,e,i){return iO(W(),Ri(),n,t,e,i)}function ot(n,t,e,i,r){return rO(W(),Ri(),n,t,e,i,r)}function Hr(n,t,e,i,r,o){return function oO(n,t,e,i,r,o,s,a){const l=t+e;return function Nm(n,t,e,i,r){const o=Al(n,t,e,i);return wi(n,t+2,r)||o}(n,l,r,o,s)?Ho(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):Mh(n,l+3)}(W(),Ri(),n,t,e,i,r,o)}function va(n,t,e,i,r,o,s){return function sO(n,t,e,i,r,o,s,a,l){const c=t+e;return Ur(n,c,r,o,s,a)?Ho(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):Mh(n,c+4)}(W(),Ri(),n,t,e,i,r,o,s)}function qC(n,t,e,i){return function aO(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l=0;e--){const i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks||(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];const o=i.factory||(i.factory=wl(i.type)),s=Xi(O);try{const a=om(!1),l=o();return om(a),function u9(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,W(),r,l),l}finally{Xi(s)}}function Ye(n,t,e){const i=n+22,r=W(),o=iu(r,i);return Eh(r,i)?iO(r,Ri(),t,o.transform,e,o):o.transform(e)}function Um(n,t,e,i){const r=n+22,o=W(),s=iu(o,r);return Eh(o,r)?rO(o,Ri(),t,s.transform,e,i,s):s.transform(e,i)}function Eh(n,t){return n[1].data[t].pure}function KC(n){return t=>{setTimeout(n,void 0,t)}}const R=class gH extends ye{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){const l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=KC(o),r&&(r=KC(r)),s&&(s=KC(s)));const a=super.subscribe({next:r,error:o,complete:s});return t instanceof ft&&t.add(a),a}};function _H(){return this._results[kl()]()}class Ih{get changes(){return this._changes||(this._changes=new R)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;const e=kl(),i=Ih.prototype;i[e]||(i[e]=_H)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){const i=this;i.dirty=!1;const r=function Br(n){return n.flat(Number.POSITIVE_INFINITY)}(t);(this._changesDetected=!function jV(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i{class n{}return n.__NG_ELEMENT_ID__=bH,n})();const yH=$r,vH=class extends yH{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){const i=this._declarationTContainer.tViews,r=Tm(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[17]=this._declarationLView[this._declarationTContainer.index];const s=this._declarationLView[19];return null!==s&&(r[19]=s.createEmbeddedView(i)),vC(i,r,t),new gh(r)}};function bH(){return Hm(ai(),W())}function Hm(n,t){return 4&n.type?new vH(t,n,gu(n,t)):null}let ir=(()=>{class n{}return n.__NG_ELEMENT_ID__=CH,n})();function CH(){return uO(ai(),W())}const wH=ir,lO=class extends wH{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return gu(this._hostTNode,this._hostLView)}get injector(){return new su(this._hostTNode,this._hostLView)}get parentInjector(){const t=Tb(this._hostTNode,this._hostLView);if(_M(t)){const e=rm(t,this._hostLView),i=im(t);return new su(e[1].data[i+8],e)}return new su(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){const e=cO(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-10}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);const s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){const s=t&&!function ih(n){return"function"==typeof n}(t);let a;if(s)a=e;else{const d=e||{};a=d.index,i=d.injector,r=d.projectableNodes,o=d.environmentInjector||d.ngModuleRef}const l=s?t:new _h(Nt(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){const h=(s?c:this.parentInjector).get(Bo,null);h&&(o=h)}const u=l.create(c,r,void 0,o);return this.insert(u.hostView,a),u}insert(t,e){const i=t._lView,r=i[1];if(function lV(n){return _o(n[3])}(i)){const u=this.indexOf(t);if(-1!==u)this.detach(u);else{const d=i[3],h=new lO(d,d[6],d[3]);h.detach(h.indexOf(t))}}const o=this._adjustIndex(e),s=this._lContainer;!function Mz(n,t,e,i){const r=10+i,o=e.length;i>0&&(e[r-1][4]=t),i0)i.push(s[a/2]);else{const c=o[a+1],u=t[-l];for(let d=10;d{class n{constructor(e){this.appInits=e,this.resolve=Wm,this.reject=Wm,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;const e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(U(Gm,8))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const Oh=new se("AppId",{providedIn:"root",factory:function LO(){return`${s0()}${s0()}${s0()}`}});function s0(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const PO=new se("Platform Initializer"),Km=new se("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),RO=new se("appBootstrapListener"),FO=new se("AnimationModuleType"),Ns=new se("LocaleId",{providedIn:"root",factory:()=>re(Ns,Ae.Optional|Ae.SkipSelf)||function YH(){return typeof $localize<"u"&&$localize.locale||Nu}()}),e7=(()=>Promise.resolve(0))();function a0(n){typeof Zone>"u"?e7.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}class Xe{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new R(!1),this.onMicrotaskEmpty=new R(!1),this.onStable=new R(!1),this.onError=new R(!1),typeof Zone>"u")throw new j(908,!1);Zone.assertZonePatched();const r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function t7(){let n=It.requestAnimationFrame,t=It.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){const e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);const i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function r7(n){const t=()=>{!function i7(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(It,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,c0(n),n.isCheckStableRunning=!0,l0(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),c0(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return BO(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),UO(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return BO(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),UO(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,c0(n),l0(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!Xe.isInAngularZone())throw new j(909,!1)}static assertNotInAngularZone(){if(Xe.isInAngularZone())throw new j(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){const o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,n7,Wm,Wm);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}}const n7={};function l0(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function c0(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function BO(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function UO(n){n._nesting--,l0(n)}class o7{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new R,this.onMicrotaskEmpty=new R,this.onStable=new R,this.onError=new R}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}const HO=new se(""),Ym=new se("");let h0,u0=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,h0||(function s7(n){h0=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{Xe.assertNotInAngularZone(),a0(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())a0(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!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(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(U(Xe),U(d0),U(Ym))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),d0=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return h0?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),ba=null;const $O=new se("AllowMultipleToken"),p0=new se("PlatformDestroyListeners");function qO(n,t,e=[]){const i=`Platform: ${t}`,r=new se(i);return(o=[])=>{let s=f0();if(!s||s.injector.get($O,!1)){const a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function c7(n){if(ba&&!ba.get($O,!1))throw new j(400,!1);ba=n;const t=n.get(YO);(function GO(n){const t=n.get(PO,null);t&&t.forEach(e=>e())})(n)}(function KO(n=[],t){return Ci.create({name:t,providers:[{provide:sC,useValue:"platform"},{provide:p0,useValue:new Set([()=>ba=null])},...n]})}(a,i))}return function d7(n){const t=f0();if(!t)throw new j(401,!1);return t}()}}function f0(){return ba?.get(YO)??null}let YO=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){const r=function ZO(n,t){let e;return e="noop"===n?new o7:("zone.js"===n?void 0:n)||new Xe(t),e}(i?.ngZone,function QO(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:Xe,useValue:r}];return r.run(()=>{const s=Ci.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(yu,null);if(!l)throw new j(402,!1);return r.runOutsideAngular(()=>{const c=r.onError.subscribe({next:u=>{l.handleError(u)}});a.onDestroy(()=>{Qm(this._modules,a),c.unsubscribe()})}),function JO(n,t,e){try{const i=e();return vh(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{const c=a.injector.get(qm);return c.runInitializers(),c.donePromise.then(()=>(function wx(n){Ji(n,"Expected localeId to be defined"),"string"==typeof n&&(Cx=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(Ns,Nu)||Nu),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){const r=XO({},i);return function a7(n,t,e){const i=new WC(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){const i=e.injector.get(Pl);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new j(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new j(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());const e=this._injector.get(p0,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(U(Ci))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function XO(n,t){return Array.isArray(t)?t.reduce(XO,n):{...n,...t}}let Pl=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new mt(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new mt(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{Xe.assertNotInAngularZone(),a0(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});const c=this._zone.onUnstable.subscribe(()=>{Xe.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=ys(o,s.pipe(function Bf(){return n=>gl()(function zf(n,t){return function(i){let r;if(r="function"==typeof n?n:function(){return n},"function"==typeof t)return i.lift(new Kv(r,t));const o=Object.create(i,qv);return o.source=i,o.subjectFactory=r,o}}(vs)(n))}()))}bootstrap(e,i){const r=e instanceof NE;if(!this._injector.get(qm).done)throw!r&&function Jc(n){const t=Nt(n)||_i(n)||Li(n);return null!==t&&t.standalone}(e),new j(405,false);let s;s=r?e:this._injector.get(Ol).resolveComponentFactory(e),this.componentTypes.push(s.componentType);const a=function l7(n){return n.isBoundToModule}(s)?void 0:this._injector.get(Lu),c=s.create(Ci.NULL,[],i||s.selector,a),u=c.location.nativeElement,d=c.injector.get(HO,null);return d?.registerApplication(u),c.onDestroy(()=>{this.detachView(c.hostView),Qm(this.components,c),d?.unregisterApplication(u)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new j(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){const i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){const i=e;Qm(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);const i=this._injector.get(RO,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>Qm(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new j(406,!1);const e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(U(Xe),U(Bo),U(yu))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Qm(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}let Tt=(()=>{class n{}return n.__NG_ELEMENT_ID__=f7,n})();function f7(n){return function m7(n,t,e){if(Jd(n)&&!e){const i=wr(n.index,t);return new gh(i,i)}return 47&n.type?new gh(t[16],t):null}(ai(),W(),16==(16&n))}class rk{constructor(){}supports(t){return Am(t)}create(t){return new C7(t)}}const b7=(n,t)=>t;class C7{constructor(t){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=t||b7}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){const s=!i||e&&e.currentIndex{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new w7(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}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(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){const r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new ok),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new ok),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class w7{constructor(t,e){this.item=t,this.trackById=e,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 S7{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){const e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}}class ok{constructor(){this.map=new Map}put(t){const e=t.trackById;let i=this.map.get(e);i||(i=new S7,this.map.set(e,i)),i.add(t)}get(t,e){const r=this.map.get(t);return r?r.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function sk(n,t,e){const i=n.previousIndex;if(null===i)return i;let r=0;return e&&i{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{const o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const r=this._records.get(t);this._maybeAddToChanges(r,e);const o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}const i=new T7(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}}class T7{constructor(t){this.key=t,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 lk(){return new kh([new rk])}let kh=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||lk()),deps:[[n,new sh,new oh]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new j(901,!1)}}return n.\u0275prov=K({token:n,providedIn:"root",factory:lk}),n})();function ck(){return new Ah([new ak])}let Ah=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){const r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||ck()),deps:[[n,new sh,new oh]]}}find(e){const i=this.factories.find(r=>r.supports(e));if(i)return i;throw new j(901,!1)}}return n.\u0275prov=K({token:n,providedIn:"root",factory:ck}),n})();const I7=qO(null,"core",[]);let x7=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(U(Pl))},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({}),n})();let v0=null;function Wo(){return v0}class N7{}const Jt=new se("DocumentToken");var rr=(()=>((rr=rr||{})[rr.Decimal=0]="Decimal",rr[rr.Percent=1]="Percent",rr[rr.Currency=2]="Currency",rr[rr.Scientific=3]="Scientific",rr))(),Ne=(()=>((Ne=Ne||{})[Ne.Decimal=0]="Decimal",Ne[Ne.Group=1]="Group",Ne[Ne.List=2]="List",Ne[Ne.PercentSign=3]="PercentSign",Ne[Ne.PlusSign=4]="PlusSign",Ne[Ne.MinusSign=5]="MinusSign",Ne[Ne.Exponential=6]="Exponential",Ne[Ne.SuperscriptingExponent=7]="SuperscriptingExponent",Ne[Ne.PerMille=8]="PerMille",Ne[Ne.Infinity=9]="Infinity",Ne[Ne.NaN=10]="NaN",Ne[Ne.TimeSeparator=11]="TimeSeparator",Ne[Ne.CurrencyDecimal=12]="CurrencyDecimal",Ne[Ne.CurrencyGroup=13]="CurrencyGroup",Ne))();function Wr(n,t){const e=ji(n),i=e[ue.NumberSymbols][t];if(typeof i>"u"){if(t===Ne.CurrencyDecimal)return e[ue.NumberSymbols][Ne.Decimal];if(t===Ne.CurrencyGroup)return e[ue.NumberSymbols][Ne.Group]}return i}const h6=/^(\d+)?\.((\d+)(-(\d+))?)?$/;function O0(n){const t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function Dk(n,t){t=encodeURIComponent(t);for(const e of n.split(";")){const i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}const A0=/\s+/,Tk=[];let Ot=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=Tk,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(A0):Tk}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(A0):e}ngDoCheck(){for(const i of this.initialClasses)this._updateState(i,!0);const e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(const i of e)this._updateState(i,!0);else if(null!=e)for(const i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){const r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(const e of this.stateMap){const i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(A0).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(O(kh),O(Ah),O(qe),O(Vn))},n.\u0275dir=de({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})();class D6{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}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 Un=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){const e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){const i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new D6(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){const a=i.get(o);i.move(a,s),Ik(a,r)}});for(let r=0,o=i.length;r{Ik(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(kh))},n.\u0275dir=de({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function Ik(n,t){n.context.$implicit=t.item}let He=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new M6,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){xk("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){xk("ngIfElse",e),this._elseTemplateRef=e,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(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r))},n.\u0275dir=de({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})();class M6{constructor(){this.$implicit=null,this.ngIf=null}}function xk(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${At(t)}'.`)}class N0{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}}let Fs=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){const i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(const i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=de({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),jl=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new N0(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(Fs,9))},n.\u0275dir=de({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),Ph=(()=>{class n{constructor(e,i,r){r._addDefault(new N0(e,i))}}return n.\u0275fac=function(e){return new(e||n)(O(ir),O($r),O(Fs,9))},n.\u0275dir=de({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),cn=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){const e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){const[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:tr.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Ah),O(Vn))},n.\u0275dir=de({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Zn=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){const i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){const{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(O(ir))},n.\u0275dir=de({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]}),n})();function Do(n,t){return new j(2100,!1)}class I6{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}}class x6{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}}const O6=new x6,k6=new I6;let Vl=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(vh(e))return O6;if(xI(e))return k6;throw Do()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(O(Tt,16))},n.\u0275pipe=vn({name:"async",type:n,pure:!1,standalone:!0}),n})(),L0=(()=>{class n{transform(e){if(null==e)return null;if("string"!=typeof e)throw Do();return e.toLowerCase()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=vn({name:"lowercase",type:n,pure:!0,standalone:!0}),n})(),Lk=(()=>{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function P0(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{return function y6(n,t,e){return function I0(n,t,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(n)){let c=function b6(n){let i,r,o,s,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(o=t.search(/e/i))>0?(r<0&&(r=o),r+=+t.slice(o+1),t=t.substring(0,o)):r<0&&(r=t.length),o=0;"0"===t.charAt(o);o++);if(o===(a=t.length))i=[0],r=1;else{for(a--;"0"===t.charAt(a);)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(t.charAt(o))}return r>22&&(i=i.splice(0,21),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);s&&(c=function v6(n){if(0===n.digits[0])return n;const t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let u=t.minInt,d=t.minFrac,h=t.maxFrac;if(o){const T=o.match(h6);if(null===T)throw new Error(`${o} is not a valid digit info`);const M=T[1],w=T[3],N=T[5];null!=M&&(u=O0(M)),null!=w&&(d=O0(w)),null!=N?h=O0(N):null!=w&&d>h&&(h=d)}!function C6(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen;const o=Math.min(Math.max(t,r),e);let s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r=c?f.pop():l=!1),h>=10?1:0},0);u&&(i.unshift(u),n.integerLen++)}(c,d,h);let p=c.digits,f=c.integerLen;const m=c.exponent;let _=[];for(l=p.every(T=>!T);f0?_=p.splice(f,p.length):(_=p,p=[0]);const b=[];for(p.length>=t.lgSize&&b.unshift(p.splice(-t.lgSize,p.length).join(""));p.length>t.gSize;)b.unshift(p.splice(-t.gSize,p.length).join(""));p.length&&b.unshift(p.join("")),a=b.join(Wr(e,i)),_.length&&(a+=Wr(e,r)+_.join("")),m&&(a+=Wr(e,Ne.Exponential)+"+"+m)}else a=Wr(e,Ne.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,function x0(n,t="-"){const e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(";"),r=i[0],o=i[1],s=-1!==r.indexOf(".")?r.split("."):[r.substring(0,r.lastIndexOf("0")+1),r.substring(r.lastIndexOf("0")+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf("#"));for(let u=0;u{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({}),n})();class Fk{}class D$ extends N7{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class V0 extends D${static makeCurrent(){!function A7(n){v0||(v0=n)}(new V0)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){const e=function T$(){return Fh=Fh||document.querySelector("base"),Fh?Fh.getAttribute("href"):null}();return null==e?null:function M$(n){cg=cg||document.createElement("a"),cg.setAttribute("href",n);const t=cg.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Fh=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return Dk(document.cookie,t)}}let cg,Fh=null;const Hk=new se("TRANSITION_ID"),I$=[{provide:Gm,useFactory:function E$(n,t,e){return()=>{e.get(qm).donePromise.then(()=>{const i=Wo(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const ug=new se("EventManagerPlugins");let dg=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>r.manager=this),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){const i=this._eventNameToPlugin.get(e);if(i)return i;const r=this._plugins;for(let o=0;o{class n{constructor(){this._stylesSet=new Set}addStyles(e){const i=new Set;e.forEach(r=>{this._stylesSet.has(r)||(this._stylesSet.add(r),i.add(r))}),this.onStylesAdded(i)}onStylesAdded(e){}getAllStyles(){return Array.from(this._stylesSet)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),jh=(()=>{class n extends Wk{constructor(e){super(),this._doc=e,this._hostNodes=new Map,this._hostNodes.set(e.head,[])}_addStylesToHost(e,i,r){e.forEach(o=>{const s=this._doc.createElement("style");s.textContent=o,r.push(i.appendChild(s))})}addHost(e){const i=[];this._addStylesToHost(this._stylesSet,e,i),this._hostNodes.set(e,i)}removeHost(e){const i=this._hostNodes.get(e);i&&i.forEach(Gk),this._hostNodes.delete(e)}onStylesAdded(e){this._hostNodes.forEach((i,r)=>{this._addStylesToHost(e,r,i)})}ngOnDestroy(){this._hostNodes.forEach(e=>e.forEach(Gk))}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function Gk(n){Wo().remove(n)}const z0={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/MathML/"},B0=/%COMP%/g;function U0(n,t){return t.flat(100).map(e=>e.replace(B0,n))}function Yk(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}let hg=(()=>{class n{constructor(e,i,r){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.rendererByCompId=new Map,this.defaultRenderer=new H0(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;switch(i.encapsulation){case B.Emulated:{let r=this.rendererByCompId.get(i.id);return r||(r=new R$(this.eventManager,this.sharedStylesHost,i,this.appId),this.rendererByCompId.set(i.id,r)),r.applyToHost(e),r}case B.ShadowDom:return new F$(this.eventManager,this.sharedStylesHost,e,i);default:if(!this.rendererByCompId.has(i.id)){const r=U0(i.id,i.styles);this.sharedStylesHost.addStyles(r),this.rendererByCompId.set(i.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(U(dg),U(jh),U(Oh))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class H0{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(z0[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(Zk(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Zk(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;const o=z0[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){const r=z0[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(tr.DashCase|tr.Important)?t.style.setProperty(e,i,r&tr.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&tr.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Yk(i)):this.eventManager.addEventListener(t,e,Yk(i))}}function Zk(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}class R$ extends H0{constructor(t,e,i,r){super(t),this.component=i;const o=U0(r+"-"+i.id,i.styles);e.addStyles(o),this.contentAttr=function N$(n){return"_ngcontent-%COMP%".replace(B0,n)}(r+"-"+i.id),this.hostAttr=function L$(n){return"_nghost-%COMP%".replace(B0,n)}(r+"-"+i.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}}class F$ extends H0{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const o=U0(r.id,r.styles);for(let s=0;s{class n extends $k{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const Jk=["alt","control","meta","shift"],V$={"\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"},z$={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey};let B$=(()=>{class n extends $k{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){const o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Wo().onAndCancel(e,o.domEventName,s))}static parseEventName(e){const i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;const o=n._normalizeKey(i.pop());let s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),Jk.forEach(c=>{const u=i.indexOf(c);u>-1&&(i.splice(u,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;const l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=V$[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),Jk.forEach(s=>{s!==r&&(0,z$[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const eA=[{provide:Km,useValue:"browser"},{provide:PO,useValue:function U$(){V0.makeCurrent()},multi:!0},{provide:Jt,useFactory:function $$(){return function Vz(n){Zb=n}(document),document},deps:[]}],W$=qO(I7,"browser",eA),tA=new se(""),nA=[{provide:Ym,useClass:class x${addToWindow(t){It.getAngularTestability=(i,r=!0)=>{const o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},It.getAllAngularTestabilities=()=>t.getAllTestabilities(),It.getAllAngularRootElements=()=>t.getAllRootElements(),It.frameworkStabilizers||(It.frameworkStabilizers=[]),It.frameworkStabilizers.push(i=>{const r=It.getAllAngularTestabilities();let o=r.length,s=!1;const a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Wo().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:HO,useClass:u0,deps:[Xe,d0,Ym]},{provide:u0,useClass:u0,deps:[Xe,d0,Ym]}],iA=[{provide:sC,useValue:"root"},{provide:yu,useFactory:function H$(){return new yu},deps:[]},{provide:ug,useClass:j$,multi:!0,deps:[Jt,Xe,Km]},{provide:ug,useClass:B$,multi:!0,deps:[Jt]},{provide:hg,useClass:hg,deps:[dg,jh,Oh]},{provide:fh,useExisting:hg},{provide:Wk,useExisting:jh},{provide:jh,useClass:jh,deps:[Jt]},{provide:dg,useClass:dg,deps:[ug,Xe]},{provide:Fk,useClass:O$,deps:[]},[]];let rA=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:Oh,useValue:e.appId},{provide:Hk,useExisting:Oh},I$]}}}return n.\u0275fac=function(e){return new(e||n)(U(tA,12))},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({providers:[...iA,...nA],imports:[ze,x7]}),n})();typeof window<"u"&&window;let pg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:function(e){let i=null;return i=e?new(e||n):U(G0),i},providedIn:"root"}),n})(),G0=(()=>{class n extends pg{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case Zt.NONE:return i;case Zt.HTML:return Vo(i,"HTML")?Dr(i):wE(this._doc,String(i)).toString();case Zt.STYLE:return Vo(i,"Style")?Dr(i):i;case Zt.SCRIPT:if(Vo(i,"Script"))return Dr(i);throw new Error("unsafe value used in a script context");case Zt.URL:return Vo(i,"URL")?Dr(i):vm(String(i));case Zt.RESOURCE_URL:if(Vo(i,"ResourceURL"))return Dr(i);throw new Error(`unsafe value used in a resource URL context (see ${Uc})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${Uc})`)}}bypassSecurityTrustHtml(e){return function Gz(n){return new zz(n)}(e)}bypassSecurityTrustStyle(e){return function qz(n){return new Bz(n)}(e)}bypassSecurityTrustScript(e){return function Kz(n){return new Uz(n)}(e)}bypassSecurityTrustUrl(e){return function Yz(n){return new Hz(n)}(e)}bypassSecurityTrustResourceUrl(e){return function Qz(n){return new $z(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(U(Jt))},n.\u0275prov=K({token:n,factory:function(e){let i=null;return i=e?new e:function eW(n){return new G0(n.get(Jt))}(U(Ci)),i},providedIn:"root"}),n})();function Wt(n,t){return function(i){return i.lift(new tW(n,t))}}class tW{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new nW(t,this.predicate,this.thisArg))}}class nW extends ut{constructor(t,e,i){super(t),this.predicate=e,this.thisArg=i,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(i){return void this.destination.error(i)}e&&this.destination.next(t)}}const lA=(()=>{function n(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return n.prototype=Object.create(Error.prototype),n})(),To=new mt(n=>n.complete());function fg(n){return n?function iW(n){return new mt(t=>n.schedule(()=>t.complete()))}(n):To}function Gt(n){return t=>0===n?fg():t.lift(new rW(n))}class rW{constructor(t){if(this.total=t,this.total<0)throw new lA}call(t,e){return e.subscribe(new oW(t,this.total))}}class oW extends ut{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,i=++this.count;i<=e&&(this.destination.next(t),i===e&&(this.destination.complete(),this.unsubscribe()))}}class zi extends ye{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new po;return this._value}next(t){super.next(this._value=t)}}function mg(n,t){return new mt(e=>{const i=n.length;if(0===i)return void e.complete();const r=new Array(i);let o=0,s=0;for(let a=0;a{c||(c=!0,s++),r[a]=u},error:u=>e.error(u),complete:()=>{o++,(o===i||!c)&&(s===i&&e.next(t?t.reduce((u,d,h)=>(u[d]=r[h],u),{}):r),e.complete())}}))}})}let cA=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(qe))},n.\u0275dir=de({type:n}),n})(),zl=(()=>{class n extends cA{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=function Qn(n){return Po(()=>{const t=n.prototype.constructor,e=t[Ct]||Eb(t),i=Object.prototype;let r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){const o=r[Ct]||Eb(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}(n)))(i||n)}}(),n.\u0275dir=de({type:n,features:[Lt]}),n})();const wn=new se("NgValueAccessor"),lW={provide:wn,useExisting:$e(()=>qr),multi:!0},uW=new se("CompositionEventMode");let qr=(()=>{class n extends cA{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function cW(){const n=Wo()?Wo().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Vn),O(qe),O(uW,8))},n.\u0275dir=de({type:n,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(e,i){1&e&&P("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Ie([lW]),Lt]}),n})();function wa(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function dA(n){return null!=n&&"number"==typeof n.length}const ci=new se("NgValidators"),Sa=new se("NgAsyncValidators"),hW=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Kr{static min(t){return function hA(n){return t=>{if(wa(t.value)||wa(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e{if(wa(t.value)||wa(n))return null;const e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}(t)}static required(t){return function fA(n){return wa(n.value)?{required:!0}:null}(t)}static requiredTrue(t){return function mA(n){return!0===n.value?null:{required:!0}}(t)}static email(t){return function gA(n){return wa(n.value)||hW.test(n.value)?null:{email:!0}}(t)}static minLength(t){return function _A(n){return t=>wa(t.value)||!dA(t.value)?null:t.value.lengthdA(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}(t)}static pattern(t){return function vA(n){if(!n)return gg;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(wa(i.value))return null;const r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}(t)}static nullValidator(t){return null}static compose(t){return TA(t)}static composeAsync(t){return MA(t)}}function gg(n){return null}function bA(n){return null!=n}function CA(n){return vh(n)?Yt(n):n}function wA(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function SA(n,t){return t.map(e=>e(n))}function DA(n){return n.map(t=>function pW(n){return!n.validate}(t)?t:e=>t.validate(e))}function TA(n){if(!n)return null;const t=n.filter(bA);return 0==t.length?null:function(e){return wA(SA(e,t))}}function q0(n){return null!=n?TA(DA(n)):null}function MA(n){if(!n)return null;const t=n.filter(bA);return 0==t.length?null:function(e){return function sW(...n){if(1===n.length){const t=n[0];if(oi(t))return mg(t,null);if(ll(t)&&Object.getPrototypeOf(t)===Object.prototype){const e=Object.keys(t);return mg(e.map(i=>t[i]),e)}}if("function"==typeof n[n.length-1]){const t=n.pop();return mg(n=1===n.length&&oi(n[0])?n[0]:n,null).pipe(me(e=>t(...e)))}return mg(n,null)}(SA(e,t).map(CA)).pipe(me(wA))}}function K0(n){return null!=n?MA(DA(n)):null}function EA(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function IA(n){return n._rawValidators}function xA(n){return n._rawAsyncValidators}function Y0(n){return n?Array.isArray(n)?n:[n]:[]}function _g(n,t){return Array.isArray(n)?n.includes(t):n===t}function OA(n,t){const e=Y0(t);return Y0(n).forEach(r=>{_g(e,r)||e.push(r)}),e}function kA(n,t){return Y0(t).filter(e=>!_g(n,e))}class AA{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(t){this._rawValidators=t||[],this._composedValidatorFn=q0(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=K0(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}class it extends AA{get formDirective(){return null}get path(){return null}}class Go extends AA{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class NA{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}}let $n=(()=>{class n extends NA{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(Go,2))},n.\u0275dir=de({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&Si("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Lt]}),n})(),js=(()=>{class n extends NA{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(O(it,10))},n.\u0275dir=de({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(e,i){2&e&&Si("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Lt]}),n})();const Vh="VALID",vg="INVALID",ju="PENDING",zh="DISABLED";function X0(n){return(bg(n)?n.validators:n)||null}function ew(n,t){return(bg(t)?t.asyncValidators:n)||null}function bg(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}function PA(n,t,e){const i=n.controls;if(!(t?Object.keys(i):i).length)throw new j(1e3,"");if(!i[e])throw new j(1001,"")}function RA(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new j(1002,"")})}class Cg{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Vh}get invalid(){return this.status===vg}get pending(){return this.status==ju}get disabled(){return this.status===zh}get enabled(){return this.status!==zh}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(OA(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(OA(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(kA(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(kA(t,this._rawAsyncValidators))}hasValidator(t){return _g(this._rawValidators,t)}hasAsyncValidator(t){return _g(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=ju,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=zh,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=Vh,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Vh||this.status===ju)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?zh:Vh}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=ju,this._hasOwnPendingAsyncValidator=!0;const e=CA(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){const i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new R,this.statusChanges=new R}_calculateStatus(){return this._allControlsDisabled()?zh:this.errors?vg:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ju)?ju:this._anyControlsHaveStatus(vg)?vg:Vh}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){bg(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function bW(n){return Array.isArray(n)?q0(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function CW(n){return Array.isArray(n)?K0(n):n||null}(this._rawAsyncValidators)}}class Da extends Cg{constructor(t,e,i){super(X0(e),ew(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){RA(this,0,t),Object.keys(t).forEach(i=>{PA(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{const r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{const i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}}class FA extends Da{}const Vu=new se("CallSetDisabledState",{providedIn:"root",factory:()=>wg}),wg="always";function Sg(n,t){return[...t.path,n]}function Bh(n,t,e=wg){tw(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function SW(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&jA(n,t)})}(n,t),function TW(n,t){const e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function DW(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&jA(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function wW(n,t){if(t.valueAccessor.setDisabledState){const e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function Dg(n,t,e=!0){const i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),Mg(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function Tg(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function tw(n,t){const e=IA(n);null!==t.validator?n.setValidators(EA(e,t.validator)):"function"==typeof e&&n.setValidators([e]);const i=xA(n);null!==t.asyncValidator?n.setAsyncValidators(EA(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);const r=()=>n.updateValueAndValidity();Tg(t._rawValidators,r),Tg(t._rawAsyncValidators,r)}function Mg(n,t){let e=!1;if(null!==n){if(null!==t.validator){const r=IA(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){const r=xA(n);if(Array.isArray(r)&&r.length>0){const o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}const i=()=>{};return Tg(t._rawValidators,i),Tg(t._rawAsyncValidators,i),e}function jA(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function iw(n,t){if(!n.hasOwnProperty("model"))return!1;const e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function rw(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===qr?e=o:function IW(n){return Object.getPrototypeOf(n.constructor)===zl}(o)?i=o:r=o}),r||i||e||null}function BA(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}function UA(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}const Vs=class extends Cg{constructor(t=null,e,i){super(X0(e),ew(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),bg(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=UA(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){BA(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){BA(this._onDisabledChange,t)}_forEachChild(t){}_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(t){UA(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},NW={provide:Go,useExisting:$e(()=>Hh)},WA=(()=>Promise.resolve())();let Hh=(()=>{class n extends Go{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new Vs,this._registered=!1,this.update=new R,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=rw(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){const i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),iw(e,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(e){this.viewModel=e,this.update.emit(e)}_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(){Bh(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(e){WA.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){const i=e.isDisabled.currentValue,r=0!==i&&function Fu(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}(i);WA.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?Sg(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(O(it,9),O(ci,10),O(Sa,10),O(wn,10),O(Tt,8),O(Vu,8))},n.\u0275dir=de({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Ie([NW]),Lt,Yn]}),n})(),zs=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=de({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),n})(),qA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({}),n})();const sw=new se("NgModelWithFormControlWarning"),VW={provide:it,useExisting:$e(()=>Yr)};let Yr=(()=>{class n extends it{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new R,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Mg(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){const i=this.form.get(e.path);return Bh(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){Dg(e.control||null,e,!1),function xW(n,t){const e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,function zA(n,t){n._syncPendingControls(),t.forEach(e=>{const i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{const i=e.control,r=this.form.get(e.path);i!==r&&(Dg(i||null,e),(n=>n instanceof Vs)(r)&&(Bh(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){const i=this.form.get(e.path);(function VA(n,t){tw(n,t)})(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){const i=this.form.get(e.path);i&&function MW(n,t){return Mg(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){tw(this.form,this),this._oldForm&&Mg(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(O(ci,10),O(Sa,10),O(Vu,8))},n.\u0275dir=de({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&P("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ie([VW]),Lt,Yn]}),n})();const UW={provide:Go,useExisting:$e(()=>Jn)};let Jn=(()=>{class n extends Go{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new R,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=rw(0,o)}ngOnChanges(e){this._added||this._setUpControl(),iw(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return Sg(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(O(it,13),O(ci,10),O(Sa,10),O(wn,10),O(sw,8))},n.\u0275dir=de({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Ie([UW]),Lt,Yn]}),n})(),c2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[qA]}),n})();class u2 extends Cg{constructor(t,e,i){super(X0(e),ew(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){RA(this,0,t),t.forEach((i,r)=>{PA(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>!!i._syncPendingControls()||e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}}function d2(n){return!!n&&(void 0!==n.asyncValidators||void 0!==n.validators||void 0!==n.updateOn)}let $h=(()=>{class n{constructor(){this.useNonNullable=!1}get nonNullable(){const e=new n;return e.useNonNullable=!0,e}group(e,i=null){const r=this._reduceControls(e);let o={};return d2(i)?o=i:null!==i&&(o.validators=i.validator,o.asyncValidators=i.asyncValidator),new Da(r,o)}record(e,i=null){const r=this._reduceControls(e);return new FA(r,i)}control(e,i,r){let o={};return this.useNonNullable?(d2(i)?o=i:(o.validators=i,o.asyncValidators=r),new Vs(e,{...o,nonNullable:!0})):new Vs(e,i,r)}array(e,i,r){const o=e.map(s=>this._createControl(s));return new u2(o,i,r)}_reduceControls(e){const i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r])}),i}_createControl(e){return e instanceof Vs||e instanceof Cg?e:Array.isArray(e)?this.control(e[0],e.length>1?e[1]:null,e.length>2?e[2]:null):this.control(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ul=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Vu,useValue:e.callSetDisabledState??wg}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[c2]}),n})(),Wn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:sw,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Vu,useValue:e.callSetDisabledState??wg}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[c2]}),n})();const iG=["editor"];let oG=(()=>{class n{constructor(e,i){this.ngZone=e,this.monacoPathConfig=i,this.isMonacoLoaded$=new zi(!1),this._monacoPath="assets/monaco-editor/min/vs",window.monacoEditorAlreadyInitialized?e.run(()=>this.isMonacoLoaded$.next(!0)):(window.monacoEditorAlreadyInitialized=!0,this.monacoPathConfig&&(this.monacoPath=this.monacoPathConfig),this.loadMonaco())}set monacoPath(e){e&&(this._monacoPath=e)}loadMonaco(){const e=()=>{let s=this._monacoPath;window.amdRequire=window.require;const a=!!this.nodeRequire,l=s.includes("http");a&&(window.require=this.nodeRequire,l||(s=window.require("path").resolve(window.__dirname,this._monacoPath))),window.amdRequire.config({paths:{vs:s}}),window.amdRequire(["vs/editor/editor.main"],()=>{this.ngZone.run(()=>this.isMonacoLoaded$.next(!0))},c=>console.error("Error loading monaco-editor: ",c))};if(window.amdRequire)return e();window.require&&(this.addElectronFixScripts(),this.nodeRequire=window.require);const o=document.createElement("script");o.type="text/javascript",o.src=`${this._monacoPath}/loader.js`,o.addEventListener("load",e),document.body.appendChild(o)}addElectronFixScripts(){const e=document.createElement("script"),i=document.createTextNode("self.module = undefined;"),r=document.createTextNode("self.process.browser = true;");e.appendChild(i),e.appendChild(r),document.body.appendChild(e)}}return n.\u0275fac=function(e){return new(e||n)(U(Xe),U("MONACO_PATH",8))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),h2=(()=>{class n{constructor(e){this.monacoLoader=e,this.init=new R,this.onTouched=()=>{},this.onErrorStatusChange=()=>{},this.propagateChange=()=>{}}get model(){return this.editor&&this.editor.getModel()}get modelMarkers(){return this.model&&monaco.editor.getModelMarkers({resource:this.model.uri})}ngOnInit(){this.monacoLoader.isMonacoLoaded$.pipe(Wt(e=>e),Gt(1)).subscribe(()=>{this.initEditor()})}ngOnChanges(e){if(this.editor&&e.options&&!e.options.firstChange){const{language:i,theme:r,...o}=e.options.currentValue,{language:s,theme:a}=e.options.previousValue;s!==i&&monaco.editor.setModelLanguage(this.editor.getModel(),this.options&&this.options.language?this.options.language:"text"),a!==r&&monaco.editor.setTheme(r),this.editor.updateOptions(o)}if(this.editor&&e.uri){const i=e.uri.currentValue,r=e.uri.previousValue;if(r&&!i||!r&&i||i&&r&&i.path!==r.path){const o=this.editor.getValue();let s;this.modelUriInstance&&this.modelUriInstance.dispose(),i&&(s=monaco.editor.getModels().find(a=>a.uri.path===i.path)),this.modelUriInstance=s||monaco.editor.createModel(o,this.options.language||"text",this.uri),this.editor.setModel(this.modelUriInstance)}}}writeValue(e){this.value=e,this.editor&&e?this.editor.setValue(e):this.editor&&this.editor.setValue("")}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){this.onTouched=e}validate(){return this.parsedError?{monaco:{value:this.parsedError.split("|")}}:null}registerOnValidatorChange(e){this.onErrorStatusChange=e}initEditor(){const e={value:[this.value].join("\n"),language:"text",automaticLayout:!0,scrollBeyondLastLine:!1,theme:"vc"};this.editor=monaco.editor.create(this.editorContent.nativeElement,this.options?{...e,...this.options}:e),this.registerEditorListeners(),this.init.emit(this.editor)}registerEditorListeners(){this.editor.onDidChangeModelContent(()=>{this.propagateChange(this.editor.getValue())}),this.editor.onDidChangeModelDecorations(()=>{const e=this.modelMarkers.map(({message:r})=>r).join("|");this.parsedError!==e&&(this.parsedError=e,this.onErrorStatusChange())}),this.editor.onDidBlurEditorText(()=>{this.onTouched()})}ngOnDestroy(){this.editor&&this.editor.dispose()}}return n.\u0275fac=function(e){return new(e||n)(O(oG))},n.\u0275cmp=Y({type:n,selectors:[["ngx-monaco-editor"]],viewQuery:function(e,i){if(1&e&&Me(iG,7),2&e){let r;J(r=X())&&(i.editorContent=r.first)}},inputs:{options:"options",uri:"uri"},outputs:{init:"init"},features:[Ie([{provide:wn,useExisting:$e(()=>n),multi:!0},{provide:ci,useExisting:$e(()=>n),multi:!0}]),Yn],decls:4,vars:0,consts:[["fxFlex","",1,"editor-container"],["container",""],[1,"monaco-editor"],["editor",""]],template:function(e,i){1&e&&(S(0,"div",0,1),F(2,"div",2,3),D())},styles:[".monaco-editor[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;right:0}.editor-container[_ngcontent-%COMP%]{overflow:hidden;position:relative;display:table;width:100%;height:100%;min-width:0}"],changeDetection:0}),n})(),Eg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[[]]}),n})();function _e(...n){let t=n[n.length-1];return la(t)?(n.pop(),zc(n,t)):ua(n)}class Ig{}class pw{}class Mr{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{const i=e.indexOf(":");if(i>0){const r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let i=t[e];const r=e.toLowerCase();"string"==typeof i&&(i=[i]),i.length>0&&(this.headers.set(r,i),this.maybeSetNormalizedName(e,r))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof Mr?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new Mr;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof Mr?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);const r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":const o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class sG{encodeKey(t){return p2(t)}encodeValue(t){return p2(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}const lG=/%(\d[a-f0-9])/gi,cG={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function p2(n){return encodeURIComponent(n).replace(lG,(t,e)=>cG[e]??t)}function xg(n){return`${n}`}class Bs{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new sG,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function aG(n,t){const e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{const o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const i=t.fromObject[e],r=Array.isArray(i)?i.map(xg):[xg(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){const e=[];return Object.keys(t).forEach(i=>{const r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Bs({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(xg(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[];const r=i.indexOf(xg(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}class uG{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}function f2(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function m2(n){return typeof Blob<"u"&&n instanceof Blob}function g2(n){return typeof FormData<"u"&&n instanceof FormData}class Hl{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function dG(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new Mr),this.context||(this.context=new uG),this.params){const s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{const a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":ad.set(h,t.setHeaders[h]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((d,h)=>d.set(h,t.setParams[h]),c)),new Hl(e,i,o,{params:c,headers:l,context:u,reportProgress:a,responseType:r,withCredentials:s})}}var rn=(()=>((rn=rn||{})[rn.Sent=0]="Sent",rn[rn.UploadProgress=1]="UploadProgress",rn[rn.ResponseHeader=2]="ResponseHeader",rn[rn.DownloadProgress=3]="DownloadProgress",rn[rn.Response=4]="Response",rn[rn.User=5]="User",rn))();class fw{constructor(t,e=200,i="OK"){this.headers=t.headers||new Mr,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class mw extends fw{constructor(t={}){super(t),this.type=rn.ResponseHeader}clone(t={}){return new mw({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Og extends fw{constructor(t={}){super(t),this.type=rn.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Og({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class _2 extends fw{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function gw(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}let Er=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof Hl)o=e;else{let l,c;l=r.headers instanceof Mr?r.headers:new Mr(r.headers),r.params&&(c=r.params instanceof Bs?r.params:new Bs({fromObject:r.params})),o=new Hl(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}const s=_e(o).pipe(function Ta(n,t){return Tn(n,t,1)}(l=>this.handler.handle(l)));if(e instanceof Hl||"events"===r.observe)return s;const a=s.pipe(Wt(l=>l instanceof Og));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(me(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(me(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(me(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(me(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Bs).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,gw(r,i))}post(e,i,r={}){return this.request("POST",e,gw(r,i))}put(e,i,r={}){return this.request("PUT",e,gw(r,i))}}return n.\u0275fac=function(e){return new(e||n)(U(Ig))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function y2(n,t){return t(n)}function pG(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}const mG=new se("HTTP_INTERCEPTORS"),Wh=new se("HTTP_INTERCEPTOR_FNS");function gG(){let n=null;return(t,e)=>(null===n&&(n=(re(mG,{optional:!0})??[]).reduceRight(pG,y2)),n(t,e))}let v2=(()=>{class n extends Ig{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){const i=Array.from(new Set(this.injector.get(Wh)));this.chain=i.reduceRight((r,o)=>function fG(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),y2)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(U(pw),U(Bo))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const bG=/^\)\]\}',?\n/;let C2=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new mt(i=>{const r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((p,f)=>r.setRequestHeader(p,f.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){const p=e.detectContentTypeHeader();null!==p&&r.setRequestHeader("Content-Type",p)}if(e.responseType){const p=e.responseType.toLowerCase();r.responseType="json"!==p?p:"text"}const o=e.serializeBody();let s=null;const a=()=>{if(null!==s)return s;const p=r.statusText||"OK",f=new Mr(r.getAllResponseHeaders()),m=function CG(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new mw({headers:f,status:r.status,statusText:p,url:m}),s},l=()=>{let{headers:p,status:f,statusText:m,url:_}=a(),b=null;204!==f&&(b=typeof r.response>"u"?r.responseText:r.response),0===f&&(f=b?200:0);let T=f>=200&&f<300;if("json"===e.responseType&&"string"==typeof b){const M=b;b=b.replace(bG,"");try{b=""!==b?JSON.parse(b):null}catch(w){b=M,T&&(T=!1,b={error:w,text:b})}}T?(i.next(new Og({body:b,headers:p,status:f,statusText:m,url:_||void 0})),i.complete()):i.error(new _2({error:b,headers:p,status:f,statusText:m,url:_||void 0}))},c=p=>{const{url:f}=a(),m=new _2({error:p,status:r.status||0,statusText:r.statusText||"Unknown Error",url:f||void 0});i.error(m)};let u=!1;const d=p=>{u||(i.next(a()),u=!0);let f={type:rn.DownloadProgress,loaded:p.loaded};p.lengthComputable&&(f.total=p.total),"text"===e.responseType&&r.responseText&&(f.partialText=r.responseText),i.next(f)},h=p=>{let f={type:rn.UploadProgress,loaded:p.loaded};p.lengthComputable&&(f.total=p.total),i.next(f)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",d),null!==o&&r.upload&&r.upload.addEventListener("progress",h)),r.send(o),i.next({type:rn.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",d),null!==o&&r.upload&&r.upload.removeEventListener("progress",h)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(U(Fk))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const _w=new se("XSRF_ENABLED"),w2="XSRF-TOKEN",S2=new se("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>w2}),D2="X-XSRF-TOKEN",T2=new se("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>D2});class M2{}let wG=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=Dk(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(U(Jt),U(Km),U(S2))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function SG(n,t){const e=n.url.toLowerCase();if(!re(_w)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);const i=re(M2).getToken(),r=re(T2);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var In=(()=>((In=In||{})[In.Interceptors=0]="Interceptors",In[In.LegacyInterceptors=1]="LegacyInterceptors",In[In.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",In[In.NoXsrfProtection=3]="NoXsrfProtection",In[In.JsonpSupport=4]="JsonpSupport",In[In.RequestsMadeViaParent=5]="RequestsMadeViaParent",In))();function zu(n,t){return{\u0275kind:n,\u0275providers:t}}function DG(...n){const t=[Er,C2,v2,{provide:Ig,useExisting:v2},{provide:pw,useExisting:C2},{provide:Wh,useValue:SG,multi:!0},{provide:_w,useValue:!0},{provide:M2,useClass:wG}];for(const e of n)t.push(...e.\u0275providers);return function dB(n){return{\u0275providers:n}}(t)}const E2=new se("LEGACY_INTERCEPTOR_FN");function MG({cookieName:n,headerName:t}){const e=[];return void 0!==n&&e.push({provide:S2,useValue:n}),void 0!==t&&e.push({provide:T2,useValue:t}),zu(In.CustomXsrfConfiguration,e)}let kg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({providers:[DG(zu(In.LegacyInterceptors,[{provide:E2,useFactory:gG},{provide:Wh,useExisting:E2,multi:!0}]),MG({cookieName:w2,headerName:D2}))]}),n})();class EG extends ft{constructor(t,e){super()}schedule(t,e=0){return this}}class Ag extends EG{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const i=this.id,r=this.scheduler;return null!=i&&(this.id=this.recycleAsyncId(r,i,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this}requestAsyncId(t,e,i=0){return setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!==i&&this.delay===i&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=!!o&&o||new Error(o)}if(i)return this.unsubscribe(),r}_unsubscribe(){const t=this.id,e=this.scheduler,i=e.actions,r=i.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&i.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let I2=(()=>{class n{constructor(e,i=n.now){this.SchedulerAction=e,this.now=i}schedule(e,i=0,r){return new this.SchedulerAction(this,e).schedule(r,i)}}return n.now=()=>Date.now(),n})();class Mo extends I2{constructor(t,e=I2.now){super(t,()=>Mo.delegate&&Mo.delegate!==this?Mo.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,i){return Mo.delegate&&Mo.delegate!==this?Mo.delegate.schedule(t,e,i):super.schedule(t,e,i)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let i;this.active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}const yw=new class xG extends Mo{}(class IG extends Ag{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!==i&&i>0||null===i&&this.delay>0?super.requestAsyncId(t,e,i):t.flush(this)}}),OG=yw;function Ir(n,t){return new mt(t?e=>t.schedule(kG,0,{error:n,subscriber:e}):e=>e.error(n))}function kG({error:n,subscriber:t}){t.error(n)}class or{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,i){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return i&&i()}}accept(t,e,i){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,i)}toObservable(){switch(this.kind){case"N":return _e(this.value);case"E":return Ir(this.error);case"C":return fg()}throw new Error("unexpected notification kind value")}static createNext(t){return typeof t<"u"?new or("N",t):or.undefinedValueNotification}static createError(t){return new or("E",void 0,t)}static createComplete(){return or.completeNotification}}or.completeNotification=new or("C"),or.undefinedValueNotification=new or("N",void 0);class NG{constructor(t,e=0){this.scheduler=t,this.delay=e}call(t,e){return e.subscribe(new Ng(t,this.scheduler,this.delay))}}class Ng extends ut{constructor(t,e,i=0){super(t),this.scheduler=e,this.delay=i}static dispatch(t){const{notification:e,destination:i}=t;e.observe(i),this.unsubscribe()}scheduleMessage(t){this.destination.add(this.scheduler.schedule(Ng.dispatch,this.delay,new LG(t,this.destination)))}_next(t){this.scheduleMessage(or.createNext(t))}_error(t){this.scheduleMessage(or.createError(t)),this.unsubscribe()}_complete(){this.scheduleMessage(or.createComplete()),this.unsubscribe()}}class LG{constructor(t,e){this.notification=t,this.destination=e}}class Lg extends ye{constructor(t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i){super(),this.scheduler=i,this._events=[],this._infiniteTimeWindow=!1,this._bufferSize=t<1?1:t,this._windowTime=e<1?1:e,e===Number.POSITIVE_INFINITY?(this._infiniteTimeWindow=!0,this.next=this.nextInfiniteTimeWindow):this.next=this.nextTimeWindow}nextInfiniteTimeWindow(t){if(!this.isStopped){const e=this._events;e.push(t),e.length>this._bufferSize&&e.shift()}super.next(t)}nextTimeWindow(t){this.isStopped||(this._events.push(new PG(this._getNow(),t)),this._trimBufferThenGetEvents()),super.next(t)}_subscribe(t){const e=this._infiniteTimeWindow,i=e?this._events:this._trimBufferThenGetEvents(),r=this.scheduler,o=i.length;let s;if(this.closed)throw new po;if(this.isStopped||this.hasError?s=ft.EMPTY:(this.observers.push(t),s=new jd(this,t)),r&&t.add(t=new Ng(t,r)),e)for(let a=0;ae&&(s=Math.max(s,o-e)),s>0&&r.splice(0,s),r}}class PG{constructor(t,e){this.time=t,this.value=e}}function xn(n,t){return"function"==typeof t?e=>e.pipe(xn((i,r)=>Yt(n(i,r)).pipe(me((o,s)=>t(i,o,r,s))))):e=>e.lift(new RG(n))}class RG{constructor(t){this.project=t}call(t,e){return e.subscribe(new FG(t,this.project))}}class FG extends fl{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const i=this.index++;try{e=this.project(t,i)}catch(r){return void this.destination.error(r)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const i=new pl(this),r=this.destination;r.add(i),this.innerSubscription=ml(t,i),this.innerSubscription!==i&&r.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;(!t||t.closed)&&super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}const Pg={schedule(n,t){const e=setTimeout(n,t);return()=>clearTimeout(e)},scheduleBeforeRender(n){if(typeof window>"u")return Pg.schedule(n,0);if(typeof window.requestAnimationFrame>"u")return Pg.schedule(n,16);const t=window.requestAnimationFrame(n);return()=>window.cancelAnimationFrame(t)}};let vw;function GG(n,t,e){let i=e;return function VG(n){return!!n&&n.nodeType===Node.ELEMENT_NODE}(n)&&t.some((r,o)=>!("*"===r||!function BG(n,t){if(!vw){const e=Element.prototype;vw=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}return n.nodeType===Node.ELEMENT_NODE&&vw.call(n,t)}(n,r)||(i=o,0))),i}class KG{constructor(t,e){this.componentFactory=e.get(Ol).resolveComponentFactory(t)}create(t){return new YG(this.componentFactory,t)}}class YG{constructor(t,e){this.componentFactory=t,this.injector=e,this.eventEmitters=new Lg(1),this.events=this.eventEmitters.pipe(xn(i=>ys(...i))),this.componentRef=null,this.viewChangeDetectorRef=null,this.inputChanges=null,this.hasInputChanges=!1,this.implementsOnChanges=!1,this.scheduledChangeDetectionFn=null,this.scheduledDestroyFn=null,this.initialInputValues=new Map,this.unchangedInputs=new Set(this.componentFactory.inputs.map(({propName:i})=>i)),this.ngZone=this.injector.get(Xe),this.elementZone=typeof Zone>"u"?null:this.ngZone.run(()=>Zone.current)}connect(t){this.runInZone(()=>{if(null!==this.scheduledDestroyFn)return this.scheduledDestroyFn(),void(this.scheduledDestroyFn=null);null===this.componentRef&&this.initializeComponent(t)})}disconnect(){this.runInZone(()=>{null===this.componentRef||null!==this.scheduledDestroyFn||(this.scheduledDestroyFn=Pg.schedule(()=>{null!==this.componentRef&&(this.componentRef.destroy(),this.componentRef=null,this.viewChangeDetectorRef=null)},10))})}getInputValue(t){return this.runInZone(()=>null===this.componentRef?this.initialInputValues.get(t):this.componentRef.instance[t])}setInputValue(t,e){this.runInZone(()=>{null!==this.componentRef?function UG(n,t){return n===t||n!=n&&t!=t}(e,this.getInputValue(t))&&(void 0!==e||!this.unchangedInputs.has(t))||(this.recordInputChange(t,e),this.unchangedInputs.delete(t),this.hasInputChanges=!0,this.componentRef.instance[t]=e,this.scheduleDetectChanges()):this.initialInputValues.set(t,e)})}initializeComponent(t){const e=Ci.create({providers:[],parent:this.injector}),i=function WG(n,t){const e=n.childNodes,i=t.map(()=>[]);let r=-1;t.some((o,s)=>"*"===o&&(r=s,!0));for(let o=0,s=e.length;o{this.initialInputValues.has(t)&&this.setInputValue(t,this.initialInputValues.get(t))}),this.initialInputValues.clear()}initializeOutputs(t){const e=this.componentFactory.outputs.map(({propName:i,templateName:r})=>t.instance[i].pipe(me(s=>({name:r,value:s}))));this.eventEmitters.next(e)}callNgOnChanges(t){if(!this.implementsOnChanges||null===this.inputChanges)return;const e=this.inputChanges;this.inputChanges=null,t.instance.ngOnChanges(e)}markViewForCheck(t){this.hasInputChanges&&(this.hasInputChanges=!1,t.markForCheck())}scheduleDetectChanges(){this.scheduledChangeDetectionFn||(this.scheduledChangeDetectionFn=Pg.scheduleBeforeRender(()=>{this.scheduledChangeDetectionFn=null,this.detectChanges()}))}recordInputChange(t,e){if(!this.implementsOnChanges)return;null===this.inputChanges&&(this.inputChanges={});const i=this.inputChanges[t];if(i)return void(i.currentValue=e);const r=this.unchangedInputs.has(t),o=r?void 0:this.getInputValue(t);this.inputChanges[t]=new qT(o,e,r)}detectChanges(){null!==this.componentRef&&(this.callNgOnChanges(this.componentRef),this.markViewForCheck(this.viewChangeDetectorRef),this.componentRef.changeDetectorRef.detectChanges())}runInZone(t){return this.elementZone&&Zone.current!==this.elementZone?this.ngZone.run(t):t()}}class QG extends HTMLElement{constructor(){super(...arguments),this.ngElementEventsSubscription=null}}class x2{}class JG{}const Us="*";function $l(n,t){return{type:7,name:n,definitions:t,options:{}}}function Bi(n,t=null){return{type:4,styles:t,timings:n}}function O2(n,t=null){return{type:2,steps:n,options:t}}function Pt(n){return{type:6,styles:n,offset:null}}function Bu(n,t,e){return{type:0,name:n,styles:t,options:e}}function Ui(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function Rg(n,t=null){return{type:8,animation:n,options:t}}function Fg(n,t=null){return{type:10,animation:n,options:t}}function k2(n){Promise.resolve().then(n)}class Gh{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){k2(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class A2{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0;const o=this.players.length;0==o?k2(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(i=>{const r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){const t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}function N2(n){return new j(3e3,!1)}function Lq(){return typeof window<"u"&&typeof window.document<"u"}function Cw(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function Ma(n){switch(n.length){case 0:return new Gh;case 1:return n[0];default:return new A2(n)}}function L2(n,t,e,i,r=new Map,o=new Map){const s=[],a=[];let l=-1,c=null;if(i.forEach(u=>{const d=u.get("offset"),h=d==l,p=h&&c||new Map;u.forEach((f,m)=>{let _=m,b=f;if("offset"!==m)switch(_=t.normalizePropertyName(_,s),b){case"!":b=r.get(m);break;case Us:b=o.get(m);break;default:b=t.normalizeStyleValue(m,_,b,s)}p.set(_,b)}),h||a.push(p),c=p,l=d}),s.length)throw function wq(n){return new j(3502,!1)}();return a}function ww(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&Sw(e,"start",n)));break;case"done":n.onDone(()=>i(e&&Sw(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&Sw(e,"destroy",n)))}}function Sw(n,t,e){const o=Dw(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function Dw(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function xr(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function P2(n){const t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}let Tw=(n,t)=>!1,R2=(n,t,e)=>[],F2=null;function Mw(n){const t=n.parentNode||n.host;return t===F2?null:t}(Cw()||typeof Element<"u")&&(Lq()?(F2=(()=>document.documentElement)(),Tw=(n,t)=>{for(;t;){if(t===n)return!0;t=Mw(t)}return!1}):Tw=(n,t)=>n.contains(t),R2=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));const i=n.querySelector(t);return i?[i]:[]});let Wl=null,j2=!1;const V2=Tw,z2=R2;let B2=(()=>{class n{validateStyleProperty(e){return function Rq(n){Wl||(Wl=function Fq(){return typeof document<"u"?document.body:null}()||{},j2=!!Wl.style&&"WebkitAppearance"in Wl.style);let t=!0;return Wl.style&&!function Pq(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in Wl.style,!t&&j2&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in Wl.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return V2(e,i)}getParentElement(e){return Mw(e)}query(e,i,r){return z2(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new Gh(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),Ew=(()=>{class n{}return n.NOOP=new B2,n})();const Iw="ng-enter",jg="ng-leave",Vg="ng-trigger",zg=".ng-trigger",H2="ng-animating",xw=".ng-animating";function Hs(n){if("number"==typeof n)return n;const t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:Ow(parseFloat(t[1]),t[2])}function Ow(n,t){return"s"===t?1e3*n:n}function Bg(n,t,e){return n.hasOwnProperty("duration")?n:function zq(n,t,e){let r,o=0,s="";if("string"==typeof n){const a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(N2()),{duration:0,delay:0,easing:""};r=Ow(parseFloat(a[1]),a[2]);const l=a[3];null!=l&&(o=Ow(parseFloat(l),a[4]));const c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(function eq(){return new j(3100,!1)}()),a=!0),o<0&&(t.push(function tq(){return new j(3101,!1)}()),a=!0),a&&t.splice(l,0,N2())}return{duration:r,delay:o,easing:s}}(n,t,e)}function qh(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function $2(n){const t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function Ea(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function G2(n,t,e){return e?t+":"+e+";":""}function q2(n){let t="";for(let e=0;e{const o=Aw(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),Cw()&&q2(n))}function Gl(n,t){n.style&&(t.forEach((e,i)=>{const r=Aw(i);n.style[r]=""}),Cw()&&q2(n))}function Kh(n){return Array.isArray(n)?1==n.length?n[0]:O2(n):n}const kw=new RegExp("{{\\s*(.+?)\\s*}}","g");function K2(n){let t=[];if("string"==typeof n){let e;for(;e=kw.exec(n);)t.push(e[1]);kw.lastIndex=0}return t}function Yh(n,t,e){const i=n.toString(),r=i.replace(kw,(o,s)=>{let a=t[s];return null==a&&(e.push(function iq(n){return new j(3003,!1)}()),a=""),a.toString()});return r==i?n:r}function Ug(n){const t=[];let e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}const Hq=/-+([a-z0-9])/g;function Aw(n){return n.replace(Hq,(...t)=>t[1].toUpperCase())}function $q(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Or(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw function rq(n){return new j(3004,!1)}()}}function Y2(n,t){return window.getComputedStyle(n)[t]}function Qq(n,t){const e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function Zq(n,t,e){if(":"==n[0]){const l=function Jq(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i) *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}const i=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(function _q(n){return new j(3015,!1)}()),t;const r=i[1],o=i[2],s=i[3];t.push(Q2(r,s));"<"==o[0]&&!("*"==r&&"*"==s)&&t.push(Q2(s,r))}(i,e,t)):e.push(n),e}const Gg=new Set(["true","1"]),qg=new Set(["false","0"]);function Q2(n,t){const e=Gg.has(n)||qg.has(n),i=Gg.has(t)||qg.has(t);return(r,o)=>{let s="*"==n||n==r,a="*"==t||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?Gg.has(n):qg.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?Gg.has(t):qg.has(t)),s&&a}}const Xq=new RegExp("s*:selfs*,?","g");function Nw(n,t,e,i){return new eK(n).build(t,e,i)}class eK{constructor(t){this._driver=t}build(t,e,i){const r=new iK(e);return this._resetContextStyleTimingState(r),Or(this,Kh(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0;const o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(function sq(){return new j(3006,!1)}()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){const l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(u=>{l.name=u,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){const l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(function aq(){return new j(3007,!1)}())}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){const i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){const o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{K2(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Ug(o.values()),e.errors.push(function lq(n,t){return new j(3008,!1)}()))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const i=Or(this,Kh(t.animation),e);return{type:1,matchers:Qq(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:ql(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>Or(this,i,e)),options:ql(t.options)}}visitGroup(t,e){const i=e.currentTime;let r=0;const o=t.steps.map(s=>{e.currentTime=i;const a=Or(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:ql(t.options)}}visitAnimate(t,e){const i=function oK(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return Lw(Bg(n,t).duration,0,"");const e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){const o=Lw(0,0,"");return o.dynamic=!0,o.strValue=e,o}const r=Bg(e,t);return Lw(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:Pt({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;const c={};i.easing&&(c.easing=i.easing),s=Pt(c)}e.currentTime+=i.duration+i.delay;const l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){const i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){const i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===Us?i.push(a):e.errors.push(new j(3002,!1)):i.push($2(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){const i=e.currentAnimateTimings;let r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{const c=e.collectedStyles.get(e.currentQuerySelector),u=c.get(l);let d=!0;u&&(o!=r&&o>=u.startTime&&r<=u.endTime&&(e.errors.push(function uq(n,t,e,i,r){return new j(3010,!1)}()),d=!1),o=u.startTime),d&&c.set(l,{startTime:o,endTime:r}),e.options&&function Uq(n,t,e){const i=t.params||{},r=K2(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(function nq(n){return new j(3001,!1)}())})}(a,e.options,e.errors)})})}visitKeyframes(t,e){const i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(function dq(){return new j(3011,!1)}()),i;let o=0;const s=[];let a=!1,l=!1,c=0;const u=t.steps.map(b=>{const T=this._makeStyleAst(b,e);let M=null!=T.offset?T.offset:function rK(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){const i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){const e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(T.styles),w=0;return null!=M&&(o++,w=T.offset=M),l=l||w<0||w>1,a=a||w0&&o{const M=h>0?T==p?1:h*T:s[T],w=M*_;e.currentTime=f+m.delay+w,m.duration=w,this._validateStyleAst(b,e),b.offset=M,i.styles.push(b)}),i}visitReference(t,e){return{type:8,animation:Or(this,Kh(t.animation),e),options:ql(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ql(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ql(t.options)}}visitQuery(t,e){const i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;const[o,s]=function tK(n){const t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(Xq,"")),n=n.replace(/@\*/g,zg).replace(/@\w+/g,e=>zg+"-"+e.slice(1)).replace(/:animating/g,xw),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,xr(e.collectedStyles,e.currentQuerySelector,new Map);const a=Or(this,Kh(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:ql(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(function mq(){return new j(3013,!1)}());const i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Bg(t.timings,e.errors,!0);return{type:12,animation:Or(this,Kh(t.animation),e),timings:i,options:null}}}class iK{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}}function ql(n){return n?(n=qh(n)).params&&(n.params=function nK(n){return n?qh(n):null}(n.params)):n={},n}function Lw(n,t,e){return{duration:n,delay:t,easing:e}}function Pw(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}class Kg{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const lK=new RegExp(":enter","g"),uK=new RegExp(":leave","g");function Rw(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new dK).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}class dK{buildKeyframes(t,e,i,r,o,s,a,l,c,u=[]){c=c||new Kg;const d=new Fw(t,e,c,r,o,u,[]);d.options=l;const h=l.delay?Hs(l.delay):0;d.currentTimeline.delayNextStep(h),d.currentTimeline.setStyles([s],null,d.errors,l),Or(this,i,d);const p=d.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){const _=p[m];if(_.element===e){f=_;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,d.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[Pw(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const i=e.subInstructions.get(e.element);if(i){const r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(const r of t){const o=r?.delay;if(o){const s="number"==typeof o?o:Hs(Yh(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime;const s=null!=i.duration?Hs(i.duration):null,a=null!=i.delay?Hs(i.delay):null;return 0!==s&&t.forEach(l=>{const c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),Or(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const i=e.subContextCount;let r=e;const o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Yg);const s=Hs(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>Or(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const i=[];let r=e.currentTimeline.currentTime;const o=t.options&&t.options.delay?Hs(t.options.delay):0;t.steps.forEach(s=>{const a=e.createSubContext(t.options);o&&a.delayNextStep(o),Or(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const i=t.strValue;return Bg(e.params?Yh(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());const o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();const o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){const i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Hs(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Yg);let s=i;const a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,u)=>{e.currentQueryIndex=u;const d=e.createSubContext(t.options,c);o&&d.delayNextStep(o),c===e.element&&(l=d.currentTimeline),Or(this,t.animation,d),d.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,d.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1);let l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}const u=e.currentTimeline;l&&u.delayNextStep(l);const d=u.currentTime;Or(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-d+(r.startTime-i.currentTimeline.startTime)}}const Yg={};class Fw{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Yg,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Qg(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const i=t;let r=this.options;null!=i.duration&&(r.duration=Hs(i.duration)),null!=i.delay&&(r.delay=Hs(i.delay));const o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Yh(o[a],s,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){const r=e||this.element,o=new Fw(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Yg,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){const r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new hK(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(lK,"."+this._enterClassName)).replace(uK,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(function gq(n){return new j(3014,!1)}()),a}}class Qg{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Qg(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||Us),this._currentKeyframe.set(e,Us);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);const o=r&&r.params||{},s=function pK(n,t){const e=new Map;let i;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,Us)}else Ea(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){const c=Yh(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Us),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{const r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration;let r=[];this._keyframes.forEach((a,l)=>{const c=Ea(a,new Map,this._backFill);c.forEach((u,d)=>{"!"===u?t.add(d):u===Us&&e.add(d)}),i||c.set("offset",l/this.duration),r.push(c)});const o=t.size?Ug(t.values()):[],s=e.size?Ug(e.values()):[];if(i){const a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Pw(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}}class hK extends Qg{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){const o=[],s=i+e,a=e/s,l=Ea(t[0]);l.set("offset",0),o.push(l);const c=Ea(t[0]);c.set("offset",X2(a)),o.push(c);const u=t.length-1;for(let d=1;d<=u;d++){let h=Ea(t[d]);const p=h.get("offset");h.set("offset",X2((e+p*i)/s)),o.push(h)}i=s,e=0,r="",t=o}return Pw(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}}function X2(n,t=3){const e=Math.pow(10,t-1);return Math.round(n*e)/e}class jw{}const fK=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]);class mK extends jw{normalizePropertyName(t,e){return Aw(t)}normalizeStyleValue(t,e,i,r){let o="";const s=i.toString().trim();if(fK.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{const a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(function oq(n,t){return new j(3005,!1)}())}return s+o}}function eN(n,t,e,i,r,o,s,a,l,c,u,d,h){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:d,errors:h}}const Vw={};class tN{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function gK(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,u){const d=[],h=this.ast.options&&this.ast.options.params||Vw,f=this.buildStyles(i,a&&a.params||Vw,d),m=l&&l.params||Vw,_=this.buildStyles(r,m,d),b=new Set,T=new Map,M=new Map,w="void"===r,N={params:_K(m,h),delay:this.ast.options?.delay},k=u?[]:Rw(t,e,this.ast.animation,o,s,f,_,N,c,d);let $=0;if(k.forEach(pe=>{$=Math.max(pe.duration+pe.delay,$)}),d.length)return eN(e,this._triggerName,i,r,w,f,_,[],[],T,M,$,d);k.forEach(pe=>{const De=pe.element,at=xr(T,De,new Set);pe.preStyleProps.forEach(Ze=>at.add(Ze));const tt=xr(M,De,new Set);pe.postStyleProps.forEach(Ze=>tt.add(Ze)),De!==e&&b.add(De)});const V=Ug(b.values());return eN(e,this._triggerName,i,r,w,f,_,k,V,T,M,$)}}function _K(n,t){const e=qh(t);for(const i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}class yK{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){const i=new Map,r=qh(this.defaultParams);return Object.keys(t).forEach(o=>{const s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Yh(s,r,e));const l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}class bK{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{this.states.set(r.name,new yK(r.style,r.options&&r.options.params||{},i))}),nN(this.states,"true","1"),nN(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new tN(t,r,this.states))}),this.fallbackTransition=function CK(n,t,e){return new tN(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}function nN(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}const wK=new Kg;class SK{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){const i=[],o=Nw(this._driver,e,i,[]);if(i.length)throw function Sq(n){return new j(3503,!1)}();this._animations.set(t,o)}_buildPlayer(t,e,i){const r=t.element,o=L2(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){const r=[],o=this._animations.get(t);let s;const a=new Map;if(o?(s=Rw(this._driver,e,o,Iw,jg,new Map,new Map,i,wK,r),s.forEach(u=>{const d=xr(a,u.element,new Map);u.postStyleProps.forEach(h=>d.set(h,null))})):(r.push(function Dq(){return new j(3300,!1)}()),s=[]),r.length)throw function Tq(n){return new j(3504,!1)}();a.forEach((u,d)=>{u.forEach((h,p)=>{u.set(p,this._driver.computeStyle(d,p,Us))})});const c=Ma(s.map(u=>{const d=a.get(u.element);return this._buildPlayer(u,new Map,d)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){const e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);const i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){const e=this._playersById.get(t);if(!e)throw function Mq(n){return new j(3301,!1)}();return e}listen(t,e,i,r){const o=Dw(e,"","","");return ww(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});const o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}const iN="ng-animate-queued",zw="ng-animate-disabled",IK=[],rN={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},xK={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Qr="__ng_removed";class Bw{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;const i=t&&t.hasOwnProperty("value");if(this.value=function NK(n){return n??null}(i?t.value:t),i){const o=qh(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){const e=t.params;if(e){const i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}}const Qh="void",Uw=new Bw(Qh);class OK{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Zr(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw function Eq(n,t){return new j(3302,!1)}();if(null==i||0==i.length)throw function Iq(n){return new j(3303,!1)}();if(!function LK(n){return"start"==n||"done"==n}(i))throw function xq(n,t){return new j(3400,!1)}();const o=xr(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);const a=xr(this._engine.statesByElement,t,new Map);return a.has(e)||(Zr(t,Vg),Zr(t,Vg+"-"+e),a.set(e,Uw)),()=>{this._engine.afterFlush(()=>{const l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){const e=this._triggers.get(t);if(!e)throw function Oq(n){return new j(3401,!1)}();return e}trigger(t,e,i,r=!0){const o=this._getTrigger(e),s=new Hw(this.id,e,t);let a=this._engine.statesByElement.get(t);a||(Zr(t,Vg),Zr(t,Vg+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e);const c=new Bw(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=Uw),c.value!==Qh&&l.value===c.value){if(!function FK(n,t){const e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r{Gl(t,_),qo(t,b)})}return}const h=xr(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,c.value,t,c.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:p,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Zr(t,iN),s.onStart(()=>{Uu(t,iN)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);const _=this._engine.playersByElement.get(t);if(_){let b=_.indexOf(s);b>=0&&_.splice(b,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const i=this._engine.driver.query(t,zg,!0);i.forEach(r=>{if(r[Qr])return;const o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){const o=this._engine.statesByElement.get(t),s=new Map;if(o){const a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){const u=this.trigger(t,c,Qh,r);u&&a.push(u)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&Ma(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){const r=new Set;e.forEach(o=>{const s=o.name;if(r.has(s))return;r.add(s);const l=this._triggers.get(s).fallbackTransition,c=i.get(s)||Uw,u=new Bw(Qh),d=new Hw(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:u,player:d,isFallbackTransition:!0})})}}removeNode(t,e){const i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){const o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{const o=t[Qr];(!o||o===rN)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Zr(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(i=>{const r=i.player;if(r.destroyed)return;const o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){const l=Dw(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,ww(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{const o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}class kK{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){const i=new OK(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){const i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){const l=r.get(a);if(l){const c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;const i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];const r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){const o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Zg(e)){const o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Zg(e))return;const o=e[Qr];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;const s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){const s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Zr(t,zw)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),Uu(t,zw))}removeNode(t,e,i,r){if(Zg(e)){const o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){const s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Qr]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Zg(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,zg,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,xw,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ma(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t[Qr];if(e&&e.setForRemoval){if(t[Qr]=rN,e.namespaceId){this.destroyInnerAnimations(t);const i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(zw)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;ii()),this._flushFns=[],this._whenQuietFns.length){const i=this._whenQuietFns;this._whenQuietFns=[],e.length?Ma(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw function kq(n){return new j(3402,!1)}()}_flushAnimations(t,e){const i=new Kg,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,u=new Set;this.disabledNodes.forEach(Q=>{u.add(Q);const ee=this.driver.query(Q,".ng-animate-queued",!0);for(let ne=0;ne{const ne=Iw+m++;f.set(ee,ne),Q.forEach(we=>Zr(we,ne))});const _=[],b=new Set,T=new Set;for(let Q=0;Qb.add(we)):T.add(ee))}const M=new Map,w=aN(h,Array.from(b));w.forEach((Q,ee)=>{const ne=jg+m++;M.set(ee,ne),Q.forEach(we=>Zr(we,ne))}),t.push(()=>{p.forEach((Q,ee)=>{const ne=f.get(ee);Q.forEach(we=>Uu(we,ne))}),w.forEach((Q,ee)=>{const ne=M.get(ee);Q.forEach(we=>Uu(we,ne))}),_.forEach(Q=>{this.processLeaveNode(Q)})});const N=[],k=[];for(let Q=this._namespaceList.length-1;Q>=0;Q--)this._namespaceList[Q].drainQueuedTransitions(e).forEach(ne=>{const we=ne.player,lt=ne.element;if(N.push(we),this.collectedEnterElements.length){const _n=lt[Qr];if(_n&&_n.setForMove){if(_n.previousTriggersValues&&_n.previousTriggersValues.has(ne.triggerName)){const mi=_n.previousTriggersValues.get(ne.triggerName),Kn=this.statesByElement.get(ne.element);if(Kn&&Kn.has(ne.triggerName)){const jr=Kn.get(ne.triggerName);jr.value=mi,Kn.set(ne.triggerName,jr)}}return void we.destroy()}}const zt=!d||!this.driver.containsElement(d,lt),kt=M.get(lt),sn=f.get(lt),St=this._buildInstruction(ne,i,sn,kt,zt);if(St.errors&&St.errors.length)return void k.push(St);if(zt)return we.onStart(()=>Gl(lt,St.fromStyles)),we.onDestroy(()=>qo(lt,St.toStyles)),void r.push(we);if(ne.isFallbackTransition)return we.onStart(()=>Gl(lt,St.fromStyles)),we.onDestroy(()=>qo(lt,St.toStyles)),void r.push(we);const fr=[];St.timelines.forEach(_n=>{_n.stretchStartingKeyframe=!0,this.disabledNodes.has(_n.element)||fr.push(_n)}),St.timelines=fr,i.append(lt,St.timelines),s.push({instruction:St,player:we,element:lt}),St.queriedElements.forEach(_n=>xr(a,_n,[]).push(we)),St.preStyleProps.forEach((_n,mi)=>{if(_n.size){let Kn=l.get(mi);Kn||l.set(mi,Kn=new Set),_n.forEach((jr,_s)=>Kn.add(_s))}}),St.postStyleProps.forEach((_n,mi)=>{let Kn=c.get(mi);Kn||c.set(mi,Kn=new Set),_n.forEach((jr,_s)=>Kn.add(_s))})});if(k.length){const Q=[];k.forEach(ee=>{Q.push(function Aq(n,t){return new j(3505,!1)}())}),N.forEach(ee=>ee.destroy()),this.reportError(Q)}const $=new Map,V=new Map;s.forEach(Q=>{const ee=Q.element;i.has(ee)&&(V.set(ee,ee),this._beforeAnimationBuild(Q.player.namespaceId,Q.instruction,$))}),r.forEach(Q=>{const ee=Q.element;this._getPreviousPlayers(ee,!1,Q.namespaceId,Q.triggerName,null).forEach(we=>{xr($,ee,[]).push(we),we.destroy()})});const pe=_.filter(Q=>cN(Q,l,c)),De=new Map;sN(De,this.driver,T,c,Us).forEach(Q=>{cN(Q,l,c)&&pe.push(Q)});const tt=new Map;p.forEach((Q,ee)=>{sN(tt,this.driver,new Set(Q),l,"!")}),pe.forEach(Q=>{const ee=De.get(Q),ne=tt.get(Q);De.set(Q,new Map([...Array.from(ee?.entries()??[]),...Array.from(ne?.entries()??[])]))});const Ze=[],Kt=[],gn={};s.forEach(Q=>{const{element:ee,player:ne,instruction:we}=Q;if(i.has(ee)){if(u.has(ee))return ne.onDestroy(()=>qo(ee,we.toStyles)),ne.disabled=!0,ne.overrideTotalTime(we.totalTime),void r.push(ne);let lt=gn;if(V.size>1){let kt=ee;const sn=[];for(;kt=kt.parentNode;){const St=V.get(kt);if(St){lt=St;break}sn.push(kt)}sn.forEach(St=>V.set(St,lt))}const zt=this._buildAnimation(ne.namespaceId,we,$,o,tt,De);if(ne.setRealPlayer(zt),lt===gn)Ze.push(ne);else{const kt=this.playersByElement.get(lt);kt&&kt.length&&(ne.parentPlayer=Ma(kt)),r.push(ne)}}else Gl(ee,we.fromStyles),ne.onDestroy(()=>qo(ee,we.toStyles)),Kt.push(ne),u.has(ee)&&r.push(ne)}),Kt.forEach(Q=>{const ee=o.get(Q.element);if(ee&&ee.length){const ne=Ma(ee);Q.setRealPlayer(ne)}}),r.forEach(Q=>{Q.parentPlayer?Q.syncPlayerEvents(Q.parentPlayer):Q.destroy()});for(let Q=0;Q<_.length;Q++){const ee=_[Q],ne=ee[Qr];if(Uu(ee,jg),ne&&ne.hasAnimation)continue;let we=[];if(a.size){let zt=a.get(ee);zt&&zt.length&&we.push(...zt);let kt=this.driver.query(ee,xw,!0);for(let sn=0;sn!zt.destroyed);lt.length?PK(this,ee,lt):this.processLeaveNode(ee)}return _.length=0,Ze.forEach(Q=>{this.players.push(Q),Q.onDone(()=>{Q.destroy();const ee=this.players.indexOf(Q);this.players.splice(ee,1)}),Q.play()}),Ze}elementContainsData(t,e){let i=!1;const r=e[Qr];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){const a=this.playersByQueriedElement.get(t);a&&(s=a)}else{const a=this.playersByElement.get(t);if(a){const l=!o||o==Qh;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){const o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(const l of e.timelines){const c=l.element,u=c!==o,d=xr(i,c,[]);this._getPreviousPlayers(c,u,s,a,e.toState).forEach(p=>{const f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),d.push(p)})}Gl(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){const a=e.triggerName,l=e.element,c=[],u=new Set,d=new Set,h=e.timelines.map(f=>{const m=f.element;u.add(m);const _=m[Qr];if(_&&_.removedBeforeQueried)return new Gh(f.duration,f.delay);const b=m!==l,T=function RK(n){const t=[];return lN(n,t),t}((i.get(m)||IK).map($=>$.getRealPlayer())).filter($=>!!$.element&&$.element===m),M=o.get(m),w=s.get(m),N=L2(0,this._normalizer,0,f.keyframes,M,w),k=this._buildPlayer(f,N,T);if(f.subTimeline&&r&&d.add(m),b){const $=new Hw(t,a,m);$.setRealPlayer(k),c.push($)}return k});c.forEach(f=>{xr(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>function AK(n,t,e){let i=n.get(t);if(i){if(i.length){const r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,f.element,f))}),u.forEach(f=>Zr(f,H2));const p=Ma(h);return p.onDestroy(()=>{u.forEach(f=>Uu(f,H2)),qo(l,e.toStyles)}),d.forEach(f=>{xr(r,f,[]).push(p)}),p}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new Gh(t.duration,t.delay)}}class Hw{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new Gh,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>ww(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){xr(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function Zg(n){return n&&1===n.nodeType}function oN(n,t){const e=n.style.display;return n.style.display=t??"none",e}function sN(n,t,e,i,r){const o=[];e.forEach(l=>o.push(oN(l)));const s=[];i.forEach((l,c)=>{const u=new Map;l.forEach(d=>{const h=t.computeStyle(c,d,r);u.set(d,h),(!h||0==h.length)&&(c[Qr]=xK,s.push(c))}),n.set(c,u)});let a=0;return e.forEach(l=>oN(l,o[a++])),s}function aN(n,t){const e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;const r=new Set(t),o=new Map;function s(a){if(!a)return 1;let l=o.get(a);if(l)return l;const c=a.parentNode;return l=e.has(c)?c:r.has(c)?1:s(c),o.set(a,l),l}return t.forEach(a=>{const l=s(a);1!==l&&e.get(l).push(a)}),e}function Zr(n,t){n.classList?.add(t)}function Uu(n,t){n.classList?.remove(t)}function PK(n,t,e){Ma(e).onDone(()=>n.processLeaveNode(t))}function lN(n,t){for(let e=0;er.add(o)):t.set(n,i),e.delete(n),!0}class Jg{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new kK(t,e,i),this._timelineEngine=new SK(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){const s=t+"-"+r;let a=this._triggerCache[s];if(!a){const l=[],u=Nw(this._driver,o,l,[]);if(l.length)throw function Cq(n,t){return new j(3404,!1)}();a=function vK(n,t,e){return new bK(n,t,e)}(r,u,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){const[o,s]=P2(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){const[s,a]=P2(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}let VK=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&qo(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(qo(this._element,this._initialStyles),this._endStyles&&(qo(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(Gl(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Gl(this._element,this._endStyles),this._endStyles=null),qo(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function $w(n){let t=null;return n.forEach((e,i)=>{(function zK(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}class uN{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){const e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:Y2(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){const e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}}class BK{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return V2(t,e)}getParentElement(t){return Mw(t)}query(t,e,i){return z2(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){const l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);const c=new Map,u=s.filter(p=>p instanceof uN);(function Wq(n,t){return 0===n||0===t})(i,r)&&u.forEach(p=>{p.currentSnapshot.forEach((f,m)=>c.set(m,f))});let d=function Bq(n){return n.length?n[0]instanceof Map?n:n.map(t=>$2(t)):[]}(e).map(p=>Ea(p));d=function Gq(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;os.set(a,Y2(n,a)))}}return t}(t,d,c);const h=function jK(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=$w(t[0]),t.length>1&&(i=$w(t[t.length-1]))):t instanceof Map&&(e=$w(t)),e||i?new VK(n,e,i):null}(t,d);return new uN(t,d,l,h)}}let UK=(()=>{class n extends x2{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:B.None,styles:[],data:{animation:[]}})}build(e){const i=this._nextAnimationId.toString();this._nextAnimationId++;const r=Array.isArray(e)?O2(e):e;return dN(this._renderer,null,i,"register",[r]),new HK(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(U(fh),U(Jt))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class HK extends JG{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new $K(this._id,t,e||{},this._renderer)}}class $K{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return dN(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}}function dN(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}const hN="@.disabled";let WK=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{const a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){const o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let u=this._rendererCache.get(o);return u||(u=new pN("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,u)),u}const s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);const l=u=>{Array.isArray(u)?u.forEach(l):this.engine.registerTrigger(s,a,e,u.name,u)};return i.data.animation.forEach(l),new GK(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&ei(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{const[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(U(fh),U(Jg),U(Xe))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();class pN{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==hN?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class GK extends pN{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==hN?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){const r=function qK(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t);let o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function KK(n){const t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}}let YK=(()=>{class n extends Jg{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(U(Jt),U(Ew),U(jw),U(Pl))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const fN=[{provide:x2,useClass:UK},{provide:jw,useFactory:function QK(){return new mK}},{provide:Jg,useClass:YK},{provide:fh,useFactory:function ZK(n,t,e){return new WK(n,t,e)},deps:[hg,Jg,Xe]}],Ww=[{provide:Ew,useFactory:()=>new BK},{provide:FO,useValue:"BrowserAnimations"},...fN],mN=[{provide:Ew,useClass:B2},{provide:FO,useValue:"NoopAnimations"},...fN];let JK=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?mN:Ww}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({providers:Ww,imports:[rA]}),n})();function ui(n){return function(e){const i=new nY(n),r=e.lift(i);return i.caught=r}}class nY{constructor(t){this.selector=t}call(t,e){return e.subscribe(new iY(t,this.selector,this.caught))}}class iY extends fl{constructor(t,e,i){super(t),this.selector=e,this.caught=i}error(t){if(!this.isStopped){let e;try{e=this.selector(t,this.caught)}catch(o){return void super.error(o)}this._unsubscribeAndRecycle();const i=new pl(this);this.add(i);const r=ml(e,i);r!==i&&this.add(r)}}}Object.create(Error.prototype);class bN extends ut{notifyNext(t,e,i,r,o){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class lY extends ut{constructor(t,e,i){super(),this.parent=t,this.outerValue=e,this.outerIndex=i,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function CN(n,t,e,i,r=new lY(n,e,i)){if(!r.closed)return t instanceof mt?t.subscribe(r):gr(t)(r)}const wN={};class cY{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new uY(t,this.resultSelector))}}class uY extends bN{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(wN),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let i=0;i(function(n){n.SHOW_VIDEO_THUMBNAIL="SHOW_VIDEO_THUMBNAIL"}(Xu||(Xu={})),Xu))();getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-20"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-30"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-50"),getComputedStyle(document.body).getPropertyValue("--color-palette-black-op-70");let tJ=(()=>{class n{constructor(){this.iconPath="./src/assets/images/icons",this.dotCMSURLKey="siteURLJWT"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),mp=class{constructor(t){this.iconPath=t.iconPath}displayErrorMessage(t){this.displayMessage("Error",t,"error")}displaySuccessMessage(t){this.displayMessage("Success",t,"success")}displayInfoMessage(t){this.displayMessage("Info",t,"info")}displayMessage(t,e,i){let r;return r=new Notification(i,{body:e,icon:this.iconPath+"/"+i+".png"}),r}};function on(...n){const t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return e=>me(function oJ(n,t){return i=>{let r=i;for(let o=0;ooi(r)?i(...r):i(r))):new mt(r=>{RL(n,t,function o(s){r.next(arguments.length>1?Array.prototype.slice.call(arguments):s)},r,e)})}function RL(n,t,e,i,r){let o;if(function lJ(n){return n&&"function"==typeof n.addEventListener&&"function"==typeof n.removeEventListener}(n)){const s=n;n.addEventListener(t,e,r),o=()=>s.removeEventListener(t,e,r)}else if(function aJ(n){return n&&"function"==typeof n.on&&"function"==typeof n.off}(n)){const s=n;n.on(t,e),o=()=>s.off(t,e)}else if(function sJ(n){return n&&"function"==typeof n.addListener&&"function"==typeof n.removeListener}(n)){const s=n;n.addListener(t,e),o=()=>s.removeListener(t,e)}else{if(!n||!n.length)throw new TypeError("Invalid event target");for(let s=0,a=n.length;s=0;a--)(s=n[a])&&(o=(r<3?s(o):r>3?s(t,e,o):s(t,e))||o);return r>3&&o&&Object.defineProperty(t,e,o),o}([dm("config"),function JZ(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}("design:paramtypes",[tJ])],mp);const FL=n=>{const t=parseInt(n,0);if(t)return t;try{return JSON.parse(n)}catch{return n}};let cJ=(()=>{class n{setItem(e,i){let r;r="object"==typeof i?JSON.stringify(i):i,localStorage.setItem(e,r)}getItem(e){const i=localStorage.getItem(e);return FL(i)}removeItem(e){localStorage.removeItem(e)}clear(){localStorage.clear()}listen(e){return D_(window,"storage").pipe(Wt(({key:i})=>i===e),me(i=>FL(i.newValue)))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const jL="default",VL="dotMessagesKeys-lang",D1="dotMessagesKeys",zL="buildDate";let tc=(()=>{class n{constructor(e,i){this.http=e,this.dotLocalstorageService=i,this.messageMap={},this.getAll()}init(e){this.getAll(e?.language||jL,e?.buildDate||null)}get(e,...i){return this.messageMap[e]?i.length?function rJ(n,t){return n.replace(/{(\d+)}/g,(e,i)=>typeof t[i]<"u"?t[i]:e)}(this.messageMap[e],i):this.messageMap[e]:e}getAll(e=jL,i=null){this.shouldReloadMessages(e,i)?this.http.get(this.geti18nURL(e)).pipe(Gt(1),on("entity")).subscribe(r=>{this.messageMap=r,this.dotLocalstorageService.setItem(D1,this.messageMap),this.dotLocalstorageService.setItem(VL,e),this.dotLocalstorageService.setItem(zL,i)}):this.messageMap=this.dotLocalstorageService.getItem(D1)}geti18nURL(e){return`/api/v2/languages/${e||"default"}/keys`}shouldReloadMessages(e,i){const r=this.dotLocalstorageService.getItem(zL),o=this.dotLocalstorageService.getItem(VL);return!this.dotLocalstorageService.getItem(D1)||e!==o||i&&i!==r}}return n.\u0275fac=function(e){return new(e||n)(U(Er),U(cJ))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const fJ=[{icon:"tune",titleKey:"com.dotcms.repackage.javax.portlet.title.rules",url:"/rules"},{icon:"cloud_upload",titleKey:"com.dotcms.repackage.javax.portlet.title.publishing-queue",url:"/c/publishing-queue"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.site-search",url:"/c/site-search"},{icon:"person",titleKey:"com.dotcms.repackage.javax.portlet.title.personas",url:"/c/c_Personas"},{icon:"update",titleKey:"com.dotcms.repackage.javax.portlet.title.time-machine",url:"/c/time-machine"},{icon:"device_hub",titleKey:"com.dotcms.repackage.javax.portlet.title.workflow-schemes",url:"/c/workflow-schemes"},{icon:"find_in_page",titleKey:"com.dotcms.repackage.javax.portlet.title.es-search",url:"/c/es-search"},{icon:"business",titleKey:"Forms-and-Form-Builder",url:"/forms"},{icon:"apps",titleKey:"com.dotcms.repackage.javax.portlet.title.apps",url:"/apps"},{icon:"integration_instructions",titleKey:"com.dotcms.repackage.javax.portlet.title.velocity",url:"/c/velocity_playground"}];let BL=(()=>{class n{constructor(e){this.http=e,this.unlicenseData=new zi({icon:"",titleKey:"",url:""}),this.licenseURL="/api/v1/appconfiguration"}isEnterprise(){return this.getLicense().pipe(me(e=>e.level>=200))}canAccessEnterprisePortlet(e){return this.isEnterprise().pipe(Gt(1),me(i=>{const r=this.checksIfEnterpriseUrl(e);return!r||r&&i}))}checksIfEnterpriseUrl(e){const i=fJ.filter(r=>0===e.indexOf(r.url));return i.length&&this.unlicenseData.next(...i),!!i.length}getLicense(){return this.license?_e(this.license):this.http.get(this.licenseURL).pipe(on("entity","config","license"),Mt(e=>{this.setLicense(e)}))}updateLicense(){this.http.get(this.licenseURL).pipe(on("entity","config","license")).subscribe(e=>{this.setLicense(e)})}setLicense(e){this.license={...e}}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function UL(n,t,e,i,r,o,s){try{var a=n[o](s),l=a.value}catch(c){return void e(c)}a.done?t(l):Promise.resolve(l).then(i,r)}function ed(n){return function(){var t=this,e=arguments;return new Promise(function(i,r){var o=n.apply(t,e);function s(l){UL(o,i,r,s,a,"next",l)}function a(l){UL(o,i,r,s,a,"throw",l)}s(void 0)})}}const gJ={500:"500 Internal Server Error",400:"400 Bad Request",401:"401 Unauthorized Error"};let gp=(()=>{class n{uploadFile({file:e,maxSize:i,signal:r}){return"string"==typeof e?this.uploadFileByURL(e,r):this.uploadBinaryFile({file:e,maxSize:i,signal:r})}uploadFileByURL(e,i){return fetch("/api/v1/temp/byUrl",{method:"POST",signal:i,headers:{"Content-Type":"application/json",Origin:window.location.hostname},body:JSON.stringify({remoteUrl:e})}).then(function(){var o=ed(function*(s){if(200===s.status)return(yield s.json()).tempFiles[0];throw{message:(yield s.json()).message,status:s.status}});return function(s){return o.apply(this,arguments)}}()).catch(o=>{const{message:s,response:a}=o,l="string"==typeof a?JSON.parse(a):a;throw this.errorHandler(l||{message:s},o.status)})}uploadBinaryFile({file:e,maxSize:i,signal:r}){let o="/api/v1/temp";o+=i?`?maxFileLength=${i}`:"";const s=new FormData;return s.append("file",e),fetch(o,{method:"POST",signal:r,headers:{Origin:window.location.hostname},body:s}).then(function(){var a=ed(function*(l){if(200===l.status)return(yield l.json()).tempFiles[0];throw{message:(yield l.json()).message,status:l.status}});return function(l){return a.apply(this,arguments)}}()).catch(a=>{throw this.errorHandler(JSON.parse(a.response),a.status)})}errorHandler(e,i){let r="";try{r=e.message||e.errors[0].message}catch{r=gJ[i||500]}return{message:r,status:500|i}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();class Oe{static equals(t,e,i){return i?this.resolveFieldData(t,i)===this.resolveFieldData(e,i):this.equalsByValue(t,e)}static equalsByValue(t,e){if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){var o,s,a,i=Array.isArray(t),r=Array.isArray(e);if(i&&r){if((s=t.length)!=e.length)return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[o],e[o]))return!1;return!0}if(i!=r)return!1;var l=t instanceof Date,c=e instanceof Date;if(l!=c)return!1;if(l&&c)return t.getTime()==e.getTime();var u=t instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return t.toString()==e.toString();var h=Object.keys(t);if((s=h.length)!==Object.keys(e).length)return!1;for(o=s;0!=o--;)if(!Object.prototype.hasOwnProperty.call(e,h[o]))return!1;for(o=s;0!=o--;)if(!this.equalsByValue(t[a=h[o]],e[a]))return!1;return!0}return t!=t&&e!=e}static resolveFieldData(t,e){if(t&&e){if(this.isFunction(e))return e(t);if(-1==e.indexOf("."))return t[e];{let i=e.split("."),r=t;for(let o=0,s=i.length;o=t.length&&(i%=t.length,e%=t.length),t.splice(i,0,t.splice(e,1)[0]))}static insertIntoOrderedArray(t,e,i,r){if(i.length>0){let o=!1;for(let s=0;se){i.splice(s,0,t),o=!0;break}o||i.push(t)}else i.push(t)}static findIndexInList(t,e){let i=-1;if(e)for(let r=0;r-1&&(t=t.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),t}static isEmpty(t){return null==t||""===t||Array.isArray(t)&&0===t.length||!(t instanceof Date)&&"object"==typeof t&&0===Object.keys(t).length}static isNotEmpty(t){return!this.isEmpty(t)}static compare(t,e,i,r=1){let o=-1;const s=this.isEmpty(t),a=this.isEmpty(e);return o=s&&a?0:s?r:a?-r:"string"==typeof t&&"string"==typeof e?t.localeCompare(e,i,{numeric:!0}):te?1:0,o}static sort(t,e,i=1,r,o=1){return(1===o?i:o)*Oe.compare(t,e,r,i)}static merge(t,e){if(null!=t||null!=e)return null!=t&&"object"!=typeof t||null!=e&&"object"!=typeof e?null!=t&&"string"!=typeof t||null!=e&&"string"!=typeof e?e||t:[t||"",e||""].join(" "):{...t||{},...e||{}}}}var HL=0;function T_(){return"pr_id_"+ ++HL}var $i=function vJ(){let n=[];const r=o=>o&&parseInt(o.style.zIndex,10)||0;return{get:r,set:(o,s,a)=>{s&&(s.style.zIndex=String(((o,s)=>{let a=n.length>0?n[n.length-1]:{key:o,value:s},l=a.value+(a.key===o?0:s)+1;return n.push({key:o,value:l}),l})(o,a)))},clear:o=>{o&&((o=>{n=n.filter(s=>s.value!==o)})(r(o)),o.style.zIndex="")},getCurrent:()=>n.length>0?n[n.length-1].value:0}}();const $L=["*"];let Di=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.IN="in",n.LESS_THAN="lt",n.LESS_THAN_OR_EQUAL_TO="lte",n.GREATER_THAN="gt",n.GREATER_THAN_OR_EQUAL_TO="gte",n.BETWEEN="between",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.DATE_IS="dateIs",n.DATE_IS_NOT="dateIsNot",n.DATE_BEFORE="dateBefore",n.DATE_AFTER="dateAfter",n})(),T1=(()=>{class n{constructor(){this.filters={startsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return Oe.removeAccents(e.toString()).toLocaleLowerCase(r).slice(0,o.length)===o},contains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return-1!==Oe.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},notContains:(e,i,r)=>{if(null==i||"string"==typeof i&&""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r);return-1===Oe.removeAccents(e.toString()).toLocaleLowerCase(r).indexOf(o)},endsWith:(e,i,r)=>{if(null==i||""===i.trim())return!0;if(null==e)return!1;let o=Oe.removeAccents(i.toString()).toLocaleLowerCase(r),s=Oe.removeAccents(e.toString()).toLocaleLowerCase(r);return-1!==s.indexOf(o,s.length-o.length)},equals:(e,i,r)=>null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Oe.removeAccents(e.toString()).toLocaleLowerCase(r)==Oe.removeAccents(i.toString()).toLocaleLowerCase(r)),notEquals:(e,i,r)=>!(null==i||"string"==typeof i&&""===i.trim()||null!=e&&(e.getTime&&i.getTime?e.getTime()===i.getTime():Oe.removeAccents(e.toString()).toLocaleLowerCase(r)==Oe.removeAccents(i.toString()).toLocaleLowerCase(r))),in:(e,i)=>{if(null==i||0===i.length)return!0;for(let r=0;rnull==i||null==i[0]||null==i[1]||null!=e&&(e.getTime?i[0].getTime()<=e.getTime()&&e.getTime()<=i[1].getTime():i[0]<=e&&e<=i[1]),lt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()<=i.getTime():e<=i),gt:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>i.getTime():e>i),gte:(e,i,r)=>null==i||null!=e&&(e.getTime&&i.getTime?e.getTime()>=i.getTime():e>=i),is:(e,i,r)=>this.filters.equals(e,i,r),isNot:(e,i,r)=>this.filters.notEquals(e,i,r),before:(e,i,r)=>this.filters.lt(e,i,r),after:(e,i,r)=>this.filters.gt(e,i,r),dateIs:(e,i)=>null==i||null!=e&&e.toDateString()===i.toDateString(),dateIsNot:(e,i)=>null==i||null!=e&&e.toDateString()!==i.toDateString(),dateBefore:(e,i)=>null==i||null!=e&&e.getTime()null==i||null!=e&&e.getTime()>i.getTime()}}filter(e,i,r,o,s){let a=[];if(e)for(let l of e)for(let c of i){let u=Oe.resolveFieldData(l,c);if(this.filters[o](u,r,s)){a.push(l);break}}return a}register(e,i){this.filters[e]=i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),bJ=(()=>{class n{constructor(){this.messageSource=new ye,this.clearSource=new ye,this.messageObserver=this.messageSource.asObservable(),this.clearObserver=this.clearSource.asObservable()}add(e){e&&this.messageSource.next(e)}addAll(e){e&&e.length&&this.messageSource.next(e)}clear(e){this.clearSource.next(e||null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})(),_p=(()=>{class n{constructor(){this.clickSource=new ye,this.clickObservable=this.clickSource.asObservable()}add(e){e&&this.clickSource.next(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Eo=(()=>{class n{constructor(){this.ripple=!1,this.overlayOptions={},this.filterMatchModeOptions={text:[Di.STARTS_WITH,Di.CONTAINS,Di.NOT_CONTAINS,Di.ENDS_WITH,Di.EQUALS,Di.NOT_EQUALS],numeric:[Di.EQUALS,Di.NOT_EQUALS,Di.LESS_THAN,Di.LESS_THAN_OR_EQUAL_TO,Di.GREATER_THAN,Di.GREATER_THAN_OR_EQUAL_TO],date:[Di.DATE_IS,Di.DATE_IS_NOT,Di.DATE_BEFORE,Di.DATE_AFTER]},this.translation={startsWith:"Starts with",contains:"Contains",notContains:"Not contains",endsWith:"Ends with",equals:"Equals",notEquals:"Not equals",noFilter:"No Filter",lt:"Less than",lte:"Less than or equal to",gt:"Greater than",gte:"Greater than or equal to",is:"Is",isNot:"Is not",before:"Before",after:"After",dateIs:"Date is",dateIsNot:"Date is not",dateBefore:"Date is before",dateAfter:"Date is after",clear:"Clear",apply:"Apply",matchAll:"Match All",matchAny:"Match Any",addRule:"Add Rule",removeRule:"Remove Rule",accept:"Yes",reject:"No",choose:"Choose",upload:"Upload",cancel:"Cancel",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dateFormat:"mm/dd/yy",firstDayOfWeek:0,today:"Today",weekHeader:"Wk",weak:"Weak",medium:"Medium",strong:"Strong",passwordPrompt:"Enter a password",emptyMessage:"No results found",emptyFilterMessage:"No results found"},this.zIndex={modal:1100,overlay:1e3,menu:1e3,tooltip:1100},this.translationSource=new ye,this.translationObserver=this.translationSource.asObservable()}getTranslation(e){return this.translation[e]}setTranslation(e){this.translation={...this.translation,...e},this.translationSource.next(this.translation)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),M_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-header"]],ngContentSelectors:$L,decls:1,vars:0,template:function(e,i){1&e&&(li(),ln(0))},encapsulation:2}),n})(),E_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-footer"]],ngContentSelectors:$L,decls:1,vars:0,template:function(e,i){1&e&&(li(),ln(0))},encapsulation:2}),n})(),mn=(()=>{class n{constructor(e){this.template=e}getType(){return this.name}}return n.\u0275fac=function(e){return new(e||n)(O($r))},n.\u0275dir=de({type:n,selectors:[["","pTemplate",""]],inputs:{type:"type",name:["pTemplate","name"]}}),n})(),Sn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze]}),n})(),Ln=(()=>{class n{}return n.STARTS_WITH="startsWith",n.CONTAINS="contains",n.NOT_CONTAINS="notContains",n.ENDS_WITH="endsWith",n.EQUALS="equals",n.NOT_EQUALS="notEquals",n.NO_FILTER="noFilter",n.LT="lt",n.LTE="lte",n.GT="gt",n.GTE="gte",n.IS="is",n.IS_NOT="isNot",n.BEFORE="before",n.AFTER="after",n.CLEAR="clear",n.APPLY="apply",n.MATCH_ALL="matchAll",n.MATCH_ANY="matchAny",n.ADD_RULE="addRule",n.REMOVE_RULE="removeRule",n.ACCEPT="accept",n.REJECT="reject",n.CHOOSE="choose",n.UPLOAD="upload",n.CANCEL="cancel",n.DAY_NAMES="dayNames",n.DAY_NAMES_SHORT="dayNamesShort",n.DAY_NAMES_MIN="dayNamesMin",n.MONTH_NAMES="monthNames",n.MONTH_NAMES_SHORT="monthNamesShort",n.FIRST_DAY_OF_WEEK="firstDayOfWeek",n.TODAY="today",n.WEEK_HEADER="weekHeader",n.WEAK="weak",n.MEDIUM="medium",n.STRONG="strong",n.PASSWORD_PROMPT="passwordPrompt",n.EMPTY_MESSAGE="emptyMessage",n.EMPTY_FILTER_MESSAGE="emptyFilterMessage",n})(),A=(()=>{class n{static addClass(e,i){e&&i&&(e.classList?e.classList.add(i):e.className+=" "+i)}static addMultipleClasses(e,i){if(e&&i)if(e.classList){let r=i.trim().split(" ");for(let o=0;o{if(m)return"relative"===getComputedStyle(m).getPropertyValue("position")?m:r(m.parentElement)},o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.offsetHeight,a=i.getBoundingClientRect(),l=this.getWindowScrollTop(),c=this.getWindowScrollLeft(),u=this.getViewport(),h=r(e)?.getBoundingClientRect()||{top:-1*l,left:-1*c};let p,f;a.top+s+o.height>u.height?(p=a.top-h.top-o.height,e.style.transformOrigin="bottom",a.top+p<0&&(p=-1*a.top)):(p=s+a.top-h.top,e.style.transformOrigin="top"),f=o.width>u.width?-1*(a.left-h.left):a.left-h.left+o.width>u.width?-1*(a.left-h.left+o.width-u.width):a.left-h.left,e.style.top=p+"px",e.style.left=f+"px"}static absolutePosition(e,i){const r=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),o=r.height,s=r.width,a=i.offsetHeight,l=i.offsetWidth,c=i.getBoundingClientRect(),u=this.getWindowScrollTop(),d=this.getWindowScrollLeft(),h=this.getViewport();let p,f;c.top+a+o>h.height?(p=c.top+u-o,e.style.transformOrigin="bottom",p<0&&(p=u)):(p=a+c.top+u,e.style.transformOrigin="top"),f=c.left+s>h.width?Math.max(0,c.left+d+l-s):c.left+d,e.style.top=p+"px",e.style.left=f+"px"}static getParents(e,i=[]){return null===e.parentNode?i:this.getParents(e.parentNode,i.concat([e.parentNode]))}static getScrollableParents(e){let i=[];if(e){let r=this.getParents(e);const o=/(auto|scroll)/,s=a=>{let l=window.getComputedStyle(a,null);return o.test(l.getPropertyValue("overflow"))||o.test(l.getPropertyValue("overflowX"))||o.test(l.getPropertyValue("overflowY"))};for(let a of r){let l=1===a.nodeType&&a.dataset.scrollselectors;if(l){let c=l.split(",");for(let u of c){let d=this.findSingle(a,u);d&&s(d)&&i.push(d)}}9!==a.nodeType&&s(a)&&i.push(a)}}return i}static getHiddenElementOuterHeight(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementOuterWidth(e){e.style.visibility="hidden",e.style.display="block";let i=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",i}static getHiddenElementDimensions(e){let i={};return e.style.visibility="hidden",e.style.display="block",i.width=e.offsetWidth,i.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible",i}static scrollInView(e,i){let r=getComputedStyle(e).getPropertyValue("borderTopWidth"),o=r?parseFloat(r):0,s=getComputedStyle(e).getPropertyValue("paddingTop"),a=s?parseFloat(s):0,l=e.getBoundingClientRect(),u=i.getBoundingClientRect().top+document.body.scrollTop-(l.top+document.body.scrollTop)-o-a,d=e.scrollTop,h=e.clientHeight,p=this.getOuterHeight(i);u<0?e.scrollTop=d+u:u+p>h&&(e.scrollTop=d+u-h+p)}static fadeIn(e,i){e.style.opacity=0;let r=+new Date,o=0,s=function(){o=+e.style.opacity.replace(",",".")+((new Date).getTime()-r)/i,e.style.opacity=o,r=+new Date,+o<1&&(window.requestAnimationFrame&&requestAnimationFrame(s)||setTimeout(s,16))};s()}static fadeOut(e,i){var r=1,a=50/i;let l=setInterval(()=>{(r-=a)<=0&&(r=0,clearInterval(l)),e.style.opacity=r},50)}static getWindowScrollTop(){let e=document.documentElement;return(window.pageYOffset||e.scrollTop)-(e.clientTop||0)}static getWindowScrollLeft(){let e=document.documentElement;return(window.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}static matches(e,i){var r=Element.prototype;return(r.matches||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||function(s){return-1!==[].indexOf.call(document.querySelectorAll(s),this)}).call(e,i)}static getOuterWidth(e,i){let r=e.offsetWidth;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginLeft)+parseFloat(o.marginRight)}return r}static getHorizontalPadding(e){let i=getComputedStyle(e);return parseFloat(i.paddingLeft)+parseFloat(i.paddingRight)}static getHorizontalMargin(e){let i=getComputedStyle(e);return parseFloat(i.marginLeft)+parseFloat(i.marginRight)}static innerWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i+=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static width(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight),i}static getInnerHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i+=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom),i}static getOuterHeight(e,i){let r=e.offsetHeight;if(i){let o=getComputedStyle(e);r+=parseFloat(o.marginTop)+parseFloat(o.marginBottom)}return r}static getHeight(e){let i=e.offsetHeight,r=getComputedStyle(e);return i-=parseFloat(r.paddingTop)+parseFloat(r.paddingBottom)+parseFloat(r.borderTopWidth)+parseFloat(r.borderBottomWidth),i}static getWidth(e){let i=e.offsetWidth,r=getComputedStyle(e);return i-=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight)+parseFloat(r.borderLeftWidth)+parseFloat(r.borderRightWidth),i}static getViewport(){let e=window,i=document,r=i.documentElement,o=i.getElementsByTagName("body")[0];return{width:e.innerWidth||r.clientWidth||o.clientWidth,height:e.innerHeight||r.clientHeight||o.clientHeight}}static getOffset(e){var i=e.getBoundingClientRect();return{top:i.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:i.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0)}}static replaceElementWith(e,i){let r=e.parentNode;if(!r)throw"Can't replace element";return r.replaceChild(i,e)}static getUserAgent(){return navigator.userAgent}static isIE(){var e=window.navigator.userAgent;return e.indexOf("MSIE ")>0||(e.indexOf("Trident/")>0?(e.indexOf("rv:"),!0):e.indexOf("Edge/")>0)}static isIOS(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}static isAndroid(){return/(android)/i.test(navigator.userAgent)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}static appendChild(e,i){if(this.isElement(i))i.appendChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot append "+i+" to "+e;i.el.nativeElement.appendChild(e)}}static removeChild(e,i){if(this.isElement(i))i.removeChild(e);else{if(!i.el||!i.el.nativeElement)throw"Cannot remove "+e+" from "+i;i.el.nativeElement.removeChild(e)}}static removeElement(e){"remove"in Element.prototype?e.remove():e.parentNode.removeChild(e)}static isElement(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName}static calculateScrollbarWidth(e){if(e){let i=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.borderRightWidth)}{if(null!==this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;let i=document.createElement("div");i.className="p-scrollbar-measure",document.body.appendChild(i);let r=i.offsetWidth-i.clientWidth;return document.body.removeChild(i),this.calculatedScrollbarWidth=r,r}}static calculateScrollbarHeight(){if(null!==this.calculatedScrollbarHeight)return this.calculatedScrollbarHeight;let e=document.createElement("div");e.className="p-scrollbar-measure",document.body.appendChild(e);let i=e.offsetHeight-e.clientHeight;return document.body.removeChild(e),this.calculatedScrollbarWidth=i,i}static invokeElementMethod(e,i,r){e[i].apply(e,r)}static clearSelection(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch{}}static getBrowser(){if(!this.browser){let e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}static resolveUserAgent(){let e=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:i[1]||"",version:i[2]||"0"}}static isInteger(e){return Number.isInteger?Number.isInteger(e):"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}static isHidden(e){return!e||null===e.offsetParent}static isVisible(e){return e&&null!=e.offsetParent}static isExist(e){return null!==e&&typeof e<"u"&&e.nodeName&&e.parentNode}static focus(e,i){e&&document.activeElement!==e&&e.focus(i)}static getFocusableElements(e){let i=n.find(e,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]), [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]),\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden]):not(.p-disabled)'),r=[];for(let o of i)(o.offsetWidth||o.offsetHeight||o.getClientRects().length)&&r.push(o);return r}static getNextFocusableElement(e,i=!1){const r=n.getFocusableElements(e);let o=0;if(r&&r.length>0){const s=r.indexOf(r[0].ownerDocument.activeElement);i?o=-1==s||0===s?r.length-1:s-1:-1!=s&&s!==r.length-1&&(o=s+1)}return r[o]}static generateZIndex(){return this.zindex=this.zindex||999,++this.zindex}static getSelection(){return window.getSelection?window.getSelection().toString():document.getSelection?document.getSelection().toString():document.selection?document.selection.createRange().text:null}static getTargetElement(e,i){if(!e)return null;switch(e){case"document":return document;case"window":return window;case"@next":return i?.nextElementSibling;case"@prev":return i?.previousElementSibling;case"@parent":return i?.parentElement;case"@grandparent":return i?.parentElement.parentElement;default:const r=typeof e;if("string"===r)return document.querySelector(e);if("object"===r&&e.hasOwnProperty("nativeElement"))return this.isExist(e.nativeElement)?e.nativeElement:void 0;const s=(a=e)&&a.constructor&&a.call&&a.apply?e():e;return s&&9===s.nodeType||this.isExist(s)?s:null}var a}}return n.zindex=1e3,n.calculatedScrollbarWidth=null,n.calculatedScrollbarHeight=null,n})();class I_{constructor(t,e=(()=>{})){this.element=t,this.listener=e}bindScrollListener(){this.scrollableParents=A.getScrollableParents(this.element);for(let t=0;t{class n{constructor(e,i,r){this.el=e,this.zone=i,this.config=r}ngAfterViewInit(){this.config&&this.config.ripple&&this.zone.runOutsideAngular(()=>{this.create(),this.mouseDownListener=this.onMouseDown.bind(this),this.el.nativeElement.addEventListener("mousedown",this.mouseDownListener)})}onMouseDown(e){let i=this.getInk();if(!i||"none"===getComputedStyle(i,null).display)return;if(A.removeClass(i,"p-ink-active"),!A.getHeight(i)&&!A.getWidth(i)){let a=Math.max(A.getOuterWidth(this.el.nativeElement),A.getOuterHeight(this.el.nativeElement));i.style.height=a+"px",i.style.width=a+"px"}let r=A.getOffset(this.el.nativeElement),o=e.pageX-r.left+document.body.scrollTop-A.getWidth(i)/2,s=e.pageY-r.top+document.body.scrollLeft-A.getHeight(i)/2;i.style.top=s+"px",i.style.left=o+"px",A.addClass(i,"p-ink-active"),this.timeout=setTimeout(()=>{let a=this.getInk();a&&A.removeClass(a,"p-ink-active")},401)}getInk(){const e=this.el.nativeElement.children;for(let i=0;i{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze]}),n})();function CJ(n,t){1&n&&ce(0)}const wJ=function(n,t,e,i){return{"p-button-icon":!0,"p-button-icon-left":n,"p-button-icon-right":t,"p-button-icon-top":e,"p-button-icon-bottom":i}};function SJ(n,t){if(1&n&&F(0,"span",4),2&n){const e=y();Ke(e.loading?"p-button-loading-icon "+e.loadingIcon:e.icon),g("ngClass",va(4,wJ,"left"===e.iconPos&&e.label,"right"===e.iconPos&&e.label,"top"===e.iconPos&&e.label,"bottom"===e.iconPos&&e.label)),he("aria-hidden",!0)}}function DJ(n,t){if(1&n&&(S(0,"span",5),H(1),D()),2&n){const e=y();he("aria-hidden",e.icon&&!e.label),v(1),ve(e.label)}}function TJ(n,t){if(1&n&&(S(0,"span",4),H(1),D()),2&n){const e=y();Ke(e.badgeClass),g("ngClass",e.badgeStyleClass()),v(1),ve(e.badge)}}const MJ=function(n,t,e,i,r){return{"p-button p-component":!0,"p-button-icon-only":n,"p-button-vertical":t,"p-disabled":e,"p-button-loading":i,"p-button-loading-label-only":r}},EJ=["*"],ic={button:"p-button",component:"p-component",iconOnly:"p-button-icon-only",disabled:"p-disabled",loading:"p-button-loading",labelOnly:"p-button-loading-label-only"};let Nr=(()=>{class n{constructor(e){this.el=e,this.iconPos="left",this.loadingIcon="pi pi-spinner pi-spin",this._loading=!1,this._internalClasses=Object.values(ic)}get label(){return this._label}set label(e){this._label=e,this.initialized&&(this.updateLabel(),this.updateIcon(),this.setStyleClass())}get icon(){return this._icon}set icon(e){this._icon=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get loading(){return this._loading}set loading(e){this._loading=e,this.initialized&&(this.updateIcon(),this.setStyleClass())}get htmlElement(){return this.el.nativeElement}ngAfterViewInit(){A.addMultipleClasses(this.htmlElement,this.getStyleClass().join(" ")),this.createIcon(),this.createLabel(),this.initialized=!0}getStyleClass(){const e=[ic.button,ic.component];return this.icon&&!this.label&&Oe.isEmpty(this.htmlElement.textContent)&&e.push(ic.iconOnly),this.loading&&(e.push(ic.disabled,ic.loading),!this.icon&&this.label&&e.push(ic.labelOnly)),e}setStyleClass(){const e=this.getStyleClass();this.htmlElement.classList.remove(...this._internalClasses),this.htmlElement.classList.add(...e)}createLabel(){if(this.label){let e=document.createElement("span");this.icon&&!this.label&&e.setAttribute("aria-hidden","true"),e.className="p-button-label",e.appendChild(document.createTextNode(this.label)),this.htmlElement.appendChild(e)}}createIcon(){if(this.icon||this.loading){let e=document.createElement("span");e.className="p-button-icon",e.setAttribute("aria-hidden","true");let i=this.label?"p-button-icon-"+this.iconPos:null;i&&A.addClass(e,i);let r=this.getIconClass();r&&A.addMultipleClasses(e,r),this.htmlElement.insertBefore(e,this.htmlElement.firstChild)}}updateLabel(){let e=A.findSingle(this.htmlElement,".p-button-label");this.label?e?e.textContent=this.label:this.createLabel():e&&this.htmlElement.removeChild(e)}updateIcon(){let e=A.findSingle(this.htmlElement,".p-button-icon");this.icon||this.loading?e?e.className=this.iconPos?"p-button-icon p-button-icon-"+this.iconPos+" "+this.getIconClass():"p-button-icon "+this.getIconClass():this.createIcon():e&&this.htmlElement.removeChild(e)}getIconClass(){return this.loading?"p-button-loading-icon "+this.loadingIcon:this._icon}ngOnDestroy(){this.initialized=!1}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pButton",""]],hostAttrs:[1,"p-element"],inputs:{iconPos:"iconPos",loadingIcon:"loadingIcon",label:"label",icon:"icon",loading:"loading"}}),n})(),rc=(()=>{class n{constructor(){this.type="button",this.iconPos="left",this.loading=!1,this.loadingIcon="pi pi-spinner pi-spin",this.onClick=new R,this.onFocus=new R,this.onBlur=new R}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template})}badgeStyleClass(){return{"p-badge p-component":!0,"p-badge-no-gutter":this.badge&&1===String(this.badge).length}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-button"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{type:"type",iconPos:"iconPos",icon:"icon",badge:"badge",label:"label",disabled:"disabled",loading:"loading",loadingIcon:"loadingIcon",style:"style",styleClass:"styleClass",badgeClass:"badgeClass",ariaLabel:"ariaLabel"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},ngContentSelectors:EJ,decls:6,vars:17,consts:[["pRipple","",3,"ngStyle","disabled","ngClass","click","focus","blur"],[4,"ngTemplateOutlet"],[3,"ngClass","class",4,"ngIf"],["class","p-button-label",4,"ngIf"],[3,"ngClass"],[1,"p-button-label"]],template:function(e,i){1&e&&(li(),S(0,"button",0),P("click",function(o){return i.onClick.emit(o)})("focus",function(o){return i.onFocus.emit(o)})("blur",function(o){return i.onBlur.emit(o)}),ln(1),C(2,CJ,1,0,"ng-container",1),C(3,SJ,1,9,"span",2),C(4,DJ,2,2,"span",3),C(5,TJ,2,4,"span",2),D()),2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("disabled",i.disabled||i.loading)("ngClass",function tO(n,t,e,i,r,o,s,a){const l=Ri()+n,c=W(),u=Ur(c,l,e,i,r,o);return wi(c,l+4,s)||u?Ho(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):yh(c,l+5)}(11,MJ,i.icon&&!i.label,("top"===i.iconPos||"bottom"===i.iconPos)&&i.label,i.disabled||i.loading,i.loading,i.loading&&!i.icon&&i.label)),he("type",i.type)("aria-label",i.ariaLabel),v(2),g("ngTemplateOutlet",i.contentTemplate),v(1),g("ngIf",!i.contentTemplate&&(i.icon||i.loading)),v(1),g("ngIf",!i.contentTemplate&&i.label),v(1),g("ngIf",!i.contentTemplate&&i.badge))},dependencies:[Ot,He,Zn,cn,Xr],encapsulation:2,changeDetection:0}),n})(),Xn=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze,Ar]}),n})(),x_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze]}),n})();const xJ=["*"];var ka=(()=>(function(n){n.FILE_TYPE_MISMATCH="FILE_TYPE_MISMATCH",n.MAX_FILE_SIZE_EXCEEDED="MAX_FILE_SIZE_EXCEEDED",n.MULTIPLE_FILES_DROPPED="MULTIPLE_FILES_DROPPED"}(ka||(ka={})),ka))();let OJ=(()=>{class n{constructor(){this.fileDropped=new R,this.fileDragEnter=new R,this.fileDragOver=new R,this.fileDragLeave=new R,this._accept=[],this.errorsType=[],this._validity={fileTypeMismatch:!1,maxFileSizeExceeded:!1,multipleFilesDropped:!1,errorsType:[],valid:!0}}set accept(e){this._accept=e?.filter(i=>"*/*"!==i).map(i=>i.toLowerCase().replace(/\*/g,""))}get validity(){return this._validity}onDrop(e){e.stopPropagation(),e.preventDefault();const{dataTransfer:i}=e,r=this.getFiles(i),o=1===r?.length?r[0]:null;0!==r.length&&(this.setValidity(r),i.items?.clear(),i.clearData(),this.fileDropped.emit({file:o,validity:this._validity}))}onDragEnter(e){e.stopPropagation(),e.preventDefault(),this.fileDragEnter.emit(!0)}onDragOver(e){e.stopPropagation(),e.preventDefault(),this.fileDragOver.emit(!0)}onDragLeave(e){e.stopPropagation(),e.preventDefault(),this.fileDragLeave.emit(!0)}typeMatch(e){if(!this._accept.length)return!0;const i=e.name.split(".").pop().toLowerCase(),r=e.type.toLowerCase(),o=this._accept.some(s=>r.includes(s)||s.includes(`.${i}`));return o||this.errorsType.push(ka.FILE_TYPE_MISMATCH),o}getFiles(e){const{items:i,files:r}=e;return i?Array.from(i).filter(o=>"file"===o.kind).map(o=>o.getAsFile()):Array.from(r)||[]}isFileTooLong(e){if(!this.maxFileSize)return!1;const i=e.size>this.maxFileSize;return i&&this.errorsType.push(ka.MAX_FILE_SIZE_EXCEEDED),i}multipleFilesDropped(e){const i=e.length>1;return i&&this.errorsType.push(ka.MULTIPLE_FILES_DROPPED),i}setValidity(e){this.errorsType=[];const i=e[0],r=this.multipleFilesDropped(e),o=!this.typeMatch(i),s=this.isFileTooLong(i);this._validity={...this._validity,multipleFilesDropped:r,fileTypeMismatch:o,maxFileSizeExceeded:s,errorsType:this.errorsType,valid:!o&&!s&&!r}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-drop-zone"]],hostBindings:function(e,i){1&e&&P("drop",function(o){return i.onDrop(o)})("dragenter",function(o){return i.onDragEnter(o)})("dragover",function(o){return i.onDragOver(o)})("dragleave",function(o){return i.onDragLeave(o)})},inputs:{maxFileSize:"maxFileSize",accept:"accept"},outputs:{fileDropped:"fileDropped",fileDragEnter:"fileDragEnter",fileDragOver:"fileDragOver",fileDragLeave:"fileDragLeave"},standalone:!0,features:[$t],ngContentSelectors:xJ,decls:1,vars:0,template:function(e,i){1&e&&(li(),ln(0))},dependencies:[ze],styles:["[_nghost-%COMP%]{height:100%;width:100%}"],changeDetection:0}),n})(),Zo=(()=>{class n{constructor(e){this.dotMessageService=e}transform(e,i=[]){return e?this.dotMessageService.get(e,...i):""}}return n.\u0275fac=function(e){return new(e||n)(O(tc,16))},n.\u0275pipe=vn({name:"dm",type:n,pure:!0,standalone:!0}),n})();function Rt(n){return t=>t.lift(new VJ(n))}class VJ{constructor(t){this.notifier=t}call(t,e){const i=new zJ(t),r=ml(this.notifier,new pl(i));return r&&!i.seenValue?(i.add(r),e.subscribe(i)):i}}class zJ extends fl{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function BJ(n,t){if(1&n&&(S(0,"small",1),H(1),Ue(2,"dm"),D()),2&n){const e=y();v(1),xt(" ",Ye(2,1,e.errorMsg),"\n")}}const O_={maxlength:"error.form.validator.maxlength",required:"error.form.validator.required",pattern:"error.form.validator.pattern"};let M1=(()=>{class n{constructor(e,i){this.cd=e,this.dotMessageService=i,this.errorMsg="",this.destroy$=new ye}set message(e){this.defaultMessage=e,this.cd.markForCheck()}set field(e){e&&(this._field=e,e.statusChanges.pipe(Rt(this.destroy$)).subscribe(()=>{this.errorMsg=this.getErrors(e.errors),this.cd.detectChanges()}))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}getErrors(e){let i=[];return e&&(i=[...this.getMsgDefaultValidators(e),...this.getMsgCustomsValidators(e)]),this.defaultMessage?this.defaultMessage:i.slice(0,1)[0]}getMsgDefaultValidators(e){let i=[];return Object.entries(e).forEach(([r,o])=>{if(r in O_){let s="";const{requiredLength:a,requiredPattern:l}=o;switch(r){case"maxlength":s=this.dotMessageService.get(O_[r],a);break;case"pattern":s=this.dotMessageService.get(this.patternErrorMessage||O_[r],l);break;default:s=O_[r]}i=[...i,s]}}),i}getMsgCustomsValidators(e){let i=[];return Object.entries(e).forEach(([,r])=>{"string"==typeof r&&(i=[...i,r])}),i}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(tc))},n.\u0275cmp=Y({type:n,selectors:[["dot-field-validation-message"]],inputs:{patternErrorMessage:"patternErrorMessage",message:"message",field:"field"},standalone:!0,features:[$t],decls:1,vars:1,consts:[["class","p-invalid","data-testId","error-msg",4,"ngIf"],["data-testId","error-msg",1,"p-invalid"]],template:function(e,i){1&e&&C(0,BJ,3,3,"small",0),2&e&&g("ngIf",i._field&&i._field.enabled&&i._field.dirty&&!i._field.valid)},dependencies:[He,Zo],encapsulation:2,changeDetection:0}),n})();function UJ(n,t){if(1&n){const e=q();S(0,"img",4),P("error",function(){return I(e),x(y().handleError())}),D()}if(2&n){const e=y();g("src",e.src,zo)("title",e.name)("alt",e.name)}}function HJ(n,t){if(1&n){const e=q();S(0,"video",5),P("error",function(){return I(e),x(y().handleError())}),F(1,"source",6),D()}if(2&n){const e=y();v(1),g("src",e.src,zo)}}const $J=function(n){return["pi",n]},WJ=function(n){return{"font-size":n,color:"var(--color-palette-secondary-400)"}};function GJ(n,t){if(1&n&&F(0,"i",7),2&n){const e=y();g("ngClass",te(2,$J,e.thumbnailIcon))("ngStyle",te(4,WJ,e.iconSize))}}const qJ={html:"pi-file",pdf:"pi-file-pdf",image:"pi-image",video:"pi-video",msword:"pi-file-word",doc:"pi-file-word",docx:"pi-file-word"};var td=(()=>(function(n){n.image="image",n.video="video",n.icon="icon"}(td||(td={})),td))();let KJ=(()=>{class n{constructor(){this.CONTENT_THUMBNAIL_TYPE=td,this.DEFAULT_ICON="pi-file",this.thumbnailUrlMap={image:this.getImageThumbnailUrl.bind(this),video:this.getVideoThumbnailUrl.bind(this),pdf:this.getPdfThumbnailUrl.bind(this)}}get iconSize(){return this._iconSize||"1rem"}get name(){return this._name||""}ngOnInit(){this.buildThumbnail()}handleError(){this.thumbnailType=this.CONTENT_THUMBNAIL_TYPE.icon}setProperties(){const{tempUrl:e,inode:i,name:r,contentType:o,titleImage:s,iconSize:a}=this.dotThumbanilOptions;this._tempUrl=e,this._inode=i,this._name=r,this._contentType=o,this._titleImage=s,this._iconSize=a,this._type=this._contentType.split("/")[0]}buildThumbnail(){this.setProperties(),this.setSrc(),this.setThumbnailType(),this.setThumbnailIcon()}setThumbnailType(){this.thumbnailType=td[this._type]||td.icon}setSrc(){this.src=this._tempUrl||this.thumbnailUrlMap[this._type]?.()}setThumbnailIcon(){const e=this._name.split(".").pop();this.thumbnailIcon=qJ[e]||this.DEFAULT_ICON}getPdfThumbnailUrl(){return`/contentAsset/image/${this._inode}/${this._titleImage}/pdf_page/1/resize_w/250/quality_q/45`}getImageThumbnailUrl(){return`/dA/${this._inode}/500w/50q`}getVideoThumbnailUrl(){return`/dA/${this._inode}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-content-thumbnail"]],inputs:{dotThumbanilOptions:"dotThumbanilOptions"},standalone:!0,features:[$t],decls:4,vars:3,consts:[[3,"ngSwitch"],["data-testId","thumbail-image",3,"src","title","alt","error",4,"ngSwitchCase"],["controls","","data-testId","thumbail-video",3,"error",4,"ngSwitchCase"],["data-testId","thumbail-icon",3,"ngClass","ngStyle",4,"ngSwitchDefault"],["data-testId","thumbail-image",3,"src","title","alt","error"],["controls","","data-testId","thumbail-video",3,"error"],[3,"src"],["data-testId","thumbail-icon",3,"ngClass","ngStyle"]],template:function(e,i){1&e&&(ae(0,0),C(1,UJ,1,3,"img",1),C(2,HJ,2,1,"video",2),C(3,GJ,1,6,"i",3),le()),2&e&&(g("ngSwitch",i.thumbnailType),v(1),g("ngSwitchCase",i.CONTENT_THUMBNAIL_TYPE.image),v(1),g("ngSwitchCase",i.CONTENT_THUMBNAIL_TYPE.video))},dependencies:[ze,Ot,cn,Fs,jl,Ph],styles:["[_nghost-%COMP%]{width:100%;height:100%;justify-content:center;align-items:center;display:flex}[_nghost-%COMP%] img[_ngcontent-%COMP%], [_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] img[_ngcontent-%COMP%]{object-fit:cover}[_nghost-%COMP%] i[_ngcontent-%COMP%]{color:var(--color-palette-secondary-400)}"],changeDetection:0}),n})(),GL=(()=>{class n{constructor(e){this.host=e,this.focused=!1}ngAfterViewChecked(){if(!this.focused&&this.autofocus){const e=A.getFocusableElements(this.host.nativeElement);0===e.length&&this.host.nativeElement.focus(),e.length>0&&e[0].focus(),this.focused=!0}}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pAutoFocus",""]],hostAttrs:[1,"p-element"],inputs:{autofocus:"autofocus"}}),n})(),Aa=(()=>{class n{constructor(e,i,r){this.el=e,this.ngModel=i,this.cd=r}ngAfterViewInit(){this.updateFilledState(),this.cd.detectChanges()}ngDoCheck(){this.updateFilledState()}onInput(e){this.updateFilledState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length||this.ngModel&&this.ngModel.model}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Hh,8),O(Tt))},n.\u0275dir=de({type:n,selectors:[["","pInputText",""]],hostAttrs:[1,"p-inputtext","p-component","p-element"],hostVars:2,hostBindings:function(e,i){1&e&&P("input",function(o){return i.onInput(o)}),2&e&&Si("p-filled",i.filled)}}),n})(),oc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze]}),n})();const QJ=["overlay"],ZJ=["content"];function JJ(n,t){1&n&&ce(0)}const XJ=function(n,t,e){return{showTransitionParams:n,hideTransitionParams:t,transform:e}},eX=function(n){return{value:"visible",params:n}},tX=function(n){return{mode:n}},nX=function(n){return{$implicit:n}};function iX(n,t){if(1&n){const e=q();S(0,"div",1,3),P("click",function(r){return I(e),x(y(2).onOverlayContentClick(r))})("@overlayContentAnimation.start",function(r){return I(e),x(y(2).onOverlayContentAnimationStart(r))})("@overlayContentAnimation.done",function(r){return I(e),x(y(2).onOverlayContentAnimationDone(r))}),ln(2),C(3,JJ,1,0,"ng-container",4),D()}if(2&n){const e=y(2);Ke(e.contentStyleClass),g("ngStyle",e.contentStyle)("ngClass","p-overlay-content")("@overlayContentAnimation",te(11,eX,Hr(7,XJ,e.showTransitionOptions,e.hideTransitionOptions,e.transformOptions[e.modal?e.overlayResponsiveDirection:"default"]))),v(3),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",te(15,nX,te(13,tX,e.overlayMode)))}}const rX=function(n,t,e,i,r,o,s,a,l,c,u,d,h,p){return{"p-overlay p-component":!0,"p-overlay-modal p-component-overlay p-component-overlay-enter":n,"p-overlay-center":t,"p-overlay-top":e,"p-overlay-top-start":i,"p-overlay-top-end":r,"p-overlay-bottom":o,"p-overlay-bottom-start":s,"p-overlay-bottom-end":a,"p-overlay-left":l,"p-overlay-left-start":c,"p-overlay-left-end":u,"p-overlay-right":d,"p-overlay-right-start":h,"p-overlay-right-end":p}};function oX(n,t){if(1&n){const e=q();S(0,"div",1,2),P("click",function(r){return I(e),x(y().onOverlayClick(r))}),C(2,iX,4,17,"div",0),D()}if(2&n){const e=y();Ke(e.styleClass),g("ngStyle",e.style)("ngClass",qC(5,rX,[e.modal,e.modal&&"center"===e.overlayResponsiveDirection,e.modal&&"top"===e.overlayResponsiveDirection,e.modal&&"top-start"===e.overlayResponsiveDirection,e.modal&&"top-end"===e.overlayResponsiveDirection,e.modal&&"bottom"===e.overlayResponsiveDirection,e.modal&&"bottom-start"===e.overlayResponsiveDirection,e.modal&&"bottom-end"===e.overlayResponsiveDirection,e.modal&&"left"===e.overlayResponsiveDirection,e.modal&&"left-start"===e.overlayResponsiveDirection,e.modal&&"left-end"===e.overlayResponsiveDirection,e.modal&&"right"===e.overlayResponsiveDirection,e.modal&&"right-start"===e.overlayResponsiveDirection,e.modal&&"right-end"===e.overlayResponsiveDirection])),v(2),g("ngIf",e.visible)}}const sX=["*"],aX={provide:wn,useExisting:$e(()=>A_),multi:!0},lX=Rg([Pt({transform:"{{transform}}",opacity:0}),Bi("{{showTransitionParams}}")]),cX=Rg([Bi("{{hideTransitionParams}}",Pt({transform:"{{transform}}",opacity:0}))]);let A_=(()=>{class n{constructor(e,i,r,o,s,a){this.document=e,this.el=i,this.renderer=r,this.config=o,this.overlayService=s,this.zone=a,this.visibleChange=new R,this.onBeforeShow=new R,this.onShow=new R,this.onBeforeHide=new R,this.onHide=new R,this.onAnimationStart=new R,this.onAnimationDone=new R,this._visible=!1,this.modalVisible=!1,this.isOverlayClicked=!1,this.isOverlayContentClicked=!1,this.transformOptions={default:"scaleY(0.8)",center:"scale(0.7)",top:"translate3d(0px, -100%, 0px)","top-start":"translate3d(0px, -100%, 0px)","top-end":"translate3d(0px, -100%, 0px)",bottom:"translate3d(0px, 100%, 0px)","bottom-start":"translate3d(0px, 100%, 0px)","bottom-end":"translate3d(0px, 100%, 0px)",left:"translate3d(-100%, 0px, 0px)","left-start":"translate3d(-100%, 0px, 0px)","left-end":"translate3d(-100%, 0px, 0px)",right:"translate3d(100%, 0px, 0px)","right-start":"translate3d(100%, 0px, 0px)","right-end":"translate3d(100%, 0px, 0px)"},this.window=this.document.defaultView}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.modalVisible&&(this.modalVisible=!0)}get mode(){return this._mode||this.overlayOptions?.mode}set mode(e){this._mode=e}get style(){return Oe.merge(this._style,this.modal?this.overlayResponsiveOptions?.style:this.overlayOptions?.style)}set style(e){this._style=e}get styleClass(){return Oe.merge(this._styleClass,this.modal?this.overlayResponsiveOptions?.styleClass:this.overlayOptions?.styleClass)}set styleClass(e){this._styleClass=e}get contentStyle(){return Oe.merge(this._contentStyle,this.modal?this.overlayResponsiveOptions?.contentStyle:this.overlayOptions?.contentStyle)}set contentStyle(e){this._contentStyle=e}get contentStyleClass(){return Oe.merge(this._contentStyleClass,this.modal?this.overlayResponsiveOptions?.contentStyleClass:this.overlayOptions?.contentStyleClass)}set contentStyleClass(e){this._contentStyleClass=e}get target(){const e=this._target||this.overlayOptions?.target;return void 0===e?"@prev":e}set target(e){this._target=e}get appendTo(){return this._appendTo||this.overlayOptions?.appendTo}set appendTo(e){this._appendTo=e}get autoZIndex(){const e=this._autoZIndex||this.overlayOptions?.autoZIndex;return void 0===e||e}set autoZIndex(e){this._autoZIndex=e}get baseZIndex(){const e=this._baseZIndex||this.overlayOptions?.baseZIndex;return void 0===e?0:e}set baseZIndex(e){this._baseZIndex=e}get showTransitionOptions(){const e=this._showTransitionOptions||this.overlayOptions?.showTransitionOptions;return void 0===e?".12s cubic-bezier(0, 0, 0.2, 1)":e}set showTransitionOptions(e){this._showTransitionOptions=e}get hideTransitionOptions(){const e=this._hideTransitionOptions||this.overlayOptions?.hideTransitionOptions;return void 0===e?".1s linear":e}set hideTransitionOptions(e){this._hideTransitionOptions=e}get listener(){return this._listener||this.overlayOptions?.listener}set listener(e){this._listener=e}get responsive(){return this._responsive||this.overlayOptions?.responsive}set responsive(e){this._responsive=e}get options(){return this._options}set options(e){this._options=e}get modal(){return"modal"===this.mode||this.overlayResponsiveOptions&&this.window?.matchMedia(this.overlayResponsiveOptions.media?.replace("@media","")||`(max-width: ${this.overlayResponsiveOptions.breakpoint})`).matches}get overlayMode(){return this.mode||(this.modal?"modal":"overlay")}get overlayOptions(){return{...this.config?.overlayOptions,...this.options}}get overlayResponsiveOptions(){return{...this.overlayOptions?.responsive,...this.responsive}}get overlayResponsiveDirection(){return this.overlayResponsiveOptions?.direction||"center"}get overlayEl(){return this.overlayViewChild?.nativeElement}get contentEl(){return this.contentViewChild?.nativeElement}get targetEl(){return A.getTargetElement(this.target,this.el?.nativeElement)}ngAfterContentInit(){this.templates?.forEach(e=>{e.getType(),this.contentTemplate=e.template})}show(e,i=!1){this.onVisibleChange(!0),this.handleEvents("onShow",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.addClass(this.document?.body,"p-overflow-hidden")}hide(e,i=!1){this.visible&&(this.onVisibleChange(!1),this.handleEvents("onHide",{overlay:e||this.overlayEl,target:this.targetEl,mode:this.overlayMode}),i&&A.focus(this.targetEl),this.modal&&A.removeClass(this.document?.body,"p-overflow-hidden"))}alignOverlay(){!this.modal&&A.alignOverlay(this.overlayEl,this.targetEl,this.appendTo)}onVisibleChange(e){this._visible=e,this.visibleChange.emit(e)}onOverlayClick(e){this.isOverlayClicked=!0}onOverlayContentClick(e){this.overlayService.add({originalEvent:e,target:this.targetEl}),this.isOverlayContentClicked=!0}onOverlayContentAnimationStart(e){switch(e.toState){case"visible":this.handleEvents("onBeforeShow",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.autoZIndex&&$i.set(this.overlayMode,this.overlayEl,this.baseZIndex+this.config?.zIndex[this.overlayMode]),A.appendOverlay(this.overlayEl,"body"===this.appendTo?this.document.body:this.appendTo,this.appendTo),this.alignOverlay();break;case"void":this.handleEvents("onBeforeHide",{overlay:this.overlayEl,target:this.targetEl,mode:this.overlayMode}),this.modal&&A.addClass(this.overlayEl,"p-component-overlay-leave")}this.handleEvents("onAnimationStart",e)}onOverlayContentAnimationDone(e){const i=this.overlayEl||e.element.parentElement;switch(e.toState){case"visible":this.show(i,!0),this.bindListeners();break;case"void":this.hide(i,!0),this.unbindListeners(),A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),$i.clear(i),this.modalVisible=!1}this.handleEvents("onAnimationDone",e)}handleEvents(e,i){this[e].emit(i),this.options&&this.options[e]&&this.options[e](i),this.config?.overlayOptions&&this.config?.overlayOptions[e]&&this.config?.overlayOptions[e](i)}bindListeners(){this.bindScrollListener(),this.bindDocumentClickListener(),this.bindDocumentResizeListener(),this.bindDocumentKeyboardListener()}unbindListeners(){this.unbindScrollListener(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindDocumentKeyboardListener()}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new I_(this.targetEl,e=>{(!this.listener||this.listener(e,{type:"scroll",mode:this.overlayMode,valid:!0}))&&this.hide(e,!0)})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}bindDocumentClickListener(){this.documentClickListener||(this.documentClickListener=this.renderer.listen(this.document,"click",e=>{const r=!(this.targetEl&&(this.targetEl.isSameNode(e.target)||!this.isOverlayClicked&&this.targetEl.contains(e.target))||this.isOverlayContentClicked);(this.listener?this.listener(e,{type:"outside",mode:this.overlayMode,valid:3!==e.which&&r}):r)&&this.hide(e),this.isOverlayClicked=this.isOverlayContentClicked=!1}))}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){this.documentResizeListener||(this.documentResizeListener=this.renderer.listen(this.window,"resize",e=>{(this.listener?this.listener(e,{type:"resize",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.hide(e,!0)}))}unbindDocumentResizeListener(){this.documentResizeListener&&(this.documentResizeListener(),this.documentResizeListener=null)}bindDocumentKeyboardListener(){this.documentKeyboardListener||this.zone.runOutsideAngular(()=>{this.documentKeyboardListener=this.renderer.listen(this.window,"keydown",e=>{this.overlayOptions.hideOnEscape&&27===e.keyCode&&(this.listener?this.listener(e,{type:"keydown",mode:this.overlayMode,valid:!A.isTouchDevice()}):!A.isTouchDevice())&&this.zone.run(()=>{this.hide(e,!0)})})})}unbindDocumentKeyboardListener(){this.documentKeyboardListener&&(this.documentKeyboardListener(),this.documentKeyboardListener=null)}ngOnDestroy(){this.hide(this.overlayEl,!0),this.overlayEl&&(A.appendOverlay(this.overlayEl,this.targetEl,this.appendTo),$i.clear(this.overlayEl)),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.unbindListeners()}}return n.\u0275fac=function(e){return new(e||n)(O(Jt),O(qe),O(Vn),O(Eo),O(_p),O(Xe))},n.\u0275cmp=Y({type:n,selectors:[["p-overlay"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(QJ,5),Me(ZJ,5)),2&e){let r;J(r=X())&&(i.overlayViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{visible:"visible",mode:"mode",style:"style",styleClass:"styleClass",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",target:"target",appendTo:"appendTo",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",listener:"listener",responsive:"responsive",options:"options"},outputs:{visibleChange:"visibleChange",onBeforeShow:"onBeforeShow",onShow:"onShow",onBeforeHide:"onBeforeHide",onHide:"onHide",onAnimationStart:"onAnimationStart",onAnimationDone:"onAnimationDone"},features:[Ie([aX])],ngContentSelectors:sX,decls:1,vars:1,consts:[[3,"ngStyle","class","ngClass","click",4,"ngIf"],[3,"ngStyle","ngClass","click"],["overlay",""],["content",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(li(),C(0,oX,3,20,"div",0)),2&e&&g("ngIf",i.modalVisible)},dependencies:[Ot,He,Zn,cn],styles:[".p-overlay{position:absolute;top:0;left:0}.p-overlay-modal{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;width:100%;height:100%}.p-overlay-content{transform-origin:inherit}.p-overlay-modal>.p-overlay-content{z-index:1;width:90%}.p-overlay-top{align-items:flex-start}.p-overlay-top-start{align-items:flex-start;justify-content:flex-start}.p-overlay-top-end{align-items:flex-start;justify-content:flex-end}.p-overlay-bottom{align-items:flex-end}.p-overlay-bottom-start{align-items:flex-end;justify-content:flex-start}.p-overlay-bottom-end{align-items:flex-end;justify-content:flex-end}.p-overlay-left{justify-content:flex-start}.p-overlay-left-start{justify-content:flex-start;align-items:flex-start}.p-overlay-left-end{justify-content:flex-start;align-items:flex-end}.p-overlay-right{justify-content:flex-end}.p-overlay-right-start{justify-content:flex-end;align-items:flex-start}.p-overlay-right-end{justify-content:flex-end;align-items:flex-end}\n"],encapsulation:2,data:{animation:[$l("overlayContentAnimation",[Ui(":enter",[Fg(lX)]),Ui(":leave",[Fg(cX)])])]},changeDetection:0}),n})();const uX=["element"],dX=["content"];function hX(n,t){1&n&&ce(0)}const E1=function(n,t){return{$implicit:n,options:t}};function pX(n,t){if(1&n&&(ae(0),C(1,hX,1,0,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",ot(2,E1,e.loadedItems,e.getContentOptions()))}}function fX(n,t){1&n&&ce(0)}function mX(n,t){if(1&n&&(ae(0),C(1,fX,1,0,"ng-container",7),le()),2&n){const e=t.$implicit,i=t.index,r=y(3);v(1),g("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",ot(2,E1,e,r.getOptions(i)))}}const gX=function(n){return{"p-scroller-loading":n}};function _X(n,t){if(1&n&&(S(0,"div",8,9),C(2,mX,2,5,"ng-container",10),D()),2&n){const e=y(2);g("ngClass",te(4,gX,e.d_loading))("ngStyle",e.contentStyle),v(2),g("ngForOf",e.loadedItems)("ngForTrackBy",e._trackBy||e.index)}}function yX(n,t){1&n&&F(0,"div",11),2&n&&g("ngStyle",y(2).spacerStyle)}function vX(n,t){1&n&&ce(0)}const bX=function(n){return{numCols:n}},qL=function(n){return{options:n}};function CX(n,t){if(1&n&&(ae(0),C(1,vX,1,0,"ng-container",7),le()),2&n){const e=t.index,i=y(4);v(1),g("ngTemplateOutlet",i.loaderTemplate)("ngTemplateOutletContext",te(4,qL,i.getLoaderOptions(e,i.both&&te(2,bX,i._numItemsInViewport.cols))))}}function wX(n,t){if(1&n&&(ae(0),C(1,CX,2,6,"ng-container",14),le()),2&n){const e=y(3);v(1),g("ngForOf",e.loaderArr)}}function SX(n,t){1&n&&ce(0)}const DX=function(){return{styleClass:"p-scroller-loading-icon"}};function TX(n,t){if(1&n&&(ae(0),C(1,SX,1,0,"ng-container",7),le()),2&n){const e=y(4);v(1),g("ngTemplateOutlet",e.loaderIconTemplate)("ngTemplateOutletContext",te(3,qL,pn(2,DX)))}}function MX(n,t){1&n&&F(0,"i",16)}function EX(n,t){if(1&n&&(C(0,TX,2,5,"ng-container",0),C(1,MX,1,0,"ng-template",null,15,yt)),2&n){const e=Pe(2);g("ngIf",y(3).loaderIconTemplate)("ngIfElse",e)}}const IX=function(n){return{"p-component-overlay":n}};function xX(n,t){if(1&n&&(S(0,"div",12),C(1,wX,2,1,"ng-container",0),C(2,EX,3,2,"ng-template",null,13,yt),D()),2&n){const e=Pe(3),i=y(2);g("ngClass",te(3,IX,!i.loaderTemplate)),v(1),g("ngIf",i.loaderTemplate)("ngIfElse",e)}}const OX=function(n,t,e){return{"p-scroller":!0,"p-scroller-inline":n,"p-both-scroll":t,"p-horizontal-scroll":e}};function kX(n,t){if(1&n){const e=q();ae(0),S(1,"div",2,3),P("scroll",function(r){return I(e),x(y().onContainerScroll(r))}),C(3,pX,2,5,"ng-container",0),C(4,_X,3,6,"ng-template",null,4,yt),C(6,yX,1,1,"div",5),C(7,xX,4,5,"div",6),D(),le()}if(2&n){const e=Pe(5),i=y();v(1),Ke(i._styleClass),g("ngStyle",i._style)("ngClass",Hr(10,OX,i.inline,i.both,i.horizontal)),he("id",i._id)("tabindex",i.tabindex),v(2),g("ngIf",i.contentTemplate)("ngIfElse",e),v(3),g("ngIf",i._showSpacer),v(1),g("ngIf",!i.loaderDisabled&&i._showLoader&&i.d_loading)}}function AX(n,t){1&n&&ce(0)}const NX=function(n,t){return{rows:n,columns:t}};function LX(n,t){if(1&n&&(ae(0),C(1,AX,1,0,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",ot(5,E1,e.items,ot(2,NX,e._items,e.loadedColumns)))}}function PX(n,t){if(1&n&&(ln(0),C(1,LX,2,8,"ng-container",17)),2&n){const e=y();v(1),g("ngIf",e.contentTemplate)}}const RX=["*"];let N_=(()=>{class n{constructor(e,i){this.cd=e,this.zone=i,this.onLazyLoad=new R,this.onScroll=new R,this.onScrollIndexChange=new R,this._tabindex=0,this._itemSize=0,this._orientation="vertical",this._step=0,this._delay=0,this._resizeDelay=10,this._appendOnly=!1,this._inline=!1,this._lazy=!1,this._disabled=!1,this._loaderDisabled=!1,this._showSpacer=!0,this._showLoader=!1,this._autoSize=!1,this.d_loading=!1,this.first=0,this.last=0,this.page=0,this.isRangeChanged=!1,this.numItemsInViewport=0,this.lastScrollPos=0,this.lazyLoadState={},this.loaderArr=[],this.spacerStyle={},this.contentStyle={},this.initialized=!1}get id(){return this._id}set id(e){this._id=e}get style(){return this._style}set style(e){this._style=e}get styleClass(){return this._styleClass}set styleClass(e){this._styleClass=e}get tabindex(){return this._tabindex}set tabindex(e){this._tabindex=e}get items(){return this._items}set items(e){this._items=e}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e}get scrollHeight(){return this._scrollHeight}set scrollHeight(e){this._scrollHeight=e}get scrollWidth(){return this._scrollWidth}set scrollWidth(e){this._scrollWidth=e}get orientation(){return this._orientation}set orientation(e){this._orientation=e}get step(){return this._step}set step(e){this._step=e}get delay(){return this._delay}set delay(e){this._delay=e}get resizeDelay(){return this._resizeDelay}set resizeDelay(e){this._resizeDelay=e}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=e}get inline(){return this._inline}set inline(e){this._inline=e}get lazy(){return this._lazy}set lazy(e){this._lazy=e}get disabled(){return this._disabled}set disabled(e){this._disabled=e}get loaderDisabled(){return this._loaderDisabled}set loaderDisabled(e){this._loaderDisabled=e}get columns(){return this._columns}set columns(e){this._columns=e}get showSpacer(){return this._showSpacer}set showSpacer(e){this._showSpacer=e}get showLoader(){return this._showLoader}set showLoader(e){this._showLoader=e}get numToleratedItems(){return this._numToleratedItems}set numToleratedItems(e){this._numToleratedItems=e}get loading(){return this._loading}set loading(e){this._loading=e}get autoSize(){return this._autoSize}set autoSize(e){this._autoSize=e}get trackBy(){return this._trackBy}set trackBy(e){this._trackBy=e}get options(){return this._options}set options(e){this._options=e,e&&"object"==typeof e&&Object.entries(e).forEach(([i,r])=>this[`_${i}`]!==r&&(this[`_${i}`]=r))}get vertical(){return"vertical"===this._orientation}get horizontal(){return"horizontal"===this._orientation}get both(){return"both"===this._orientation}get loadedItems(){return this._items&&!this.d_loading?this.both?this._items.slice(this._appendOnly?0:this.first.rows,this.last.rows).map(e=>this._columns?e:e.slice(this._appendOnly?0:this.first.cols,this.last.cols)):this.horizontal&&this._columns?this._items:this._items.slice(this._appendOnly?0:this.first,this.last):[]}get loadedRows(){return this.d_loading?this._loaderDisabled?this.loaderArr:[]:this.loadedItems}get loadedColumns(){return this._columns&&(this.both||this.horizontal)?this.d_loading&&this._loaderDisabled?this.both?this.loaderArr[0]:this.loaderArr:this._columns.slice(this.both?this.first.cols:this.first,this.both?this.last.cols:this.last):this._columns}get isPageChanged(){return!this._step||this.page!==this.getPageByFirst()}ngOnInit(){this.setInitialState()}ngOnChanges(e){let i=!1;if(e.loading){const{previousValue:r,currentValue:o}=e.loading;this.lazy&&r!==o&&o!==this.d_loading&&(this.d_loading=o,i=!0)}if(e.orientation&&(this.lastScrollPos=this.both?{top:0,left:0}:0),e.numToleratedItems){const{previousValue:r,currentValue:o}=e.numToleratedItems;r!==o&&o!==this.d_numToleratedItems&&(this.d_numToleratedItems=o)}if(e.options){const{previousValue:r,currentValue:o}=e.options;this.lazy&&r?.loading!==o?.loading&&o?.loading!==this.d_loading&&(this.d_loading=o.loading,i=!0),r?.numToleratedItems!==o?.numToleratedItems&&o?.numToleratedItems!==this.d_numToleratedItems&&(this.d_numToleratedItems=o.numToleratedItems)}this.initialized&&!i&&(e.items?.previousValue?.length!==e.items?.currentValue?.length||e.itemSize||e.scrollHeight||e.scrollWidth)&&(this.init(),this.calculateAutoSize())}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"content":this.contentTemplate=e.template;break;case"item":default:this.itemTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"loadericon":this.loaderIconTemplate=e.template}})}ngAfterViewInit(){this.viewInit()}ngAfterViewChecked(){this.initialized||this.viewInit()}ngOnDestroy(){this.unbindResizeListener(),this.contentEl=null,this.initialized=!1}viewInit(){A.isVisible(this.elementViewChild?.nativeElement)&&(this.setInitialState(),this.setContentEl(this.contentEl),this.init(),this.defaultWidth=A.getWidth(this.elementViewChild.nativeElement),this.defaultHeight=A.getHeight(this.elementViewChild.nativeElement),this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.initialized=!0)}init(){this._disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize(),this.bindResizeListener(),this.cd.detectChanges())}setContentEl(e){this.contentEl=e||this.contentViewChild?.nativeElement||A.findSingle(this.elementViewChild?.nativeElement,".p-scroller-content")}setInitialState(){this.first=this.both?{rows:0,cols:0}:0,this.last=this.both?{rows:0,cols:0}:0,this.numItemsInViewport=this.both?{rows:0,cols:0}:0,this.lastScrollPos=this.both?{top:0,left:0}:0,this.d_loading=this._loading||!1,this.d_numToleratedItems=this._numToleratedItems,this.loaderArr=[],this.spacerStyle={},this.contentStyle={}}getElementRef(){return this.elementViewChild}getPageByFirst(){return Math.floor((this.first+4*this.d_numToleratedItems)/(this._step||1))}scrollTo(e){this.lastScrollPos=this.both?{top:0,left:0}:0,this.elementViewChild?.nativeElement?.scrollTo(e)}scrollToIndex(e,i="auto"){const{numToleratedItems:r}=this.calculateNumItems(),o=this.getContentPosition(),s=(u=0,d)=>u<=d?0:u,a=(u,d,h)=>u*d+h,l=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:i});let c=0;this.both?(c={rows:s(e[0],r[0]),cols:s(e[1],r[1])},l(a(c.cols,this._itemSize[1],o.left),a(c.rows,this._itemSize[0],o.top))):(c=s(e,r),this.horizontal?l(a(c,this._itemSize,o.left),0):l(0,a(c,this._itemSize,o.top))),this.isRangeChanged=this.first!==c,this.first=c}scrollInView(e,i,r="auto"){if(i){const{first:o,viewport:s}=this.getRenderedRange(),a=(u=0,d=0)=>this.scrollTo({left:u,top:d,behavior:r}),c="to-end"===i;if("to-start"===i){if(this.both)s.first.rows-o.rows>e[0]?a(s.first.cols*this._itemSize[1],(s.first.rows-1)*this._itemSize[0]):s.first.cols-o.cols>e[1]&&a((s.first.cols-1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.first-o>e){const u=(s.first-1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else if(c)if(this.both)s.last.rows-o.rows<=e[0]+1?a(s.first.cols*this._itemSize[1],(s.first.rows+1)*this._itemSize[0]):s.last.cols-o.cols<=e[1]+1&&a((s.first.cols+1)*this._itemSize[1],s.first.rows*this._itemSize[0]);else if(s.last-o<=e+1){const u=(s.first+1)*this._itemSize;this.horizontal?a(u,0):a(0,u)}}else this.scrollToIndex(e,r)}getRenderedRange(){const e=(o,s)=>Math.floor(o/(s||o));let i=this.first,r=0;if(this.elementViewChild?.nativeElement){const{scrollTop:o,scrollLeft:s}=this.elementViewChild.nativeElement;this.both?(i={rows:e(o,this._itemSize[0]),cols:e(s,this._itemSize[1])},r={rows:i.rows+this.numItemsInViewport.rows,cols:i.cols+this.numItemsInViewport.cols}):(i=e(this.horizontal?s:o,this._itemSize),r=i+this.numItemsInViewport)}return{first:this.first,last:this.last,viewport:{first:i,last:r}}}calculateNumItems(){const e=this.getContentPosition(),i=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetWidth-e.left:0,r=this.elementViewChild?.nativeElement?this.elementViewChild.nativeElement.offsetHeight-e.top:0,o=(c,u)=>Math.ceil(c/(u||c)),s=c=>Math.ceil(c/2),a=this.both?{rows:o(r,this._itemSize[0]),cols:o(i,this._itemSize[1])}:o(this.horizontal?i:r,this._itemSize);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(this.both?[s(a.rows),s(a.cols)]:s(a))}}calculateOptions(){const{numItemsInViewport:e,numToleratedItems:i}=this.calculateNumItems(),r=(a,l,c,u=!1)=>this.getLast(a+l+(aArray.from({length:e.cols})):Array.from({length:e})),this._lazy&&Promise.resolve().then(()=>{this.lazyLoadState={first:this._step?this.both?{rows:0,cols:o.cols}:0:o,last:Math.min(this._step?this._step:this.last,this.items.length)},this.handleEvents("onLazyLoad",this.lazyLoadState)})}calculateAutoSize(){this._autoSize&&!this.d_loading&&Promise.resolve().then(()=>{if(this.contentEl){this.contentEl.style.minHeight=this.contentEl.style.minWidth="auto",this.contentEl.style.position="relative",this.elementViewChild.nativeElement.style.contain="none";const[e,i]=[A.getWidth(this.contentEl),A.getHeight(this.contentEl)];e!==this.defaultContentWidth&&(this.elementViewChild.nativeElement.style.width=""),i!==this.defaultContentHeight&&(this.elementViewChild.nativeElement.style.height="");const[r,o]=[A.getWidth(this.elementViewChild.nativeElement),A.getHeight(this.elementViewChild.nativeElement)];(this.both||this.horizontal)&&(this.elementViewChild.nativeElement.style.width=rthis.elementViewChild.nativeElement.style[s]=a;this.both||this.horizontal?(o("height",r),o("width",i)):o("height",r)}}setSpacerSize(){if(this._items){const e=this.getContentPosition(),i=(r,o,s,a=0)=>this.spacerStyle={...this.spacerStyle,[`${r}`]:(o||[]).length*s+a+"px"};this.both?(i("height",this._items,this._itemSize[0],e.y),i("width",this._columns||this._items[1],this._itemSize[1],e.x)):this.horizontal?i("width",this._columns||this._items,this._itemSize,e.x):i("height",this._items,this._itemSize,e.y)}}setContentPosition(e){if(this.contentEl&&!this._appendOnly){const i=e?e.first:this.first,r=(s,a)=>s*a,o=(s=0,a=0)=>this.contentStyle={...this.contentStyle,transform:`translate3d(${s}px, ${a}px, 0)`};if(this.both)o(r(i.cols,this._itemSize[1]),r(i.rows,this._itemSize[0]));else{const s=r(i,this._itemSize);this.horizontal?o(s,0):o(0,s)}}}onScrollPositionChange(e){const i=e.target,r=this.getContentPosition(),o=(_,b)=>_?_>b?_-b:_:0,s=(_,b)=>Math.floor(_/(b||_)),a=(_,b,T,M,w,N)=>_<=w?w:N?T-M-w:b+w-1,l=(_,b,T,M,w,N,k)=>_<=N?0:Math.max(0,k?_b?T:_-2*N),c=(_,b,T,M,w,N=!1)=>{let k=b+M+2*w;return _>=w&&(k+=w+1),this.getLast(k,N)},u=o(i.scrollTop,r.top),d=o(i.scrollLeft,r.left);let h=this.both?{rows:0,cols:0}:0,p=this.last,f=!1,m=this.lastScrollPos;if(this.both){const _=this.lastScrollPos.top<=u,b=this.lastScrollPos.left<=d;if(!this._appendOnly||this._appendOnly&&(_||b)){const T={rows:s(u,this._itemSize[0]),cols:s(d,this._itemSize[1])},M={rows:a(T.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],_),cols:a(T.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],b)};h={rows:l(T.rows,M.rows,this.first.rows,0,0,this.d_numToleratedItems[0],_),cols:l(T.cols,M.cols,this.first.cols,0,0,this.d_numToleratedItems[1],b)},p={rows:c(T.rows,h.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(T.cols,h.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},f=h.rows!==this.first.rows||p.rows!==this.last.rows||h.cols!==this.first.cols||p.cols!==this.last.cols||this.isRangeChanged,m={top:u,left:d}}}else{const _=this.horizontal?d:u,b=this.lastScrollPos<=_;if(!this._appendOnly||this._appendOnly&&b){const T=s(_,this._itemSize);h=l(T,a(T,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,b),this.first,0,0,this.d_numToleratedItems,b),p=c(T,h,0,this.numItemsInViewport,this.d_numToleratedItems),f=h!==this.first||p!==this.last||this.isRangeChanged,m=_}}return{first:h,last:p,isRangeChanged:f,scrollPos:m}}onScrollChange(e){const{first:i,last:r,isRangeChanged:o,scrollPos:s}=this.onScrollPositionChange(e);if(o){const a={first:i,last:r};if(this.setContentPosition(a),this.first=i,this.last=r,this.lastScrollPos=s,this.handleEvents("onScrollIndexChange",a),this._lazy&&this.isPageChanged){const l={first:this._step?Math.min(this.getPageByFirst()*this._step,this.items.length-this._step):i,last:Math.min(this._step?(this.getPageByFirst()+1)*this._step:r,this.items.length)};(this.lazyLoadState.first!==l.first||this.lazyLoadState.last!==l.last)&&this.handleEvents("onLazyLoad",l),this.lazyLoadState=l}}}onContainerScroll(e){if(this.handleEvents("onScroll",{originalEvent:e}),this._delay&&this.isPageChanged){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),!this.d_loading&&this.showLoader){const{isRangeChanged:i}=this.onScrollPositionChange(e);(i||this._step&&this.isPageChanged)&&(this.d_loading=!0,this.cd.detectChanges())}this.scrollTimeout=setTimeout(()=>{this.onScrollChange(e),this.d_loading&&this.showLoader&&(!this._lazy||void 0===this._loading)&&(this.d_loading=!1,this.page=this.getPageByFirst(),this.cd.detectChanges())},this._delay)}else!this.d_loading&&this.onScrollChange(e)}bindResizeListener(){this.windowResizeListener||this.zone.runOutsideAngular(()=>{this.windowResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.windowResizeListener),window.addEventListener("orientationchange",this.windowResizeListener)})}unbindResizeListener(){this.windowResizeListener&&(window.removeEventListener("resize",this.windowResizeListener),window.removeEventListener("orientationchange",this.windowResizeListener),this.windowResizeListener=null)}onWindowResize(){this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{if(A.isVisible(this.elementViewChild?.nativeElement)){const[e,i]=[A.getWidth(this.elementViewChild.nativeElement),A.getHeight(this.elementViewChild.nativeElement)],[r,o]=[e!==this.defaultWidth,i!==this.defaultHeight];(this.both?r||o:this.horizontal?r:this.vertical&&o)&&this.zone.run(()=>{this.d_numToleratedItems=this._numToleratedItems,this.defaultWidth=e,this.defaultHeight=i,this.defaultContentWidth=A.getWidth(this.contentEl),this.defaultContentHeight=A.getHeight(this.contentEl),this.init()})}},this._resizeDelay)}handleEvents(e,i){return this.options&&this.options[e]?this.options[e](i):this[e].emit(i)}getContentOptions(){return{contentStyleClass:"p-scroller-content "+(this.d_loading?"p-scroller-loading":""),items:this.loadedItems,getItemOptions:e=>this.getOptions(e),loading:this.d_loading,getLoaderOptions:(e,i)=>this.getLoaderOptions(e,i),itemSize:this._itemSize,rows:this.loadedRows,columns:this.loadedColumns,spacerStyle:this.spacerStyle,contentStyle:this.contentStyle,vertical:this.vertical,horizontal:this.horizontal,both:this.both}}getOptions(e){const i=(this._items||[]).length,r=this.both?this.first.rows+e:this.first+e;return{index:r,count:i,first:0===r,last:r===i-1,even:r%2==0,odd:r%2!=0}}getLoaderOptions(e,i){const r=this.loaderArr.length;return{index:e,count:r,first:0===e,last:e===r-1,even:e%2==0,odd:e%2!=0,...i}}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Xe))},n.\u0275cmp=Y({type:n,selectors:[["p-scroller"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(uX,5),Me(dX,5)),2&e){let r;J(r=X())&&(i.elementViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first)}},hostAttrs:[1,"p-scroller-viewport","p-element"],inputs:{id:"id",style:"style",styleClass:"styleClass",tabindex:"tabindex",items:"items",itemSize:"itemSize",scrollHeight:"scrollHeight",scrollWidth:"scrollWidth",orientation:"orientation",step:"step",delay:"delay",resizeDelay:"resizeDelay",appendOnly:"appendOnly",inline:"inline",lazy:"lazy",disabled:"disabled",loaderDisabled:"loaderDisabled",columns:"columns",showSpacer:"showSpacer",showLoader:"showLoader",numToleratedItems:"numToleratedItems",loading:"loading",autoSize:"autoSize",trackBy:"trackBy",options:"options"},outputs:{onLazyLoad:"onLazyLoad",onScroll:"onScroll",onScrollIndexChange:"onScrollIndexChange"},features:[Yn],ngContentSelectors:RX,decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["disabledContainer",""],[3,"ngStyle","ngClass","scroll"],["element",""],["buildInContent",""],["class","p-scroller-spacer",3,"ngStyle",4,"ngIf"],["class","p-scroller-loader",3,"ngClass",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-scroller-content",3,"ngClass","ngStyle"],["content",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"p-scroller-spacer",3,"ngStyle"],[1,"p-scroller-loader",3,"ngClass"],["buildInLoader",""],[4,"ngFor","ngForOf"],["buildInLoaderIcon",""],[1,"p-scroller-loading-icon","pi","pi-spinner","pi-spin"],[4,"ngIf"]],template:function(e,i){if(1&e&&(li(),C(0,kX,8,14,"ng-container",0),C(1,PX,2,1,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf",!i._disabled)("ngIfElse",r)}},dependencies:[Ot,Un,He,Zn,cn],styles:["p-scroller{flex:1;outline:0 none}.p-scroller{position:relative;overflow:auto;contain:strict;transform:translateZ(0);will-change:scroll-position;outline:0 none}.p-scroller-content{position:absolute;top:0;left:0;min-height:100%;min-width:100%;will-change:transform}.p-scroller-spacer{position:absolute;top:0;left:0;height:1px;width:1px;transform-origin:0 0;pointer-events:none}.p-scroller-loader{position:sticky;top:0;left:0;width:100%;height:100%}.p-scroller-loader.p-component-overlay{display:flex;align-items:center;justify-content:center}.p-scroller-loading-icon{font-size:2rem}.p-scroller-inline .p-scroller-content{position:static}\n"],encapsulation:2}),n})();const FX=["container"],jX=["in"],VX=["multiIn"],zX=["multiContainer"],BX=["ddBtn"],UX=["items"],HX=["scroller"],$X=["overlay"],WX=function(n,t){return{"p-autocomplete-dd-input":n,"p-disabled":t}};function GX(n,t){if(1&n){const e=q();S(0,"input",13,14),P("click",function(r){return I(e),x(y().onInputClick(r))})("input",function(r){return I(e),x(y().onInput(r))})("keydown",function(r){return I(e),x(y().onKeydown(r))})("keyup",function(r){return I(e),x(y().onKeyup(r))})("focus",function(r){return I(e),x(y().onInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))})("change",function(r){return I(e),x(y().onInputChange(r))})("paste",function(r){return I(e),x(y().onInputPaste(r))}),D()}if(2&n){const e=y();Ke(e.inputStyleClass),g("autofocus",e.autofocus)("ngStyle",e.inputStyle)("autocomplete",e.autocomplete)("ngClass",ot(20,WX,e.dropdown,e.disabled))("value",e.inputFieldValue)("readonly",e.readonly)("disabled",e.disabled),he("type",e.type)("id",e.inputId)("required",e.required)("name",e.name)("placeholder",e.placeholder)("size",e.size)("maxlength",e.maxlength)("tabindex",e.tabindex)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)}}function qX(n,t){if(1&n){const e=q();S(0,"i",15),P("click",function(){return I(e),x(y().clear())}),D()}}function KX(n,t){if(1&n){const e=q();S(0,"i",15),P("click",function(){return I(e),x(y().clear())}),D()}}function YX(n,t){1&n&&ce(0)}function QX(n,t){if(1&n&&(S(0,"span",27),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.resolveFieldData(e))}}function ZX(n,t){if(1&n){const e=q();S(0,"span",28),P("click",function(){I(e),y();const r=Pe(1);return x(y(2).removeItem(r))}),D()}}const L_=function(n){return{$implicit:n}};function JX(n,t){if(1&n&&(S(0,"li",22,23),C(2,YX,1,0,"ng-container",24),C(3,QX,2,1,"span",25),C(4,ZX,1,0,"span",26),D()),2&n){const e=t.$implicit,i=y(2);v(2),g("ngTemplateOutlet",i.selectedItemTemplate)("ngTemplateOutletContext",te(4,L_,e)),v(1),g("ngIf",!i.selectedItemTemplate),v(1),g("ngIf",!i.disabled&&!i.readonly)}}const XX=function(n,t){return{"p-disabled":n,"p-focus":t}};function eee(n,t){if(1&n){const e=q();S(0,"ul",16,17),P("click",function(){return I(e),x(Pe(5).focus())}),C(2,JX,5,6,"li",18),S(3,"li",19)(4,"input",20,21),P("input",function(r){return I(e),x(y().onInput(r))})("click",function(r){return I(e),x(y().onInputClick(r))})("keydown",function(r){return I(e),x(y().onKeydown(r))})("keyup",function(r){return I(e),x(y().onKeyup(r))})("focus",function(r){return I(e),x(y().onInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))})("change",function(r){return I(e),x(y().onInputChange(r))})("paste",function(r){return I(e),x(y().onInputPaste(r))}),D()()()}if(2&n){const e=y();g("ngClass",ot(20,XX,e.disabled,e.focus)),v(2),g("ngForOf",e.value),v(2),Ke(e.inputStyleClass),g("autofocus",e.autofocus)("disabled",e.disabled)("readonly",e.readonly)("autocomplete",e.autocomplete)("ngStyle",e.inputStyle),he("type",e.type)("id",e.inputId)("placeholder",e.value&&e.value.length?null:e.placeholder)("tabindex",e.tabindex)("maxlength",e.maxlength)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledBy)("aria-required",e.required)("aria-controls",e.listId)("aria-expanded",e.overlayVisible)("aria-activedescendant","p-highlighted-option")}}function tee(n,t){1&n&&F(0,"i",29)}function nee(n,t){if(1&n){const e=q();S(0,"button",30,31),P("click",function(r){return I(e),x(y().handleDropdownClick(r))}),D()}if(2&n){const e=y();g("icon",e.dropdownIcon)("disabled",e.disabled),he("aria-label",e.dropdownAriaLabel)("tabindex",e.tabindex)}}function iee(n,t){1&n&&ce(0)}function ree(n,t){1&n&&ce(0)}const KL=function(n,t){return{$implicit:n,options:t}};function oee(n,t){if(1&n&&C(0,ree,1,0,"ng-container",24),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(15))("ngTemplateOutletContext",ot(2,KL,e,i))}}function see(n,t){1&n&&ce(0)}const aee=function(n){return{options:n}};function lee(n,t){if(1&n&&C(0,see,1,0,"ng-container",24),2&n){const e=t.options;g("ngTemplateOutlet",y(3).loaderTemplate)("ngTemplateOutletContext",te(2,aee,e))}}function cee(n,t){1&n&&(ae(0),C(1,lee,1,4,"ng-template",35),le())}const P_=function(n){return{height:n}};function uee(n,t){if(1&n){const e=q();S(0,"p-scroller",32,33),P("onLazyLoad",function(r){return I(e),x(y().onLazyLoad.emit(r))}),C(2,oee,1,5,"ng-template",34),C(3,cee,2,0,"ng-container",11),D()}if(2&n){const e=y();jt(te(8,P_,e.scrollHeight)),g("items",e.suggestions)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function dee(n,t){1&n&&ce(0)}const hee=function(){return{}};function pee(n,t){if(1&n&&(ae(0),C(1,dee,1,0,"ng-container",24),le()),2&n){const e=y(),i=Pe(15);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",ot(3,KL,e.suggestions,pn(2,hee)))}}function fee(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(3);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function mee(n,t){1&n&&ce(0)}function gee(n,t){1&n&&ce(0)}function _ee(n,t){if(1&n&&(S(0,"li",41),C(1,fee,2,1,"span",11),C(2,mee,1,0,"ng-container",24),D(),C(3,gee,1,0,"ng-container",24)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y();g("ngStyle",te(6,P_,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,L_,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(10,L_,o.getOptionGroupChildren(e)))}}function yee(n,t){if(1&n&&(ae(0),C(1,_ee,4,12,"ng-template",40),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function vee(n,t){1&n&&ce(0)}function bee(n,t){if(1&n&&(ae(0),C(1,vee,1,0,"ng-container",24),le()),2&n){const e=y().$implicit,i=Pe(5);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,L_,e))}}function Cee(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(3);v(1),ve(i.resolveFieldData(e))}}function wee(n,t){1&n&&ce(0)}const See=function(n){return{"p-highlight":n}},Dee=function(n,t){return{$implicit:n,index:t}};function Tee(n,t){if(1&n){const e=q();S(0,"li",43),P("click",function(){const o=I(e).$implicit;return x(y(3).selectItem(o))}),C(1,Cee,2,1,"span",11),C(2,wee,1,0,"ng-container",24),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(2).options,o=y();g("ngStyle",te(6,P_,r.itemSize+"px"))("ngClass",te(8,See,e===o.highlightOption))("id",o.highlightOption==e?"p-highlighted-option":""),v(1),g("ngIf",!o.itemTemplate),v(1),g("ngTemplateOutlet",o.itemTemplate)("ngTemplateOutletContext",ot(10,Dee,e,r.getOptions?r.getOptions(i):i))}}function Mee(n,t){1&n&&C(0,Tee,3,13,"li",42),2&n&&g("ngForOf",t.$implicit)}function Eee(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(3);v(1),xt(" ",e.emptyMessageLabel," ")}}function Iee(n,t){1&n&&ce(0,null,46)}function xee(n,t){if(1&n&&(S(0,"li",44),C(1,Eee,2,1,"ng-container",45),C(2,Iee,2,0,"ng-container",9),D()),2&n){const e=y().options,i=y();g("ngStyle",te(4,P_,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function Oee(n,t){if(1&n&&(S(0,"ul",36,37),C(2,yee,2,1,"ng-container",11),C(3,bee,2,4,"ng-container",11),C(4,Mee,1,1,"ng-template",null,38,yt),C(6,xee,3,6,"li",39),D()),2&n){const e=t.options,i=y();jt(e.contentStyle),g("ngClass",e.contentStyleClass),he("id",i.listId),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.noResults&&i.showEmptyMessage)}}function kee(n,t){1&n&&ce(0)}const Aee=function(n,t){return{"p-autocomplete p-component":!0,"p-autocomplete-dd":n,"p-autocomplete-multiple":t}},Nee=function(){return["p-autocomplete-panel p-component"]},Lee={provide:wn,useExisting:$e(()=>I1),multi:!0};let I1=(()=>{class n{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.differs=o,this.config=s,this.overlayService=a,this.zone=l,this.minLength=1,this.delay=300,this.scrollHeight="200px",this.lazy=!1,this.type="text",this.autoZIndex=!0,this.baseZIndex=0,this.dropdownIcon="pi pi-chevron-down",this.unique=!0,this.completeOnFocus=!1,this.showClear=!1,this.dropdownMode="blank",this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.autocomplete="off",this.completeMethod=new R,this.onSelect=new R,this.onUnselect=new R,this.onFocus=new R,this.onBlur=new R,this.onDropdownClick=new R,this.onClear=new R,this.onKeyUp=new R,this.onShow=new R,this.onHide=new R,this.onLazyLoad=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.overlayVisible=!1,this.focus=!1,this.inputFieldValue=null,this.inputValue=null,this.differ=o.find([]).create(null),this.listId=T_()+"_list"}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get suggestions(){return this._suggestions}set suggestions(e){this._suggestions=e,this.handleSuggestionsChange()}ngAfterViewChecked(){this.suggestionsUpdated&&this.overlayViewChild&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1),this.suggestionsUpdated=!1}),this.highlightOptionChanged&&this.zone.runOutsideAngular(()=>{setTimeout(()=>{if(this.overlay&&this.itemsWrapper){let e=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&A.scrollInView(this.itemsWrapper,e)}},1),this.highlightOptionChanged=!1})}handleSuggestionsChange(){null!=this._suggestions&&this.loading&&(this.highlightOption=null,this._suggestions.length?(this.noResults=!1,this.show(),this.suggestionsUpdated=!0,this.autoHighlight&&(this.highlightOption=this._suggestions[0])):(this.noResults=!0,this.showEmptyMessage?(this.show(),this.suggestionsUpdated=!0):this.hide()),this.loading=!1)}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}writeValue(e){this.value=e,this.filled=this.value&&""!=this.value,this.updateInputField(),this.cd.markForCheck()}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInput(e){if(!this.inputKeyDown&&A.isIE())return;this.timeout&&clearTimeout(this.timeout);let i=e.target.value;this.inputValue=i,!this.multiple&&!this.forceSelection&&this.onModelChange(i),0===i.length&&!this.multiple&&(this.value=null,this.hide(),this.onClear.emit(e),this.onModelChange(i)),i.length>=this.minLength?this.timeout=setTimeout(()=>{this.search(e,i)},this.delay):this.hide(),this.updateFilledState(),this.inputKeyDown=!1}onInputClick(e){this.documentClickListener&&(this.inputClick=!0)}search(e,i){null!=i&&(this.loading=!0,this.completeMethod.emit({originalEvent:e,query:i}))}selectItem(e,i=!0){this.forceSelectionUpdateModelTimeout&&(clearTimeout(this.forceSelectionUpdateModelTimeout),this.forceSelectionUpdateModelTimeout=null),this.multiple?(this.multiInputEL.nativeElement.value="",this.value=this.value||[],(!this.isSelected(e)||!this.unique)&&(this.value=[...this.value,e],this.onModelChange(this.value))):(this.inputEL.nativeElement.value=this.resolveFieldData(e),this.value=e,this.onModelChange(this.value)),this.onSelect.emit(e),this.updateFilledState(),i&&(this.itemClicked=!0,this.focusInput()),this.hide()}show(e){(this.multiInputEL||this.inputEL)&&!this.overlayVisible&&(this.multiple?this.multiInputEL.nativeElement.ownerDocument.activeElement==this.multiInputEL.nativeElement:this.inputEL.nativeElement.ownerDocument.activeElement==this.inputEL.nativeElement)&&(this.overlayVisible=!0),this.onShow.emit(e),this.cd.markForCheck()}clear(){this.multiple?this.value=null:(this.inputValue=null,this.inputEL.nativeElement.value=""),this.updateFilledState(),this.onModelChange(this.value),this.onClear.emit()}onOverlayAnimationStart(e){"visible"===e.toState&&(this.itemsWrapper=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-autocomplete-panel"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild.nativeElement))}resolveFieldData(e){let i=this.field?Oe.resolveFieldData(e,this.field):e;return void 0!==i?i:""}hide(e){this.overlayVisible=!1,this.onHide.emit(e),this.cd.markForCheck()}handleDropdownClick(e){if(this.overlayVisible)this.hide();else{this.focusInput();let i=this.multiple?this.multiInputEL.nativeElement.value:this.inputEL.nativeElement.value;"blank"===this.dropdownMode?this.search(e,""):"current"===this.dropdownMode&&this.search(e,i),this.onDropdownClick.emit({originalEvent:e,query:i})}}focusInput(){this.multiple?this.multiInputEL.nativeElement.focus():this.inputEL.nativeElement.focus()}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}removeItem(e){let i=A.index(e),r=this.value[i];this.value=this.value.filter((o,s)=>s!=i),this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(r)}onKeydown(e){if(this.overlayVisible)switch(e.which){case 40:if(this.group){let r=this.findOptionGroupIndex(this.highlightOption,this.suggestions);if(-1!==r){let o=r.itemIndex+1;o=0)this.highlightOption=this.getOptionGroupChildren(this.suggestions[r.groupIndex])[o],this.highlightOptionChanged=!0;else if(o<0){let s=this.suggestions[r.groupIndex-1];s&&(this.highlightOption=this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1],this.highlightOptionChanged=!0)}}}else{let r=this.findOptionIndex(this.highlightOption,this.suggestions);r>0&&(this.highlightOption=this.suggestions[r-1],this.highlightOptionChanged=!0)}e.preventDefault();break;case 13:this.highlightOption&&(this.selectItem(this.highlightOption),this.hide()),e.preventDefault();break;case 27:this.hide(),e.preventDefault();break;case 9:this.highlightOption&&this.selectItem(this.highlightOption),this.hide()}else 40===e.which&&this.suggestions?this.search(e,e.target.value):e.ctrlKey&&"z"===e.key&&!this.multiple?(this.inputEL.nativeElement.value=this.resolveFieldData(null),this.value="",this.onModelChange(this.value)):e.ctrlKey&&"z"===e.key&&this.multiple&&(this.value.pop(),this.onModelChange(this.value),this.updateFilledState());if(this.multiple&&8===e.which&&this.value&&this.value.length&&!this.multiInputEL.nativeElement.value){this.value=[...this.value];const r=this.value.pop();this.onModelChange(this.value),this.updateFilledState(),this.onUnselect.emit(r)}this.inputKeyDown=!0}onKeyup(e){this.onKeyUp.emit(e)}onInputFocus(e){!this.itemClicked&&this.completeOnFocus&&this.search(e,this.multiple?this.multiInputEL.nativeElement.value:this.inputEL.nativeElement.value),this.focus=!0,this.onFocus.emit(e),this.itemClicked=!1}onInputBlur(e){this.focus=!1,this.onModelTouched(),this.onBlur.emit(e)}onInputChange(e){if(this.forceSelection){let i=!1,r=e.target.value.trim();if(this.suggestions)for(let o of this.suggestions){let s=this.field?Oe.resolveFieldData(o,this.field):o;if(s&&r===s.trim()){i=!0,this.forceSelectionUpdateModelTimeout=setTimeout(()=>{this.selectItem(o,!1)},250);break}}i||(this.multiple?this.multiInputEL.nativeElement.value="":(this.value=null,this.inputEL.nativeElement.value=""),this.onClear.emit(e),this.onModelChange(this.value),this.updateFilledState())}}onInputPaste(e){this.onKeydown(e)}isSelected(e){let i=!1;if(this.value&&this.value.length)for(let r=0;r{const t=n+1;return{label:`Heading ${t}`,icon:Jo(zee[n]||""),id:`heading${t}`,attributes:{level:t}}}),O1={label:"Paragraph",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNDc0NjEgMTZWMTUuMjYxN0w3LjQyOTY5IDE1LjA5NzdWOC4zNzY5NUw2LjQ3NDYxIDguMjEyODlWNy40Njg3NUgxMC4zOTQ1QzExLjMwNDcgNy40Njg3NSAxMi4wMTE3IDcuNzAzMTIgMTIuNTE1NiA4LjE3MTg4QzEzLjAyMzQgOC42NDA2MiAxMy4yNzczIDkuMjU3ODEgMTMuMjc3MyAxMC4wMjM0QzEzLjI3NzMgMTAuNzk2OSAxMy4wMjM0IDExLjQxNiAxMi41MTU2IDExLjg4MDlDMTIuMDExNyAxMi4zNDU3IDExLjMwNDcgMTIuNTc4MSAxMC4zOTQ1IDEyLjU3ODFIOC41ODM5OFYxNS4wOTc3TDkuNTM5MDYgMTUuMjYxN1YxNkg2LjQ3NDYxWk04LjU4Mzk4IDExLjY3NThIMTAuMzk0NUMxMC45NzI3IDExLjY3NTggMTEuNDA0MyAxMS41MjE1IDExLjY4OTUgMTEuMjEyOUMxMS45Nzg1IDEwLjkwMDQgMTIuMTIzIDEwLjUwNzggMTIuMTIzIDEwLjAzNTJDMTIuMTIzIDkuNTYyNSAxMS45Nzg1IDkuMTY3OTcgMTEuNjg5NSA4Ljg1MTU2QzExLjQwNDMgOC41MzUxNiAxMC45NzI3IDguMzc2OTUgMTAuMzk0NSA4LjM3Njk1SDguNTgzOThWMTEuNjc1OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE0IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIxOCIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iNiIgeT0iMjIiIHdpZHRoPSIyMCIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"paragraph"};function Jo(n){return Qee.bypassSecurityTrustUrl(n)}const j_=[{label:"Image",icon:"image",id:"image"},{label:"Video",icon:"movie",id:"video"},...ZL,{label:"Table",icon:"table_view",id:"table"},...[{label:"List Ordered",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNzA4OTggMjAuNTMxMlYxOS43OTNMOC4wMjczNCAxOS42Mjg5VjEzLjIzNjNMNi42ODU1NSAxMy4yNTk4VjEyLjUzOTFMOS4xODE2NCAxMlYxOS42Mjg5TDEwLjQ5NDEgMTkuNzkzVjIwLjUzMTJINi43MDg5OFoiIGZpbGw9IiMyMjIyMjIiLz4KPHBhdGggZD0iTTExLjc5NDkgMjAuNTMxMlYxOS4zNDc3SDEyLjk0OTJWMjAuNTMxMkgxMS43OTQ5WiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTMiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE1IiB5PSIxNiIgd2lkdGg9IjExIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPHJlY3QgeD0iMTUiIHk9IjE5IiB3aWR0aD0iMTEiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8L3N2Zz4K"),id:"orderedList"},{label:"List Unordered",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iMTQiIHk9IjEyIiB3aWR0aD0iMTIiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNCIgeT0iMTUiIHdpZHRoPSIxMiIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjE0IiB5PSIxOCIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPGNpcmNsZSBjeD0iOC41IiBjeT0iMTUuNSIgcj0iMi41IiBmaWxsPSIjMjIyMjIyIi8+Cjwvc3ZnPgo="),id:"bulletList"}],...[{label:"AI Content",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE1LjA4NDEgOC43MjQ5M0wxMi41MjIgOS41MDc0MkMxMi40NTU2IDkuNTI3NjggMTIuMzk3MiA5LjU2OTczIDEyLjM1NTcgOS42MjcyOEMxMi4zMTQyIDkuNjg0ODMgMTIuMjkxOCA5Ljc1NDc4IDEyLjI5MTggOS44MjY2NkMxMi4yOTE4IDkuODk4NTQgMTIuMzE0MiA5Ljk2ODQ5IDEyLjM1NTcgMTAuMDI2QzEyLjM5NzIgMTAuMDgzNiAxMi40NTU2IDEwLjEyNTYgMTIuNTIyIDEwLjE0NTlMMTUuMDg0MSAxMC45Mjg0TDE1LjgzODEgMTMuNTg3M0MxNS44NTc3IDEzLjY1NjIgMTUuODk4MiAxMy43MTY4IDE1Ljk1MzYgMTMuNzU5OEMxNi4wMDkxIDEzLjgwMjkgMTYuMDc2NSAxMy44MjYyIDE2LjE0NTcgMTMuODI2MkMxNi4yMTUgMTMuODI2MiAxNi4yODI0IDEzLjgwMjkgMTYuMzM3OCAxMy43NTk4QzE2LjM5MzMgMTMuNzE2OCAxNi40MzM4IDEzLjY1NjIgMTYuNDUzMyAxMy41ODczTDE3LjIwNzcgMTAuOTI4NEwxOS43Njk3IDEwLjE0NTlDMTkuODM2MiAxMC4xMjU2IDE5Ljg5NDYgMTAuMDgzNiAxOS45MzYxIDEwLjAyNkMxOS45Nzc2IDkuOTY4NDkgMjAgOS44OTg1NCAyMCA5LjgyNjY2QzIwIDkuNzU0NzggMTkuOTc3NiA5LjY4NDgzIDE5LjkzNjEgOS42MjcyOEMxOS44OTQ2IDkuNTY5NzMgMTkuODM2MiA5LjUyNzY4IDE5Ljc2OTcgOS41MDc0MkwxNy4yMDc3IDguNzI0OTNMMTYuNDUzMyA2LjA2NjA0QzE2LjQzMzggNS45OTcwNyAxNi4zOTMzIDUuOTM2NTIgMTYuMzM3OCA1Ljg5MzQ1QzE2LjI4MjQgNS44NTAzNyAxNi4yMTUgNS44MjcwOSAxNi4xNDU3IDUuODI3MDlDMTYuMDc2NSA1LjgyNzA5IDE2LjAwOTEgNS44NTAzNyAxNS45NTM2IDUuODkzNDVDMTUuODk4MiA1LjkzNjUyIDE1Ljg1NzYgNS45OTcwNyAxNS44MzgxIDYuMDY2MDRMMTUuMDg0MSA4LjcyNDkzWiIgZmlsbD0iIzhEOTJBNSIvPgo8cGF0aCBkPSJNMTguMjE4NSAzLjk1MjMzTDE5LjYwODQgMy41Mjc0M0MxOS42NzQ5IDMuNTA3MTYgMTkuNzMzMiAzLjQ2NTExIDE5Ljc3NDcgMy40MDc1N0MxOS44MTYyIDMuMzUwMDIgMTkuODM4NiAzLjI4MDA4IDE5LjgzODYgMy4yMDgyQzE5LjgzODYgMy4xMzYzMyAxOS44MTYyIDMuMDY2MzggMTkuNzc0NyAzLjAwODg0QzE5LjczMzIgMi45NTEyOSAxOS42NzQ5IDIuOTA5MjQgMTkuNjA4NCAyLjg4ODk4TDE4LjIxODUgMi40NjQ0MUwxNy44MDkxIDEuMDIxNjdDMTcuNzg5NiAwLjk1MjY5OCAxNy43NDkxIDAuODkyMTQ0IDE3LjY5MzYgMC44NDkwNjlDMTcuNjM4MiAwLjgwNTk5NSAxNy41NzA3IDAuNzgyNzE1IDE3LjUwMTUgMC43ODI3MTVDMTcuNDMyMiAwLjc4MjcxNSAxNy4zNjQ4IDAuODA1OTk1IDE3LjMwOTQgMC44NDkwNjlDMTcuMjUzOSAwLjg5MjE0NCAxNy4yMTM0IDAuOTUyNjk4IDE3LjE5MzkgMS4wMjE2N0wxNi43ODQ4IDIuNDY0NDFMMTUuMzk0NiAyLjg4ODk4QzE1LjMyODEgMi45MDkyMyAxNS4yNjk4IDIuOTUxMjggMTUuMjI4MyAzLjAwODgzQzE1LjE4NjcgMy4wNjYzNyAxNS4xNjQzIDMuMTM2MzIgMTUuMTY0MyAzLjIwODJDMTUuMTY0MyAzLjI4MDA4IDE1LjE4NjcgMy4zNTAwMyAxNS4yMjgzIDMuNDA3NThDMTUuMjY5OCAzLjQ2NTEyIDE1LjMyODEgMy41MDcxNyAxNS4zOTQ2IDMuNTI3NDNMMTYuNzg0OCAzLjk1MjMzTDE3LjE5MzkgNS4zOTQ3NEMxNy4yMTM0IDUuNDYzNzEgMTcuMjUzOSA1LjUyNDI2IDE3LjMwOTQgNS41NjczM0MxNy4zNjQ4IDUuNjEwNDEgMTcuNDMyMiA1LjYzMzY5IDE3LjUwMTUgNS42MzM2OUMxNy41NzA3IDUuNjMzNjkgMTcuNjM4MiA1LjYxMDQxIDE3LjY5MzYgNS41NjczM0MxNy43NDkxIDUuNTI0MjYgMTcuNzg5NiA1LjQ2MzcxIDE3LjgwOTEgNS4zOTQ3NEwxOC4yMTg1IDMuOTUyMzNaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xMS4xNjcyIDQuNTU2MzVMOS43NjQ3OCA1LjE0OTk2QzkuNzA1NzggNS4xNzQ5NCA5LjY1NTI5IDUuMjE3NiA5LjYxOTc0IDUuMjcyNDlDOS41ODQyIDUuMzI3MzcgOS41NjUyMiA1LjM5MjAxIDkuNTY1MjIgNS40NTgxNEM5LjU2NTIyIDUuNTI0MjYgOS41ODQyIDUuNTg4OSA5LjYxOTc0IDUuNjQzNzhDOS42NTUyOSA1LjY5ODY3IDkuNzA1NzggNS43NDEzMyA5Ljc2NDc4IDUuNzY2MzFMMTEuMTY3MiA2LjM1OTkyTDExLjczOTIgNy44MTUzNEMxMS43NjMzIDcuODc2NTcgMTEuODA0NCA3LjkyODk3IDExLjg1NzMgNy45NjU4NUMxMS45MTAyIDguMDAyNzQgMTEuOTcyNCA4LjAyMjQzIDEyLjAzNjIgOC4wMjI0M0MxMi4wOTk5IDguMDIyNDMgMTIuMTYyMiA4LjAwMjc0IDEyLjIxNSA3Ljk2NTg1QzEyLjI2NzkgNy45Mjg5NyAxMi4zMDkgNy44NzY1NyAxMi4zMzMxIDcuODE1MzRMMTIuOTA1MSA2LjM1OTkyTDE0LjMwNzIgNS43NjYzMUMxNC4zNjYyIDUuNzQxMzIgMTQuNDE2NyA1LjY5ODY3IDE0LjQ1MjMgNS42NDM3OEMxNC40ODc4IDUuNTg4ODkgMTQuNTA2OCA1LjUyNDI2IDE0LjUwNjggNS40NTgxNEMxNC41MDY4IDUuMzkyMDEgMTQuNDg3OCA1LjMyNzM4IDE0LjQ1MjMgNS4yNzI0OUMxNC40MTY3IDUuMjE3NiAxNC4zNjYyIDUuMTc0OTUgMTQuMzA3MiA1LjE0OTk2TDEyLjkwNTEgNC41NTYzNUwxMi4zMzMxIDMuMTAxMjZDMTIuMzA5IDMuMDQwMDMgMTIuMjY3OSAyLjk4NzY0IDEyLjIxNSAyLjk1MDc1QzEyLjE2MjIgMi45MTM4NyAxMi4wOTk5IDIuODk0MTcgMTIuMDM2MiAyLjg5NDE3QzExLjk3MjQgMi44OTQxNyAxMS45MTAyIDIuOTEzODcgMTEuODU3MyAyLjk1MDc1QzExLjgwNDQgMi45ODc2NCAxMS43NjMzIDMuMDQwMDMgMTEuNzM5MiAzLjEwMTI2TDExLjE2NzIgNC41NTYzNVoiIGZpbGw9IiM4RDkyQTUiLz4KPHJlY3QgeT0iNC4yNjEyMyIgd2lkdGg9IjguNjk1NjUiIGhlaWdodD0iMS41NjUyMiIgcng9IjAuNzgyNjA5IiBmaWxsPSIjOEQ5MkE1Ii8+CjxyZWN0IHk9IjguOTU3MDMiIHdpZHRoPSIxMS4zMDQzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8cmVjdCB5PSIxMy42NTIzIiB3aWR0aD0iMTMuOTEzIiBoZWlnaHQ9IjEuNTY1MjIiIHJ4PSIwLjc4MjYwOSIgZmlsbD0iIzhEOTJBNSIvPgo8L3N2Zz4K"),id:"aiContentPrompt"},{label:"AI Image",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yLjUxNDI5IDUuNUMxLjg0NzQ2IDUuNSAxLjIwNzk0IDUuNzYxNjkgMC43MzY0MTcgNi4yMjc1MUMwLjI2NDg5NyA2LjY5MzMyIDAgNy4zMjUxMSAwIDcuOTgzODdWMTcuMDE2MUMwIDE3LjY3NDkgMC4yNjQ4OTcgMTguMzA2NyAwLjczNjQxNyAxOC43NzI1QzEuMjA3OTQgMTkuMjM4MyAxLjg0NzQ2IDE5LjUgMi41MTQyOSAxOS41SDEzLjQ4NTdDMTQuMTUyNSAxOS41IDE0Ljc5MjEgMTkuMjM4MyAxNS4yNjM2IDE4Ljc3MjVDMTUuNzM1MSAxOC4zMDY3IDE2IDE3LjY3NDkgMTYgMTcuMDE2MVYxN0wxNiAxNi43TDE0LjYyODYgMTUuMzgxM0wxMi4xNDE3IDEyLjkyNDVDMTIuMDc2NyAxMi44NTU5IDExLjk5NyAxMi44MDI0IDExLjkwODQgMTIuNzY4QzExLjgxOTkgMTIuNzMzNyAxMS43MjQ2IDEyLjcxOTIgMTEuNjI5NyAxMi43MjU4QzExLjUzMzcgMTIuNzMxMyAxMS40Mzk3IDEyLjc1NTcgMTEuMzUzNCAxMi43OTc2QzExLjI2NyAxMi44Mzk1IDExLjE5IDEyLjg5OCAxMS4xMjY5IDEyLjk2OTdMOS45NDc0MyAxNC4zNjk3TDUuNzQxNzEgMTAuMjE0OEM1LjY3OTc0IDEwLjE0OTggNS42MDQ1MSAxMC4wOTg0IDUuNTIwOTkgMTAuMDY0MkM1LjQzNzQ2IDEwLjAyOTkgNS4zNDc1NCAxMC4wMTM1IDUuMjU3MTQgMTAuMDE2MUM1LjE2MTExIDEwLjAyMTYgNS4wNjcxNiAxMC4wNDYxIDQuOTgwODEgMTAuMDg3OUM0Ljg5NDQ2IDEwLjEyOTggNC44MTc0NCAxMC4xODgzIDQuNzU0MjkgMTAuMjZMMS4zNzE0MyAxNC4yNDMyVjcuOTgzODdDMS4zNzE0MyA3LjY4NDQzIDEuNDkxODQgNy4zOTcyNiAxLjcwNjE2IDcuMTg1NTJDMS45MjA0OSA2Ljk3Mzc5IDIuMjExMTggNi44NTQ4NCAyLjUxNDI5IDYuODU0ODRINy4xMDk2OVY2LjE3NzQyVjUuNUgyLjUxNDI5Wk0xLjM3MTQgMTcuMDE2VjE2LjM1NjdMNS4zMDI4MyAxMS42OTZMOS4wNjk2OCAxNS40MTczTDYuNzY1NjkgMTguMTI3SDIuNTE0MjZDMi4yMTQyOSAxOC4xMjcxIDEuOTI2MzQgMTguMDEwNiAxLjcxMjUzIDE3LjgwMjdDMS40OTg3MiAxNy41OTQ5IDEuMzc2MiAxNy4zMTIzIDEuMzcxNCAxNy4wMTZaTTguNTQ4NTQgMTguMTQ1MUwxMS43MDI4IDE0LjQwNTdMMTQuNTgyOCAxNy4yNTA5QzE0LjUzMjMgMTcuNTAyIDE0LjM5NTQgMTcuNzI4MiAxNC4xOTU1IDE3Ljg5MTFDMTMuOTk1NiAxOC4wNTQgMTMuNzQ0OSAxOC4xNDM4IDEzLjQ4NTcgMTguMTQ1MUgxMS4wMTcxSDguNTQ4NTRaIiBmaWxsPSIjOEQ5MkE1Ii8+CjxwYXRoIGQ9Ik0xNC4zNDY3IDkuNjMzNTVMMTEuNDAwMyAxMC41MzM0QzExLjMyMzkgMTAuNTU2NyAxMS4yNTY4IDEwLjYwNTEgMTEuMjA5MSAxMC42NzEyQzExLjE2MTMgMTAuNzM3NCAxMS4xMzU1IDEwLjgxNzkgMTEuMTM1NSAxMC45MDA1QzExLjEzNTUgMTAuOTgzMiAxMS4xNjEzIDExLjA2MzYgMTEuMjA5MSAxMS4xMjk4QzExLjI1NjggMTEuMTk2IDExLjMyMzkgMTEuMjQ0NCAxMS40MDAzIDExLjI2NzdMMTQuMzQ2NyAxMi4xNjc1TDE1LjIxMzggMTUuMjI1M0MxNS4yMzYzIDE1LjMwNDYgMTUuMjgyOSAxNS4zNzQyIDE1LjM0NjcgMTUuNDIzN0MxNS40MTA0IDE1LjQ3MzIgMTUuNDg3OSAxNS41IDE1LjU2NzYgMTUuNUMxNS42NDcyIDE1LjUgMTUuNzI0NyAxNS40NzMyIDE1Ljc4ODUgMTUuNDIzN0MxNS44NTIzIDE1LjM3NDIgMTUuODk4OSAxNS4zMDQ2IDE1LjkyMTMgMTUuMjI1M0wxNi43ODg4IDEyLjE2NzVMMTkuNzM1MiAxMS4yNjc3QzE5LjgxMTYgMTEuMjQ0NCAxOS44Nzg3IDExLjE5NiAxOS45MjY1IDExLjEyOThDMTkuODc4NyAxMC42MDUxIDE5LjgxMTYgMTAuNTU2NyAxOS43MzUyIDEwLjUzMzRMMTYuNzg4OCA5LjYzMzU1TDE1LjkyMTMgNi41NzU4M0MxNS44OTg5IDYuNDk2NTEgMTUuODUyMyA2LjQyNjg4IDE1Ljc4ODUgNi4zNzczNEMxNS43MjQ4IDYuMzI3ODEgMTUuNjQ3MiA2LjMwMTA0IDE1LjU2NzYgNi4zMDEwNEMxNS40ODc5IDYuMzAxMDQgMTUuNDEwNCA2LjMyNzgxIDE1LjM0NjcgNi4zNzczNEMxNS4yODI5IDYuNDI2ODggMTUuMjM2MyA2LjQ5NjUxIDE1LjIxMzggNi41NzU4M0wxNC4zNDY3IDkuNjMzNTVaIiBmaWxsPSIjOEQ5MkE1Ii8+Cjwvc3ZnPg=="),id:"aiImagePrompt"},{label:"Blockquote",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTcuNjI1IDEzQzcuMTI1IDEzIDYuNzI1IDEyLjg1IDYuNDI1IDEyLjU1QzYuMTQxNjcgMTIuMjMzMyA2IDExLjggNiAxMS4yNUM2IDEwLjAzMzMgNi4zNzUgOC45NjY2NyA3LjEyNSA4LjA1QzcuNDU4MzMgNy42MTY2NyA3LjgzMzMzIDcuMjY2NjcgOC4yNSA3TDkgNy44NzVDOC43NjY2NyA4LjA0MTY3IDguNTMzMzMgOC4yNTgzMyA4LjMgOC41MjVDNy44NSA5LjAwODMzIDcuNjI1IDkuNSA3LjYyNSAxMEM4LjAwODMzIDEwIDguMzMzMzMgMTAuMTQxNyA4LjYgMTAuNDI1QzguODY2NjcgMTAuNzA4MyA5IDExLjA2NjcgOSAxMS41QzkgMTEuOTMzMyA4Ljg2NjY3IDEyLjI5MTcgOC42IDEyLjU3NUM4LjMzMzMzIDEyLjg1ODMgOC4wMDgzMyAxMyA3LjYyNSAxM1pNMTEuNjI1IDEzQzExLjEyNSAxMyAxMC43MjUgMTIuODUgMTAuNDI1IDEyLjU1QzEwLjE0MTcgMTIuMjMzMyAxMCAxMS44IDEwIDExLjI1QzEwIDEwLjAzMzMgMTAuMzc1IDguOTY2NjcgMTEuMTI1IDguMDVDMTEuNDU4MyA3LjYxNjY3IDExLjgzMzMgNy4yNjY2NyAxMi4yNSA3TDEzIDcuODc1QzEyLjc2NjcgOC4wNDE2NyAxMi41MzMzIDguMjU4MzMgMTIuMyA4LjUyNUMxMS44NSA5LjAwODMzIDExLjYyNSA5LjUgMTEuNjI1IDEwQzEyLjAwODMgMTAgMTIuMzMzMyAxMC4xNDE3IDEyLjYgMTAuNDI1QzEyLjg2NjcgMTAuNzA4MyAxMyAxMS4wNjY3IDEzIDExLjVDMTMgMTEuOTMzMyAxMi44NjY3IDEyLjI5MTcgMTIuNiAxMi41NzVDMTIuMzMzMyAxMi44NTgzIDEyLjAwODMgMTMgMTEuNjI1IDEzWiIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSIxNSIgeT0iMTQiIHdpZHRoPSIxMSIgaGVpZ2h0PSIxIiBmaWxsPSIjMjIyMjIyIi8+CjxyZWN0IHg9IjYiIHk9IjE4IiB3aWR0aD0iMjAiIGhlaWdodD0iMSIgZmlsbD0iIzIyMjIyMiIvPgo8cmVjdCB4PSI2IiB5PSIyMiIgd2lkdGg9IjIwIiBoZWlnaHQ9IjEiIGZpbGw9IiMyMjIyMjIiLz4KPC9zdmc+Cg=="),id:"blockquote"},{label:"Code Block",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEzLjQgMjAuNkw4LjggMTZMMTMuNCAxMS40TDEyIDEwTDYgMTZMMTIgMjJMMTMuNCAyMC42Wk0xOC42IDIwLjZMMjMuMiAxNkwxOC42IDExLjRMMjAgMTBMMjYgMTZMMjAgMjJMMTguNiAyMC42WiIgZmlsbD0iYmxhY2siLz4KPC9zdmc+Cg=="),id:"codeBlock"},{label:"Horizontal Line",icon:Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3QgeD0iNiIgeT0iMTUiIHdpZHRoPSIyMCIgaGVpZ2h0PSIyIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"),id:"horizontalRule"}],O1],rte={horizontalRule:!0,table:!0,image:!0,video:!0};function Ti(n){this.content=n}function nP(n,t,e){for(let i=0;;i++){if(i==n.childCount||i==t.childCount)return n.childCount==t.childCount?null:e;let r=n.child(i),o=t.child(i);if(r!=o){if(!r.sameMarkup(o))return e;if(r.isText&&r.text!=o.text){for(let s=0;r.text[s]==o.text[s];s++)e++;return e}if(r.content.size||o.content.size){let s=nP(r.content,o.content,e+1);if(null!=s)return s}e+=r.nodeSize}else e+=r.nodeSize}}function iP(n,t,e,i){for(let r=n.childCount,o=t.childCount;;){if(0==r||0==o)return r==o?null:{a:e,b:i};let s=n.child(--r),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:e,b:i};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c!rte[n.id]),Ti.prototype={constructor:Ti,find:function(n){for(var t=0;t>1}},Ti.from=function(n){if(n instanceof Ti)return n;var t=[];if(n)for(var e in n)t.push(e,n[e]);return new Ti(t)};class G{constructor(t,e){if(this.content=t,this.size=e||0,null==e)for(let i=0;it&&!1!==i(l,r+a,o||null,s)&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,e-u),i,r+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,e,i,r){let o="",s=!0;return this.nodesBetween(t,e,(a,l)=>{a.isText?(o+=a.text.slice(Math.max(t,l)-l,e-l),s=!i):a.isLeaf?(r?o+="function"==typeof r?r(a):r:a.type.spec.leafText&&(o+=a.type.spec.leafText(a)),s=!i):!s&&a.isBlock&&(o+=i,s=!0)},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let e=this.lastChild,i=t.firstChild,r=this.content.slice(),o=0;for(e.isText&&e.sameMarkup(i)&&(r[r.length-1]=e.withText(e.text+i.text),o=1);ot)for(let o=0,s=0;st&&((se)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,e-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,e-s-1))),i.push(a),r+=a.nodeSize),s=l}return new G(i,r)}cutByIndex(t,e){return t==e?G.empty:0==t&&e==this.content.length?this:new G(this.content.slice(t,e))}replaceChild(t,e){let i=this.content[t];if(i==e)return this;let r=this.content.slice(),o=this.size+e.nodeSize-i.nodeSize;return r[t]=e,new G(r,o)}addToStart(t){return new G([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new G(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let e=0;ethis.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let i=0,r=0;;i++){let s=r+this.child(i).nodeSize;if(s>=t)return s==t||e>0?V_(i+1,s):V_(i,r);r=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,e){if(!e)return G.empty;if(!Array.isArray(e))throw new RangeError("Invalid input for Fragment.fromJSON");return new G(e.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return G.empty;let e,i=0;for(let r=0;r{class n{constructor(e,i){this.type=e,this.attrs=i}addToSet(e){let i,r=!1;for(let o=0;othis.type.rank&&(i||(i=e.slice(0,o)),i.push(this),r=!0),i&&i.push(s)}}return i||(i=e.slice()),r||i.push(this),i}removeFromSet(e){for(let i=0;ir.type.rank-o.type.rank),i}}return n.none=[],n})();class B_ extends Error{}class ie{constructor(t,e,i){this.content=t,this.openStart=e,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,e){let i=oP(this.content,t+this.openStart,e);return i&&new ie(i,this.openStart,this.openEnd)}removeBetween(t,e){return new ie(rP(this.content,t+this.openStart,e+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,e){if(!e)return ie.empty;let i=e.openStart||0,r=e.openEnd||0;if("number"!=typeof i||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new ie(G.fromJSON(t,e.content),i,r)}static maxOpen(t,e=!0){let i=0,r=0;for(let o=t.firstChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=t.lastChild;o&&!o.isLeaf&&(e||!o.type.spec.isolating);o=o.lastChild)r++;return new ie(t,i,r)}}function rP(n,t,e){let{index:i,offset:r}=n.findIndex(t),o=n.maybeChild(i),{index:s,offset:a}=n.findIndex(e);if(r==t||o.isText){if(a!=e&&!n.child(s).isText)throw new RangeError("Removing non-flat range");return n.cut(0,t).append(n.cut(e))}if(i!=s)throw new RangeError("Removing non-flat range");return n.replaceChild(i,o.copy(rP(o.content,t-r-1,e-r-1)))}function oP(n,t,e,i){let{index:r,offset:o}=n.findIndex(t),s=n.maybeChild(r);if(o==t||s.isText)return i&&!i.canReplace(r,r,e)?null:n.cut(0,t).append(e).append(n.cut(t));let a=oP(s.content,t-o-1,e);return a&&n.replaceChild(r,s.copy(a))}function ste(n,t,e){if(e.openStart>n.depth)throw new B_("Inserted content deeper than insertion position");if(n.depth-e.openStart!=t.depth-e.openEnd)throw new B_("Inconsistent open depths");return sP(n,t,e,0)}function sP(n,t,e,i){let r=n.index(i),o=n.node(i);if(r==t.index(i)&&i=0;o--)r=t.node(o).copy(G.from(r));return{start:r.resolveNoCache(n.openStart+e),end:r.resolveNoCache(r.content.size-n.openEnd-e)}}(e,n);return ac(o,lP(n,s,a,t,i))}{let s=n.parent,a=s.content;return ac(s,a.cut(0,n.parentOffset).append(e.content).append(a.cut(t.parentOffset)))}}return ac(o,U_(n,t,i))}function aP(n,t){if(!t.type.compatibleContent(n.type))throw new B_("Cannot join "+t.type.name+" onto "+n.type.name)}function A1(n,t,e){let i=n.node(e);return aP(i,t.node(e)),i}function sc(n,t){let e=t.length-1;e>=0&&n.isText&&n.sameMarkup(t[e])?t[e]=n.withText(t[e].text+n.text):t.push(n)}function yp(n,t,e,i){let r=(t||n).node(e),o=0,s=t?t.index(e):r.childCount;n&&(o=n.index(e),n.depth>e?o++:n.textOffset&&(sc(n.nodeAfter,i),o++));for(let a=o;ar&&A1(n,t,r+1),s=i.depth>r&&A1(e,i,r+1),a=[];return yp(null,n,r,a),o&&s&&t.index(r)==e.index(r)?(aP(o,s),sc(ac(o,lP(n,t,e,i,r+1)),a)):(o&&sc(ac(o,U_(n,t,r+1)),a),yp(t,e,r,a),s&&sc(ac(s,U_(e,i,r+1)),a)),yp(i,null,r,a),new G(a)}function U_(n,t,e){let i=[];return yp(null,n,e,i),n.depth>e&&sc(ac(A1(n,t,e+1),U_(n,t,e+1)),i),yp(t,null,e,i),new G(i)}ie.empty=new ie(G.empty,0,0);class vp{constructor(t,e,i){this.pos=t,this.path=e,this.parentOffset=i,this.depth=e.length/3-1}resolveDepth(t){return null==t?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[3*this.resolveDepth(t)]}index(t){return this.path[3*this.resolveDepth(t)+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t!=this.depth||this.textOffset?1:0)}start(t){return 0==(t=this.resolveDepth(t))?0:this.path[3*t-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]}after(t){if(!(t=this.resolveDepth(t)))throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[3*t-1]+this.path[3*t].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,e=this.index(this.depth);if(e==t.childCount)return null;let i=this.pos-this.path[this.path.length-1],r=t.child(e);return i?t.child(e).cut(i):r}get nodeBefore(){let t=this.index(this.depth),e=this.pos-this.path[this.path.length-1];return e?this.parent.child(t).cut(0,e):0==t?null:this.parent.child(t-1)}posAtIndex(t,e){e=this.resolveDepth(e);let i=this.path[3*e],r=0==e?0:this.path[3*e-1]+1;for(let o=0;o0;e--)if(this.start(e)<=t&&this.end(e)>=t)return e;return 0}blockRange(t=this,e){if(t.pos=0;i--)if(t.pos<=this.end(i)&&(!e||e(this.node(i))))return new H_(this,t,i);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos=0&&e<=t.content.size))throw new RangeError("Position "+e+" out of range");let i=[],r=0,o=e;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(i.push(s,a,r+l),!c||(s=s.child(a),s.isText))break;o=c-1,r+=l+1}return new vp(e,i,o)}static resolveCached(t,e){for(let r=0;rt&&this.nodesBetween(t,e,o=>(i.isInSet(o.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),function cP(n,t){for(let e=n.length-1;e>=0;e--)t=n[e].type.name+"("+t+")";return t}(this.marks,t)}contentMatchAt(t){let e=this.type.contentMatch.matchFragment(this.content,0,t);if(!e)throw new Error("Called contentMatchAt on a node with invalid content");return e}canReplace(t,e,i=G.empty,r=0,o=i.childCount){let s=this.contentMatchAt(t).matchFragment(i,r,o),a=s&&s.matchFragment(this.content,e);if(!a||!a.validEnd)return!1;for(let l=r;le.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let t={type:this.type.name};for(let e in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(e=>e.toJSON())),t}static fromJSON(t,e){if(!e)throw new RangeError("Invalid input for Node.fromJSON");let i=null;if(e.marks){if(!Array.isArray(e.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=e.marks.map(t.markFromJSON)}if("text"==e.type){if("string"!=typeof e.text)throw new RangeError("Invalid text node in JSON");return t.text(e.text,i)}let r=G.fromJSON(t,e.content);return t.nodeType(e.type).create(e.attrs,r,i)}}Xo.prototype.text=void 0;class lc{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,e){let i=new ute(t,e);if(null==i.next)return lc.empty;let r=uP(i);i.next&&i.err("Unexpected trailing text");let o=function _te(n){let t=Object.create(null);return function e(i){let r=[];i.forEach(s=>{n[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u{c||r.push([a,c=[]]),-1==c.indexOf(u)&&c.push(u)})})});let o=t[i.join(",")]=new lc(i.indexOf(n.length-1)>-1);for(let s=0;sl.concat(o(c,a)),[]);if("seq"!=s.type){if("star"==s.type){let l=e();return i(a,l),r(o(s.expr,l),l),[i(l)]}if("plus"==s.type){let l=e();return r(o(s.expr,a),l),r(o(s.expr,l),l),[i(l)]}if("opt"==s.type)return[i(a)].concat(o(s.expr,a));if("range"==s.type){let l=a;for(let c=0;cl.to=a)}}(r));return function yte(n,t){for(let e=0,i=[n];ec.createAndFill()));for(let c=0;c=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];return function e(i){t.push(i);for(let r=0;r{let o=r+(i.validEnd?"*":" ")+" ";for(let s=0;s"+t.indexOf(i.next[s].next);return o}).join("\n")}}lc.empty=new lc(!0);class ute{constructor(t,e){this.string=t,this.nodeTypes=e,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function uP(n){let t=[];do{t.push(dte(n))}while(n.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function dte(n){let t=[];do{t.push(hte(n))}while(n.next&&")"!=n.next&&"|"!=n.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function hte(n){let t=function mte(n){if(n.eat("(")){let t=uP(n);return n.eat(")")||n.err("Missing closing paren"),t}if(!/\W/.test(n.next)){let t=function fte(n,t){let e=n.nodeTypes,i=e[t];if(i)return[i];let r=[];for(let o in e){let s=e[o];s.groups.indexOf(t)>-1&&r.push(s)}return 0==r.length&&n.err("No node type or group '"+t+"' found"),r}(n,n.next).map(e=>(null==n.inline?n.inline=e.isInline:n.inline!=e.isInline&&n.err("Mixing inline and block content"),{type:"name",value:e}));return n.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}n.err("Unexpected token '"+n.next+"'")}(n);for(;;)if(n.eat("+"))t={type:"plus",expr:t};else if(n.eat("*"))t={type:"star",expr:t};else if(n.eat("?"))t={type:"opt",expr:t};else{if(!n.eat("{"))break;t=pte(n,t)}return t}function dP(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let t=Number(n.next);return n.pos++,t}function pte(n,t){let e=dP(n),i=e;return n.eat(",")&&(i="}"!=n.next?dP(n):-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:e,max:i,expr:t}}function hP(n,t){return t-n}function pP(n,t){let e=[];return function i(r){let o=n[r];if(1==o.length&&!o[0].term)return i(o[0].to);e.push(r);for(let s=0;si[o]=new G_(o,r++,e,s)),i}removeFromSet(t){for(var e=0;e-1}}class rd{constructor(t,e){this.schema=t,this.rules=e,this.tags=[],this.styles=[],e.forEach(i=>{i.tag?this.tags.push(i):i.style&&this.styles.push(i)}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let r=t.nodes[i.node];return r.contentMatch.matchType(r)})}parse(t,e={}){let i=new CP(this,e,!1);return i.addAll(t,e.from,e.to),i.finish()}parseSlice(t,e={}){let i=new CP(this,e,!0);return i.addAll(t,e.from,e.to),ie.maxOpen(i.finish())}matchTag(t,e,i){for(let r=i?this.tags.indexOf(i)+1:0;rt.length&&(61!=a.charCodeAt(t.length)||a.slice(t.length+1)!=e))){if(s.getAttrs){let l=s.getAttrs(e);if(!1===l)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let e=[];function i(r){let o=null==r.priority?50:r.priority,s=0;for(;s{i(s=wP(s)),s.mark||s.ignore||s.clearMark||(s.mark=r)})}for(let r in t.nodes){let o=t.nodes[r].spec.parseDOM;o&&o.forEach(s=>{i(s=wP(s)),s.node||s.ignore||s.mark||(s.node=r)})}return e}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new rd(t,rd.schemaRules(t)))}}const yP={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Cte={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},vP={ol:!0,ul:!0};function bP(n,t,e){return null!=t?(t?1:0)|("full"===t?2:0):n&&"pre"==n.whitespace?3:-5&e}class Y_{constructor(t,e,i,r,o,s,a){this.type=t,this.attrs=e,this.marks=i,this.pendingMarks=r,this.solid=o,this.options=a,this.content=[],this.activeMarks=qt.none,this.stashMarks=[],this.match=s||(4&a?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let e=this.type.contentMatch.fillBefore(G.from(t));if(!e){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(e)}return this.match.findWrapping(t.type)}finish(t){if(!(1&this.options)){let r,i=this.content[this.content.length-1];if(i&&i.isText&&(r=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==r[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-r[0].length))}}let e=G.from(this.content);return!t&&this.match&&(e=e.append(this.match.fillBefore(G.empty,!0))),this.type?this.type.create(this.attrs,e,this.marks):e}popFromStashMark(t){for(let e=this.stashMarks.length-1;e>=0;e--)if(t.eq(this.stashMarks[e]))return this.stashMarks.splice(e,1)[0]}applyPending(t){for(let e=0,i=this.pendingMarks;e{s.clearMark(a)&&(i=a.addToSet(i))}):e=this.parser.schema.marks[s.mark].create(s.attrs).addToSet(e),!1!==s.consuming)break;o=s}return[e,i]}addElementByRule(t,e,i){let r,o,s;e.node?(o=this.parser.schema.nodes[e.node],o.isLeaf?this.insertNode(o.create(e.attrs))||this.leafFallback(t):r=this.enter(o,e.attrs||null,e.preserveWhitespace)):(s=this.parser.schema.marks[e.mark].create(e.attrs),this.addPendingMark(s));let a=this.top;if(o&&o.isLeaf)this.findInside(t);else if(i)this.addElement(t,i);else if(e.getContent)this.findInside(t),e.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l));else{let l=t;"string"==typeof e.contentElement?l=t.querySelector(e.contentElement):"function"==typeof e.contentElement?l=e.contentElement(t):e.contentElement&&(l=e.contentElement),this.findAround(t,l,!0),this.addAll(l)}r&&this.sync(a)&&this.open--,s&&this.removePendingMark(s,a)}addAll(t,e,i){let r=e||0;for(let o=e?t.childNodes[e]:t.firstChild,s=null==i?null:t.childNodes[i];o!=s;o=o.nextSibling,++r)this.findAtPoint(t,r),this.addDOM(o);this.findAtPoint(t,r)}findPlace(t){let e,i;for(let r=this.open;r>=0;r--){let o=this.nodes[r],s=o.findWrapping(t);if(s&&(!e||e.length>s.length)&&(e=s,i=o,!s.length)||o.solid)break}if(!e)return!1;this.sync(i);for(let r=0;rthis.open){for(;e>this.open;e--)this.nodes[e-1].content.push(this.nodes[e].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(t){for(let e=this.open;e>=0;e--)if(this.nodes[e]==t)return this.open=e,!0;return!1}get currentPos(){this.closeExtra();let t=0;for(let e=this.open;e>=0;e--){let i=this.nodes[e].content;for(let r=i.length-1;r>=0;r--)t+=i[r].nodeSize;e&&t++}return t}findAtPoint(t,e){if(this.find)for(let i=0;i-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let e=t.split("/"),i=this.options.context,r=!(this.isOpen||i&&i.parent.type!=this.nodes[0].type),o=(r?0:1)-(i?i.depth+1:0),s=(a,l)=>{for(;a>=0;a--){let c=e[a];if(""==c){if(a==e.length-1||0==a)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||0==l&&r?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&-1==u.groups.indexOf(c))return!1;l--}}return!0};return s(e.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let e=t.depth;e>=0;e--){let i=t.node(e).contentMatchAt(t.indexAfter(e)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let e in this.parser.schema.nodes){let i=this.parser.schema.nodes[e];if(i.isTextblock&&i.defaultAttrs)return i}}addPendingMark(t){let e=function Mte(n,t){for(let e=0;e=0;i--){let r=this.nodes[i];if(r.pendingMarks.lastIndexOf(t)>-1)r.pendingMarks=t.removeFromSet(r.pendingMarks);else{r.activeMarks=t.removeFromSet(r.activeMarks);let s=r.popFromStashMark(t);s&&r.type&&r.type.allowsMarkType(s.type)&&(r.activeMarks=s.addToSet(r.activeMarks))}if(r==e)break}}}function Ste(n,t){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,t)}function wP(n){let t={};for(let e in n)t[e]=n[e];return t}function Tte(n,t){let e=t.schema.nodes;for(let i in e){let r=e[i];if(!r.allowsMarkType(n))continue;let o=[],s=a=>{o.push(a);for(let l=0;l{if(o.length||s.marks.length){let a=0,l=0;for(;a=0;r--){let o=this.serializeMark(t.marks[r],t.isInline,e);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(t,e,i={}){let r=this.marks[t.type.name];return r&&es.renderSpec(P1(i),r(t,e))}static renderSpec(t,e,i=null){if("string"==typeof e)return{dom:t.createTextNode(e)};if(null!=e.nodeType)return{dom:e};if(e.dom&&null!=e.dom.nodeType)return e;let r=e[0],o=r.indexOf(" ");o>0&&(i=r.slice(0,o),r=r.slice(o+1));let s,a=i?t.createElementNS(i,r):t.createElement(r),l=e[1],c=1;if(l&&"object"==typeof l&&null==l.nodeType&&!Array.isArray(l)){c=2;for(let u in l)if(null!=l[u]){let d=u.indexOf(" ");d>0?a.setAttributeNS(u.slice(0,d),u.slice(d+1),l[u]):a.setAttribute(u,l[u])}}for(let u=c;uc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}{let{dom:h,contentDOM:p}=es.renderSpec(t,d,i);if(a.appendChild(h),p){if(s)throw new RangeError("Multiple content holes");s=p}}}return{dom:a,contentDOM:s}}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new es(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let e=SP(t.nodes);return e.text||(e.text=i=>i.text),e}static marksFromSchema(t){return SP(t.marks)}}function SP(n){let t={};for(let e in n){let i=n[e].spec.toDOM;i&&(t[e]=i)}return t}function P1(n){return n.document||window.document}const TP=Math.pow(2,16);function Ete(n,t){return n+t*TP}function MP(n){return 65535&n}class R1{constructor(t,e,i){this.pos=t,this.delInfo=e,this.recover=i}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class eo{constructor(t,e=!1){if(this.ranges=t,this.inverted=e,!t.length&&eo.empty)return eo.empty}recover(t){let e=0,i=MP(t);if(!this.inverted)for(let r=0;rt)break;let c=this.ranges[a+o],u=this.ranges[a+s],d=l+c;if(t<=d){let p=l+r+((c?t==l?-1:t==d?1:e:e)<0?0:u);if(i)return p;let f=t==(e<0?l:d)?null:Ete(a/3,t-l),m=t==l?2:t==d?1:4;return(e<0?t!=l:t!=d)&&(m|=8),new R1(p,m,f)}r+=u-c}return i?t+r:new R1(t+r,0,null)}touches(t,e){let i=0,r=MP(e),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;at)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*r)return!0;i+=this.ranges[a+s]-c}return!1}forEach(t){let e=this.inverted?2:1,i=this.inverted?1:2;for(let r=0,o=0;r=0;e--){let r=t.getMirror(e);this.appendMap(t.maps[e].invert(),null!=r&&r>e?i-r-1:void 0)}}invert(){let t=new od;return t.appendMappingInverted(this),t}map(t,e=1){if(this.mirror)return this._map(t,e,!0);for(let i=this.from;io&&ls.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,r),e.openStart,e.openEnd);return On.fromReplace(t,this.from,this.to,o)}invert(){return new ts(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new La(e.pos,i.pos,this.mark)}merge(t){return t instanceof La&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new La(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new La(e.from,e.to,t.markFromJSON(e.mark))}}ei.jsonID("addMark",La);class ts extends ei{constructor(t,e,i){super(),this.from=t,this.to=e,this.mark=i}apply(t){let e=t.slice(this.from,this.to),i=new ie(j1(e.content,r=>r.mark(this.mark.removeFromSet(r.marks)),t),e.openStart,e.openEnd);return On.fromReplace(t,this.from,this.to,i)}invert(){return new La(this.from,this.to,this.mark)}map(t){let e=t.mapResult(this.from,1),i=t.mapResult(this.to,-1);return e.deleted&&i.deleted||e.pos>=i.pos?null:new ts(e.pos,i.pos,this.mark)}merge(t){return t instanceof ts&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new ts(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new ts(e.from,e.to,t.markFromJSON(e.mark))}}ei.jsonID("removeMark",ts);class Pa extends ei{constructor(t,e){super(),this.pos=t,this.mark=e}apply(t){let e=t.nodeAt(this.pos);if(!e)return On.fail("No node at mark step's position");let i=e.type.create(e.attrs,null,this.mark.addToSet(e.marks));return On.fromReplace(t,this.pos,this.pos+1,new ie(G.from(i),0,e.isLeaf?0:1))}invert(t){let e=t.nodeAt(this.pos);if(e){let i=this.mark.addToSet(e.marks);if(i.length==e.marks.length){for(let r=0;ri.pos?null:new ti(e.pos,i.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,e){if("number"!=typeof e.from||"number"!=typeof e.to||"number"!=typeof e.gapFrom||"number"!=typeof e.gapTo||"number"!=typeof e.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ti(e.from,e.to,e.gapFrom,e.gapTo,ie.fromJSON(t,e.slice),e.insert,!!e.structure)}}function V1(n,t,e){let i=n.resolve(t),r=e-t,o=i.depth;for(;r>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,r--;if(r>0){let s=i.node(o).maybeChild(i.indexAfter(o));for(;r>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,r--}}return!1}function Ate(n,t,e){return(0==t||n.canReplace(t,n.childCount))&&(e==n.childCount||n.canReplace(0,e))}function ad(n){let e=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let i=n.depth;;--i){let r=n.$from.node(i),o=n.$from.index(i),s=n.$to.indexAfter(i);if(io;c--,u--){let d=r.node(c),h=r.index(c);if(d.type.spec.isolating)return!1;let p=d.content.cutByIndex(h,d.childCount),f=i&&i[u+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(p))return!1}let a=r.indexAfter(o),l=i&&i[0];return r.node(o).canReplaceWith(a,a,l?l.type:r.node(o+1).type)}function Ra(n,t){let e=n.resolve(t),i=e.index();return kP(e.nodeBefore,e.nodeAfter)&&e.parent.canReplace(i,i+1)}function kP(n,t){return!(!n||!t||n.isLeaf||!n.canAppend(t))}function AP(n,t,e=-1){let i=n.resolve(t);for(let r=i.depth;;r--){let o,s,a=i.index(r);if(r==i.depth?(o=i.nodeBefore,s=i.nodeAfter):e>0?(o=i.node(r+1),a++,s=i.node(r).maybeChild(a)):(o=i.node(r).maybeChild(a-1),s=i.node(r+1)),o&&!o.isTextblock&&kP(o,s)&&i.node(r).canReplace(a,a+1))return t;if(0==r)break;t=e<0?i.before(r):i.after(r)}}function NP(n,t,e){let i=n.resolve(t);if(!e.content.size)return t;let r=e.content;for(let o=0;o=0;s--){let a=s==i.depth?0:i.pos<=(i.start(s+1)+i.end(s+1))/2?-1:1,l=i.index(s)+(a>0?1:0),c=i.node(s),u=!1;if(1==o)u=c.canReplace(l,l,r);else{let d=c.contentMatchAt(l).findWrapping(r.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return 0==a?i.pos:a<0?i.before(s+1):i.after(s+1)}return null}function B1(n,t,e=t,i=ie.empty){if(t==e&&!i.size)return null;let r=n.resolve(t),o=n.resolve(e);return LP(r,o,i)?new Mi(t,e,i):new Hte(r,o,i).fit()}function LP(n,t,e){return!e.openStart&&!e.openEnd&&n.start()==t.start()&&n.parent.canReplace(n.index(),t.index(),e.content)}ei.jsonID("replaceAround",ti);class Hte{constructor(t,e,i){this.$from=t,this.$to=e,this.unplaced=i,this.frontier=[],this.placed=G.empty;for(let r=0;r<=t.depth;r++){let o=t.node(r);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(r))})}for(let r=t.depth;r>0;r--)this.placed=G.from(t.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),e=this.placed.size-this.depth-this.$from.depth,i=this.$from,r=this.close(t<0?this.$to:i.doc.resolve(t));if(!r)return null;let o=this.placed,s=i.depth,a=r.depth;for(;s&&a&&1==o.childCount;)o=o.firstChild.content,s--,a--;let l=new ie(o,s,a);return t>-1?new ti(i.pos,t,this.$to.pos,this.$to.end(),l,e):l.size||i.pos!=this.$to.pos?new Mi(i.pos,r.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let e=this.unplaced.content,i=0,r=this.unplaced.openEnd;i1&&(r=0),o.type.spec.isolating&&r<=i){t=i;break}e=o.content}for(let e=1;e<=2;e++)for(let i=1==e?t:this.unplaced.openStart;i>=0;i--){let r,o=null;i?(o=U1(this.unplaced.content,i-1).firstChild,r=o.content):r=this.unplaced.content;let s=r.firstChild;for(let a=this.depth;a>=0;a--){let u,{type:l,match:c}=this.frontier[a],d=null;if(1==e&&(s?c.matchType(s.type)||(d=c.fillBefore(G.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(2==e&&s&&(u=c.findWrapping(s.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=U1(t,e);return!(!r.childCount||r.firstChild.isLeaf||(this.unplaced=new ie(t,e+1,Math.max(i,r.size+e>=t.size-i?e+1:0)),0))}dropNode(){let{content:t,openStart:e,openEnd:i}=this.unplaced,r=U1(t,e);if(r.childCount<=1&&e>0){let o=t.size-e<=e+r.size;this.unplaced=new ie(Cp(t,e-1,1),e-1,o?e-1:i)}else this.unplaced=new ie(Cp(t,e,1),e,i)}placeNodes({sliceDepth:t,frontierDepth:e,parent:i,inject:r,wrap:o}){for(;this.depth>e;)this.closeFrontierNode();if(o)for(let m=0;m1||0==l||m.content.size)&&(d=_,u.push(PP(m.mark(h.allowedMarks(m.marks)),1==c?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=wp(this.placed,e,G.from(u)),this.frontier[e].match=d,f&&p<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,_=a;m1&&r==this.$to.end(--i);)++r;return r}findCloseLevel(t){e:for(let e=Math.min(this.depth,t.depth);e>=0;e--){let{match:i,type:r}=this.frontier[e],o=e=0;a--){let{match:l,type:c}=this.frontier[a],u=H1(t,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:e,fit:s,move:o?t.doc.resolve(t.after(e+1)):t}}}}close(t){let e=this.findCloseLevel(t);if(!e)return null;for(;this.depth>e.depth;)this.closeFrontierNode();e.fit.childCount&&(this.placed=wp(this.placed,e.depth,e.fit)),t=e.move;for(let i=e.depth+1;i<=t.depth;i++){let r=t.node(i),o=r.type.contentMatch.fillBefore(r.content,!0,t.index(i));this.openFrontierNode(r.type,r.attrs,o)}return t}openFrontierNode(t,e=null,i){let r=this.frontier[this.depth];r.match=r.match.matchType(t),this.placed=wp(this.placed,this.depth,G.from(t.create(e,i))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(G.empty,!0);e.childCount&&(this.placed=wp(this.placed,this.frontier.length,e))}}function Cp(n,t,e){return 0==t?n.cutByIndex(e,n.childCount):n.replaceChild(0,n.firstChild.copy(Cp(n.firstChild.content,t-1,e)))}function wp(n,t,e){return 0==t?n.append(e):n.replaceChild(n.childCount-1,n.lastChild.copy(wp(n.lastChild.content,t-1,e)))}function U1(n,t){for(let e=0;e1&&(i=i.replaceChild(0,PP(i.firstChild,t-1,1==i.childCount?e-1:0))),t>0&&(i=n.type.contentMatch.fillBefore(i).append(i),e<=0&&(i=i.append(n.type.contentMatch.matchFragment(i).fillBefore(G.empty,!0)))),n.copy(i)}function H1(n,t,e,i,r){let o=n.node(t),s=r?n.indexAfter(t):n.index(t);if(s==o.childCount&&!e.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,s);return a&&!function $te(n,t,e){for(let i=e;ii){let o=r.contentMatchAt(0),s=o.fillBefore(n).append(n);n=s.append(o.matchFragment(s).fillBefore(G.empty,!0))}return n}function FP(n,t){let e=[];for(let r=Math.min(n.depth,t.depth);r>=0;r--){let o=n.start(r);if(ot.pos+(t.depth-r)||n.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==n.depth&&r==t.depth&&n.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&e.push(r)}return e}class ld extends ei{constructor(t,e,i){super(),this.pos=t,this.attr=e,this.value=i}apply(t){let e=t.nodeAt(this.pos);if(!e)return On.fail("No node at attribute step's position");let i=Object.create(null);for(let o in e.attrs)i[o]=e.attrs[o];i[this.attr]=this.value;let r=e.type.create(i,null,e.marks);return On.fromReplace(t,this.pos,this.pos+1,new ie(G.from(r),0,e.isLeaf?0:1))}getMap(){return eo.empty}invert(t){return new ld(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let e=t.mapResult(this.pos,1);return e.deletedAfter?null:new ld(e.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,e){if("number"!=typeof e.pos||"string"!=typeof e.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new ld(e.pos,e.attr,e.value)}}ei.jsonID("attr",ld);let cd=class extends Error{};cd=function n(t){let e=Error.call(this,t);return e.__proto__=n.prototype,e},(cd.prototype=Object.create(Error.prototype)).constructor=cd,cd.prototype.name="TransformError";class $1{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new od}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let e=this.maybeStep(t);if(e.failed)throw new cd(e.failed);return this}maybeStep(t){let e=t.apply(this.doc);return e.failed||this.addStep(t,e.doc),e}get docChanged(){return this.steps.length>0}addStep(t,e){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=e}replace(t,e=t,i=ie.empty){let r=B1(this.doc,t,e,i);return r&&this.step(r),this}replaceWith(t,e,i){return this.replace(t,e,new ie(G.from(i),0,0))}delete(t,e){return this.replace(t,e,ie.empty)}insert(t,e){return this.replaceWith(t,t,e)}replaceRange(t,e,i){return function Gte(n,t,e,i){if(!i.size)return n.deleteRange(t,e);let r=n.doc.resolve(t),o=n.doc.resolve(e);if(LP(r,o,i))return n.step(new Mi(t,e,i));let s=FP(r,n.doc.resolve(e));0==s[s.length-1]&&s.pop();let a=-(r.depth+1);s.unshift(a);for(let h=r.depth,p=r.pos-1;h>0;h--,p--){let f=r.node(h).type.spec;if(f.defining||f.definingAsContext||f.isolating)break;s.indexOf(h)>-1?a=h:r.before(h)==p&&s.splice(1,0,-h)}let l=s.indexOf(a),c=[],u=i.openStart;for(let h=i.content,p=0;;p++){let f=h.firstChild;if(c.push(f),p==i.openStart)break;h=f.content}for(let h=u-1;h>=0;h--){let p=c[h].type,f=Wte(p);if(f&&r.node(l).type!=p)u=h;else if(f||!p.isTextblock)break}for(let h=i.openStart;h>=0;h--){let p=(h+u+1)%(i.openStart+1),f=c[p];if(f)for(let m=0;m=0&&(n.replace(t,e,i),!(n.steps.length>d));h--){let p=s[h];p<0||(t=r.before(p),e=o.after(p))}}(this,t,e,i),this}replaceRangeWith(t,e,i){return function qte(n,t,e,i){if(!i.isInline&&t==e&&n.doc.resolve(t).parent.content.size){let r=function Ute(n,t,e){let i=n.resolve(t);if(i.parent.canReplaceWith(i.index(),i.index(),e))return t;if(0==i.parentOffset)for(let r=i.depth-1;r>=0;r--){let o=i.index(r);if(i.node(r).canReplaceWith(o,o,e))return i.before(r+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let r=i.depth-1;r>=0;r--){let o=i.indexAfter(r);if(i.node(r).canReplaceWith(o,o,e))return i.after(r+1);if(o0&&(l||i.node(a-1).canReplace(i.index(a-1),r.indexAfter(a-1))))return n.delete(i.before(a),r.after(a))}for(let s=1;s<=i.depth&&s<=r.depth;s++)if(t-i.start(s)==i.depth-s&&e>i.end(s)&&r.end(s)-e!=r.depth-s)return n.delete(i.before(s),e);n.delete(t,e)}(this,t,e),this}lift(t,e){return function Nte(n,t,e){let{$from:i,$to:r,depth:o}=t,s=i.before(o+1),a=r.after(o+1),l=s,c=a,u=G.empty,d=0;for(let f=o,m=!1;f>e;f--)m||i.index(f)>0?(m=!0,u=G.from(i.node(f).copy(u)),d++):l--;let h=G.empty,p=0;for(let f=o,m=!1;f>e;f--)m||r.after(f+1)=0;s--){if(i.size){let a=e[s].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=G.from(e[s].type.create(e[s].attrs,i))}let r=t.start,o=t.end;n.step(new ti(r,o,r,o,new ie(i,0,0),e.length,!0))}(this,t,e),this}setBlockType(t,e=t,i,r=null){return function Fte(n,t,e,i,r){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=n.steps.length;n.doc.nodesBetween(t,e,(s,a)=>{if(s.isTextblock&&!s.hasMarkup(i,r)&&function jte(n,t,e){let i=n.resolve(t),r=i.index();return i.parent.canReplaceWith(r,r+1,e)}(n.doc,n.mapping.slice(o).map(a),i)){n.clearIncompatible(n.mapping.slice(o).map(a,1),i);let l=n.mapping.slice(o),c=l.map(a,1),u=l.map(a+s.nodeSize,1);return n.step(new ti(c,u,c+1,u-1,new ie(G.from(i.create(r,null,s.marks)),0,0),1,!0)),!1}})}(this,t,e,i,r),this}setNodeMarkup(t,e,i=null,r){return function Vte(n,t,e,i,r){let o=n.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");e||(e=o.type);let s=e.create(i,null,r||o.marks);if(o.isLeaf)return n.replaceWith(t,t+o.nodeSize,s);if(!e.validContent(o.content))throw new RangeError("Invalid content for node type "+e.name);n.step(new ti(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new ie(G.from(s),0,0),1,!0))}(this,t,e,i,r),this}setNodeAttribute(t,e,i){return this.step(new ld(t,e,i)),this}addNodeMark(t,e){return this.step(new Pa(t,e)),this}removeNodeMark(t,e){if(!(e instanceof qt)){let i=this.doc.nodeAt(t);if(!i)throw new RangeError("No node at position "+t);if(!(e=e.isInSet(i.marks)))return this}return this.step(new sd(t,e)),this}split(t,e=1,i){return function zte(n,t,e=1,i){let r=n.doc.resolve(t),o=G.empty,s=G.empty;for(let a=r.depth,l=r.depth-e,c=e-1;a>l;a--,c--){o=G.from(r.node(a).copy(o));let u=i&&i[c];s=G.from(u?u.type.create(u.attrs,s):r.node(a).copy(s))}n.step(new Mi(t,t,new ie(o.append(s),e,e),!0))}(this,t,e,i),this}addMark(t,e,i){return function xte(n,t,e,i){let s,a,r=[],o=[];n.doc.nodesBetween(t,e,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,t),p=Math.min(c+l.nodeSize,e),f=i.addToSet(d);for(let m=0;mn.step(l)),o.forEach(l=>n.step(l))}(this,t,e,i),this}removeMark(t,e,i){return function Ote(n,t,e,i){let r=[],o=0;n.doc.nodesBetween(t,e,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(i instanceof G_){let u,c=s.marks;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(s.marks)&&(l=[i]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,e);for(let u=0;un.step(new ts(s.from,s.to,s.style)))}(this,t,e,i),this}clearIncompatible(t,e,i){return function kte(n,t,e,i=e.contentMatch){let r=n.doc.nodeAt(t),o=[],s=t+1;for(let a=0;a=0;a--)n.step(o[a])}(this,t,e,i),this}}const W1=Object.create(null);class Fe{constructor(t,e,i){this.$anchor=t,this.$head=e,this.ranges=i||[new jP(t.min(e),t.max(e))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let e=0;e=0;o--){let s=e<0?ud(t.node(0),t.node(o),t.before(o+1),t.index(o),e,i):ud(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,e,i);if(s)return s}return null}static near(t,e=1){return this.findFrom(t,e)||this.findFrom(t,-e)||new Lr(t.node(0))}static atStart(t){return ud(t,t,0,0,1)||new Lr(t)}static atEnd(t){return ud(t,t,t.content.size,t.childCount,-1)||new Lr(t)}static fromJSON(t,e){if(!e||!e.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=W1[e.type];if(!i)throw new RangeError(`No selection type ${e.type} defined`);return i.fromJSON(t,e)}static jsonID(t,e){if(t in W1)throw new RangeError("Duplicate use of selection JSON ID "+t);return W1[t]=e,e.prototype.jsonID=t,e}getBookmark(){return Le.between(this.$anchor,this.$head).getBookmark()}}Fe.prototype.visible=!0;class jP{constructor(t,e){this.$from=t,this.$to=e}}let VP=!1;function zP(n){!VP&&!n.parent.inlineContent&&(VP=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Le extends Fe{constructor(t,e=t){zP(t),zP(e),super(t,e)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,e){let i=t.resolve(e.map(this.head));if(!i.parent.inlineContent)return Fe.near(i);let r=t.resolve(e.map(this.anchor));return new Le(r.parent.inlineContent?r:i,i)}replace(t,e=ie.empty){if(super.replace(t,e),e==ie.empty){let i=this.$from.marksAcross(this.$to);i&&t.ensureMarks(i)}}eq(t){return t instanceof Le&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new Z_(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,e){if("number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new Le(t.resolve(e.anchor),t.resolve(e.head))}static create(t,e,i=e){let r=t.resolve(e);return new this(r,i==e?r:t.resolve(i))}static between(t,e,i){let r=t.pos-e.pos;if((!i||r)&&(i=r>=0?1:-1),!e.parent.inlineContent){let o=Fe.findFrom(e,i,!0)||Fe.findFrom(e,-i,!0);if(!o)return Fe.near(e,i);e=o.$head}return t.parent.inlineContent||(0==r||(t=(Fe.findFrom(t,-i,!0)||Fe.findFrom(t,i,!0)).$anchor).posnew Lr(n)};function ud(n,t,e,i,r,o=!1){if(t.inlineContent)return Le.create(n,e);for(let s=i-(r>0?0:1);r>0?s=0;s+=r){let a=t.child(s);if(a.isAtom){if(!o&&Ee.isSelectable(a))return Ee.create(n,e-(r<0?a.nodeSize:0))}else{let l=ud(n,a,e+r,r<0?a.childCount:0,r,o);if(l)return l}e+=a.nodeSize*r}return null}function BP(n,t,e){let i=n.steps.length-1;if(i{null==s&&(s=u)}),n.setSelection(Fe.near(n.doc.resolve(s),e)))}function $P(n,t){return t&&n?n.bind(t):n}class Sp{constructor(t,e,i){this.name=t,this.init=$P(e.init,i),this.apply=$P(e.apply,i)}}function WP(n,t,e){for(let i in n){let r=n[i];r instanceof Function?r=r.bind(t):"handleDOMEvents"==i&&(r=WP(r,t,{})),e[i]=r}return e}new Sp("doc",{init:n=>n.doc||n.schema.topNodeType.createAndFill(),apply:n=>n.doc}),new Sp("selection",{init:(n,t)=>n.selection||Fe.atStart(t.doc),apply:n=>n.selection}),new Sp("storedMarks",{init:n=>n.storedMarks||null,apply:(n,t,e,i)=>i.selection.$cursor?n.storedMarks:null}),new Sp("scrollToSelection",{init:()=>0,apply:(n,t)=>n.scrolledIntoView?t+1:t});class pt{constructor(t){this.spec=t,this.props={},t.props&&WP(t.props,this,this.props),this.key=t.key?t.key.key:GP("plugin")}getState(t){return t[this.key]}}const K1=Object.create(null);function GP(n){return n in K1?n+"$"+ ++K1[n]:(K1[n]=0,n+"$")}class Et{constructor(t="key"){this.key=GP(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}function Pr(n){if(null==n)return window;if("[object Window]"!==n.toString()){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function cc(n){return n instanceof Pr(n).Element||n instanceof Element}function to(n){return n instanceof Pr(n).HTMLElement||n instanceof HTMLElement}function Y1(n){return!(typeof ShadowRoot>"u")&&(n instanceof Pr(n).ShadowRoot||n instanceof ShadowRoot)}var uc=Math.max,X_=Math.min,hd=Math.round;function Q1(){var n=navigator.userAgentData;return null!=n&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function qP(){return!/^((?!chrome|android).)*safari/i.test(Q1())}function pd(n,t,e){void 0===t&&(t=!1),void 0===e&&(e=!1);var i=n.getBoundingClientRect(),r=1,o=1;t&&to(n)&&(r=n.offsetWidth>0&&hd(i.width)/n.offsetWidth||1,o=n.offsetHeight>0&&hd(i.height)/n.offsetHeight||1);var a=(cc(n)?Pr(n):window).visualViewport,l=!qP()&&e,c=(i.left+(l&&a?a.offsetLeft:0))/r,u=(i.top+(l&&a?a.offsetTop:0))/o,d=i.width/r,h=i.height/o;return{width:d,height:h,top:u,right:c+d,bottom:u+h,left:c,x:c,y:u}}function Z1(n){var t=Pr(n);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ns(n){return n?(n.nodeName||"").toLowerCase():null}function Fa(n){return((cc(n)?n.ownerDocument:n.document)||window.document).documentElement}function J1(n){return pd(Fa(n)).left+Z1(n).scrollLeft}function Ys(n){return Pr(n).getComputedStyle(n)}function X1(n){var t=Ys(n);return/auto|scroll|overlay|hidden/.test(t.overflow+t.overflowY+t.overflowX)}function tne(n,t,e){void 0===e&&(e=!1);var i=to(t),r=to(t)&&function ene(n){var t=n.getBoundingClientRect(),e=hd(t.width)/n.offsetWidth||1,i=hd(t.height)/n.offsetHeight||1;return 1!==e||1!==i}(t),o=Fa(t),s=pd(n,r,e),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!e)&&(("body"!==ns(t)||X1(o))&&(a=function Xte(n){return n!==Pr(n)&&to(n)?function Jte(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}(n):Z1(n)}(t)),to(t)?((l=pd(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=J1(o))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function eS(n){var t=pd(n),e=n.offsetWidth,i=n.offsetHeight;return Math.abs(t.width-e)<=1&&(e=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:n.offsetLeft,y:n.offsetTop,width:e,height:i}}function ey(n){return"html"===ns(n)?n:n.assignedSlot||n.parentNode||(Y1(n)?n.host:null)||Fa(n)}function KP(n){return["html","body","#document"].indexOf(ns(n))>=0?n.ownerDocument.body:to(n)&&X1(n)?n:KP(ey(n))}function Dp(n,t){var e;void 0===t&&(t=[]);var i=KP(n),r=i===(null==(e=n.ownerDocument)?void 0:e.body),o=Pr(i),s=r?[o].concat(o.visualViewport||[],X1(i)?i:[]):i,a=t.concat(s);return r?a:a.concat(Dp(ey(s)))}function nne(n){return["table","td","th"].indexOf(ns(n))>=0}function YP(n){return to(n)&&"fixed"!==Ys(n).position?n.offsetParent:null}function Tp(n){for(var t=Pr(n),e=YP(n);e&&nne(e)&&"static"===Ys(e).position;)e=YP(e);return e&&("html"===ns(e)||"body"===ns(e)&&"static"===Ys(e).position)?t:e||function ine(n){var t=/firefox/i.test(Q1());if(/Trident/i.test(Q1())&&to(n)&&"fixed"===Ys(n).position)return null;var r=ey(n);for(Y1(r)&&(r=r.host);to(r)&&["html","body"].indexOf(ns(r))<0;){var o=Ys(r);if("none"!==o.transform||"none"!==o.perspective||"paint"===o.contain||-1!==["transform","perspective"].indexOf(o.willChange)||t&&"filter"===o.willChange||t&&o.filter&&"none"!==o.filter)return r;r=r.parentNode}return null}(n)||t}var ar="top",no="bottom",io="right",lr="left",tS="auto",Mp=[ar,no,io,lr],fd="start",Ep="end",QP="viewport",Ip="popper",ZP=Mp.reduce(function(n,t){return n.concat([t+"-"+fd,t+"-"+Ep])},[]),JP=[].concat(Mp,[tS]).reduce(function(n,t){return n.concat([t,t+"-"+fd,t+"-"+Ep])},[]),mne=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function gne(n){var t=new Map,e=new Set,i=[];function r(o){e.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach(function(a){if(!e.has(a)){var l=t.get(a);l&&r(l)}}),i.push(o)}return n.forEach(function(o){t.set(o.name,o)}),n.forEach(function(o){e.has(o.name)||r(o)}),i}function yne(n){var t;return function(){return t||(t=new Promise(function(e){Promise.resolve().then(function(){t=void 0,e(n())})})),t}}var XP={placement:"bottom",modifiers:[],strategy:"absolute"};function eR(){for(var n=arguments.length,t=new Array(n),e=0;e=0?"x":"y"}function tR(n){var l,t=n.reference,e=n.element,i=n.placement,r=i?is(i):null,o=i?md(i):null,s=t.x+t.width/2-e.width/2,a=t.y+t.height/2-e.height/2;switch(r){case ar:l={x:s,y:t.y-e.height};break;case no:l={x:s,y:t.y+t.height};break;case io:l={x:t.x+t.width,y:a};break;case lr:l={x:t.x-e.width,y:a};break;default:l={x:t.x,y:t.y}}var c=r?nS(r):null;if(null!=c){var u="y"===c?"height":"width";switch(o){case fd:l[c]=l[c]-(t[u]/2-e[u]/2);break;case Ep:l[c]=l[c]+(t[u]/2-e[u]/2)}}return l}const Dne={name:"popperOffsets",enabled:!0,phase:"read",fn:function Sne(n){var t=n.state;t.modifiersData[n.name]=tR({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}};var Tne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function nR(n){var t,e=n.popper,i=n.popperRect,r=n.placement,o=n.variation,s=n.offsets,a=n.position,l=n.gpuAcceleration,c=n.adaptive,u=n.roundOffsets,d=n.isFixed,h=s.x,p=void 0===h?0:h,f=s.y,m=void 0===f?0:f,_="function"==typeof u?u({x:p,y:m}):{x:p,y:m};p=_.x,m=_.y;var b=s.hasOwnProperty("x"),T=s.hasOwnProperty("y"),M=lr,w=ar,N=window;if(c){var k=Tp(e),$="clientHeight",V="clientWidth";k===Pr(e)&&"static"!==Ys(k=Fa(e)).position&&"absolute"===a&&($="scrollHeight",V="scrollWidth"),(r===ar||(r===lr||r===io)&&o===Ep)&&(w=no,m-=(d&&k===N&&N.visualViewport?N.visualViewport.height:k[$])-i.height,m*=l?1:-1),r!==lr&&(r!==ar&&r!==no||o!==Ep)||(M=io,p-=(d&&k===N&&N.visualViewport?N.visualViewport.width:k[V])-i.width,p*=l?1:-1)}var Ze,at=Object.assign({position:a},c&&Tne),tt=!0===u?function Mne(n,t){var i=n.y,r=t.devicePixelRatio||1;return{x:hd(n.x*r)/r||0,y:hd(i*r)/r||0}}({x:p,y:m},Pr(e)):{x:p,y:m};return p=tt.x,m=tt.y,Object.assign({},at,l?((Ze={})[w]=T?"0":"",Ze[M]=b?"0":"",Ze.transform=(N.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",Ze):((t={})[w]=T?m+"px":"",t[M]=b?p+"px":"",t.transform="",t))}const Ine={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function Ene(n){var t=n.state,e=n.options,i=e.gpuAcceleration,r=void 0===i||i,o=e.adaptive,s=void 0===o||o,a=e.roundOffsets,l=void 0===a||a,c={placement:is(t.placement),variation:md(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,nR(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,nR(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},iR={name:"applyStyles",enabled:!0,phase:"write",fn:function xne(n){var t=n.state;Object.keys(t.elements).forEach(function(e){var i=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];!to(o)||!ns(o)||(Object.assign(o.style,i),Object.keys(r).forEach(function(s){var a=r[s];!1===a?o.removeAttribute(s):o.setAttribute(s,!0===a?"":a)}))})},effect:function One(n){var t=n.state,e={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,e.popper),t.styles=e,t.elements.arrow&&Object.assign(t.elements.arrow.style,e.arrow),function(){Object.keys(t.elements).forEach(function(i){var r=t.elements[i],o=t.attributes[i]||{},a=Object.keys(t.styles.hasOwnProperty(i)?t.styles[i]:e[i]).reduce(function(l,c){return l[c]="",l},{});!to(r)||!ns(r)||(Object.assign(r.style,a),Object.keys(o).forEach(function(l){r.removeAttribute(l)}))})}},requires:["computeStyles"]},Nne={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function Ane(n){var t=n.state,i=n.name,r=n.options.offset,o=void 0===r?[0,0]:r,s=JP.reduce(function(u,d){return u[d]=function kne(n,t,e){var i=is(n),r=[lr,ar].indexOf(i)>=0?-1:1,o="function"==typeof e?e(Object.assign({},t,{placement:n})):e,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[lr,io].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(d,t.rects,o),u},{}),a=s[t.placement],c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=a.x,t.modifiersData.popperOffsets.y+=c),t.modifiersData[i]=s}};var Lne={left:"right",right:"left",bottom:"top",top:"bottom"};function ny(n){return n.replace(/left|right|bottom|top/g,function(t){return Lne[t]})}var Pne={start:"end",end:"start"};function rR(n){return n.replace(/start|end/g,function(t){return Pne[t]})}function oR(n,t){var e=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(e&&Y1(e)){var i=t;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function iS(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function sR(n,t,e){return t===QP?iS(function Rne(n,t){var e=Pr(n),i=Fa(n),r=e.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=qP();(c||!c&&"fixed"===t)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+J1(n),y:l}}(n,e)):cc(t)?function jne(n,t){var e=pd(n,!1,"fixed"===t);return e.top=e.top+n.clientTop,e.left=e.left+n.clientLeft,e.bottom=e.top+n.clientHeight,e.right=e.left+n.clientWidth,e.width=n.clientWidth,e.height=n.clientHeight,e.x=e.left,e.y=e.top,e}(t,e):iS(function Fne(n){var t,e=Fa(n),i=Z1(n),r=null==(t=n.ownerDocument)?void 0:t.body,o=uc(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=uc(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+J1(n),l=-i.scrollTop;return"rtl"===Ys(r||e).direction&&(a+=uc(e.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Fa(n)))}function lR(n){return Object.assign({},{top:0,right:0,bottom:0,left:0},n)}function cR(n,t){return t.reduce(function(e,i){return e[i]=n,e},{})}function xp(n,t){void 0===t&&(t={});var i=t.placement,r=void 0===i?n.placement:i,o=t.strategy,s=void 0===o?n.strategy:o,a=t.boundary,l=void 0===a?"clippingParents":a,c=t.rootBoundary,u=void 0===c?QP:c,d=t.elementContext,h=void 0===d?Ip:d,p=t.altBoundary,f=void 0!==p&&p,m=t.padding,_=void 0===m?0:m,b=lR("number"!=typeof _?_:cR(_,Mp)),M=n.rects.popper,w=n.elements[f?h===Ip?"reference":Ip:h],N=function zne(n,t,e,i){var r="clippingParents"===t?function Vne(n){var t=Dp(ey(n)),i=["absolute","fixed"].indexOf(Ys(n).position)>=0&&to(n)?Tp(n):n;return cc(i)?t.filter(function(r){return cc(r)&&oR(r,i)&&"body"!==ns(r)}):[]}(n):[].concat(t),o=[].concat(r,[e]),a=o.reduce(function(l,c){var u=sR(n,c,i);return l.top=uc(u.top,l.top),l.right=X_(u.right,l.right),l.bottom=X_(u.bottom,l.bottom),l.left=uc(u.left,l.left),l},sR(n,o[0],i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(cc(w)?w:w.contextElement||Fa(n.elements.popper),l,u,s),k=pd(n.elements.reference),$=tR({reference:k,element:M,strategy:"absolute",placement:r}),V=iS(Object.assign({},M,$)),pe=h===Ip?V:k,De={top:N.top-pe.top+b.top,bottom:pe.bottom-N.bottom+b.bottom,left:N.left-pe.left+b.left,right:pe.right-N.right+b.right},at=n.modifiersData.offset;if(h===Ip&&at){var tt=at[r];Object.keys(De).forEach(function(Ze){var Kt=[io,no].indexOf(Ze)>=0?1:-1,gn=[ar,no].indexOf(Ze)>=0?"y":"x";De[Ze]+=tt[gn]*Kt})}return De}const $ne={name:"flip",enabled:!0,phase:"main",fn:function Hne(n){var t=n.state,e=n.options,i=n.name;if(!t.modifiersData[i]._skip){for(var r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0===s||s,l=e.fallbackPlacements,c=e.padding,u=e.boundary,d=e.rootBoundary,h=e.altBoundary,p=e.flipVariations,f=void 0===p||p,m=e.allowedAutoPlacements,_=t.options.placement,b=is(_),M=l||(b!==_&&f?function Une(n){if(is(n)===tS)return[];var t=ny(n);return[rR(n),t,rR(t)]}(_):[ny(_)]),w=[_].concat(M).reduce(function(St,fr){return St.concat(is(fr)===tS?function Bne(n,t){void 0===t&&(t={});var r=t.boundary,o=t.rootBoundary,s=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=void 0===l?JP:l,u=md(t.placement),d=u?a?ZP:ZP.filter(function(f){return md(f)===u}):Mp,h=d.filter(function(f){return c.indexOf(f)>=0});0===h.length&&(h=d);var p=h.reduce(function(f,m){return f[m]=xp(n,{placement:m,boundary:r,rootBoundary:o,padding:s})[is(m)],f},{});return Object.keys(p).sort(function(f,m){return p[f]-p[m]})}(t,{placement:fr,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):fr)},[]),N=t.rects.reference,k=t.rects.popper,$=new Map,V=!0,pe=w[0],De=0;De=0,gn=Kt?"width":"height",Q=xp(t,{placement:at,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),ee=Kt?Ze?io:lr:Ze?no:ar;N[gn]>k[gn]&&(ee=ny(ee));var ne=ny(ee),we=[];if(o&&we.push(Q[tt]<=0),a&&we.push(Q[ee]<=0,Q[ne]<=0),we.every(function(St){return St})){pe=at,V=!1;break}$.set(at,we)}if(V)for(var zt=function(fr){var Ao=w.find(function(_n){var mi=$.get(_n);if(mi)return mi.slice(0,fr).every(function(Kn){return Kn})});if(Ao)return pe=Ao,"break"},kt=f?3:1;kt>0&&"break"!==zt(kt);kt--);t.placement!==pe&&(t.modifiersData[i]._skip=!0,t.placement=pe,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Op(n,t,e){return uc(n,X_(t,e))}const Kne={name:"preventOverflow",enabled:!0,phase:"main",fn:function qne(n){var t=n.state,e=n.options,i=n.name,r=e.mainAxis,o=void 0===r||r,s=e.altAxis,a=void 0!==s&&s,h=e.tether,p=void 0===h||h,f=e.tetherOffset,m=void 0===f?0:f,_=xp(t,{boundary:e.boundary,rootBoundary:e.rootBoundary,padding:e.padding,altBoundary:e.altBoundary}),b=is(t.placement),T=md(t.placement),M=!T,w=nS(b),N=function Wne(n){return"x"===n?"y":"x"}(w),k=t.modifiersData.popperOffsets,$=t.rects.reference,V=t.rects.popper,pe="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,De="number"==typeof pe?{mainAxis:pe,altAxis:pe}:Object.assign({mainAxis:0,altAxis:0},pe),at=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,tt={x:0,y:0};if(k){if(o){var Ze,Kt="y"===w?ar:lr,gn="y"===w?no:io,Q="y"===w?"height":"width",ee=k[w],ne=ee+_[Kt],we=ee-_[gn],lt=p?-V[Q]/2:0,zt=T===fd?$[Q]:V[Q],kt=T===fd?-V[Q]:-$[Q],sn=t.elements.arrow,St=p&&sn?eS(sn):{width:0,height:0},fr=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Ao=fr[Kt],_n=fr[gn],mi=Op(0,$[Q],St[Q]),Kn=M?$[Q]/2-lt-mi-Ao-De.mainAxis:zt-mi-Ao-De.mainAxis,jr=M?-$[Q]/2+lt+mi+_n+De.mainAxis:kt+mi+_n+De.mainAxis,_s=t.elements.arrow&&Tp(t.elements.arrow),Sf=null!=(Ze=at?.[w])?Ze:0,Ov=ee+jr-Sf,Df=Op(p?X_(ne,ee+Kn-Sf-(_s?"y"===w?_s.clientTop||0:_s.clientLeft||0:0)):ne,ee,p?uc(we,Ov):we);k[w]=Df,tt[w]=Df-ee}if(a){var Tf,ra=k[N],al="y"===N?"height":"width",Mf=ra+_["x"===w?ar:lr],Pc=ra-_["x"===w?no:io],Ef=-1!==[ar,lr].indexOf(b),Nv=null!=(Tf=at?.[N])?Tf:0,Lv=Ef?Mf:ra-$[al]-V[al]-Nv+De.altAxis,Pv=Ef?ra+$[al]+V[al]-Nv-De.altAxis:Pc,Rv=p&&Ef?function Gne(n,t,e){var i=Op(n,t,e);return i>e?e:i}(Lv,ra,Pv):Op(p?Lv:Mf,ra,p?Pv:Pc);k[N]=Rv,tt[N]=Rv-ra}t.modifiersData[i]=tt}},requiresIfExists:["offset"]},Jne={name:"arrow",enabled:!0,phase:"main",fn:function Qne(n){var t,e=n.state,i=n.name,r=n.options,o=e.elements.arrow,s=e.modifiersData.popperOffsets,a=is(e.placement),l=nS(a),u=[lr,io].indexOf(a)>=0?"height":"width";if(o&&s){var d=function(t,e){return lR("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:cR(t,Mp))}(r.padding,e),h=eS(o),p="y"===l?ar:lr,f="y"===l?no:io,m=e.rects.reference[u]+e.rects.reference[l]-s[l]-e.rects.popper[u],_=s[l]-e.rects.reference[l],b=Tp(o),T=b?"y"===l?b.clientHeight||0:b.clientWidth||0:0,k=T/2-h[u]/2+(m/2-_/2),$=Op(d[p],k,T-h[u]-d[f]);e.modifiersData[i]=((t={})[l]=$,t.centerOffset=$-k,t)}},effect:function Zne(n){var t=n.state,i=n.options.element,r=void 0===i?"[data-popper-arrow]":i;null!=r&&("string"==typeof r&&!(r=t.elements.popper.querySelector(r))||oR(t.elements.popper,r)&&(t.elements.arrow=r))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function uR(n,t,e){return void 0===e&&(e={x:0,y:0}),{top:n.top-t.height-e.y,right:n.right-t.width+e.x,bottom:n.bottom-t.height+e.y,left:n.left-t.width-e.x}}function dR(n){return[ar,io,no,lr].some(function(t){return n[t]>=0})}var eie=[wne,Dne,Ine,iR,Nne,$ne,Kne,Jne,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function Xne(n){var t=n.state,e=n.name,i=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,s=xp(t,{elementContext:"reference"}),a=xp(t,{altBoundary:!0}),l=uR(s,i),c=uR(a,r,o),u=dR(l),d=dR(c);t.modifiersData[e]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}],tie=bne({defaultModifiers:eie}),hR="tippy-content",fR="tippy-arrow",mR="tippy-svg-arrow",ja={passive:!0,capture:!0},gR=function(){return document.body};function rS(n,t,e){return Array.isArray(n)?n[t]??(Array.isArray(e)?e[t]:e):n}function oS(n,t){var e={}.toString.call(n);return 0===e.indexOf("[object")&&e.indexOf(t+"]")>-1}function _R(n,t){return"function"==typeof n?n.apply(void 0,t):n}function yR(n,t){return 0===t?n:function(i){clearTimeout(e),e=setTimeout(function(){n(i)},t)};var e}function Va(n){return[].concat(n)}function vR(n,t){-1===n.indexOf(t)&&n.push(t)}function gd(n){return[].slice.call(n)}function CR(n){return Object.keys(n).reduce(function(t,e){return void 0!==n[e]&&(t[e]=n[e]),t},{})}function dc(){return document.createElement("div")}function iy(n){return["Element","Fragment"].some(function(t){return oS(n,t)})}function lS(n,t){n.forEach(function(e){e&&(e.style.transitionDuration=t+"ms")})}function kp(n,t){n.forEach(function(e){e&&e.setAttribute("data-state",t)})}function cS(n,t,e){var i=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){n[i](r,e)})}function DR(n,t){for(var e=t;e;){var i;if(n.contains(e))return!0;e=null==e.getRootNode||null==(i=e.getRootNode())?void 0:i.host}return!1}var rs={isTouch:!1},TR=0;function cie(){rs.isTouch||(rs.isTouch=!0,window.performance&&document.addEventListener("mousemove",MR))}function MR(){var n=performance.now();n-TR<20&&(rs.isTouch=!1,document.removeEventListener("mousemove",MR)),TR=n}function uie(){var n=document.activeElement;(function wR(n){return!(!n||!n._tippy||n._tippy.reference!==n)})(n)&&n.blur&&!n._tippy.state.isVisible&&n.blur()}var pie=!!(typeof window<"u"&&typeof document<"u")&&!!window.msCrypto,cr=Object.assign({appendTo:gR,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),_ie=Object.keys(cr);function kR(n){var e=(n.plugins||[]).reduce(function(i,r){var a,o=r.name;return o&&(i[o]=void 0!==n[o]?n[o]:null!=(a=cr[o])?a:r.defaultValue),i},{});return Object.assign({},n,e)}function AR(n,t){var e=Object.assign({},t,{content:_R(t.content,[n])},t.ignoreAttributes?{}:function vie(n,t){return(t?Object.keys(kR(Object.assign({},cr,{plugins:t}))):_ie).reduce(function(r,o){var s=(n.getAttribute("data-tippy-"+o)||"").trim();if(!s)return r;if("content"===o)r[o]=s;else try{r[o]=JSON.parse(s)}catch{r[o]=s}return r},{})}(n,t.plugins));return e.aria=Object.assign({},cr.aria,e.aria),e.aria={expanded:"auto"===e.aria.expanded?t.interactive:e.aria.expanded,content:"auto"===e.aria.content?t.interactive?null:"describedby":e.aria.content},e}function uS(n,t){n.innerHTML=t}function NR(n){var t=dc();return!0===n?t.className=fR:(t.className=mR,iy(n)?t.appendChild(n):uS(t,n)),t}function LR(n,t){iy(t.content)?(uS(n,""),n.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?uS(n,t.content):n.textContent=t.content)}function ry(n){var t=n.firstElementChild,e=gd(t.children);return{box:t,content:e.find(function(i){return i.classList.contains(hR)}),arrow:e.find(function(i){return i.classList.contains(fR)||i.classList.contains(mR)}),backdrop:e.find(function(i){return i.classList.contains("tippy-backdrop")})}}function PR(n){var t=dc(),e=dc();e.className="tippy-box",e.setAttribute("data-state","hidden"),e.setAttribute("tabindex","-1");var i=dc();function r(o,s){var a=ry(t),l=a.box,c=a.content,u=a.arrow;s.theme?l.setAttribute("data-theme",s.theme):l.removeAttribute("data-theme"),"string"==typeof s.animation?l.setAttribute("data-animation",s.animation):l.removeAttribute("data-animation"),s.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth="number"==typeof s.maxWidth?s.maxWidth+"px":s.maxWidth,s.role?l.setAttribute("role",s.role):l.removeAttribute("role"),(o.content!==s.content||o.allowHTML!==s.allowHTML)&&LR(c,n.props),s.arrow?u?o.arrow!==s.arrow&&(l.removeChild(u),l.appendChild(NR(s.arrow))):l.appendChild(NR(s.arrow)):u&&l.removeChild(u)}return i.className=hR,i.setAttribute("data-state","hidden"),LR(i,n.props),t.appendChild(e),e.appendChild(i),r(n.props,n.props),{popper:t,onUpdate:r}}PR.$$tippy=!0;var Cie=1,oy=[],sy=[];function wie(n,t){var i,r,o,u,d,h,m,e=AR(n,Object.assign({},cr,kR(CR(t)))),s=!1,a=!1,l=!1,c=!1,p=[],f=yR(xv,e.interactiveDebounce),_=Cie++,T=function oie(n){return n.filter(function(t,e){return n.indexOf(t)===e})}(e.plugins),w={id:_,reference:n,popper:dc(),popperInstance:null,props:e,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:T,clearDelayTimeouts:function Lv(){clearTimeout(i),clearTimeout(r),cancelAnimationFrame(o)},setProps:function Pv(z){if(!w.state.isDestroyed){ne("onBeforeUpdate",[w,z]),Iv();var be=w.props,Be=AR(n,Object.assign({},be,CR(z),{ignoreAttributes:!0}));w.props=Be,_s(),be.interactiveDebounce!==Be.interactiveDebounce&&(zt(),f=yR(xv,Be.interactiveDebounce)),be.triggerTarget&&!Be.triggerTarget?Va(be.triggerTarget).forEach(function(Bt){Bt.removeAttribute("aria-expanded")}):Be.triggerTarget&&n.removeAttribute("aria-expanded"),lt(),ee(),$&&$(be,Be),w.popperInstance&&(kv(),al().forEach(function(Bt){requestAnimationFrame(Bt._tippy.popperInstance.forceUpdate)})),ne("onAfterUpdate",[w,z])}},setContent:function Rv(z){w.setProps({content:z})},show:function p1e(){var z=w.state.isVisible,be=w.state.isDestroyed,Be=!w.state.isEnabled,Bt=rs.isTouch&&!w.props.touch,Dt=rS(w.props.duration,0,cr.duration);if(!(z||be||Be||Bt||Ze().hasAttribute("disabled")||(ne("onShow",[w],!1),!1===w.props.onShow(w)))){if(w.state.isVisible=!0,tt()&&(k.style.visibility="visible"),ee(),fr(),w.state.isMounted||(k.style.transition="none"),tt()){var Qi=gn();lS([Qi.box,Qi.content],0)}h=function(){var Rc;if(w.state.isVisible&&!c){if(c=!0,k.style.transition=w.props.moveTransition,tt()&&w.props.animation){var bT=gn(),Fv=bT.box,Pd=bT.content;lS([Fv,Pd],Dt),kp([Fv,Pd],"visible")}we(),lt(),vR(sy,w),null==(Rc=w.popperInstance)||Rc.forceUpdate(),ne("onMount",[w]),w.props.animation&&tt()&&function mi(z,be){Kn(z,be)}(Dt,function(){w.state.isShown=!0,ne("onShown",[w])})}},function ra(){var be,z=w.props.appendTo,Be=Ze();(be=w.props.interactive&&z===gR||"parent"===z?Be.parentNode:_R(z,[Be])).contains(k)||be.appendChild(k),w.state.isMounted=!0,kv()}()}},hide:function f1e(){var z=!w.state.isVisible,be=w.state.isDestroyed,Be=!w.state.isEnabled,Bt=rS(w.props.duration,1,cr.duration);if(!(z||be||Be)&&(ne("onHide",[w],!1),!1!==w.props.onHide(w))){if(w.state.isVisible=!1,w.state.isShown=!1,c=!1,s=!1,tt()&&(k.style.visibility="hidden"),zt(),Ao(),ee(!0),tt()){var Dt=gn(),Qi=Dt.box,uo=Dt.content;w.props.animation&&(lS([Qi,uo],Bt),kp([Qi,uo],"hidden"))}we(),lt(),w.props.animation?tt()&&function _n(z,be){Kn(z,function(){!w.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&be()})}(Bt,w.unmount):w.unmount()}},hideWithInteractivity:function m1e(z){Kt().addEventListener("mousemove",f),vR(oy,f),f(z)},enable:function Ef(){w.state.isEnabled=!0},disable:function Nv(){w.hide(),w.state.isEnabled=!1},unmount:function g1e(){w.state.isVisible&&w.hide(),w.state.isMounted&&(Av(),al().forEach(function(z){z._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),sy=sy.filter(function(z){return z!==w}),w.state.isMounted=!1,ne("onHidden",[w]))},destroy:function _1e(){w.state.isDestroyed||(w.clearDelayTimeouts(),w.unmount(),Iv(),delete n._tippy,w.state.isDestroyed=!0,ne("onDestroy",[w]))}};if(!e.render)return w;var N=e.render(w),k=N.popper,$=N.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+w.id,w.popper=k,n._tippy=w,k._tippy=w;var V=T.map(function(z){return z.fn(w)}),pe=n.hasAttribute("aria-expanded");return _s(),lt(),ee(),ne("onCreate",[w]),e.showOnCreate&&Mf(),k.addEventListener("mouseenter",function(){w.props.interactive&&w.state.isVisible&&w.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){w.props.interactive&&w.props.trigger.indexOf("mouseenter")>=0&&Kt().addEventListener("mousemove",f)}),w;function De(){var z=w.props.touch;return Array.isArray(z)?z:[z,0]}function at(){return"hold"===De()[0]}function tt(){var z;return!(null==(z=w.props.render)||!z.$$tippy)}function Ze(){return m||n}function Kt(){var z=Ze().parentNode;return z?function SR(n){var t,i=Va(n)[0];return null!=i&&null!=(t=i.ownerDocument)&&t.body?i.ownerDocument:document}(z):document}function gn(){return ry(k)}function Q(z){return w.state.isMounted&&!w.state.isVisible||rs.isTouch||u&&"focus"===u.type?0:rS(w.props.delay,z?0:1,cr.delay)}function ee(z){void 0===z&&(z=!1),k.style.pointerEvents=w.props.interactive&&!z?"":"none",k.style.zIndex=""+w.props.zIndex}function ne(z,be,Be){var Bt;void 0===Be&&(Be=!0),V.forEach(function(Dt){Dt[z]&&Dt[z].apply(Dt,be)}),Be&&(Bt=w.props)[z].apply(Bt,be)}function we(){var z=w.props.aria;if(z.content){var be="aria-"+z.content,Be=k.id;Va(w.props.triggerTarget||n).forEach(function(Dt){var Qi=Dt.getAttribute(be);if(w.state.isVisible)Dt.setAttribute(be,Qi?Qi+" "+Be:Be);else{var uo=Qi&&Qi.replace(Be,"").trim();uo?Dt.setAttribute(be,uo):Dt.removeAttribute(be)}})}}function lt(){!pe&&w.props.aria.expanded&&Va(w.props.triggerTarget||n).forEach(function(be){w.props.interactive?be.setAttribute("aria-expanded",w.state.isVisible&&be===Ze()?"true":"false"):be.removeAttribute("aria-expanded")})}function zt(){Kt().removeEventListener("mousemove",f),oy=oy.filter(function(z){return z!==f})}function kt(z){if(!rs.isTouch||!l&&"mousedown"!==z.type){var be=z.composedPath&&z.composedPath()[0]||z.target;if(!w.props.interactive||!DR(k,be)){if(Va(w.props.triggerTarget||n).some(function(Be){return DR(Be,be)})){if(rs.isTouch||w.state.isVisible&&w.props.trigger.indexOf("click")>=0)return}else ne("onClickOutside",[w,z]);!0===w.props.hideOnClick&&(w.clearDelayTimeouts(),w.hide(),a=!0,setTimeout(function(){a=!1}),w.state.isMounted||Ao())}}}function sn(){l=!0}function St(){l=!1}function fr(){var z=Kt();z.addEventListener("mousedown",kt,!0),z.addEventListener("touchend",kt,ja),z.addEventListener("touchstart",St,ja),z.addEventListener("touchmove",sn,ja)}function Ao(){var z=Kt();z.removeEventListener("mousedown",kt,!0),z.removeEventListener("touchend",kt,ja),z.removeEventListener("touchstart",St,ja),z.removeEventListener("touchmove",sn,ja)}function Kn(z,be){var Be=gn().box;function Bt(Dt){Dt.target===Be&&(cS(Be,"remove",Bt),be())}if(0===z)return be();cS(Be,"remove",d),cS(Be,"add",Bt),d=Bt}function jr(z,be,Be){void 0===Be&&(Be=!1),Va(w.props.triggerTarget||n).forEach(function(Dt){Dt.addEventListener(z,be,Be),p.push({node:Dt,eventType:z,handler:be,options:Be})})}function _s(){at()&&(jr("touchstart",Sf,{passive:!0}),jr("touchend",Ov,{passive:!0})),function rie(n){return n.split(/\s+/).filter(Boolean)}(w.props.trigger).forEach(function(z){if("manual"!==z)switch(jr(z,Sf),z){case"mouseenter":jr("mouseleave",Ov);break;case"focus":jr(pie?"focusout":"blur",Df);break;case"focusin":jr("focusout",Df)}})}function Iv(){p.forEach(function(z){z.node.removeEventListener(z.eventType,z.handler,z.options)}),p=[]}function Sf(z){var be,Be=!1;if(w.state.isEnabled&&!Tf(z)&&!a){var Bt="focus"===(null==(be=u)?void 0:be.type);u=z,m=z.currentTarget,lt(),!w.state.isVisible&&function aS(n){return oS(n,"MouseEvent")}(z)&&oy.forEach(function(Dt){return Dt(z)}),"click"===z.type&&(w.props.trigger.indexOf("mouseenter")<0||s)&&!1!==w.props.hideOnClick&&w.state.isVisible?Be=!0:Mf(z),"click"===z.type&&(s=!Be),Be&&!Bt&&Pc(z)}}function xv(z){var be=z.target,Be=Ze().contains(be)||k.contains(be);"mousemove"===z.type&&Be||function lie(n,t){var e=t.clientX,i=t.clientY;return n.every(function(r){var o=r.popperRect,s=r.popperState,l=r.props.interactiveBorder,c=function bR(n){return n.split("-")[0]}(s.placement),u=s.modifiersData.offset;return!u||o.top-i+("bottom"===c?u.top.y:0)>l||i-o.bottom-("top"===c?u.bottom.y:0)>l||o.left-e+("right"===c?u.left.x:0)>l||e-o.right-("left"===c?u.right.x:0)>l})}(al().concat(k).map(function(Dt){var Qi,Ld=null==(Qi=Dt._tippy.popperInstance)?void 0:Qi.state;return Ld?{popperRect:Dt.getBoundingClientRect(),popperState:Ld,props:e}:null}).filter(Boolean),z)&&(zt(),Pc(z))}function Ov(z){if(!(Tf(z)||w.props.trigger.indexOf("click")>=0&&s)){if(w.props.interactive)return void w.hideWithInteractivity(z);Pc(z)}}function Df(z){w.props.trigger.indexOf("focusin")<0&&z.target!==Ze()||w.props.interactive&&z.relatedTarget&&k.contains(z.relatedTarget)||Pc(z)}function Tf(z){return!!rs.isTouch&&at()!==z.type.indexOf("touch")>=0}function kv(){Av();var z=w.props,be=z.popperOptions,Be=z.placement,Bt=z.offset,Dt=z.getReferenceClientRect,Qi=z.moveTransition,uo=tt()?ry(k).arrow:null,Ld=Dt?{getBoundingClientRect:Dt,contextElement:Dt.contextElement||Ze()}:n,Rc=[{name:"offset",options:{offset:Bt}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Qi}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Fv){var Pd=Fv.state;if(tt()){var CT=gn().box;["placement","reference-hidden","escaped"].forEach(function(jv){"placement"===jv?CT.setAttribute("data-placement",Pd.placement):Pd.attributes.popper["data-popper-"+jv]?CT.setAttribute("data-"+jv,""):CT.removeAttribute("data-"+jv)}),Pd.attributes.popper={}}}}];tt()&&uo&&Rc.push({name:"arrow",options:{element:uo,padding:3}}),Rc.push.apply(Rc,be?.modifiers||[]),w.popperInstance=tie(Ld,k,Object.assign({},be,{placement:Be,onFirstUpdate:h,modifiers:Rc}))}function Av(){w.popperInstance&&(w.popperInstance.destroy(),w.popperInstance=null)}function al(){return gd(k.querySelectorAll("[data-tippy-root]"))}function Mf(z){w.clearDelayTimeouts(),z&&ne("onTrigger",[w,z]),fr();var be=Q(!0),Be=De(),Dt=Be[1];rs.isTouch&&"hold"===Be[0]&&Dt&&(be=Dt),be?i=setTimeout(function(){w.show()},be):w.show()}function Pc(z){if(w.clearDelayTimeouts(),ne("onUntrigger",[w,z]),w.state.isVisible){if(!(w.props.trigger.indexOf("mouseenter")>=0&&w.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(z.type)>=0&&s)){var be=Q(!1);be?r=setTimeout(function(){w.state.isVisible&&w.hide()},be):o=requestAnimationFrame(function(){w.hide()})}}else Ao()}}function za(n,t){void 0===t&&(t={});var e=cr.plugins.concat(t.plugins||[]);!function die(){document.addEventListener("touchstart",cie,ja),window.addEventListener("blur",uie)}();var i=Object.assign({},t,{plugins:e}),a=function aie(n){return iy(n)?[n]:function sie(n){return oS(n,"NodeList")}(n)?gd(n):Array.isArray(n)?n:gd(document.querySelectorAll(n))}(n).reduce(function(l,c){var u=c&&wie(c,i);return u&&l.push(u),l},[]);return iy(n)?a[0]:a}za.defaultProps=cr,za.setDefaultProps=function(t){Object.keys(t).forEach(function(i){cr[i]=t[i]})},za.currentInput=rs,Object.assign({},iR,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}}),za.setDefaultProps({render:PR});const ss=za,ro=function(n){for(var t=0;;t++)if(!(n=n.previousSibling))return t},hc=function(n,t,e,i){return e&&(VR(n,t,e,i,-1)||VR(n,t,e,i,1))},Oie=/^(img|br|input|textarea|hr)$/i;function VR(n,t,e,i,r){for(;;){if(n==e&&t==i)return!0;if(t==(r<0?0:as(n))){let o=n.parentNode;if(!o||1!=o.nodeType||Aie(n)||Oie.test(n.nodeName)||"false"==n.contentEditable)return!1;t=ro(n)+(r<0?0:1),n=o}else{if(1!=n.nodeType)return!1;if("false"==(n=n.childNodes[t+(r<0?-1:0)]).contentEditable)return!1;t=r<0?as(n):0}}}function as(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Aie(n){let t;for(let e=n;e&&!(t=e.pmViewDesc);e=e.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==n||t.contentDOM==n)}const ly=function(n){return n.focusNode&&hc(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function pc(n,t){let e=document.createEvent("Event");return e.initEvent("keydown",!0,!0),e.keyCode=n,e.key=e.code=t,e}const ls=typeof navigator<"u"?navigator:null,zR=typeof document<"u"?document:null,Ba=ls&&ls.userAgent||"",hS=/Edge\/(\d+)/.exec(Ba),BR=/MSIE \d/.exec(Ba),pS=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ba),ur=!!(BR||pS||hS),Ua=BR?document.documentMode:pS?+pS[1]:hS?+hS[1]:0,Io=!ur&&/gecko\/(\d+)/i.test(Ba);Io&&/Firefox\/(\d+)/.exec(Ba);const fS=!ur&&/Chrome\/(\d+)/.exec(Ba),Ei=!!fS,Pie=fS?+fS[1]:0,Gi=!ur&&!!ls&&/Apple Computer/.test(ls.vendor),_d=Gi&&(/Mobile\/\w+/.test(Ba)||!!ls&&ls.maxTouchPoints>2),oo=_d||!!ls&&/Mac/.test(ls.platform),Rie=!!ls&&/Win/.test(ls.platform),xo=/Android \d/.test(Ba),cy=!!zR&&"webkitFontSmoothing"in zR.documentElement.style,Fie=cy?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,Rp=function(n){n&&(this.nodeName=n)};function aF(n){return n.editable?n.hasFocus():function fF(n){let t=n.domSelectionRange();if(!t.anchorNode)return!1;try{return n.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(n.editable||n.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch{return!1}}(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function Zs(n,t=!1){let e=n.state.selection;if(function dF(n,t){if(t instanceof Ee){let e=n.docView.descAt(t.from);e!=n.lastSelectedViewDesc&&(hF(n),e&&e.selectNode(),n.lastSelectedViewDesc=e)}else hF(n)}(n,e),aF(n)){if(!t&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&Ei){let i=n.domSelectionRange(),r=n.domObserver.currentSelection;if(i.anchorNode&&r.anchorNode&&hc(i.anchorNode,i.anchorOffset,r.anchorNode,r.anchorOffset))return n.input.mouseDown.delayedSelectionSync=!0,void n.domObserver.setCurSelection()}if(n.domObserver.disconnectSelection(),n.cursorWrapper)!function ure(n){let t=n.domSelection(),e=document.createRange(),i=n.cursorWrapper.dom,r="IMG"==i.nodeName;r?e.setEnd(i.parentNode,ro(i)+1):e.setEnd(i,0),e.collapse(!1),t.removeAllRanges(),t.addRange(e),!r&&!n.state.selection.visible&&ur&&Ua<=11&&(i.disabled=!0,i.disabled=!1)}(n);else{let o,s,{anchor:i,head:r}=e;lF&&!(e instanceof Le)&&(e.$from.parent.inlineContent||(o=cF(n,e.from)),!e.empty&&!e.$from.parent.inlineContent&&(s=cF(n,e.to))),n.docView.setSelection(i,r,n.root,t),lF&&(o&&uF(o),s&&uF(s)),e.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function cre(n){let t=n.dom.ownerDocument;t.removeEventListener("selectionchange",n.input.hideSelectionGuard);let e=n.domSelectionRange(),i=e.anchorNode,r=e.anchorOffset;t.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(e.anchorNode!=i||e.anchorOffset!=r)&&(t.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!aF(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}Rp.prototype=Object.create(null),new Rp;const lF=Gi||Ei&&Pie<63;function cF(n,t){let{node:e,offset:i}=n.docView.domFromPos(t,0),r=ir(n,t,e))||Le.between(t,e,i)}function SS(n,t){let{$anchor:e,$head:i}=n.selection,r=t>0?e.max(i):e.min(i),o=r.parent.inlineContent?r.depth?n.doc.resolve(t>0?r.after():r.before()):null:r;return o&&Fe.findFrom(o,t)}function _c(n,t){return n.dispatch(n.state.tr.setSelection(t).scrollIntoView()),!0}function mF(n,t,e){let i=n.state.selection;if(!(i instanceof Le)){if(i instanceof Ee&&i.node.isInline)return _c(n,new Le(t>0?i.$to:i.$from));{let r=SS(n.state,t);return!!r&&_c(n,r)}}if(!i.empty||e.indexOf("s")>-1)return!1;if(n.endOfTextblock(t>0?"forward":"backward")){let r=SS(n.state,t);return!!(r&&r instanceof Ee)&&_c(n,r)}if(!(oo&&e.indexOf("m")>-1)){let s,r=i.$head,o=r.textOffset?null:t<0?r.nodeBefore:r.nodeAfter;if(!o||o.isText)return!1;let a=t<0?r.pos-o.nodeSize:r.pos;return!!(o.isAtom||(s=n.docView.descAt(a))&&!s.contentDOM)&&(Ee.isSelectable(o)?_c(n,new Ee(t<0?n.state.doc.resolve(r.pos-o.nodeSize):r)):!!cy&&_c(n,new Le(n.state.doc.resolve(t<0?a:a+o.nodeSize))))}}function dy(n){return 3==n.nodeType?n.nodeValue.length:n.childNodes.length}function Fp(n){let t=n.pmViewDesc;return t&&0==t.size&&(n.nextSibling||"BR"!=n.nodeName)}function jp(n,t){return t<0?function hre(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let r,o,s=!1;for(Io&&1==e.nodeType&&i0){if(1!=e.nodeType)break;{let a=e.childNodes[i-1];if(Fp(a))r=e,o=--i;else{if(3!=a.nodeType)break;e=a,i=e.nodeValue.length}}}else{if(_F(e))break;{let a=e.previousSibling;for(;a&&Fp(a);)r=e.parentNode,o=ro(a),a=a.previousSibling;if(a)e=a,i=dy(e);else{if(e=e.parentNode,e==n.dom)break;i=0}}}s?DS(n,e,i):r&&DS(n,r,o)}(n):gF(n)}function gF(n){let t=n.domSelectionRange(),e=t.focusNode,i=t.focusOffset;if(!e)return;let o,s,r=dy(e);for(;;)if(i{n.state==r&&Zs(n)},50)}function yF(n,t){let e=n.state.doc.resolve(t);if(!Ei&&!Rie&&e.parent.inlineContent){let r=n.coordsAtPos(t);if(t>e.start()){let o=n.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>r.top&&s1)return o.leftr.top&&s1)return o.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(n.dom).direction?"rtl":"ltr"}function vF(n,t,e){let i=n.state.selection;if(i instanceof Le&&!i.empty||e.indexOf("s")>-1||oo&&e.indexOf("m")>-1)return!1;let{$from:r,$to:o}=i;if(!r.parent.inlineContent||n.endOfTextblock(t<0?"up":"down")){let s=SS(n.state,t);if(s&&s instanceof Ee)return _c(n,s)}if(!r.parent.inlineContent){let s=t<0?r:o,a=i instanceof Lr?Fe.near(s,t):Fe.findFrom(s,t);return!!a&&_c(n,a)}return!1}function bF(n,t){if(!(n.state.selection instanceof Le))return!0;let{$head:e,$anchor:i,empty:r}=n.state.selection;if(!e.sameParent(i))return!0;if(!r)return!1;if(n.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!e.textOffset&&(t<0?e.nodeBefore:e.nodeAfter);if(o&&!o.isText){let s=n.state.tr;return t<0?s.delete(e.pos-o.nodeSize,e.pos):s.delete(e.pos,e.pos+o.nodeSize),n.dispatch(s),!0}return!1}function CF(n,t,e){n.domObserver.stop(),t.contentEditable=e,n.domObserver.start()}function wF(n,t){n.someProp("transformCopied",p=>{t=p(t,n)});let e=[],{content:i,openStart:r,openEnd:o}=t;for(;r>1&&o>1&&1==i.childCount&&1==i.firstChild.childCount;){r--,o--;let p=i.firstChild;e.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),i=p.content}let s=n.someProp("clipboardSerializer")||es.fromSchema(n.state.schema),a=OF(),l=a.createElement("div");l.appendChild(s.serializeFragment(i,{document:a}));let u,c=l.firstChild,d=0;for(;c&&1==c.nodeType&&(u=IF[c.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let f=a.createElement(u[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),d++}c=l.firstChild}return c&&1==c.nodeType&&c.setAttribute("data-pm-slice",`${r} ${o}${d?` -${d}`:""} ${JSON.stringify(e)}`),{dom:l,text:n.someProp("clipboardTextSerializer",p=>p(t,n))||t.content.textBetween(0,t.content.size,"\n\n")}}function SF(n,t,e,i,r){let s,a,o=r.parent.type.spec.code;if(!e&&!t)return null;let l=t&&(i||o||!e);if(l){if(n.someProp("transformPastedText",h=>{t=h(t,o||i,n)}),o)return t?new ie(G.from(n.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):ie.empty;let d=n.someProp("clipboardTextParser",h=>h(t,r,i,n));if(d)a=d;else{let h=r.marks(),{schema:p}=n.state,f=es.fromSchema(p);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(m=>{let _=s.appendChild(document.createElement("p"));m&&_.appendChild(f.serializeNode(p.text(m,h)))})}}else n.someProp("transformPastedHTML",d=>{e=d(e,n)}),s=function yre(n){let t=/^(\s*]*>)*/.exec(n);t&&(n=n.slice(t[0].length));let r,e=OF().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(n);if((r=i&&IF[i[1].toLowerCase()])&&(n=r.map(o=>"<"+o+">").join("")+n+r.map(o=>"").reverse().join("")),e.innerHTML=n,r)for(let o=0;o0;d--){let h=s.firstChild;for(;h&&1!=h.nodeType;)h=h.nextSibling;if(!h)break;s=h}if(a||(a=(n.someProp("clipboardParser")||n.someProp("domParser")||rd.fromSchema(n.state.schema)).parseSlice(s,{preserveWhitespace:!(!l&&!u),context:r,ruleFromNode:h=>"BR"!=h.nodeName||h.nextSibling||!h.parentNode||gre.test(h.parentNode.nodeName)?null:{ignore:!0}})),u)a=function bre(n,t){if(!n.size)return n;let i,e=n.content.firstChild.type.schema;try{i=JSON.parse(t)}catch{return n}let{content:r,openStart:o,openEnd:s}=n;for(let a=i.length-2;a>=0;a-=2){let l=e.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;r=G.from(l.create(i[a+1],r)),o++,s++}return new ie(r,o,s)}(EF(a,+u[1],+u[2]),u[4]);else if(a=ie.maxOpen(function _re(n,t){if(n.childCount<2)return n;for(let e=t.depth;e>=0;e--){let o,r=t.node(e).contentMatchAt(t.index(e)),s=[];if(n.forEach(a=>{if(!s)return;let c,l=r.findWrapping(a.type);if(!l)return s=null;if(c=s.length&&o.length&&TF(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=MF(s[s.length-1],o.length));let u=DF(a,l);s.push(u),r=r.matchType(u.type),o=l}}),s)return G.from(s)}return n}(a.content,r),!0),a.openStart||a.openEnd){let d=0,h=0;for(let p=a.content.firstChild;d{a=d(a,n)}),a}const gre=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function DF(n,t,e=0){for(let i=t.length-1;i>=e;i--)n=t[i].create(null,G.from(n));return n}function TF(n,t,e,i,r){if(r1&&(o=0),r=e&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=r).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(G.empty,!0))),n.replaceChild(t<0?0:n.childCount-1,s.copy(a))}function EF(n,t,e){return t0;s--)if(n.someProp(t,a=>s>o.depth?a(n,e,o.nodeAfter,o.before(s),r,!0):a(n,e,o.node(s),o.before(s),r,!1)))return!0;return!1}function vd(n,t,e){n.focused||n.focus();let i=n.state.tr.setSelection(t);"pointer"==e&&i.setMeta("pointer",!0),n.dispatch(i)}function kre(n,t,e,i){return IS(n,"handleDoubleClickOn",t,e,i)||n.someProp("handleDoubleClick",r=>r(n,t,i))}function Are(n,t,e,i){return IS(n,"handleTripleClickOn",t,e,i)||n.someProp("handleTripleClick",r=>r(n,t,i))||function Nre(n,t,e){if(0!=e.button)return!1;let i=n.state.doc;if(-1==t)return!!i.inlineContent&&(vd(n,Le.create(i,0,i.content.size),"pointer"),!0);let r=i.resolve(t);for(let o=r.depth+1;o>0;o--){let s=o>r.depth?r.nodeAfter:r.node(o),a=r.before(o);if(s.inlineContent)vd(n,Le.create(i,a+1,a+1+s.content.size),"pointer");else{if(!Ee.isSelectable(s))continue;vd(n,Ee.create(i,a),"pointer")}return!0}}(n,e,i)}function xS(n){return py(n)}Ki.keydown=(n,t)=>{let e=t;if(n.input.shiftKey=16==e.keyCode||e.shiftKey,!AF(n,e)&&(n.input.lastKeyCode=e.keyCode,n.input.lastKeyCodeTime=Date.now(),!xo||!Ei||13!=e.keyCode))if(229!=e.keyCode&&n.domObserver.forceFlush(),!_d||13!=e.keyCode||e.ctrlKey||e.altKey||e.metaKey)n.someProp("handleKeyDown",i=>i(n,e))||function mre(n,t){let e=t.keyCode,i=function fre(n){let t="";return n.ctrlKey&&(t+="c"),n.metaKey&&(t+="m"),n.altKey&&(t+="a"),n.shiftKey&&(t+="s"),t}(t);if(8==e||oo&&72==e&&"c"==i)return bF(n,-1)||jp(n,-1);if(46==e||oo&&68==e&&"c"==i)return bF(n,1)||jp(n,1);if(13==e||27==e)return!0;if(37==e||oo&&66==e&&"c"==i){let r=37==e?"ltr"==yF(n,n.state.selection.from)?-1:1:-1;return mF(n,r,i)||jp(n,r)}if(39==e||oo&&70==e&&"c"==i){let r=39==e?"ltr"==yF(n,n.state.selection.from)?1:-1:1;return mF(n,r,i)||jp(n,r)}return 38==e||oo&&80==e&&"c"==i?vF(n,-1,i)||jp(n,-1):40==e||oo&&78==e&&"c"==i?function pre(n){if(!Gi||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:e}=n.domSelectionRange();if(t&&1==t.nodeType&&0==e&&t.firstChild&&"false"==t.firstChild.contentEditable){let i=t.firstChild;CF(n,i,"true"),setTimeout(()=>CF(n,i,"false"),20)}return!1}(n)||vF(n,1,i)||gF(n):i==(oo?"m":"c")&&(66==e||73==e||89==e||90==e)}(n,e)?e.preventDefault():Ga(n,"key");else{let i=Date.now();n.input.lastIOSEnter=i,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==i&&(n.someProp("handleKeyDown",r=>r(n,pc(13,"Enter"))),n.input.lastIOSEnter=0)},200)}},Ki.keyup=(n,t)=>{16==t.keyCode&&(n.input.shiftKey=!1)},Ki.keypress=(n,t)=>{let e=t;if(AF(n,e)||!e.charCode||e.ctrlKey&&!e.altKey||oo&&e.metaKey)return;if(n.someProp("handleKeyPress",r=>r(n,e)))return void e.preventDefault();let i=n.state.selection;if(!(i instanceof Le&&i.$from.sameParent(i.$to))){let r=String.fromCharCode(e.charCode);!/[\r\n]/.test(r)&&!n.someProp("handleTextInput",o=>o(n,i.$from.pos,i.$to.pos,r))&&n.dispatch(n.state.tr.insertText(r).scrollIntoView()),e.preventDefault()}};const kF=oo?"metaKey":"ctrlKey";qi.mousedown=(n,t)=>{let e=t;n.input.shiftKey=e.shiftKey;let i=xS(n),r=Date.now(),o="singleClick";r-n.input.lastClick.time<500&&function Ere(n,t){let e=t.x-n.clientX,i=t.y-n.clientY;return e*e+i*i<100}(e,n.input.lastClick)&&!e[kF]&&("singleClick"==n.input.lastClick.type?o="doubleClick":"doubleClick"==n.input.lastClick.type&&(o="tripleClick")),n.input.lastClick={time:r,x:e.clientX,y:e.clientY,type:o};let s=n.posAtCoords(hy(e));s&&("singleClick"==o?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new Lre(n,s,e,!!i)):("doubleClick"==o?kre:Are)(n,s.pos,s.inside,e)?e.preventDefault():Ga(n,"pointer"))};class Lre{constructor(t,e,i,r){let o,s;if(this.view=t,this.pos=e,this.event=i,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!i[kF],this.allowDefault=i.shiftKey,e.inside>-1)o=t.state.doc.nodeAt(e.inside),s=e.inside;else{let u=t.state.doc.resolve(e.pos);o=u.parent,s=u.depth?u.before():0}const a=r?null:i.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l?l.dom:null;let{selection:c}=t.state;(0==i.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||c instanceof Ee&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Io||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Ga(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>Zs(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let e=this.pos;this.view.state.doc!=this.startDoc&&(e=this.view.posAtCoords(hy(t))),this.updateAllowDefault(t),this.allowDefault||!e?Ga(this.view,"pointer"):function Ore(n,t,e,i,r){return IS(n,"handleClickOn",t,e,i)||n.someProp("handleClick",o=>o(n,t,i))||(r?function xre(n,t){if(-1==t)return!1;let i,r,e=n.state.selection;e instanceof Ee&&(i=e.node);let o=n.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if(Ee.isSelectable(a)){r=i&&e.$from.depth>0&&s>=e.$from.depth&&o.before(e.$from.depth+1)==e.$from.pos?o.before(e.$from.depth):o.before(s);break}}return null!=r&&(vd(n,Ee.create(n.state.doc,r),"pointer"),!0)}(n,e):function Ire(n,t){if(-1==t)return!1;let e=n.state.doc.resolve(t),i=e.nodeAfter;return!!(i&&i.isAtom&&Ee.isSelectable(i))&&(vd(n,new Ee(e),"pointer"),!0)}(n,e))}(this.view,e.pos,e.inside,t,this.selectNode)?t.preventDefault():0==t.button&&(this.flushed||Gi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ei&&!this.view.state.selection.visible&&Math.min(Math.abs(e.pos-this.view.state.selection.from),Math.abs(e.pos-this.view.state.selection.to))<=2)?(vd(this.view,Fe.near(this.view.state.doc.resolve(e.pos)),"pointer"),t.preventDefault()):Ga(this.view,"pointer")}move(t){this.updateAllowDefault(t),Ga(this.view,"pointer"),0==t.buttons&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}function AF(n,t){return!!n.composing||!!(Gi&&Math.abs(t.timeStamp-n.input.compositionEndedAt)<500)&&(n.input.compositionEndedAt=-2e8,!0)}qi.touchstart=n=>{n.input.lastTouch=Date.now(),xS(n),Ga(n,"pointer")},qi.touchmove=n=>{n.input.lastTouch=Date.now(),Ga(n,"pointer")},qi.contextmenu=n=>xS(n);const Pre=xo?5e3:-1;function NF(n,t){clearTimeout(n.input.composingTimeout),t>-1&&(n.input.composingTimeout=setTimeout(()=>py(n),t))}function py(n,t=!1){if(!(xo&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),function LF(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=function Rre(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}(n),t||n.docView&&n.docView.dirty){let e=function bS(n,t=null){let e=n.domSelectionRange(),i=n.state.doc;if(!e.focusNode)return null;let r=n.docView.nearestDesc(e.focusNode),o=r&&0==r.size,s=n.docView.posFromDOM(e.focusNode,e.focusOffset,1);if(s<0)return null;let l,c,a=i.resolve(s);if(ly(e)){for(l=a;r&&!r.node;)r=r.parent;let u=r.node;if(r&&u.isAtom&&Ee.isSelectable(u)&&r.parent&&(!u.isInline||!function kie(n,t,e){for(let i=0==t,r=t==as(n);i||r;){if(n==e)return!0;let o=ro(n);if(!(n=n.parentNode))return!1;i=i&&0==o,r=r&&o==as(n)}}(e.focusNode,e.focusOffset,r.dom))){let d=r.posBefore;c=new Ee(s==d?a:i.resolve(d))}}else{let u=n.docView.posFromDOM(e.anchorNode,e.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}return c||(c=wS(n,l,a,"pointer"==t||n.state.selection.head{if(!n.composing){n.domObserver.flush();let{state:t}=n,e=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!e.textOffset&&e.parentOffset&&e.nodeBefore.marks.some(i=>!1===i.type.spec.inclusive)))n.markCursor=n.state.storedMarks||e.marks(),py(n,!0),n.markCursor=null;else if(py(n),Io&&t.selection.empty&&e.parentOffset&&!e.textOffset&&e.nodeBefore.marks.length){let i=n.domSelectionRange();for(let r=i.focusNode,o=i.focusOffset;r&&1==r.nodeType&&0!=o;){let s=o<0?r.lastChild:r.childNodes[o-1];if(!s)break;if(3==s.nodeType){n.domSelection().collapse(s,s.nodeValue.length);break}r=s,o=-1}}n.input.composing=!0}NF(n,Pre)},Ki.compositionend=(n,t)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=t.timeStamp,n.input.compositionID++,NF(n,20))};const bd=ur&&Ua<15||_d&&Fie<604;function Vp(n,t,e,i,r){let o=SF(n,t,e,i,n.state.selection.$from);if(n.someProp("handlePaste",l=>l(n,r,o||ie.empty)))return!0;if(!o)return!1;let s=function jre(n){return 0==n.openStart&&0==n.openEnd&&1==n.content.childCount?n.content.firstChild:null}(o),a=s?n.state.tr.replaceSelectionWith(s,n.input.shiftKey):n.state.tr.replaceSelection(o);return n.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}qi.copy=Ki.cut=(n,t)=>{let e=t,i=n.state.selection,r="cut"==e.type;if(i.empty)return;let o=bd?null:e.clipboardData,s=i.content(),{dom:a,text:l}=wF(n,s);o?(e.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function Fre(n,t){if(!n.dom.parentNode)return;let e=n.dom.parentNode.appendChild(document.createElement("div"));e.appendChild(t),e.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),r=document.createRange();r.selectNodeContents(t),n.dom.blur(),i.removeAllRanges(),i.addRange(r),setTimeout(()=>{e.parentNode&&e.parentNode.removeChild(e),n.focus()},50)}(n,a),r&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Ki.paste=(n,t)=>{let e=t;if(n.composing&&!xo)return;let i=bd?null:e.clipboardData;i&&Vp(n,i.getData("text/plain"),i.getData("text/html"),n.input.shiftKey,e)?e.preventDefault():function Vre(n,t){if(!n.dom.parentNode)return;let e=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,i=n.dom.parentNode.appendChild(document.createElement(e?"textarea":"div"));e||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout(()=>{n.focus(),i.parentNode&&i.parentNode.removeChild(i),e?Vp(n,i.value,null,n.input.shiftKey,t):Vp(n,i.textContent,i.innerHTML,n.input.shiftKey,t)},50)}(n,e)};class zre{constructor(t,e){this.slice=t,this.move=e}}const PF=oo?"altKey":"ctrlKey";qi.dragstart=(n,t)=>{let e=t,i=n.input.mouseDown;if(i&&i.done(),!e.dataTransfer)return;let r=n.state.selection,o=r.empty?null:n.posAtCoords(hy(e));if(!(o&&o.pos>=r.from&&o.pos<=(r instanceof Ee?r.to-1:r.to)))if(i&&i.mightDrag)n.dispatch(n.state.tr.setSelection(Ee.create(n.state.doc,i.mightDrag.pos)));else if(e.target&&1==e.target.nodeType){let c=n.docView.nearestDesc(e.target,!0);c&&c.node.type.spec.draggable&&c!=n.docView&&n.dispatch(n.state.tr.setSelection(Ee.create(n.state.doc,c.posBefore)))}let s=n.state.selection.content(),{dom:a,text:l}=wF(n,s);e.dataTransfer.clearData(),e.dataTransfer.setData(bd?"Text":"text/html",a.innerHTML),e.dataTransfer.effectAllowed="copyMove",bd||e.dataTransfer.setData("text/plain",l),n.dragging=new zre(s,!e[PF])},qi.dragend=n=>{let t=n.dragging;window.setTimeout(()=>{n.dragging==t&&(n.dragging=null)},50)},Ki.dragover=Ki.dragenter=(n,t)=>t.preventDefault(),Ki.drop=(n,t)=>{let e=t,i=n.dragging;if(n.dragging=null,!e.dataTransfer)return;let r=n.posAtCoords(hy(e));if(!r)return;let o=n.state.doc.resolve(r.pos),s=i&&i.slice;s?n.someProp("transformPasted",f=>{s=f(s,n)}):s=SF(n,e.dataTransfer.getData(bd?"Text":"text/plain"),bd?null:e.dataTransfer.getData("text/html"),!1,o);let a=!(!i||e[PF]);if(n.someProp("handleDrop",f=>f(n,e,s||ie.empty,a)))return void e.preventDefault();if(!s)return;e.preventDefault();let l=s?NP(n.state.doc,o.pos,s):o.pos;null==l&&(l=o.pos);let c=n.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,h=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(h))return;let p=c.doc.resolve(u);if(d&&Ee.isSelectable(s.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ee(p));else{let f=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,_,b,T)=>f=T),c.setSelection(wS(n,p,c.doc.resolve(f)))}n.focus(),n.dispatch(c.setMeta("uiEvent","drop"))},qi.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&Zs(n)},20))},qi.blur=(n,t)=>{let e=t;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),e.relatedTarget&&n.dom.contains(e.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)},qi.beforeinput=(n,t)=>{if(Ei&&xo&&"deleteContentBackward"==t.inputType){n.domObserver.flushSoon();let{domChangeCount:i}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=i||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",o=>o(n,pc(8,"Backspace")))))return;let{$cursor:r}=n.state.selection;r&&r.pos>0&&n.dispatch(n.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let n in Ki)qi[n]=Ki[n];function zp(n,t){if(n==t)return!0;for(let e in n)if(n[e]!==t[e])return!1;for(let e in t)if(!(e in n))return!1;return!0}class OS{constructor(t,e){this.toDOM=t,this.spec=e||yc,this.side=this.spec.side||0}map(t,e,i,r){let{pos:o,deleted:s}=t.mapResult(e.from+r,this.side<0?-1:1);return s?null:new Gn(o-i,o-i,this)}valid(){return!0}eq(t){return this==t||t instanceof OS&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&zp(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class qa{constructor(t,e){this.attrs=t,this.spec=e||yc}map(t,e,i,r){let o=t.map(e.from+r,this.spec.inclusiveStart?-1:1)-i,s=t.map(e.to+r,this.spec.inclusiveEnd?1:-1)-i;return o>=s?null:new Gn(o,s,this)}valid(t,e){return e.from=t&&(!o||o(a.spec))&&i.push(a.copy(a.from+r,a.to+r))}for(let s=0;st){let a=this.children[s]+1;this.children[s+2].findInner(t-a,e-a,i,r+a,o)}}map(t,e,i){return this==Ii||0==t.maps.length?this:this.mapInner(t,e,0,0,i||yc)}mapInner(t,e,i,r,o){let s;for(let a=0;a{let _=m-f-(p-h);for(let b=0;bT+u-d)continue;let M=a[b]+u-d;p>=M?a[b+1]=h<=M?-2:-1:f>=r&&_&&(a[b]+=_,a[b+1]+=_)}d+=_}),u=e.maps[c].map(u,-1)}let l=!1;for(let c=0;c=i.content.size){l=!0;continue}let p=e.map(n[c+1]+o,-1)-r,{index:f,offset:m}=i.content.findIndex(d),_=i.maybeChild(f);if(_&&m==d&&m+_.nodeSize==p){let b=a[c+2].mapInner(e,_,u+1,n[c]+o+1,s);b!=Ii?(a[c]=d,a[c+1]=p,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=function Ure(n,t,e,i,r,o,s){function a(l,c){for(let u=0;u{let u,c=l+i;if(u=FF(e,a,c)){for(r||(r=this.children.slice());oa&&d.to=t){this.children[a]==t&&(i=this.children[a+2]);break}let o=t+1,s=o+e.content.size;for(let a=0;ao&&l.type instanceof qa){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;cr.map(t,e,yc));return Ka.from(i)}forChild(t,e){if(e.isLeaf)return en.empty;let i=[];for(let r=0;re instanceof en)?t:t.reduce((e,i)=>e.concat(i instanceof en?i:i.members),[]))}}}function RF(n,t){if(!t||!n.length)return n;let e=[];for(let i=0;ie&&s.to{let c=FF(n,a,l+e);if(c){o=!0;let u=fy(c,a,e+l+1,i);u!=Ii&&r.push(l,l+a.nodeSize,u)}});let s=RF(o?jF(n):n,-e).sort(vc);for(let a=0;a0;)t++;n.splice(t,0,e)}for(var Ya={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},my={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ooe=typeof navigator<"u"&&/Mac/.test(navigator.platform),soe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),hi=0;hi<10;hi++)Ya[48+hi]=Ya[96+hi]=String(hi);for(hi=1;hi<=24;hi++)Ya[hi+111]="F"+hi;for(hi=65;hi<=90;hi++)Ya[hi]=String.fromCharCode(hi+32),my[hi]=String.fromCharCode(hi);for(var PS in Ya)my.hasOwnProperty(PS)||(my[PS]=Ya[PS]);const loe=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function coe(n){let i,r,o,s,t=n.split(/-(?!$)/),e=t[t.length-1];"Space"==e&&(e=" ");for(let a=0;a127)&&(o=Ya[i.keyCode])&&o!=r){let a=t[RS(o,i)];if(a&&a(e.state,e.dispatch,e))return!0}}return!1}}const jS=(n,t)=>!n.selection.empty&&(t&&t(n.tr.deleteSelection().scrollIntoView()),!0);const YF=(n,t,e)=>{let i=function KF(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("backward",n):e.parentOffset>0)?null:e}(n,e);if(!i)return!1;let r=VS(i);if(!r){let s=i.blockRange(),a=s&&ad(s);return null!=a&&(t&&t(n.tr.lift(s,a).scrollIntoView()),!0)}let o=r.nodeBefore;if(!o.type.spec.isolating&&a3(n,r,t))return!0;if(0==i.parent.content.size&&(wd(o,"end")||Ee.isSelectable(o))){let s=B1(n.doc,i.before(),i.after(),ie.empty);if(s&&s.slice.size{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("backward",n):i.parentOffset>0)return!1;o=VS(i)}let s=o&&o.nodeBefore;return!(!s||!Ee.isSelectable(s)||(t&&t(n.tr.setSelection(Ee.create(n.doc,o.pos-s.nodeSize)).scrollIntoView()),0))};function VS(n){if(!n.parent.type.spec.isolating)for(let t=n.depth-1;t>=0;t--){if(n.index(t)>0)return n.doc.resolve(n.before(t+1));if(n.node(t).type.spec.isolating)break}return null}const XF=(n,t,e)=>{let i=function JF(n,t){let{$cursor:e}=n.selection;return!e||(t?!t.endOfTextblock("forward",n):e.parentOffset{let{$head:i,empty:r}=n.selection,o=i;if(!r)return!1;if(i.parent.isTextblock){if(e?!e.endOfTextblock("forward",n):i.parentOffset=0;t--){let e=n.node(t);if(n.index(t)+1{let{$head:e,$anchor:i}=n.selection;return!(!e.parent.type.spec.code||!e.sameParent(i)||(t&&t(n.tr.insertText("\n").scrollIntoView()),0))};function BS(n){for(let t=0;t{let{$head:e,$anchor:i}=n.selection;if(!e.parent.type.spec.code||!e.sameParent(i))return!1;let r=e.node(-1),o=e.indexAfter(-1),s=BS(r.contentMatchAt(o));if(!s||!r.canReplaceWith(o,o,s))return!1;if(t){let a=e.after(),l=n.tr.replaceWith(a,a,s.createAndFill());l.setSelection(Fe.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},r3=(n,t)=>{let e=n.selection,{$from:i,$to:r}=e;if(e instanceof Lr||i.parent.inlineContent||r.parent.inlineContent)return!1;let o=BS(r.parent.contentMatchAt(r.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!i.parentOffset&&r.index(){let{$cursor:e}=n.selection;if(!e||e.parent.content.size)return!1;if(e.depth>1&&e.after()!=e.end(-1)){let o=e.before();if(Ks(n.doc,o))return t&&t(n.tr.split(o).scrollIntoView()),!0}let i=e.blockRange(),r=i&&ad(i);return null!=r&&(t&&t(n.tr.lift(i,r).scrollIntoView()),!0)},s3=function moe(n){return(t,e)=>{let{$from:i,$to:r}=t.selection;if(t.selection instanceof Ee&&t.selection.node.isBlock)return!(!i.parentOffset||!Ks(t.doc,i.pos)||(e&&e(t.tr.split(i.pos).scrollIntoView()),0));if(!i.parent.isBlock)return!1;if(e){let o=r.parentOffset==r.parent.content.size,s=t.tr;(t.selection instanceof Le||t.selection instanceof Lr)&&s.deleteSelection();let a=0==i.depth?null:BS(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=n&&n(r.parent,o),c=l?[l]:o&&a?[{type:a}]:void 0,u=Ks(s.doc,s.mapping.map(i.pos),1,c);if(!c&&!u&&Ks(s.doc,s.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(s.split(s.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=s.mapping.map(i.before()),h=s.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&s.setNodeMarkup(s.mapping.map(i.before()),a)}e(s.scrollIntoView())}return!0}}();function a3(n,t,e){let o,s,i=t.nodeBefore,r=t.nodeAfter;if(i.type.spec.isolating||r.type.spec.isolating)return!1;if(function yoe(n,t,e){let i=t.nodeBefore,r=t.nodeAfter,o=t.index();return!(!(i&&r&&i.type.compatibleContent(r.type))||(!i.content.size&&t.parent.canReplace(o-1,o)?(e&&e(n.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(o,o+1)||!r.isTextblock&&!Ra(n.doc,t.pos)||(e&&e(n.tr.clearIncompatible(t.pos,i.type,i.contentMatchAt(i.childCount)).join(t.pos).scrollIntoView()),0)))}(n,t,e))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(r.type))&&s.matchType(o[0]||r.type).validEnd){if(e){let d=t.pos+r.nodeSize,h=G.empty;for(let m=o.length-1;m>=0;m--)h=G.from(o[m].create(null,h));h=G.from(i.copy(h));let p=n.tr.step(new ti(t.pos-1,d,t.pos,d,new ie(h,1,0),o.length,!0)),f=d+2*o.length;Ra(p.doc,f)&&p.join(f),e(p.scrollIntoView())}return!0}let l=Fe.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&ad(c);if(null!=u&&u>=t.depth)return e&&e(n.tr.lift(c,u).scrollIntoView()),!0;if(a&&wd(r,"start",!0)&&wd(i,"end")){let d=i,h=[];for(;h.push(d),!d.isTextblock;)d=d.lastChild;let p=r,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(d.canReplace(d.childCount,d.childCount,p.content)){if(e){let m=G.empty;for(let b=h.length-1;b>=0;b--)m=G.from(h[b].copy(m));e(n.tr.step(new ti(t.pos-h.length,t.pos+r.nodeSize,t.pos+f,t.pos+r.nodeSize-f,new ie(m,h.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function l3(n){return function(t,e){let i=t.selection,r=n<0?i.$from:i.$to,o=r.depth;for(;r.node(o).isInline;){if(!o)return!1;o--}return!!r.node(o).isTextblock&&(e&&e(t.tr.setSelection(Le.create(t.doc,n<0?r.start(o):r.end(o)))),!0)}}const c3=l3(-1),u3=l3(1);function d3(n,t=null){return function(e,i){let r=!1;for(let o=0;o{if(r)return!1;if(l.isTextblock&&!l.hasMarkup(n,t))if(l.type==n)r=!0;else{let u=e.doc.resolve(c),d=u.index();r=u.parent.canReplaceWith(d,d+1,n)}})}if(!r)return!1;if(i){let o=e.tr;for(let s=0;s(t&&t(n.tr.setSelection(new Lr(n.doc))),!0)},woe={"Ctrl-h":Qa.Backspace,"Alt-Backspace":Qa["Mod-Backspace"],"Ctrl-d":Qa.Delete,"Ctrl-Alt-Backspace":Qa["Mod-Delete"],"Alt-Delete":Qa["Mod-Delete"],"Alt-d":Qa["Mod-Delete"],"Ctrl-a":c3,"Ctrl-e":u3};for(let n in Qa)woe[n]=Qa[n];function gy(n){const{state:t,transaction:e}=n;let{selection:i}=e,{doc:r}=e,{storedMarks:o}=e;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return i},get doc(){return r},get tr(){return i=e.selection,r=e.doc,o=e.storedMarks,e}}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform();class _y{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:i}=this,{view:r}=e,{tr:o}=i,s=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...u)=>{const d=l(...u)(s);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r,a=[],l=!!t,c=t||o.tr,d={...Object.fromEntries(Object.entries(i).map(([h,p])=>[h,(...m)=>{const _=this.buildProps(c,e),b=p(...m)(_);return a.push(b),d}])),run:()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(c),a.every(h=>!0===h))};return d}createCan(t){const{rawCommands:e,state:i}=this,o=t||i.tr,s=this.buildProps(o,!1);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...u)=>c(...u)({...s,dispatch:void 0})])),chain:()=>this.createChain(o,!1)}}buildProps(t,e=!0){const{rawCommands:i,editor:r,state:o}=this,{view:s}=r;o.storedMarks&&t.setStoredMarks(o.storedMarks);const a={tr:t,editor:r,view:s,state:gy({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(i).map(([l,c])=>[l,(...u)=>c(...u)(a)]))}};return a}}function ge(n,t,e){return void 0===n.config[t]&&n.parent?ge(n.parent,t,e):"function"==typeof n.config[t]?n.config[t].bind({...e,parent:n.parent?ge(n.parent,t,e):null}):n.config[t]}function ni(n,t){if("string"==typeof n){if(!t.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return t.nodes[n]}return n}function vt(...n){return n.filter(t=>!!t).reduce((t,e)=>{const i={...t};return Object.entries(e).forEach(([r,o])=>{i[r]=i[r]?"class"===r?[i[r],o].join(" "):"style"===r?[i[r],o].join("; "):o:o}),i},{})}function Qe(n,t,...e){return function f3(n){return"function"==typeof n}(n)?t?n.bind(t)(...e):n(...e):n}class Bp{constructor(t){this.find=t.find,this.handler=t.handler}}class YS{constructor(t){this.find=t.find,this.handler=t.handler}}function QS(n){return"Object"===function Goe(n){return Object.prototype.toString.call(n).slice(8,-1)}(n)&&n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function vy(n,t){const e={...n};return QS(n)&&QS(t)&&Object.keys(t).forEach(i=>{QS(t[i])?i in n?e[i]=vy(n[i],t[i]):Object.assign(e,{[i]:t[i]}):Object.assign(e,{[i]:t[i]})}),e}class Ut{constructor(t={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qe(ge(this,"addOptions",{name:this.name}))),this.storage=Qe(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Ut(t)}configure(t={}){const e=this.extend();return e.options=vy(this.options,t),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Ut(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Qe(ge(e,"addOptions",{name:e.name})),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}}function ZS(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,t])=>t.spec.toText).map(([t,e])=>[t,e.spec.toText]))}function by(n,t,e={strict:!0}){const i=Object.keys(t);return!i.length||i.every(r=>e.strict?t[r]===n[r]:function qS(n){return"[object RegExp]"===Object.prototype.toString.call(n)}(t[r])?t[r].test(n[r]):t[r]===n[r])}function JS(n,t,e={}){return n.find(i=>i.type===t&&by(i.attrs,e))}function ose(n,t,e={}){return!!JS(n,t,e)}function XS(n,t,e={}){if(!n||!t)return;let i=n.parent.childAfter(n.parentOffset);if(n.parentOffset===i.offset&&0!==i.offset&&(i=n.parent.childBefore(n.parentOffset)),!i.node)return;const r=JS([...i.node.marks],t,e);if(!r)return;let o=i.index,s=n.start()+i.offset,a=o+1,l=s+i.node.nodeSize;for(JS([...i.node.marks],t,e);o>0&&r.isInSet(n.parent.child(o-1).marks);)o-=1,s-=n.parent.child(o).nodeSize;for(;a${n}`;return(new window.DOMParser).parseFromString(t,"text/html").body}function Sy(n,t,e){if(e={slice:!0,parseOptions:{},...e},"object"==typeof n&&null!==n)try{return Array.isArray(n)&&n.length>0?G.fromArray(n.map(i=>t.nodeFromJSON(i))):t.nodeFromJSON(n)}catch(i){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",i),Sy("",t,e)}if("string"==typeof n){const i=rd.fromSchema(t);return e.slice?i.parseSlice(eD(n),e.parseOptions).content:i.parse(eD(n),e.parseOptions)}return Sy("",t,e)}function C3(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)}function Up(n,t,e={}){const{from:i,to:r,empty:o}=n.selection,s=t?ni(t,n.schema):null,a=[];n.doc.nodesBetween(i,r,(d,h)=>{if(d.isText)return;const p=Math.max(i,h),f=Math.min(r,h+d.nodeSize);a.push({node:d,from:p,to:f})});const l=r-i,c=a.filter(d=>!s||s.name===d.node.type.name).filter(d=>by(d.node.attrs,e,{strict:!1}));return o?!!c.length:c.reduce((d,h)=>d+h.to-h.from,0)>=l}function Dy(n,t){return t.nodes[n]?"node":t.marks[n]?"mark":null}function w3(n,t){const e="string"==typeof t?[t]:t;return Object.keys(n).reduce((i,r)=>(e.includes(r)||(i[r]=n[r]),i),{})}function D3(n,t){for(let e=n.depth;e>0;e-=1){const i=n.node(e);if(t(i))return{pos:e>0?n.before(e):0,start:n.start(e),depth:e,node:i}}}function tD(n){return t=>D3(t.$from,n)}function Ty(n,t){const e=Za(t,n.schema),{from:i,to:r,empty:o}=n.selection,s=[];o?(n.storedMarks&&s.push(...n.storedMarks),s.push(...n.selection.$head.marks())):n.doc.nodesBetween(i,r,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===e.name);return a?{...a.attrs}:{}}function My(n,t,e){const i=[];return n===t?e.resolve(n).marks().forEach(r=>{const s=XS(e.resolve(n-1),r.type);s&&i.push({mark:r,...s})}):e.nodesBetween(n,t,(r,o)=>{i.push(...r.marks.map(s=>({from:o,to:o+r.nodeSize,mark:s})))}),i}function Ey(n,t,e){return Object.fromEntries(Object.entries(e).filter(([i])=>{const r=n.find(o=>o.type===t&&o.name===i);return!!r&&r.attribute.keepOnSplit}))}function I3(n,t){const{nodeExtensions:e}=function yy(n){return{baseExtensions:n.filter(r=>"extension"===r.type),nodeExtensions:n.filter(r=>"node"===r.type),markExtensions:n.filter(r=>"mark"===r.type)}}(t),i=e.find(s=>s.name===n);if(!i)return!1;const o=Qe(ge(i,"group",{name:i.name,options:i.options,storage:i.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function x3(n,t){const e=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(e){const i=e.filter(r=>t?.includes(r.type.name));n.tr.ensureMarks(i)}}Ut.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new pt({key:new Et("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:t,schema:e}=n,{doc:i,selection:r}=t,{ranges:o}=r;return function v3(n,t,e){const{from:i,to:r}=t,{blockSeparator:o="\n\n",textSerializers:s={}}=e||{};let a="",l=!0;return n.nodesBetween(i,r,(c,u,d,h)=>{var p;const f=s?.[c.type.name];f?(c.isBlock&&!l&&(a+=o,l=!0),d&&(a+=f({node:c,pos:u,parent:d,index:h,range:t}))):c.isText?(a+=null===(p=c?.text)||void 0===p?void 0:p.slice(Math.max(i,u)-u,r-u),l=!1):c.isBlock&&!l&&(a+=o,l=!0)}),a}(i,{from:Math.min(...o.map(u=>u.$from.pos)),to:Math.max(...o.map(u=>u.$to.pos))},{textSerializers:ZS(e)})}}})]}});const rD=(n,t)=>{const e=tD(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(Math.max(0,e.pos-1)).before(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Ra(n.doc,e.pos)&&n.join(e.pos),!0},oD=(n,t)=>{const e=tD(s=>s.type===t)(n.selection);if(!e)return!0;const i=n.doc.resolve(e.start).after(e.depth);if(void 0===i)return!0;const r=n.doc.nodeAt(i);return e.node.type===r?.type&&Ra(n.doc,i)&&n.join(i),!0};var Xse=Object.freeze({__proto__:null,blur:()=>({editor:n,view:t})=>(requestAnimationFrame(()=>{var e;n.isDestroyed||(t.dom.blur(),null===(e=window?.getSelection())||void 0===e||e.removeAllRanges())}),!0),clearContent:(n=!1)=>({commands:t})=>t.setContent("",n),clearNodes:()=>({state:n,tr:t,dispatch:e})=>{const{selection:i}=t,{ranges:r}=i;return e&&r.forEach(({$from:o,$to:s})=>{n.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:u}=t,d=c.resolve(u.map(l)),h=c.resolve(u.map(l+a.nodeSize)),p=d.blockRange(h);if(!p)return;const f=ad(p);if(a.type.isTextblock){const{defaultType:m}=d.parent.contentMatchAt(d.index());t.setNodeMarkup(p.start,m)}(f||0===f)&&t.lift(p,f)})}),!0},command:n=>t=>n(t),createParagraphNear:()=>({state:n,dispatch:t})=>r3(n,t),deleteCurrentNode:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,i=e.$anchor.node();if(i.content.size>0)return!1;const r=n.selection.$anchor;for(let o=r.depth;o>0;o-=1)if(r.node(o).type===i.type){if(t){const a=r.before(o),l=r.after(o);n.delete(a,l).scrollIntoView()}return!0}return!1},deleteNode:n=>({tr:t,state:e,dispatch:i})=>{const r=ni(n,e.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r){if(i){const l=o.before(s),c=o.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},deleteRange:n=>({tr:t,dispatch:e})=>{const{from:i,to:r}=n;return e&&t.delete(i,r),!0},deleteSelection:()=>({state:n,dispatch:t})=>jS(n,t),enter:()=>({commands:n})=>n.keyboardShortcut("Enter"),exitCode:()=>({state:n,dispatch:t})=>n3(n,t),extendMarkRange:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const o=Za(n,i.schema),{doc:s,selection:a}=e,{$from:l,from:c,to:u}=a;if(r){const d=XS(l,o,t);if(d&&d.from<=c&&d.to>=u){const h=Le.create(s,d.from,d.to);e.setSelection(h)}}return!0},first:n=>t=>{const e="function"==typeof n?n(t):n;for(let i=0;i({editor:e,view:i,tr:r,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{wy()&&i.dom.focus(),requestAnimationFrame(()=>{e.isDestroyed||(i.focus(),t?.scrollIntoView&&e.commands.scrollIntoView())})};if(i.hasFocus()&&null===n||!1===n)return!0;if(o&&null===n&&!Cy(e.state.selection))return s(),!0;const a=function b3(n,t=null){if(!t)return null;const e=Fe.atStart(n),i=Fe.atEnd(n);if("start"===t||!0===t)return e;if("end"===t)return i;const r=e.from,o=i.to;return"all"===t?Le.create(n,Js(0,r,o),Js(n.content.size,r,o)):Le.create(n,Js(t,r,o),Js(t,r,o))}(r.doc,n)||e.state.selection,l=e.state.selection.eq(a);return o&&(l||r.setSelection(a),l&&r.storedMarks&&r.setStoredMarks(r.storedMarks),s()),!0},forEach:(n,t)=>e=>n.every((i,r)=>t(i,{...e,index:r})),insertContent:(n,t)=>({tr:e,commands:i})=>i.insertContentAt({from:e.selection.from,to:e.selection.to},n,t),insertContentAt:(n,t,e)=>({tr:i,dispatch:r,editor:o})=>{if(r){e={parseOptions:{},updateSelection:!0,...e};const s=Sy(t,o.schema,{parseOptions:{preserveWhitespace:"full",...e.parseOptions}});if("<>"===s.toString())return!0;let{from:a,to:l}="number"==typeof n?{from:n,to:n}:n,c=!0,u=!0;if(((n=>n.toString().startsWith("<"))(s)?s:[s]).forEach(h=>{h.check(),c=!!c&&h.isText&&0===h.marks.length,u=!!u&&h.isBlock}),a===l&&u){const{parent:h}=i.doc.resolve(a);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(a-=1,l+=1)}c?Array.isArray(t)?i.insertText(t.map(h=>h.text||"").join(""),a,l):i.insertText("object"==typeof t&&t&&t.text?t.text:t,a,l):i.replaceWith(a,l,s),e.updateSelection&&function dse(n,t,e){const i=n.steps.length-1;if(i{0===s&&(s=u)}),n.setSelection(Fe.near(n.doc.resolve(s),e))}(i,i.steps.length-1,-1)}return!0},joinUp:()=>({state:n,dispatch:t})=>((n,t)=>{let r,e=n.selection,i=e instanceof Ee;if(i){if(e.node.isTextblock||!Ra(n.doc,e.from))return!1;r=e.from}else if(r=AP(n.doc,e.from,-1),null==r)return!1;if(t){let o=n.tr.join(r);i&&o.setSelection(Ee.create(o.doc,r-n.doc.resolve(r).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0})(n,t),joinDown:()=>({state:n,dispatch:t})=>((n,t)=>{let i,e=n.selection;if(e instanceof Ee){if(e.node.isTextblock||!Ra(n.doc,e.to))return!1;i=e.to}else if(i=AP(n.doc,e.to,1),null==i)return!1;return t&&t(n.tr.join(i).scrollIntoView()),!0})(n,t),joinBackward:()=>({state:n,dispatch:t})=>YF(n,t),joinForward:()=>({state:n,dispatch:t})=>XF(n,t),keyboardShortcut:n=>({editor:t,view:e,tr:i,dispatch:r})=>{const o=function yse(n){const t=n.split(/-(?!$)/);let i,r,o,s,e=t[t.length-1];"Space"===e&&(e=" ");for(let a=0;a!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{e.someProp("handleKeyDown",c=>c(e,a))})?.steps.forEach(c=>{const u=c.map(i.mapping);u&&r&&i.maybeStep(u)}),!0},lift:(n,t={})=>({state:e,dispatch:i})=>!!Up(e,ni(n,e.schema),t)&&((n,t)=>{let{$from:e,$to:i}=n.selection,r=e.blockRange(i),o=r&&ad(r);return null!=o&&(t&&t(n.tr.lift(r,o).scrollIntoView()),!0)})(e,i),liftEmptyBlock:()=>({state:n,dispatch:t})=>o3(n,t),liftListItem:n=>({state:t,dispatch:e})=>function koe(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,s=>s.childCount>0&&s.firstChild.type==n);return!!o&&(!e||(i.node(o.depth-1).type==n?function Aoe(n,t,e,i){let r=n.tr,o=i.end,s=i.$to.end(i.depth);om;f--)p-=r.child(f).nodeSize,i.delete(p-1,p+1);let o=i.doc.resolve(e.start),s=o.nodeAfter;if(i.mapping.map(e.end)!=e.start+o.nodeAfter.nodeSize)return!1;let a=0==e.startIndex,l=e.endIndex==r.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?G.empty:G.from(r))))return!1;let d=o.pos,h=d+s.nodeSize;return i.step(new ti(d-(a?1:0),h+(l?1:0),d+1,h-1,new ie((a?G.empty:G.from(r.copy(G.empty))).append(l?G.empty:G.from(r.copy(G.empty))),a?0:1,l?0:1),a?0:1)),t(i.scrollIntoView()),!0}(t,e,o)))}}(ni(n,t.schema))(t,e),newlineInCode:()=>({state:n,dispatch:t})=>t3(n,t),resetAttributes:(n,t)=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Dy("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=ni(n,i.schema)),"mark"===a&&(s=Za(n,i.schema)),r&&e.selection.ranges.forEach(l=>{i.doc.nodesBetween(l.$from.pos,l.$to.pos,(c,u)=>{o&&o===c.type&&e.setNodeMarkup(u,void 0,w3(c.attrs,t)),s&&c.marks.length&&c.marks.forEach(d=>{s===d.type&&e.addMark(u,u+c.nodeSize,s.create(w3(d.attrs,t)))})})}),!0)},scrollIntoView:()=>({tr:n,dispatch:t})=>(t&&n.scrollIntoView(),!0),selectAll:()=>({tr:n,commands:t})=>t.setTextSelection({from:0,to:n.doc.content.size}),selectNodeBackward:()=>({state:n,dispatch:t})=>ZF(n,t),selectNodeForward:()=>({state:n,dispatch:t})=>e3(n,t),selectParentNode:()=>({state:n,dispatch:t})=>((n,t)=>{let r,{$from:e,to:i}=n.selection,o=e.sharedDepth(i);return 0!=o&&(r=e.before(o),t&&t(n.tr.setSelection(Ee.create(n.doc,r))),!0)})(n,t),selectTextblockEnd:()=>({state:n,dispatch:t})=>u3(n,t),selectTextblockStart:()=>({state:n,dispatch:t})=>c3(n,t),setContent:(n,t=!1,e={})=>({tr:i,editor:r,dispatch:o})=>{const{doc:s}=i,a=function S3(n,t,e={}){return Sy(n,t,{slice:!1,parseOptions:e})}(n,r.schema,e);return o&&i.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{const{selection:o}=e,{empty:s,ranges:a}=o,l=Za(n,i.schema);if(r)if(s){const c=Ty(i,l);e.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const u=c.$from.pos,d=c.$to.pos;i.doc.nodesBetween(u,d,(h,p)=>{const f=Math.max(p,u),m=Math.min(p+h.nodeSize,d);h.marks.find(b=>b.type===l)?h.marks.forEach(b=>{l===b.type&&e.addMark(f,m,l.create({...b.attrs,...t}))}):e.addMark(f,m,l.create(t))})});return function $se(n,t,e){var i;const{selection:r}=t;let o=null;if(Cy(r)&&(o=r.$cursor),o){const a=null!==(i=n.storedMarks)&&void 0!==i?i:o.marks();return!!e.isInSet(a)||!a.some(l=>l.type.excludes(e))}const{ranges:s}=r;return s.some(({$from:a,$to:l})=>{let c=0===a.depth&&n.doc.inlineContent&&n.doc.type.allowsMarkType(e);return n.doc.nodesBetween(a.pos,l.pos,(u,d,h)=>{if(c)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(e),f=!!e.isInSet(u.marks)||!u.marks.some(m=>m.type.excludes(e));c=p&&f}return!c}),c})}(i,e,l)},setMeta:(n,t)=>({tr:e})=>(e.setMeta(n,t),!0),setNode:(n,t={})=>({state:e,dispatch:i,chain:r})=>{const o=ni(n,e.schema);return o.isTextblock?r().command(({commands:s})=>!!d3(o,t)(e)||s.clearNodes()).command(({state:s})=>d3(o,t)(s,i)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,r=Js(n,0,i.content.size),o=Ee.create(i,r);t.setSelection(o)}return!0},setTextSelection:n=>({tr:t,dispatch:e})=>{if(e){const{doc:i}=t,{from:r,to:o}="number"==typeof n?{from:n,to:n}:n,s=Le.atStart(i).from,a=Le.atEnd(i).to,l=Js(r,s,a),c=Js(o,s,a),u=Le.create(i,l,c);t.setSelection(u)}return!0},sinkListItem:n=>({state:t,dispatch:e})=>function Loe(n){return function(t,e){let{$from:i,$to:r}=t.selection,o=i.blockRange(r,c=>c.childCount>0&&c.firstChild.type==n);if(!o)return!1;let s=o.startIndex;if(0==s)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=n)return!1;if(e){let c=l.lastChild&&l.lastChild.type==a.type,u=G.from(c?n.create():null),d=new ie(G.from(n.create(null,G.from(a.type.create(null,u)))),c?3:1,0),h=o.start,p=o.end;e(t.tr.step(new ti(h-(c?3:1),p,h,p,d,1,!0)).scrollIntoView())}return!0}}(ni(n,t.schema))(t,e),splitBlock:({keepMarks:n=!0}={})=>({tr:t,state:e,dispatch:i,editor:r})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,u=Ey(r.extensionManager.attributes,a.node().type.name,a.node().attrs);if(o instanceof Ee&&o.node.isBlock)return!(!a.parentOffset||!Ks(s,a.pos)||(i&&(n&&x3(e,r.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),0));if(!a.parent.isBlock)return!1;if(i){const d=l.parentOffset===l.parent.content.size;o instanceof Le&&t.deleteSelection();const h=0===a.depth?void 0:function Lse(n){for(let t=0;t({tr:t,state:e,dispatch:i,editor:r})=>{var o;const s=ni(n,e.schema),{$from:a,$to:l}=e.selection,c=e.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=r.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(i){let _=G.empty;const b=a.index(-1)?1:a.index(-2)?2:3;for(let $=a.depth-b;$>=a.depth-3;$-=1)_=G.from(a.node($).copy(_));const T=a.indexAfter(-1){if(k>-1)return!1;$.isTextblock&&0===$.content.size&&(k=V+1)}),k>-1&&t.setSelection(Le.near(t.doc.resolve(k))),t.scrollIntoView()}return!0}const h=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,p=Ey(d,u.type.name,u.attrs),f=Ey(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=h?[{type:s,attrs:p},{type:h,attrs:f}]:[{type:s,attrs:p}];if(!Ks(t.doc,a.pos,2))return!1;if(i){const{selection:_,storedMarks:b}=e,{splittableMarks:T}=r.extensionManager,M=b||_.$to.parentOffset&&_.$from.marks();if(t.split(a.pos,2,m).scrollIntoView(),!M||!i)return!0;const w=M.filter(N=>T.includes(N.type.name));t.ensureMarks(w)}return!0},toggleList:(n,t,e,i={})=>({editor:r,tr:o,state:s,dispatch:a,chain:l,commands:c,can:u})=>{const{extensions:d,splittableMarks:h}=r.extensionManager,p=ni(n,s.schema),f=ni(t,s.schema),{selection:m,storedMarks:_}=s,{$from:b,$to:T}=m,M=b.blockRange(T),w=_||m.$to.parentOffset&&m.$from.marks();if(!M)return!1;const N=tD(k=>I3(k.type.name,d))(m);if(M.depth>=1&&N&&M.depth-N.depth<=1){if(N.node.type===p)return c.liftListItem(f);if(I3(N.node.type.name,d)&&p.validContent(N.node.content)&&a)return l().command(()=>(o.setNodeMarkup(N.pos,p),!0)).command(()=>rD(o,p)).command(()=>oD(o,p)).run()}return e&&w&&a?l().command(()=>{const k=u().wrapInList(p,i),$=w.filter(V=>h.includes(V.type.name));return o.ensureMarks($),!!k||c.clearNodes()}).wrapInList(p,i).command(()=>rD(o,p)).command(()=>oD(o,p)).run():l().command(()=>!!u().wrapInList(p,i)||c.clearNodes()).wrapInList(p,i).command(()=>rD(o,p)).command(()=>oD(o,p)).run()},toggleMark:(n,t={},e={})=>({state:i,commands:r})=>{const{extendEmptyMarkRange:o=!1}=e,s=Za(n,i.schema);return function iD(n,t,e={}){const{empty:i,ranges:r}=n.selection,o=t?Za(t,n.schema):null;if(i)return!!(n.storedMarks||n.selection.$from.marks()).filter(d=>!o||o.name===d.type.name).find(d=>by(d.attrs,e,{strict:!1}));let s=0;const a=[];if(r.forEach(({$from:d,$to:h})=>{const p=d.pos,f=h.pos;n.doc.nodesBetween(p,f,(m,_)=>{if(!m.isText&&!m.marks.length)return;const b=Math.max(p,_),T=Math.min(f,_+m.nodeSize);s+=T-b,a.push(...m.marks.map(w=>({mark:w,from:b,to:T})))})}),0===s)return!1;const l=a.filter(d=>!o||o.name===d.mark.type.name).filter(d=>by(d.mark.attrs,e,{strict:!1})).reduce((d,h)=>d+h.to-h.from,0),c=a.filter(d=>!o||d.mark.type!==o&&d.mark.type.excludes(o)).reduce((d,h)=>d+h.to-h.from,0);return(l>0?l+c:l)>=s}(i,s,t)?r.unsetMark(s,{extendEmptyMarkRange:o}):r.setMark(s,t)},toggleNode:(n,t,e={})=>({state:i,commands:r})=>{const o=ni(n,i.schema),s=ni(t,i.schema);return Up(i,o,e)?r.setNode(s):r.setNode(o,e)},toggleWrap:(n,t={})=>({state:e,commands:i})=>{const r=ni(n,e.schema);return Up(e,r,t)?i.lift(r):i.wrapIn(r,t)},undoInputRule:()=>({state:n,dispatch:t})=>{const e=n.plugins;for(let i=0;i=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,n.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},unsetAllMarks:()=>({tr:n,dispatch:t})=>{const{selection:e}=n,{empty:i,ranges:r}=e;return i||t&&r.forEach(o=>{n.removeMark(o.$from.pos,o.$to.pos)}),!0},unsetMark:(n,t={})=>({tr:e,state:i,dispatch:r})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=e,l=Za(n,i.schema),{$from:c,empty:u,ranges:d}=a;if(!r)return!0;if(u&&s){let{from:h,to:p}=a;const f=null===(o=c.marks().find(_=>_.type===l))||void 0===o?void 0:o.attrs,m=XS(c,l,f);m&&(h=m.from,p=m.to),e.removeMark(h,p,l)}else d.forEach(h=>{e.removeMark(h.$from.pos,h.$to.pos,l)});return e.removeStoredMark(l),!0},updateAttributes:(n,t={})=>({tr:e,state:i,dispatch:r})=>{let o=null,s=null;const a=Dy("string"==typeof n?n:n.name,i.schema);return!!a&&("node"===a&&(o=ni(n,i.schema)),"mark"===a&&(s=Za(n,i.schema)),r&&e.selection.ranges.forEach(l=>{const c=l.$from.pos,u=l.$to.pos;i.doc.nodesBetween(c,u,(d,h)=>{o&&o===d.type&&e.setNodeMarkup(h,void 0,{...d.attrs,...t}),s&&d.marks.length&&d.marks.forEach(p=>{if(s===p.type){const f=Math.max(h,c),m=Math.min(h+d.nodeSize,u);e.addMark(f,m,s.create({...p.attrs,...t}))}})})}),!0)},wrapIn:(n,t={})=>({state:e,dispatch:i})=>function voe(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=s&&z1(s,n,t);return!!a&&(i&&i(e.tr.wrap(s,a).scrollIntoView()),!0)}}(ni(n,e.schema),t)(e,i),wrapInList:(n,t={})=>({state:e,dispatch:i})=>function xoe(n,t=null){return function(e,i){let{$from:r,$to:o}=e.selection,s=r.blockRange(o),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&r.node(s.depth-1).type.compatibleContent(n)&&0==s.startIndex){if(0==r.index(s.depth-1))return!1;let u=e.doc.resolve(s.start-2);l=new H_(u,u,s.depth),s.endIndex=0;u--)o=G.from(e[u].type.create(e[u].attrs,o));n.step(new ti(t.start-(i?2:0),t.end,t.start,t.end,new ie(o,0,0),e.length,!0));let s=0;for(let u=0;u{const r=Qe(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(My(e.from,e.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function O3(n){return new Bp({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Qe(n.getAttributes,void 0,i)||{},{tr:o}=t,s=e.from;let a=e.to;if(i[1]){let c=s+i[0].lastIndexOf(i[1]);c>a?c=a:a=c+i[1].length,o.insertText(i[0][i[0].length-1],s+i[0].length-1),o.replaceWith(c,a,n.type.create(r))}else i[0]&&o.replaceWith(s,a,n.type.create(r))}})}function sD(n){return new Bp({find:n.find,handler:({state:t,range:e,match:i})=>{const r=t.doc.resolve(e.from),o=Qe(n.getAttributes,void 0,i)||{};if(!r.node(-1).canReplaceWith(r.index(-1),r.indexAfter(-1),n.type))return null;t.tr.delete(e.from,e.to).setBlockType(e.from,e.from,n.type,o)}})}function Hp(n){return new Bp({find:n.find,handler:({state:t,range:e,match:i,chain:r})=>{const o=Qe(n.getAttributes,void 0,i)||{},s=t.tr.delete(e.from,e.to),l=s.doc.resolve(e.from).blockRange(),c=l&&z1(l,n.type,o);if(!c)return null;if(s.wrap(l,c),n.keepMarks&&n.editor){const{selection:d,storedMarks:h}=t,{splittableMarks:p}=n.editor.extensionManager,f=h||d.$to.parentOffset&&d.$from.marks();if(f){const m=f.filter(_=>p.includes(_.type.name));s.ensureMarks(m)}}if(n.keepAttributes){const d="bulletList"===n.type.name||"orderedList"===n.type.name?"listItem":"taskList";r().updateAttributes(d,o).run()}const u=s.doc.resolve(e.from-1).nodeBefore;u&&u.type===n.type&&Ra(s.doc,e.from-1)&&(!n.joinPredicate||n.joinPredicate(i,u))&&s.join(e.from-1)}})}Ut.create({name:"commands",addCommands:()=>({...Xse})}),Ut.create({name:"editable",addProseMirrorPlugins(){return[new pt({key:new Et("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ut.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new pt({key:new Et("focusEvents"),props:{handleDOMEvents:{focus:(t,e)=>{n.isFocused=!0;const i=n.state.tr.setMeta("focus",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1},blur:(t,e)=>{n.isFocused=!1;const i=n.state.tr.setMeta("blur",{event:e}).setMeta("addToHistory",!1);return t.dispatch(i),!1}}}})]}}),Ut.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:u,$anchor:d}=l,{pos:h,parent:p}=d,f=Fe.atStart(c).from===h;return!(!(u&&f&&p.type.isTextblock)||p.textContent.length)&&s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),i={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...i},o={...i,"Ctrl-h":n,"Alt-Backspace":n,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return wy()||C3()?o:r},addProseMirrorPlugins(){return[new pt({key:new Et("clearDocument"),appendTransaction:(n,t,e)=>{if(!n.some(f=>f.docChanged)||t.doc.eq(e.doc))return;const{empty:r,from:o,to:s}=t.selection,a=Fe.atStart(t.doc).from,l=Fe.atEnd(t.doc).to;if(r||o!==a||s!==l||0!==e.doc.textBetween(0,e.doc.content.size," "," ").length)return;const d=e.tr,h=gy({state:e,transaction:d}),{commands:p}=new _y({editor:this.editor,state:h});return p.clearNodes(),d.steps.length?d:void 0}})]}}),Ut.create({name:"tabindex",addProseMirrorPlugins(){return[new pt({key:new Et("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Yi{constructor(t={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qe(ge(this,"addOptions",{name:this.name}))),this.storage=Qe(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new Yi(t)}configure(t={}){const e=this.extend();return e.options=vy(this.options,t),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new Yi(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Qe(ge(e,"addOptions",{name:e.name})),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}static handleExit({editor:t,mark:e}){const{tr:i}=t.state,r=t.state.selection.$from;if(r.pos===r.end()){const s=r.marks();if(!s.find(c=>c?.type.name===e.name))return!1;const l=s.find(c=>c?.type.name===e.name);return l&&i.removeStoredMark(l),i.insertText(" ",r.pos),t.view.dispatch(i),!0}return!1}}class tn{constructor(t={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...t},this.name=this.config.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Qe(ge(this,"addOptions",{name:this.name}))),this.storage=Qe(ge(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new tn(t)}configure(t={}){const e=this.extend();return e.options=vy(this.options,t),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}extend(t={}){const e=new tn(t);return e.parent=this,this.child=e,e.name=t.name?t.name:e.parent.name,t.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${e.name}".`),e.options=Qe(ge(e,"addOptions",{name:e.name})),e.storage=Qe(ge(e,"addStorage",{name:e.name,options:e.options})),e}}function Ja(n){return new YS({find:n.find,handler:({state:t,range:e,match:i})=>{const r=Qe(n.getAttributes,void 0,i);if(!1===r||null===r)return null;const{tr:o}=t,s=i[i.length-1],a=i[0];let l=e.to;if(s){const c=a.search(/\S/),u=e.from+a.indexOf(s),d=u+s.length;if(My(e.from,e.to,t.doc).filter(p=>p.mark.type.excluded.find(m=>m===n.type&&m!==p.mark.type)).filter(p=>p.to>u).length)return null;de.from&&o.delete(e.from+c,u),l=e.from+c+s.length,o.addMark(e.from+c,l,n.type.create(r||{})),o.removeStoredMark(n.type)}}})}function dae(n){return new YS({find:n.find,handler({match:t,chain:e,range:i}){const r=Qe(n.getAttributes,void 0,t);if(!1===r||null===r)return null;t.input&&e().deleteRange(i).insertContentAt(i.from,{type:n.type.name,attrs:r})}})}new Et("suggestion");const mae=function(){return{padding:".75rem 2rem",borderRadius:"2px"}};function gae(n,t){if(1&n){const e=q();S(0,"button",2),P("mousedown",function(){return I(e),x(y().back.emit())}),D()}2&n&&jt(pn(2,mae))}let aD,k3=(()=>{class n{constructor(){this.title="No Results",this.showBackBtn=!1,this.back=new R}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-empty-message"]],inputs:{title:"title",showBackBtn:"showBackBtn"},outputs:{back:"back"},decls:2,vars:2,consts:[[3,"innerHTML"],["pButton","","class","p-button-outlined","label","Back","type","submit",3,"style","mousedown",4,"ngIf"],["pButton","","label","Back","type","submit",1,"p-button-outlined",3,"mousedown"]],template:function(e,i){1&e&&(F(0,"p",0),C(1,gae,1,3,"button",1)),2&e&&(g("innerHTML",i.title,fu),v(1),g("ngIf",i.showBackBtn))},dependencies:[He,Nr],styles:["[_nghost-%COMP%]{align-items:center;flex-direction:column;display:flex;justify-content:center;padding:16px;height:240px}"]}),n})();try{aD=typeof Intl<"u"&&Intl.v8BreakIterator}catch{aD=!1}const Sc=new Mo(Ag);function Gp(n,t=Sc){return e=>e.lift(new jae(n,t))}class jae{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new Vae(t,this.dueTime,this.scheduler))}}class Vae extends ut{constructor(t,e,i){super(t),this.dueTime=e,this.scheduler=i,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(zae,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function zae(n){n.debouncedNext()}class Hae{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new ye,this._typeaheadSubscription=ft.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new ye,this.change=new ye,t instanceof Ih&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){const r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Mt(e=>this._pressedLetters.push(e)),Gp(t),Wt(()=>this._pressedLetters.length>0),me(()=>this._pressedLetters.join(""))).subscribe(e=>{const i=this._getItemsArray();for(let r=1;r!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){const o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(on[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){const e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){const e=this._getItemsArray();for(let i=1;i<=e.length;i++){const r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){const i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof Ih?this._items.toArray():this._items}}class F3 extends Hae{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}}function Jae(n,t){if(1&n&&(S(0,"i",7),H(1),D()),2&n){const e=y();v(1),ve(e.url)}}function Xae(n,t){1&n&&F(0,"dot-contentlet-thumbnail",9),2&n&&g("contentlet",y(2).data.contentlet)("width",42)("height",42)("iconSize","42px")}function ele(n,t){if(1&n&&C(0,Xae,1,4,"dot-contentlet-thumbnail",8),2&n){const e=y(),i=Pe(10);g("ngIf",null==e.data?null:e.data.contentlet)("ngIfElse",i)}}function tle(n,t){if(1&n&&(S(0,"span",10),H(1),D()),2&n){const e=y();v(1),ve(e.data.contentlet.url)}}function nle(n,t){if(1&n&&(S(0,"div",11),F(1,"dot-state-icon",12),S(2,"dot-badge",13),H(3),Ue(4,"lowercase"),D()()),2&n){const e=y();v(1),g("state",e.data.contentlet),v(2),ve(Ye(4,2,e.data.contentlet.language))}}function ile(n,t){1&n&&F(0,"img",14),2&n&&g("src",y().url,zo)}let cD=(()=>{class n{constructor(e){this.element=e,this.role="list-item",this.tabindex="-1",this.disabled=!1,this.label="",this.url="",this.page=!1,this.data=null,this.icon=!1}onMouseDown(e){e.preventDefault(),this.disabled||this.command()}ngOnInit(){this.icon=this.icon="string"==typeof this.url&&!(this.url.split("/").length>1)}getLabel(){return this.element.nativeElement.innerText}focus(){this.element.nativeElement.style="background: #eee"}unfocus(){this.element.nativeElement.style=""}scrollIntoView(){if(!this.isIntoView()){const e=this.element.nativeElement,i=e.parentElement,{top:r,top:o,height:s}=i.getBoundingClientRect(),{top:a,bottom:l}=e.getBoundingClientRect(),c=a-r,u=l-o;i.scrollTop+=this.alignToTop()?c:u-s}}isIntoView(){const{bottom:e,top:i}=this.element.nativeElement.getBoundingClientRect(),r=this.element.nativeElement.parentElement.getBoundingClientRect();return i>=r.top&&e<=r.bottom}alignToTop(){const{top:e}=this.element.nativeElement.getBoundingClientRect(),{top:i}=this.element.nativeElement.parentElement.getBoundingClientRect();return e span[_ngcontent-%COMP%]{overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;margin-bottom:4px}.data-wrapper[_ngcontent-%COMP%] .url[_ngcontent-%COMP%]{color:#afb3c0;font-size:14.4px}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:8px;display:flex;align-items:flex-end}.data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] dot-state-icon[_ngcontent-%COMP%]{margin-right:8px}"]}),n})();const rle=["*"];let V3=(()=>{class n{constructor(){this.id="editor-suggestion-list",this.suggestionItems=[],this.destroy$=new ye,this.mouseMove=!0}onMouseMove(){this.mouseMove=!0}onMouseOver(e){const i=e.target,r=i.dataset?.index;if(isNaN(r)||!this.mouseMove)return;const o=Number(i?.dataset.index);i.getAttribute("disabled")?this.keyManager.activeItem?.unfocus():this.updateActiveItem(o)}onMouseDownHandler(e){e.preventDefault()}ngAfterViewInit(){this.keyManager=new F3(this.items).withWrap(),requestAnimationFrame(()=>this.setFirstItemActive()),this.items.changes.pipe(Rt(this.destroy$)).subscribe(()=>requestAnimationFrame(()=>this.setFirstItemActive()))}ngOnDestroy(){this.destroy$.next(!0)}updateSelection(e){this.keyManager.activeItem&&this.keyManager.activeItem.unfocus(),this.keyManager.onKeydown(e),this.keyManager.activeItem?.scrollIntoView(),this.mouseMove=!1}execCommand(){this.keyManager.activeItem.command()}setFirstItemActive(){this.keyManager.activeItem?.unfocus(),this.keyManager.setFirstItemActive(),this.keyManager.activeItem?.focus()}resetKeyManager(){this.keyManager.activeItem?.unfocus(),this.keyManager=new F3(this.items).withWrap(),this.setFirstItemActive()}updateActiveItem(e){this.keyManager.activeItem?.unfocus(),this.keyManager.setActiveItem(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-list"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,cD,4),2&e){let o;J(o=X())&&(i.items=o)}},hostVars:1,hostBindings:function(e,i){1&e&&P("mousemove",function(o){return i.onMouseMove(o)})("mouseover",function(o){return i.onMouseOver(o)})("mousedown",function(o){return i.onMouseDownHandler(o)}),2&e&&he("id",i.id)},inputs:{suggestionItems:"suggestionItems"},ngContentSelectors:rle,decls:1,vars:0,template:function(e,i){1&e&&(li(),ln(0))},styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}"]}),n})(),uD=(()=>{class n{constructor(e){this.http=e}get defaultHeaders(){const e=new Mr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getLanguages(){return this.languages?_e(this.languages):this.http.get("/api/v2/languages",{headers:this.defaultHeaders}).pipe(on("entity"),me(e=>{const i=this.getDotLanguageObject(e);return this.languages=i,i}))}getDotLanguageObject(e){return e.reduce((i,r)=>Object.assign(i,{[r.id]:r}),{})}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();const ole={SHOW_VIDEO_THUMBNAIL:!0};let z3=(()=>{class n{constructor(){this.config=ole}get configObject(){return this.config}setProperty(e,i){this.config={...this.config,[e]:i}}getProperty(e){return this.config[e]||!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();var Xa=(()=>(function(n){n.DOWNLOAD="DOWNLOADING",n.IMPORT="IMPORTING",n.COMPLETED="COMPLETED",n.ERROR="ERROR"}(Xa||(Xa={})),Xa))();let qp=(()=>{class n{constructor(e,i){this.http=e,this.dotUploadService=i}publishContent({data:e,maxSize:i,statusCallback:r=(s=>{}),signal:o}){return r(Xa.DOWNLOAD),this.setTempResource({data:e,maxSize:i,signal:o}).pipe(xn(s=>{const a=Array.isArray(s)?s:[s],l=[];return a.forEach(c=>{l.push({baseType:"dotAsset",asset:c.id,hostFolder:"",indexPolicy:"WAIT_FOR"})}),r(Xa.IMPORT),this.http.post("/api/v1/workflow/actions/default/fire/PUBLISH",JSON.stringify({contentlets:l}),{headers:{Origin:window.location.hostname,"Content-Type":"application/json;charset=UTF-8"}}).pipe(on("entity","results"))}),ui(s=>Ir(s)))}setTempResource({data:e,maxSize:i,signal:r}){return Yt(this.dotUploadService.uploadFile({file:e,maxSize:i,signal:r}))}}return n.\u0275fac=function(e){return new(e||n)(U(Er),U(gp))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();var Oy=(()=>(function(n){n.ASC="ASC",n.DESC="DESC"}(Oy||(Oy={})),Oy))();let sle=(()=>{class n{constructor(e){this.http=e}get({query:e,limit:i=0,offset:r=0}){return this.http.post("/api/content/_search",{query:e,sort:"score,modDate desc",limit:i,offset:r}).pipe(on("entity"))}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),dD=(()=>{class n{constructor(e){this.http=e}get defaultHeaders(){const e=new Mr;return e.set("Accept","*/*").set("Content-Type","application/json"),e}getContentTypes(e="",i=""){return this.http.post("/api/v1/contenttype/_filter",{filter:{types:i,query:e},orderBy:"name",direction:"ASC",perPage:40}).pipe(on("entity"))}getContentlets({contentType:e,filter:i,currentLanguage:r,contentletIdentifier:o}){const s=o?`-identifier:${o}`:"",a=i.includes("-")?i:`*${i}*`;return this.http.post("/api/content/_search",{query:`+contentType:${e} ${s} +languageId:${r} +deleted:false +working:true +catchall:${a} title:'${i}'^15`,sort:"modDate desc",offset:0,limit:40}).pipe(on("entity","jsonObjectView","contentlets"))}getContentletsByLink({link:e,currentLanguage:i=Yp}){return this.http.post("/api/content/_search",{query:`+languageId:${i} +deleted:false +working:true +(urlmap:*${e}* OR (contentType:(dotAsset OR htmlpageasset OR fileAsset) AND +path:*${e}*))`,sort:"modDate desc",offset:0,limit:40}).pipe(on("entity","jsonObjectView","contentlets"))}}return n.\u0275fac=function(e){return new(e||n)(U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();new Mr({"Content-Type":"application/json"});const U3=["list"];function lle(n,t){if(1&n&&(S(0,"h3"),H(1),D()),2&n){const e=y(2);v(1),ve(e.title)}}function cle(n,t){if(1&n&&F(0,"dot-suggestions-list-item",7),2&n){const e=y(),i=e.$implicit,r=e.index;g("command",i.command)("index",i.tabindex||r)("label",i.label)("url",i.icon)("data",i.data)("disabled",i.disabled)}}function ule(n,t){1&n&&F(0,"div",8)}function dle(n,t){if(1&n&&(ae(0),C(1,cle,1,6,"dot-suggestions-list-item",5),C(2,ule,1,0,"ng-template",null,6,yt),le()),2&n){const e=t.$implicit,i=Pe(3);v(1),g("ngIf","divider"!==e.id)("ngIfElse",i)}}function hle(n,t){if(1&n&&(S(0,"div"),C(1,lle,2,1,"h3",2),S(2,"dot-suggestion-list",null,3),C(4,dle,4,2,"ng-container",4),D()()),2&n){const e=y();v(1),g("ngIf",!!e.title),v(3),g("ngForOf",e.items)}}function ple(n,t){if(1&n){const e=q();S(0,"dot-empty-message",9),P("back",function(){return I(e),x(y().handleBackButton())}),D()}if(2&n){const e=y();g("title",e.noResultsMessage)("showBackBtn",!e.isFilterActive)}}var xi=(()=>(function(n){n.BLOCK="block",n.CONTENTTYPE="contentType",n.CONTENT="content"}(xi||(xi={})),xi))();let ky=(()=>{class n{constructor(e,i,r){this.suggestionsService=e,this.dotLanguageService=i,this.cd=r,this.items=[],this.title="Select a block",this.noResultsMessage="No Results",this.currentLanguage=Yp,this.allowedContentTypes="",this.contentletIdentifier="",this.isFilterActive=!1}onMouseDownHandler(e){e.preventDefault()}ngOnInit(){this.initialItems=this.items,this.itemsLoaded=xi.BLOCK,this.dotLanguageService.getLanguages().pipe(Gt(1)).subscribe(e=>this.dotLangs=e)}addContentletItem(){this.items=[{label:"Contentlets",icon:"receipt",command:()=>this.loadContentTypes()},...this.items],this.initialItems=this.items}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}handleBackButton(){return this.itemsLoaded=this.itemsLoaded===xi.CONTENT?xi.CONTENTTYPE:xi.BLOCK,this.filterItems(),!1}filterItems(e=""){switch(this.itemsLoaded){case xi.BLOCK:this.items=this.initialItems.filter(i=>i.label.toLowerCase().includes(e.trim().toLowerCase()));break;case xi.CONTENTTYPE:this.loadContentTypes(e);break;case xi.CONTENT:this.loadContentlets(this.selectedContentType,e)}this.isFilterActive=!!e.length}loadContentTypes(e=""){this.suggestionsService.getContentTypes(e,this.allowedContentTypes).pipe(me(i=>i.map(r=>({label:r.name,icon:r.icon,command:()=>{this.selectedContentType=r,this.itemsLoaded=xi.CONTENT,this.loadContentlets(r)}}))),Gt(1)).subscribe(i=>{this.items=i,this.itemsLoaded=xi.CONTENTTYPE,this.items.length?this.title="Select a content type":this.noResultsMessage="No results",this.cd.detectChanges()})}loadContentlets(e,i=""){this.suggestionsService.getContentlets({contentType:e.variable,filter:i,currentLanguage:this.currentLanguage,contentletIdentifier:this.contentletIdentifier}).pipe(Gt(1)).subscribe(r=>{this.items=r.map(o=>{const{languageId:s}=o;return o.language=this.getContentletLanguage(s),{label:o.title,icon:"contentlet/image",data:{contentlet:o},command:()=>{this.onSelectContentlet({payload:o,type:{name:"dotContent"}})}}}),this.items.length?this.title="Select a contentlet":this.noResultsMessage=`No results for ${e.name}`,this.cd.detectChanges()})}getContentletLanguage(e){const{languageCode:i,countryCode:r}=this.dotLangs[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(O(dD),O(uD),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestions"]],viewQuery:function(e,i){if(1&e&&(Me(U3,5),Me(U3,5,qe)),2&e){let r;J(r=X())&&(i.list=r.first),J(r=X())&&(i.listElement=r.first)}},hostBindings:function(e,i){1&e&&P("mousedown",function(o){return i.onMouseDownHandler(o)})},inputs:{onSelectContentlet:"onSelectContentlet",items:"items",title:"title",noResultsMessage:"noResultsMessage",currentLanguage:"currentLanguage",allowedContentTypes:"allowedContentTypes",contentletIdentifier:"contentletIdentifier"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["emptyBlock",""],[4,"ngIf"],["list",""],[4,"ngFor","ngForOf"],[3,"command","index","label","url","data","disabled",4,"ngIf","ngIfElse"],["divider",""],[3,"command","index","label","url","data","disabled"],[1,"divider"],[3,"title","showBackBtn","back"]],template:function(e,i){if(1&e&&(C(0,hle,5,2,"div",0),C(1,ple,1,2,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf",i.items.length)("ngIfElse",r)}},styles:['[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif}h3[_ngcontent-%COMP%]{text-transform:uppercase;font-size:16px;margin:8px 16px;color:#999}.suggestion-list-container[_ngcontent-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.material-icons[_ngcontent-%COMP%]{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.divider[_ngcontent-%COMP%]{border-top:#afb3c0 solid 1px;margin:.5rem 0}']}),n})();const H3={inode:"14dd5ad9-55ae-42a8-a5a7-e259b6d0901a",variantId:"DEFAULT",locked:!1,stInode:"d5ea385d-32ee-4f35-8172-d37f58d9cd7a",contentType:"Image",height:4e3,identifier:"93ca45e0-06d2-4eef-be1d-79bd6bf0fc99",hasTitleImage:!0,sortOrder:0,hostName:"demo.dotcms.com",extension:"jpg",isContent:!0,baseType:"FILEASSETS",archived:!1,working:!0,live:!0,isContentlet:!0,languageId:1,titleImage:"fileAsset",hasLiveVersion:!0,deleted:!1,folder:"",host:"",modDate:"",modUser:"",modUserName:"",owner:"",title:"",url:"",contentTypeIcon:"assessment",__icon__:"Icon"};new Et("menuFloating"),new RegExp(/]*)>(\s|\n|]*src="[^"]*"[^>]*>)*?<\/a>/gm),new RegExp(/]*src="[^"]*"[^>]*>/gm);const Yp=1;var pi=(()=>(function(n){n.DOT_IMAGE="dotImage",n.LIST_ITEM="listItem",n.BULLET_LIST="bulletList",n.ORDERED_LIST="orderedList",n.BLOCKQUOTE="blockquote",n.CODE_BLOCK="codeBlock",n.DOC="doc",n.DOT_CONTENT="dotContent",n.PARAGRAPH="paragraph",n.HARD_BREAK="hardBreak",n.HEADING="heading",n.HORIZONTAL_RULE="horizontalRule",n.TEXT="text",n.TABLE_CELL="tableCell"}(pi||(pi={})),pi))();function Ble(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-asset-search",6),P("addAsset",function(r){return I(e),x(y().onSelectAsset(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)("languageId",e.languageId)}}function Ule(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-upload-asset",7),P("uploadedFile",function(r){return I(e),x(y().onSelectAsset(r))})("preventClose",function(r){return I(e),x(y().onPreventClose(r))})("hide",function(r){return I(e),x(y().onHide(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)}}function Hle(n,t){if(1&n){const e=q();S(0,"div",5)(1,"dot-external-asset",8),P("addAsset",function(r){return I(e),x(y().onSelectAsset(r))}),D()()}if(2&n){const e=y();v(1),g("type",e.type)}}let Z3=(()=>{class n{constructor(){this.languageId=Yp,this.disableTabs=!1}onPreventClose(e){this.preventClose(e),this.disableTabs=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-form"]],inputs:{languageId:"languageId",type:"type",onSelectAsset:"onSelectAsset",preventClose:"preventClose",onHide:"onHide"},decls:8,vars:8,consts:[[1,"tabview-container"],["header","Library","leftIcon","pi pi-images",3,"cache","disabled"],["pTemplate","content"],["leftIcon","pi pi-folder",3,"cache","header","disabled"],["leftIcon","pi pi-link",3,"cache","header","disabled"],[1,"wrapper"],[3,"type","languageId","addAsset"],[3,"type","uploadedFile","preventClose","hide"],[3,"type","addAsset"]],template:function(e,i){1&e&&(S(0,"div",0)(1,"p-tabView")(2,"p-tabPanel",1),C(3,Ble,2,2,"ng-template",2),D(),S(4,"p-tabPanel",3),C(5,Ule,2,1,"ng-template",2),D(),S(6,"p-tabPanel",4),C(7,Hle,2,1,"ng-template",2),D()()()),2&e&&(v(2),g("cache",!1)("disabled",i.disableTabs),v(2),g("cache",!1)("header","Upload "+i.type)("disabled",i.disableTabs),v(2),g("cache",!1)("header",i.type+" URL")("disabled",i.disableTabs))},styles:["[_nghost-%COMP%]{border:1px solid #afb3c0;display:block}.tabview-container[_ngcontent-%COMP%]{width:720px;background:#ffffff}.wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%}[_nghost-%COMP%] .p-tabview-nav{padding:0 2rem}[_nghost-%COMP%] .p-tabview-panel{height:25rem}"],changeDetection:0}),n})();class gD{constructor({editor:t,element:e,view:i,tippyOptions:r={},updateDelay:o=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l,from:c,to:u})=>{const{doc:d,selection:h}=l,{empty:p}=h,f=!d.textBetween(c,u).length&&Cy(l.selection),m=this.element.contains(document.activeElement);return!(!a.hasFocus()&&!m||p||f||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;this.preventHide?this.preventHide=!1:a?.relatedTarget&&null!==(l=this.element.parentNode)&&void 0!==l&&l.contains(a.relatedTarget)||this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.handleDebouncedUpdate=(a,l)=>{const c=!l?.selection.eq(a.state.selection),u=!l?.doc.eq(a.state.doc);!c&&!u||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(a,c,u,l)},this.updateDelay))},this.updateHandler=(a,l,c,u)=>{var d,h,p;const{state:f,composing:m}=a,{selection:_}=f;if(m||!l&&!c)return;this.createTooltip();const{ranges:T}=_,M=Math.min(...T.map(k=>k.$from.pos)),w=Math.max(...T.map(k=>k.$to.pos));(null===(d=this.shouldShow)||void 0===d?void 0:d.call(this,{editor:this.editor,view:a,state:f,oldState:u,from:M,to:w}))?(null===(h=this.tippy)||void 0===h||h.setProps({getReferenceClientRect:(null===(p=this.tippyOptions)||void 0===p?void 0:p.getReferenceClientRect)||(()=>{if(function Hse(n){return n instanceof Ee}(f.selection)){let k=a.nodeDOM(M);const $=k.dataset.nodeViewWrapper?k:k.querySelector("[data-node-view-wrapper]");if($&&(k=$.firstChild),k)return k.getBoundingClientRect()}return function Sd(n,t,e){const r=n.state.doc.content.size,o=Js(t,0,r),s=Js(e,0,r),a=n.coordsAtPos(o),l=n.coordsAtPos(s,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),b={top:c,bottom:u,left:d,right:h,width:h-d,height:u-c,x:d,y:c};return{...b,toJSON:()=>b}}(a,M,w)})}),this.show()):this.hide()},this.editor=t,this.element=e,this.view=i,this.updateDelay=o,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:t}=this.editor.options;this.tippy||!t.parentElement||(this.tippy=ss(t,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(t,e){const{state:i}=t;if(this.updateDelay>0&&i.selection.$from.pos!==i.selection.$to.pos)return void this.handleDebouncedUpdate(t,e);const o=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,o,s,e)}show(){var t;null===(t=this.tippy)||void 0===t||t.show()}hide(){var t;null===(t=this.tippy)||void 0===t||t.hide()}destroy(){var t,e;!(null===(t=this.tippy)||void 0===t)&&t.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const $le=n=>new pt({key:"string"==typeof n.pluginKey?new Et(n.pluginKey):n.pluginKey,view:t=>new gD({view:t,...n})});Ut.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[$le({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}}),new Et("bubble-image-form");const Yle=function(n,t,e){return{"border-width":n,width:t,height:e}};let yD=(()=>{class n{constructor(){this.borderSize="",this.size=""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-spinner"]],inputs:{borderSize:"borderSize",size:"size"},decls:1,vars:5,consts:[[3,"ngStyle"]],template:function(e,i){1&e&&F(0,"div",0),2&e&&g("ngStyle",Hr(1,Yle,i.borderSize,i.size,i.size))},dependencies:[cn],styles:["div[_ngcontent-%COMP%]{border-radius:50%;width:2.5rem;height:2.5rem;display:inline-block;vertical-align:middle;font-size:10px;position:relative;text-indent:-9999em;border:.5rem solid var(--color-palette-primary-op-20);border-left-color:var(--color-palette-primary-500);transform:translateZ(0);animation:_ngcontent-%COMP%_load8 1.1s infinite linear;overflow:hidden}.edit-page-variant-mode [_nghost-%COMP%] div[_ngcontent-%COMP%]{border:.5rem solid var(--color-palette-white-op-20);border-left-color:var(--color-palette-white-op-90)}@keyframes _ngcontent-%COMP%_load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]}),n})();function nce(n,t){1&n&&ce(0)}function ice(n,t){if(1&n&&(S(0,"div",8),ln(1,1),C(2,nce,1,0,"ng-container",6),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.headerTemplate)}}function rce(n,t){1&n&&ce(0)}function oce(n,t){if(1&n&&(S(0,"div",9),H(1),C(2,rce,1,0,"ng-container",6),D()),2&n){const e=y();v(1),xt(" ",e.header," "),v(1),g("ngTemplateOutlet",e.titleTemplate)}}function sce(n,t){1&n&&ce(0)}function ace(n,t){if(1&n&&(S(0,"div",10),H(1),C(2,sce,1,0,"ng-container",6),D()),2&n){const e=y();v(1),xt(" ",e.subheader," "),v(1),g("ngTemplateOutlet",e.subtitleTemplate)}}function lce(n,t){1&n&&ce(0)}function cce(n,t){1&n&&ce(0)}function uce(n,t){if(1&n&&(S(0,"div",11),ln(1,2),C(2,cce,1,0,"ng-container",6),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.footerTemplate)}}new pt({state:{init:()=>en.empty,apply(n,t){t=t.map(n.mapping,n.doc);const e=n.getMeta(this);if(e&&e.add){const r=Gn.widget(e.add.pos,e.add.element,{key:e.add.id});t=t.add(n.doc,[r])}else e&&e.remove&&(t=t.remove(t.find(null,null,i=>i.key==e.remove.id)));return t}},props:{decorations(n){return this.getState(n)}}});const dce=["*",[["p-header"]],[["p-footer"]]],hce=["*","p-header","p-footer"];let bD=(()=>{class n{constructor(e){this.el=e}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"title":this.titleTemplate=e.template;break;case"subtitle":this.subtitleTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}getBlockableElement(){return this.el.nativeElement.children[0]}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275cmp=Y({type:n,selectors:[["p-card"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,M_,5),Vt(r,E_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},ngContentSelectors:hce,decls:9,vars:9,consts:[[3,"ngClass","ngStyle"],["class","p-card-header",4,"ngIf"],[1,"p-card-body"],["class","p-card-title",4,"ngIf"],["class","p-card-subtitle",4,"ngIf"],[1,"p-card-content"],[4,"ngTemplateOutlet"],["class","p-card-footer",4,"ngIf"],[1,"p-card-header"],[1,"p-card-title"],[1,"p-card-subtitle"],[1,"p-card-footer"]],template:function(e,i){1&e&&(li(dce),S(0,"div",0),C(1,ice,3,1,"div",1),S(2,"div",2),C(3,oce,3,2,"div",3),C(4,ace,3,2,"div",4),S(5,"div",5),ln(6),C(7,lce,1,0,"ng-container",6),D(),C(8,uce,3,1,"div",7),D()()),2&e&&(Ke(i.styleClass),g("ngClass","p-card p-component")("ngStyle",i.style),v(1),g("ngIf",i.headerFacet||i.headerTemplate),v(2),g("ngIf",i.header||i.titleTemplate),v(1),g("ngIf",i.subheader||i.subtitleTemplate),v(3),g("ngTemplateOutlet",i.contentTemplate),v(1),g("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[Ot,He,Zn,cn],styles:[".p-card-header img{width:100%}\n"],encapsulation:2,changeDetection:0}),n})();const bce=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Cce=tn.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:n}){return["img",vt(this.options.HTMLAttributes,n)]},addCommands(){return{setImage:n=>({commands:t})=>t.insertContent({type:this.name,attrs:n})}},addInputRules(){return[O3({find:bce,type:this.type,getAttributes:n=>{const[,,t,e,i]=n;return{src:e,alt:t,title:i}}})]}}),ej="language_id",wce=(n,t)=>{const{href:e=null,target:i}=t;return["a",{href:e,target:i},tj(n,t)]},tj=(n,t)=>["img",vt(n,t)],nj=(n,t)=>n.includes(ej)?n:`${n}?${ej}=${t}`,Sce=n=>{if("string"==typeof n)return{src:n,data:"null"};const{fileAsset:t,asset:e,title:i,languageId:r}=n;return{data:n,src:nj(t||e,r),title:i,alt:i}},dr=Cce.extend({name:"dotImage",addOptions:()=>({inline:!1,allowBase64:!0,HTMLAttributes:{}}),addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:nj(n.src||n.data?.asset,n.data?.languageId)})},alt:{default:null,parseHTML:n=>n.getAttribute("alt"),renderHTML:n=>({alt:n.alt||n.data?.title})},title:{default:null,parseHTML:n=>n.getAttribute("title"),renderHTML:n=>({title:n.title||n.data?.title})},href:{default:null,parseHTML:n=>n.getAttribute("href"),renderHTML:n=>({href:n.href})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})},target:{default:null,parseHTML:n=>n.getAttribute("target"),renderHTML:n=>({target:n.target})}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},addCommands(){return{...this.parent?.(),setImageLink:n=>({commands:t})=>t.updateAttributes(this.name,n),unsetImageLink:()=>({commands:n})=>n.updateAttributes(this.name,{href:""}),insertImage:(n,t)=>({chain:e,state:i})=>{const{selection:r}=i,{head:o}=r,s={attrs:Sce(n),type:dr.name};return e().insertContentAt(t??o,s).run()}}},renderHTML({HTMLAttributes:n}){const{href:t=null,style:e}=n||{};return["div",{class:"image-container",style:e},t?wce(this.options.HTMLAttributes,n):tj(this.options.HTMLAttributes,n)]}}),Tce=(tn.create({name:"dotVideo",addAttributes:()=>({src:{default:null,parseHTML:n=>n.getAttribute("src"),renderHTML:n=>({src:n.src})},mimeType:{default:null,parseHTML:n=>n.getAttribute("mimeType"),renderHTML:n=>({mimeType:n.mimeType})},width:{default:null,parseHTML:n=>n.getAttribute("width"),renderHTML:n=>({width:n.width})},height:{default:null,parseHTML:n=>n.getAttribute("height"),renderHTML:n=>({height:n.height})},orientation:{default:null,parseHTML:n=>n.getAttribute("orientation"),renderHTML:({height:n,width:t})=>({orientation:n>t?"vertical":"horizontal"})},data:{default:null,parseHTML:n=>n.getAttribute("data"),renderHTML:n=>({data:JSON.stringify(n.data)})}}),parseHTML:()=>[{tag:"video"}],addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group:()=>"block",draggable:!0,addCommands(){return{...this.parent?.(),insertVideo:(n,t)=>({commands:e,state:i})=>{const{selection:r}=i,{head:o}=r;return e.insertContentAt(t??o,{type:this.name,attrs:Tce(n)})}}},renderHTML:({HTMLAttributes:n})=>["div",{class:"video-container"},["video",vt(n,{controls:!0})]]}),n=>{if("string"==typeof n)return{src:n};const{assetMetaData:t,asset:e,mimeType:i,fileAsset:r}=n,{width:o="auto",height:s="auto",contentType:a}=t||{},l=s>o?"vertical":"horizontal";return{src:r||e,data:{...n},width:o,height:s,mimeType:i||a,orientation:l}}),Oce=(tn.create({name:"aiContent",addAttributes:()=>({content:{default:""}}),parseHTML:()=>[{tag:"div[ai-content]"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertAINode:n=>({commands:t})=>t.insertContent({type:this.name,attrs:{content:n}})}},renderHTML:()=>["div[ai-content]"],addNodeView:()=>({node:n})=>{const t=document.createElement("div"),e=document.createElement("div");return e.innerHTML=n.attrs.content||"",t.contentEditable="true",t.classList.add("ai-content-container"),t.append(e),{dom:t}}}),tn.create({name:"loader",addAttributes:()=>({isLoading:{default:!0}}),parseHTML:()=>[{tag:"div.p-d-flex.p-jc-center"}],addOptions:()=>({inline:!1}),inline(){return this.options.inline},group:()=>"block",addCommands(){return{...this.parent?.(),insertLoaderNode:n=>({commands:t})=>t.insertContent({type:this.name,attrs:{isLoading:n}})}},renderHTML:()=>["div",{class:"p-d-flex p-jc-center"}],addNodeView:()=>({node:n})=>{const t=document.createElement("div");if(t.classList.add("loader-style"),n.attrs.isLoading){const e=document.createElement("div");e.classList.add("p-progress-spinner"),t.append(e)}return{dom:t}}}),["cb"]),kce=function(n,t,e){return{"p-checkbox-label":!0,"p-checkbox-label-active":n,"p-disabled":t,"p-checkbox-label-focus":e}};function Ace(n,t){if(1&n){const e=q();S(0,"label",7),P("click",function(r){I(e);const o=y(),s=Pe(3);return x(o.onClick(r,s,!0))}),H(1),D()}if(2&n){const e=y();Ke(e.labelStyleClass),g("ngClass",Hr(5,kce,e.checked(),e.disabled,e.focused)),he("for",e.inputId),v(1),ve(e.label)}}const Nce=function(n,t,e){return{"p-checkbox p-component":!0,"p-checkbox-checked":n,"p-checkbox-disabled":t,"p-checkbox-focused":e}},Lce=function(n,t,e){return{"p-highlight":n,"p-disabled":t,"p-focus":e}},Pce={provide:wn,useExisting:$e(()=>Py),multi:!0};let Py=(()=>{class n{constructor(e){this.cd=e,this.checkboxIcon="pi pi-check",this.trueValue=!0,this.falseValue=!1,this.onChange=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.focused=!1}onClick(e,i,r){e.preventDefault(),!this.disabled&&!this.readonly&&(this.updateModel(e),r&&i.focus())}updateModel(e){let i;this.binary?(i=this.checked()?this.falseValue:this.trueValue,this.model=i,this.onModelChange(i)):(i=this.checked()?this.model.filter(r=>!Oe.equals(r,this.value)):this.model?[...this.model,this.value]:[this.value],this.onModelChange(i),this.model=i,this.formControl&&this.formControl.setValue(i)),this.onChange.emit({checked:i,originalEvent:e})}handleChange(e){this.readonly||this.updateModel(e)}onFocus(){this.focused=!0}onBlur(){this.focused=!1,this.onModelTouched()}focus(){this.inputViewChild.nativeElement.focus()}writeValue(e){this.model=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}checked(){return this.binary?this.model===this.trueValue:Oe.contains(this.value,this.model)}}return n.\u0275fac=function(e){return new(e||n)(O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-checkbox"]],viewQuery:function(e,i){if(1&e&&Me(Oce,5),2&e){let r;J(r=X())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",name:"name",disabled:"disabled",binary:"binary",label:"label",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",tabindex:"tabindex",inputId:"inputId",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass",formControl:"formControl",checkboxIcon:"checkboxIcon",readonly:"readonly",required:"required",trueValue:"trueValue",falseValue:"falseValue"},outputs:{onChange:"onChange"},features:[Ie([Pce])],decls:7,vars:26,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","checkbox",3,"readonly","value","checked","disabled","focus","blur","change"],["cb",""],[1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[3,"class","ngClass","click",4,"ngIf"],[3,"ngClass","click"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0)(1,"div",1)(2,"input",2,3),P("focus",function(){return i.onFocus()})("blur",function(){return i.onBlur()})("change",function(s){return i.handleChange(s)}),D()(),S(4,"div",4),P("click",function(s){I(r);const a=Pe(3);return x(i.onClick(s,a,!0))}),F(5,"span",5),D()(),C(6,Ace,2,9,"label",6)}2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",Hr(18,Nce,i.checked(),i.disabled,i.focused)),v(2),g("readonly",i.readonly)("value",i.value)("checked",i.checked())("disabled",i.disabled),he("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-labelledby",i.ariaLabelledBy)("aria-label",i.ariaLabel)("aria-checked",i.checked())("required",i.required),v(2),g("ngClass",Hr(22,Lce,i.checked(),i.disabled,i.focused)),v(1),g("ngClass",i.checked()?i.checkboxIcon:null),v(1),g("ngIf",i.label))},dependencies:[Ot,He,cn],styles:[".p-checkbox{display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:bottom;position:relative}.p-checkbox-disabled{cursor:default!important;pointer-events:none}.p-checkbox-box{display:flex;justify-content:center;align-items:center}p-checkbox{display:inline-flex;vertical-align:bottom;align-items:center}.p-checkbox-label{line-height:1}\n"],encapsulation:2,changeDetection:0}),n})();const Kce=["list"];function Yce(n,t){if(1&n&&F(0,"dot-suggestions-list-item",5),2&n){const e=t.$implicit,i=t.index;g("command",e.command)("index",i)("label",e.label)("url",e.icon)("data",e.data)("page",!0)}}function Qce(n,t){if(1&n&&(S(0,"div")(1,"dot-suggestion-list",null,3),C(3,Yce,1,6,"dot-suggestions-list-item",4),D()()),2&n){const e=y();v(3),g("ngForOf",e.items)}}function Zce(n,t){1&n&&F(0,"dot-suggestion-loading-list")}function Jce(n,t){if(1&n){const e=q();S(0,"dot-empty-message",6),P("back",function(){return I(e),x(y().handleBackButton())}),D()}2&n&&g("title",y().title)("showBackBtn",!0)}let ij=(()=>{class n{constructor(){this.items=[],this.loading=!1,this.back=new R}handleBackButton(){return this.back.emit(!0),!1}execCommand(){this.items.length?this.list.execCommand():this.handleBackButton()}updateSelection(e){this.list.updateSelection(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-page"]],viewQuery:function(e,i){if(1&e&&Me(Kce,5),2&e){let r;J(r=X())&&(i.list=r.first)}},inputs:{items:"items",loading:"loading",title:"title"},outputs:{back:"back"},decls:5,vars:2,consts:[[4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["list",""],[3,"command","index","label","url","data","page",4,"ngFor","ngForOf"],[3,"command","index","label","url","data","page"],[3,"title","showBackBtn","back"]],template:function(e,i){if(1&e&&(C(0,Qce,4,1,"div",0),C(1,Zce,1,0,"ng-template",null,1,yt),C(3,Jce,1,2,"ng-template",null,2,yt)),2&e){const r=Pe(2),o=Pe(4);g("ngIf",i.items.length)("ngIfElse",i.loading?r:o)}},styles:["[_nghost-%COMP%]{display:block;min-width:240px;box-shadow:0 4px 20px var(--color-palette-black-op-10);padding:8px 0;background:#ffffff}[_nghost-%COMP%] {width:100%;box-shadow:none;padding:0}[_nghost-%COMP%] dotcms-suggestions-list-item{padding:8px}"]}),n})();const Xce=["input"],eue=["suggestions"];function tue(n,t){1&n&&F(0,"hr",11)}const nue=function(){return{fontSize:"32px"}};function iue(n,t){if(1&n&&(S(0,"div",12)(1,"a",13)(2,"span",14),H(3,"language"),D(),S(4,"span",15),H(5),D()(),S(6,"div",16)(7,"div",17),F(8,"p-checkbox",18),D(),S(9,"label",19),H(10,"Open link in new window"),D()()()),2&n){const e=y();v(1),g("href",e.currentLink,zo),v(1),jt(pn(5,nue)),v(3),ve(e.currentLink),v(3),g("binary",!0)}}function rue(n,t){if(1&n){const e=q();S(0,"dot-suggestion-page",20,21),P("back",function(){return I(e),x(y().resetForm())}),D()}if(2&n){const e=y();g("items",e.items)("loading",e.loading)("title",e.noResultsTitle)}}function oue(n,t){if(1&n){const e=q();S(0,"dot-form-actions",22),P("hide",function(r){return I(e),x(y().hide.emit(r))})("remove",function(r){return I(e),x(y().removeLink.emit(r))}),D()}2&n&&g("link",y().currentLink)}const sue=function(){return{width:"5rem",padding:".75rem 1rem",borderRadius:"0 2px 2px 0"}};let rj=(()=>{class n{constructor(e,i,r){this.fb=e,this.suggestionsService=i,this.dotLanguageService=r,this.hide=new R(!1),this.removeLink=new R(!1),this.isSuggestionOpen=new R(!1),this.setNodeProps=new R,this.showSuggestions=!1,this.languageId=Yp,this.initialValues={link:"",blank:!0},this.minChars=3,this.loading=!1,this.items=[]}onMouseDownHandler(e){const{target:i}=e;i!==this.input.nativeElement&&e.preventDefault()}get noResultsTitle(){return`No results for ${this.newLink}`}get currentLink(){return this.initialValues.link}get newLink(){return this.form.get("link").value}ngOnInit(){this.form=this.fb.group({...this.initialValues}),this.form.get("link").valueChanges.pipe(Gp(500)).subscribe(e=>{e.lengththis.setNodeProps.emit({link:this.currentLink,blank:e})),this.dotLanguageService.getLanguages().pipe(Gt(1)).subscribe(e=>this.dotLangs=e)}submitForm(){this.setNodeProps.emit(this.form.value),this.hide.emit(!0)}setLoading(){const e=this.newLink.length>=this.minChars&&!Ry(this.newLink);this.items=e?this.items:[],this.showSuggestions=e,this.loading=e,e&&requestAnimationFrame(()=>this.isSuggestionOpen.emit(!0))}setFormValue({link:e="",blank:i=!0}){this.form.setValue({link:e,blank:i},{emitEvent:!1})}focusInput(){this.input.nativeElement.focus()}onKeyDownEvent(e){const i=this.suggestionsComponent?.items;if(e.stopImmediatePropagation(),"Escape"===e.key)return this.hide.emit(!0),!0;if(!this.showSuggestions||!i?.length)return!0;switch(e.key){case"Enter":return this.suggestionsComponent?.execCommand(),!1;case"ArrowUp":case"ArrowDown":return this.suggestionsComponent?.updateSelection(e),!1;default:return!1}}resetForm(){this.showSuggestions=!1,this.setFormValue({...this.initialValues})}onSelection({payload:{url:e}}){this.setFormValue({...this.form.value,link:e}),this.submitForm()}searchContentlets({link:e=""}){this.loading=!0,this.suggestionsService.getContentletsByLink({link:e,currentLanguage:this.languageId}).pipe(Gt(1)).subscribe(i=>{this.items=i.map(r=>{const{languageId:o}=r;return r.language=this.getContentletLanguage(o),{label:r.title,icon:"contentlet/image",data:{contentlet:r},command:()=>{this.onSelection({payload:r,type:{name:"dotContent"}})}}}),this.loading=!1})}getContentletLanguage(e){const{languageCode:i,countryCode:r}=this.dotLangs[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(O($h),O(dD),O(uD))},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-link-form"]],viewQuery:function(e,i){if(1&e&&(Me(Xce,5),Me(eue,5)),2&e){let r;J(r=X())&&(i.input=r.first),J(r=X())&&(i.suggestionsComponent=r.first)}},hostBindings:function(e,i){1&e&&P("mousedown",function(o){return i.onMouseDownHandler(o)})},inputs:{showSuggestions:"showSuggestions",languageId:"languageId",initialValues:"initialValues"},outputs:{hide:"hide",removeLink:"removeLink",isSuggestionOpen:"isSuggestionOpen",setNodeProps:"setNodeProps"},decls:11,vars:8,consts:[[1,"form-container"],["autocomplete","off",3,"formGroup","keydown","ngSubmit"],[1,"p-inputgroup","search-container"],[1,"p-inputgroup"],["id","editor-input-link","pInputText","","type","text","placeholder","Paste link or search for pages","formControlName","link",3,"input"],["input",""],["pButton","","type","submit","label","ADD",1,"p-button"],["class","divider",4,"ngIf"],["class","info-container",4,"ngIf"],[3,"items","loading","title","back",4,"ngIf"],[3,"link","hide","remove",4,"ngIf"],[1,"divider"],[1,"info-container"],["target","_blank",1,"url-container",3,"href"],[1,"material-icons"],[1,"truncate"],[1,"field-checkbox"],[1,"checkbox-container"],["id","editor-input-checkbox","formControlName","blank",3,"binary"],["for","editor-input-checkbox"],[3,"items","loading","title","back"],["suggestions",""],[3,"link","hide","remove"]],template:function(e,i){1&e&&(S(0,"div",0)(1,"form",1),P("keydown",function(o){return i.onKeyDownEvent(o)})("ngSubmit",function(){return i.submitForm()}),S(2,"div",2)(3,"div",3)(4,"input",4,5),P("input",function(){return i.setLoading()}),D(),F(6,"button",6),D()(),C(7,tue,1,0,"hr",7),C(8,iue,11,6,"div",8),D(),C(9,rue,2,3,"dot-suggestion-page",9),C(10,oue,1,1,"dot-form-actions",10),D()),2&e&&(v(1),g("formGroup",i.form),v(5),jt(pn(7,sue)),v(1),g("ngIf",i.showSuggestions||i.currentLink),v(1),g("ngIf",i.currentLink&&!i.showSuggestions),v(1),g("ngIf",i.showSuggestions),v(1),g("ngIf",!i.showSuggestions&&i.currentLink))},styles:[".form-container[_ngcontent-%COMP%]{background:#ffffff;border-radius:.125rem;box-shadow:0 4px 10px #0a07251a;display:flex;flex-direction:column;width:400px}.form-container[_ngcontent-%COMP%] form[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;max-width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%]{padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{background:#ffffff;border:1px solid #afb3c0}.form-container[_ngcontent-%COMP%] .search-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:1rem;width:100%}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .url-container[_ngcontent-%COMP%]{cursor:pointer;white-space:nowrap;font-size:16px;width:100%;word-wrap:normal;display:flex;align-items:center;text-decoration:none;gap:8px;color:#14151a}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%]{display:flex;gap:3.2px;min-width:100%;font-size:16px}.form-container[_ngcontent-%COMP%] .info-container[_ngcontent-%COMP%] .field-checkbox[_ngcontent-%COMP%] .checkbox-container[_ngcontent-%COMP%]{cursor:pointer;width:32px;display:flex;align-items:center;justify-content:center}.divider[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebecef;width:100%;margin:0}.truncate[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();mr(88222),new Et("addLink");const Ry=n=>!!new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(n);new Et("bubble-form");const dj=function(){return{width:"50%"}};function Tue(n,t){if(1&n){const e=q();S(0,"div")(1,"div",1)(2,"button",2),P("click",function(){return I(e),x(y().copy())}),D(),S(3,"button",3),P("click",function(){return I(e),x(y().remove.emit(!0))}),D()()()}2&n&&(v(2),jt(pn(4,dj)),v(1),jt(pn(5,dj)))}let Mue=(()=>{class n{constructor(){this.remove=new R(!1),this.hide=new R(!1),this.link=""}copy(){navigator.clipboard.writeText(this.link).then(()=>this.hide.emit(!0)).catch(()=>alert("Could not copy link"))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-form-actions"]],inputs:{link:"link"},outputs:{remove:"remove",hide:"hide"},decls:1,vars:1,consts:[[4,"ngIf"],[1,"form-actions"],["pButton","","type","button","label","COPY LINK",1,"p-button-outlined",3,"click"],["pButton","","type","button","label","REMOVE LINK",1,"p-button-outlined","p-button-danger",3,"click"]],template:function(e,i){1&e&&C(0,Tue,4,6,"div",0),2&e&&g("ngIf",i.link.length)},dependencies:[He,Nr],styles:[".form-actions[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;padding:1rem;gap:.5rem}"]}),n})();function Eue(n,t){if(1&n){const e=q();ae(0),S(1,"button",3),P("click",function(){return I(e),x(y().toggleChangeTo.emit())}),H(2),D(),F(3,"div",4),le()}if(2&n){const e=y();v(2),ve(e.selected)}}function Iue(n,t){1&n&&F(0,"div",4)}function xue(n,t){if(1&n){const e=q();ae(0),S(1,"dot-bubble-menu-button",5),P("click",function(){const o=I(e).$implicit;return x(y().command.emit(o))}),D(),C(2,Iue,1,0,"div",6),le()}if(2&n){const e=t.$implicit;v(1),g("active",e.active)("item",e),v(1),g("ngIf",e.divider)}}let hj=(()=>{class n{constructor(){this.items=[],this.command=new R,this.toggleChangeTo=new R}preventDeSelection(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-menu"]],inputs:{items:"items",selected:"selected"},outputs:{command:"command",toggleChangeTo:"toggleChangeTo"},decls:3,vars:2,consts:[["id","bubble-menu",1,"bubble-menu",3,"mousedown"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"btn-dropdown",3,"click"],[1,"divider"],[3,"active","item","click"],["class","divider",4,"ngIf"]],template:function(e,i){1&e&&(S(0,"div",0),P("mousedown",function(o){return i.preventDeSelection(o)}),C(1,Eue,4,1,"ng-container",1),C(2,xue,3,3,"ng-container",2),D()),2&e&&(v(1),g("ngIf",i.selected),v(1),g("ngForOf",i.items))},styles:['[_nghost-%COMP%]{height:100%;width:100%}.bubble-menu[_ngcontent-%COMP%]{box-sizing:border-box;align-items:center;background:#ffffff;border-radius:.125rem;box-shadow:0 10px 24px 0 var(--color-palette-black-op-20);display:flex;justify-content:center;padding:5.6px;height:40px}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]{background:none;border:none;outline:none;padding:4px;cursor:pointer}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:hover{background:#f3f3f4}.bubble-menu[_ngcontent-%COMP%] .btn-dropdown[_ngcontent-%COMP%]:after{content:"";border:solid #14151a;border-width:0 2px 2px 0;display:inline-block;padding:3.2px;transform:rotate(45deg);margin-left:12px}.bubble-menu[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #f3f3f4;height:100%;margin:0 8px}']}),n})();const Oue=function(n,t){return{"btn-bubble-menu":!0,"btn-icon":n,"btn-active":t}},kue=function(n){return{"material-icons":n}};let Aue=(()=>{class n{constructor(){this.active=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-bubble-menu-button"]],inputs:{item:"item",active:"active"},decls:3,vars:8,consts:[[3,"ngClass"]],template:function(e,i){1&e&&(S(0,"button",0)(1,"span",0),H(2),D()()),2&e&&(g("ngClass",ot(3,Oue,i.item.icon,i.active)),v(1),g("ngClass",te(6,kue,i.item.icon)),v(1),ve(i.item.icon||i.item.text))},dependencies:[Ot],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}.btn-bubble-menu[_ngcontent-%COMP%]{background:#ffffff;border:none;color:#14151a;display:flex;justify-content:center;align-items:center;cursor:pointer;max-width:auto;width:100%;height:32px;border-radius:.125rem}.btn-bubble-menu[_ngcontent-%COMP%]:hover{background:#f3f3f4}.btn-bubble-menu.btn-active[_ngcontent-%COMP%]{background:#f3f3f4;color:#14151a;border:1px solid #afb3c0}.btn-icon[_ngcontent-%COMP%]{width:32px}"]}),n})();var SD,DD;if(new Et("bubble-menu"),Ut.create({name:"dotComands",addCommands:()=>({isNodeRegistered:n=>({view:t})=>{const{schema:e}=t.state,{nodes:i}=e;return Boolean(i[n])}})}),tn.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:n}){return["td",vt(this.options.HTMLAttributes,n),0]}}),tn.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const t=n.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:n}){return["th",vt(this.options.HTMLAttributes,n),0]}}),typeof WeakMap<"u"){let n=new WeakMap;SD=t=>n.get(t),DD=(t,e)=>(n.set(t,e),e)}else{const n=[];let e=0;SD=i=>{for(let r=0;r(10==e&&(e=0),n[e++]=i,n[e++]=r)}var dn=class{constructor(n,t,e,i){this.width=n,this.height=t,this.map=e,this.problems=i}findCell(n){for(let t=0;ti&&(o+=c.attrs.colspan)}}for(let s=0;s1&&(e=!0)}-1==t?t=o:t!=o&&(t=Math.max(t,o))}return t}(n),e=n.childCount,i=[];let r=0,o=null;const s=[];for(let c=0,u=t*e;c=e){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:b-M});break}const w=r+M*t;for(let N=0;N<_;N++){0==i[w+N]?i[w+N]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:_-N});const k=T&&T[N];if(k){const $=(w+N)%t*2,V=s[$];null==V||V!=k&&1==s[$+1]?(s[$]=k,s[$+1]=1):V==k&&s[$+1]++}}}r+=_,u+=m.nodeSize}const h=(c+1)*t;let p=0;for(;r0;t--)if("row"==n.node(t).type.spec.tableRole)return n.node(0).resolve(n.before(t+1));return null}function Oo(n){const t=n.selection.$head;for(let e=t.depth;e>0;e--)if("row"==t.node(e).type.spec.tableRole)return!0;return!1}function Fy(n){const t=n.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const e=Td(t.$head)||function Jue(n){for(let t=n.nodeAfter,e=n.pos;t;t=t.firstChild,e++){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e)}for(let t=n.nodeBefore,e=n.pos;t;t=t.lastChild,e--){const i=t.type.spec.tableRole;if("cell"==i||"header_cell"==i)return n.doc.resolve(e-t.nodeSize)}}(t.$head);if(e)return e;throw new RangeError(`No cell found around position ${t.head}`)}function TD(n){return"row"==n.parent.type.spec.tableRole&&!!n.nodeAfter}function MD(n,t){return n.depth==t.depth&&n.pos>=t.start(-1)&&n.pos<=t.end(-1)}function mj(n,t,e){const i=n.node(-1),r=dn.get(i),o=n.start(-1),s=r.nextCell(n.pos-o,t,e);return null==s?null:n.node(0).resolve(o+s)}function Ec(n,t,e=1){const i={...n,colspan:n.colspan-e};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(t,e),i.colwidth.some(r=>r>0)||(i.colwidth=null)),i}function gj(n,t,e=1){const i={...n,colspan:n.colspan+e};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let r=0;rc!=t.pos-r);a.unshift(t.pos-r);const l=a.map(c=>{const u=e.nodeAt(c);if(!u)throw RangeError(`No cell with offset ${c} found`);const d=r+c+1;return new jP(s.resolve(d),s.resolve(d+u.content.size))});super(l[0].$from,l[0].$to,l),this.$anchorCell=n,this.$headCell=t}map(n,t){const e=n.resolve(t.map(this.$anchorCell.pos)),i=n.resolve(t.map(this.$headCell.pos));if(TD(e)&&TD(i)&&MD(e,i)){const r=this.$anchorCell.node(-1)!=e.node(-1);return r&&this.isRowSelection()?bt.rowSelection(e,i):r&&this.isColSelection()?bt.colSelection(e,i):new bt(e,i)}return Le.between(e,i)}content(){const n=this.$anchorCell.node(-1),t=dn.get(n),e=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-e,this.$headCell.pos-e),r={},o=[];for(let a=i.top;a0||m>0){let _=p.attrs;if(f>0&&(_=Ec(_,0,f)),m>0&&(_=Ec(_,_.colspan-m,m)),h.lefti.bottom){const _={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};p=h.top0)&&Math.max(n+this.$anchorCell.nodeAfter.attrs.rowspan,t+this.$headCell.nodeAfter.attrs.rowspan)==this.$headCell.node(-1).childCount}static colSelection(n,t=n){const e=n.node(-1),i=dn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.top<=s.top?(o.top>0&&(n=a.resolve(r+i.map[o.left])),s.bottom0&&(t=a.resolve(r+i.map[s.left])),o.bottom0)&&Math.max(i+this.$anchorCell.nodeAfter.attrs.colspan,r+this.$headCell.nodeAfter.attrs.colspan)==t.width}eq(n){return n instanceof bt&&n.$anchorCell.pos==this.$anchorCell.pos&&n.$headCell.pos==this.$headCell.pos}static rowSelection(n,t=n){const e=n.node(-1),i=dn.get(e),r=n.start(-1),o=i.findCell(n.pos-r),s=i.findCell(t.pos-r),a=n.node(0);return o.left<=s.left?(o.left>0&&(n=a.resolve(r+i.map[o.top*i.width])),s.right0&&(t=a.resolve(r+i.map[s.top*i.width])),o.right{t.push(Gn.node(i,i+e.nodeSize,{class:"selectedCell"}))}),en.create(n.doc,t)}var ode=new Et("fix-tables");function yj(n,t,e,i){const r=n.childCount,o=t.childCount;e:for(let s=0,a=0;s{"table"==r.type.spec.tableRole&&(e=function sde(n,t,e,i){const r=dn.get(t);if(!r.problems)return i;i||(i=n.tr);const o=[];for(let l=0;l0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const f=[];for(let _=0;_t.width)for(let d=0,h=0;dt.height){const d=[];for(let f=0,m=(t.height-1)*t.width;f=t.width)&&e.nodeAt(t.map[m+f]).type==l.header_cell;d.push(_?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,G.from(d)),p=[];for(let f=t.height;f{if(!r)return!1;const o=e.selection;if(o instanceof bt)return jy(e,i,Fe.near(o.$headCell,t));if("horiz"!=n&&!o.empty)return!1;const s=Sj(r,n,t);if(null==s)return!1;if("horiz"==n)return jy(e,i,Fe.near(e.doc.resolve(o.head+t),t));{const a=e.doc.resolve(s),l=mj(a,n,t);let c;return c=l?Fe.near(l,1):t<0?Fe.near(e.doc.resolve(a.before(-1)),-1):Fe.near(e.doc.resolve(a.after(-1)),1),jy(e,i,c)}}}function zy(n,t){return(e,i,r)=>{if(!r)return!1;const o=e.selection;let s;if(o instanceof bt)s=o;else{const l=Sj(r,n,t);if(null==l)return!1;s=new bt(e.doc.resolve(l))}const a=mj(s.$headCell,n,t);return!!a&&jy(e,i,new bt(s.$anchorCell,a))}}function By(n,t){const e=n.selection;if(!(e instanceof bt))return!1;if(t){const i=n.tr,r=Oi(n.schema).cell.createAndFill().content;e.forEachCell((o,s)=>{o.content.eq(r)||i.replace(i.mapping.map(s+1),i.mapping.map(s+o.nodeSize-1),new ie(r,0,0))}),i.docChanged&&t(i)}return!0}function hde(n,t){const i=Td(n.state.doc.resolve(t));return!!i&&(n.dispatch(n.state.tr.setSelection(new bt(i))),!0)}function pde(n,t,e){if(!Oo(n.state))return!1;let i=function ade(n){if(!n.size)return null;let{content:t,openStart:e,openEnd:i}=n;for(;1==t.childCount&&(e>0&&i>0||"table"==t.child(0).type.spec.tableRole);)e--,i--,t=t.child(0).content;const r=t.child(0),o=r.type.spec.tableRole,s=r.type.schema,a=[];if("row"==o)for(let l=0;l=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=r;c=t.length&&t.push(G.empty),e[r]i&&(h=h.type.createChecked(Ec(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let p=1;pr&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,r-d.attrs.rowspan)},d.content)),l.push(d)}o.push(G.from(l))}e=o,t=r}return{width:n,height:t,rows:e}}(i,a.right-a.left,a.bottom-a.top),wj(n.state,n.dispatch,s,a,i),!0}if(i){const o=Fy(n.state),s=o.start(-1);return wj(n.state,n.dispatch,s,dn.get(o.node(-1)).findCell(o.pos-s),i),!0}return!1}function fde(n,t){var e;if(t.ctrlKey||t.metaKey)return;const i=Dj(n,t.target);let r;if(t.shiftKey&&n.state.selection instanceof bt)o(n.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&i&&null!=(r=Td(n.state.selection.$anchor))&&(null==(e=ID(n,t))?void 0:e.pos)!=r.pos)o(r,t),t.preventDefault();else if(!i)return;function o(l,c){let u=ID(n,c);const d=null==el.getState(n.state);if(!u||!MD(l,u)){if(!d)return;u=l}const h=new bt(l,u);if(d||!n.state.selection.eq(h)){const p=n.state.tr.setSelection(h);d&&p.setMeta(el,l.pos),n.dispatch(p)}}function s(){n.root.removeEventListener("mouseup",s),n.root.removeEventListener("dragstart",s),n.root.removeEventListener("mousemove",a),null!=el.getState(n.state)&&n.dispatch(n.state.tr.setMeta(el,-1))}function a(l){const c=l,u=el.getState(n.state);let d;if(null!=u)d=n.state.doc.resolve(u);else if(Dj(n,c.target)!=i&&(d=ID(n,t),!d))return s();d&&o(d,c)}n.root.addEventListener("mouseup",s),n.root.addEventListener("dragstart",s),n.root.addEventListener("mousemove",a)}function Sj(n,t,e){if(!(n.state.selection instanceof Le))return null;const{$head:i}=n.state.selection;for(let r=i.depth-1;r>=0;r--){const o=i.node(r);if((e<0?i.index(r):i.indexAfter(r))!=(e<0?0:o.childCount))return null;if("cell"==o.type.spec.tableRole||"header_cell"==o.type.spec.tableRole){const a=i.before(r);return n.endOfTextblock("vert"==t?e>0?"down":"up":e>0?"right":"left")?a:null}}return null}function Dj(n,t){for(;t&&t!=n.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function ID(n,t){const e=n.posAtCoords({left:t.clientX,top:t.clientY});return e&&e?Td(n.state.doc.resolve(e.pos)):null}var mde=class{constructor(n,t){this.node=n,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xD(n,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(n){return n.type==this.node.type&&(this.node=n,xD(n,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(n){return"attributes"==n.type&&(n.target==this.table||this.colgroup.contains(n.target))}};function xD(n,t,e,i,r,o){var s;let a=0,l=!0,c=t.firstChild;const u=n.firstChild;if(u){for(let d=0,h=0;d(r.spec.props.nodeViews[Oi(s.schema).table.name]=(a,l)=>new e(a,t,l),new Uy(-1,!1)),apply:(o,s)=>s.apply(o)},props:{attributes:o=>{const s=ao.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{!function _de(n,t,e,i,r){const o=ao.getState(n.state);if(o&&!o.dragging){const s=function Cde(n){for(;n&&"TD"!=n.nodeName&&"TH"!=n.nodeName;)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}(t.target);let a=-1;if(s){const{left:l,right:c}=s.getBoundingClientRect();t.clientX-l<=e?a=Tj(n,t,"left"):c-t.clientX<=e&&(a=Tj(n,t,"right"))}if(a!=o.activeHandle){if(!r&&-1!==a){const l=n.state.doc.resolve(a),c=l.node(-1),u=dn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}Ej(n,a)}}}(o,s,n,0,i)},mouseleave:o=>{!function yde(n){const t=ao.getState(n.state);t&&t.activeHandle>-1&&!t.dragging&&Ej(n,-1)}(o)},mousedown:(o,s)=>{!function vde(n,t,e){const i=ao.getState(n.state);if(!i||-1==i.activeHandle||i.dragging)return!1;const r=n.state.doc.nodeAt(i.activeHandle),o=function bde(n,t,{colspan:e,colwidth:i}){const r=i&&i[i.length-1];if(r)return r;const o=n.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=e;if(i)for(let c=0;c{const s=ao.getState(o);if(s&&s.activeHandle>-1)return function Tde(n,t){const e=[],i=n.doc.resolve(t),r=i.node(-1);if(!r)return en.empty;const o=dn.get(r),s=i.start(-1),a=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan;for(let l=0;l-1&&n.docChanged){let i=n.mapping.map(t.activeHandle,-1);return TD(n.doc.resolve(i))||(i=-1),new Uy(i,t.dragging)}return t}};function Tj(n,t,e){const i=n.posAtCoords({left:t.clientX,top:t.clientY});if(!i)return-1;const{pos:r}=i,o=Td(n.state.doc.resolve(r));if(!o)return-1;if("right"==e)return o.pos;const s=dn.get(o.node(-1)),a=o.start(-1),l=s.map.indexOf(o.pos-a);return l%s.width==0?-1:a+s.map[l-1]}function Mj(n,t,e){return Math.max(e,n.startWidth+(t.clientX-n.startX))}function Ej(n,t){n.dispatch(n.state.tr.setMeta(ao,{setHandle:t}))}function Dde(n){return Array(n).fill(0)}function us(n){const t=n.selection,e=Fy(n),i=e.node(-1),r=e.start(-1),o=dn.get(i);return{...t instanceof bt?o.rectBetween(t.$anchorCell.pos-r,t.$headCell.pos-r):o.findCell(e.pos-r),tableStart:r,map:o,table:i}}function Ij(n,{map:t,tableStart:e,table:i},r){let o=r>0?-1:0;(function ede(n,t,e){const i=Oi(t.type.schema).header_cell;for(let r=0;r0&&r0&&t.map[a-1]==l||r0?-1:0;(function Ode(n,t,e){var i;const r=Oi(t.type.schema).header_cell;for(let o=0;o0&&r0&&u==t.map[c-t.width]){const d=e.nodeAt(u).attrs;n.setNodeMarkup(n.mapping.slice(a).map(u+i),null,{...d,rowspan:d.rowspan-1}),l+=d.colspan-1}else if(r0&&e[o]==e[o-1]||i.right0&&e[r]==e[r-n]||i.bottom{var i;const r=t.selection;let o,s;if(r instanceof bt){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,s=r.$anchorCell.pos}else{if(o=function Zue(n){for(let t=n.depth;t>0;t--){const e=n.node(t).type.spec.tableRole;if("cell"===e||"header_cell"===e)return n.node(t)}return null}(r.$from),!o)return!1;s=null==(i=Td(r.$from))?void 0:i.pos}if(null==o||null==s||1==o.attrs.colspan&&1==o.attrs.rowspan)return!1;if(e){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const u=us(t),d=t.tr;for(let p=0;pe[i.type.spec.tableRole])(n,t)}function Nj(n,t,e){const i=t.map.cellsInRect({left:0,top:0,right:"row"==n?t.map.width:1,bottom:"column"==n?t.map.height:1});for(let r=0;rr.table.nodeAt(l));for(let l=0;l{const f=p+o.tableStart,m=s.doc.nodeAt(f);m&&s.setNodeMarkup(f,h,m.attrs)}),i(s)}return!0}}Qp("row",{useDeprecatedLogic:!0}),Qp("column",{useDeprecatedLogic:!0});var Vde=Qp("cell",{useDeprecatedLogic:!0});function Lj(n){return function(t,e){if(!Oo(t))return!1;const i=function zde(n,t){if(t<0){const e=n.nodeBefore;if(e)return n.pos-e.nodeSize;for(let i=n.index(-1)-1,r=n.before();i>=0;i--){const o=n.node(-1).child(i),s=o.lastChild;if(s)return r-1-s.nodeSize;r-=o.nodeSize}}else{if(n.index()null,apply(t,e){const i=t.getMeta(el);if(null!=i)return-1==i?null:i;if(null==e||!t.docChanged)return e;const{deleted:r,pos:o}=t.mapping.mapResult(e);return r?null:o}},props:{decorations:tde,handleDOMEvents:{mousedown:fde},createSelectionBetween:t=>null!=el.getState(t.state)?t.state.selection:null,handleTripleClick:hde,handleKeyDown:dde,handlePaste:pde},appendTransaction:(t,e,i)=>function rde(n,t,e){const i=(t||n).selection,r=(t||n).doc;let o,s;if(i instanceof Ee&&(s=i.node.type.spec.tableRole)){if("cell"==s||"header_cell"==s)o=bt.create(r,i.from);else if("row"==s){const a=r.resolve(i.from+1);o=bt.rowSelection(a,a)}else if(!e){const a=dn.get(i.node),l=i.from+1;o=bt.create(r,l+1,l+a.map[a.width*a.height-1])}}else i instanceof Le&&function nde({$from:n,$to:t}){if(n.pos==t.pos||n.pos=0&&!(n.after(r+1)=0&&!(t.before(o+1)>t.start(o));o--,i--);return e==i&&/row|table/.test(n.node(r).type.spec.tableRole)}(i)?o=Le.create(r,i.from):i instanceof Le&&function ide({$from:n,$to:t}){let e,i;for(let r=n.depth;r>0;r--){const o=n.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){e=o;break}}for(let r=t.depth;r>0;r--){const o=t.node(r);if("cell"===o.type.spec.tableRole||"header_cell"===o.type.spec.tableRole){i=o;break}}return e!==i&&0===t.parentOffset}(i)&&(o=Le.create(r,i.$from.start(),i.$from.end()));return o&&(t||(t=n.tr)).setSelection(o),t}(i,vj(i,e),n)})}function Pj(n,t,e,i,r,o){let s=0,a=!0,l=t.firstChild;const c=n.firstChild;for(let u=0,d=0;u{const{selection:t}=n.state;if(!function Gde(n){return n instanceof bt}(t))return!1;let e=0;return D3(t.ranges[0].$from,o=>"table"===o.type.name)?.node.descendants(o=>{if("table"===o.type.name)return!1;["tableCell","tableHeader"].includes(o.type.name)&&(e+=1)}),e===t.ranges.length&&(n.commands.deleteTable(),!0)};tn.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Hde,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({HTMLAttributes:n}){return["table",vt(this.options.HTMLAttributes,n),["tbody",0]]},addCommands:()=>({insertTable:({rows:n=3,cols:t=3,withHeaderRow:e=!0}={})=>({tr:i,dispatch:r,editor:o})=>{const s=function Wde(n,t,e,i,r){const o=function $de(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const t={};return Object.keys(n.nodes).forEach(e=>{const i=n.nodes[e];i.spec.tableRole&&(t[i.spec.tableRole]=i)}),n.cached.tableNodeTypes=t,t}(n),s=[],a=[];for(let c=0;c({state:n,dispatch:t})=>function Mde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Ij(n.tr,e,e.left))}return!0}(n,t),addColumnAfter:()=>({state:n,dispatch:t})=>function Ede(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(Ij(n.tr,e,e.right))}return!0}(n,t),deleteColumn:()=>({state:n,dispatch:t})=>function xde(n,t){if(!Oo(n))return!1;if(t){const e=us(n),i=n.tr;if(0==e.left&&e.right==e.map.width)return!1;for(let r=e.right-1;Ide(i,e,r),r!=e.left;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=dn.get(o)}t(i)}return!0}(n,t),addRowBefore:()=>({state:n,dispatch:t})=>function kde(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(xj(n.tr,e,e.top))}return!0}(n,t),addRowAfter:()=>({state:n,dispatch:t})=>function Ade(n,t){if(!Oo(n))return!1;if(t){const e=us(n);t(xj(n.tr,e,e.bottom))}return!0}(n,t),deleteRow:()=>({state:n,dispatch:t})=>function Lde(n,t){if(!Oo(n))return!1;if(t){const e=us(n),i=n.tr;if(0==e.top&&e.bottom==e.map.height)return!1;for(let r=e.bottom-1;Nde(i,e,r),r!=e.top;r--){const o=e.tableStart?i.doc.nodeAt(e.tableStart-1):i.doc;if(!o)throw RangeError("No table found");e.table=o,e.map=dn.get(e.table)}t(i)}return!0}(n,t),deleteTable:()=>({state:n,dispatch:t})=>function Bde(n,t){const e=n.selection.$anchor;for(let i=e.depth;i>0;i--)if("table"==e.node(i).type.spec.tableRole)return t&&t(n.tr.delete(e.before(i),e.after(i)).scrollIntoView()),!0;return!1}(n,t),mergeCells:()=>({state:n,dispatch:t})=>kj(n,t),splitCell:()=>({state:n,dispatch:t})=>Aj(n,t),toggleHeaderColumn:()=>({state:n,dispatch:t})=>Qp("column")(n,t),toggleHeaderRow:()=>({state:n,dispatch:t})=>Qp("row")(n,t),toggleHeaderCell:()=>({state:n,dispatch:t})=>Vde(n,t),mergeOrSplit:()=>({state:n,dispatch:t})=>!!kj(n,t)||Aj(n,t),setCellAttribute:(n,t)=>({state:e,dispatch:i})=>function Fde(n,t){return function(e,i){if(!Oo(e))return!1;const r=Fy(e);if(r.nodeAfter.attrs[n]===t)return!1;if(i){const o=e.tr;e.selection instanceof bt?e.selection.forEachCell((s,a)=>{s.attrs[n]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[n]:t})}):o.setNodeMarkup(r.pos,null,{...r.nodeAfter.attrs,[n]:t}),i(o)}return!0}}(n,t)(e,i),goToNextCell:()=>({state:n,dispatch:t})=>Lj(1)(n,t),goToPreviousCell:()=>({state:n,dispatch:t})=>Lj(-1)(n,t),fixTables:()=>({state:n,dispatch:t})=>(t&&vj(n),!0),setCellSelection:n=>({tr:t,dispatch:e})=>{if(e){const i=bt.create(t.doc,n.anchorCell,n.headCell);t.setSelection(i)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Hy,"Mod-Backspace":Hy,Delete:Hy,"Mod-Delete":Hy}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[gde({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Ude({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:n=>({tableRole:Qe(ge(n,"tableRole",{name:n.name,options:n.options,storage:n.storage}))})}),new Et("floating-button");const Zp=new Et("freeze-scroll"),ahe=(Ut.create({name:"freezeScroll",addCommands:()=>({freezeScroll:n=>({chain:t})=>t().command(({tr:e})=>(e.setMeta(Zp,{freezeScroll:n}),!0)).run()}),addProseMirrorPlugins:()=>[ahe]}),new pt({key:Zp,state:{init:()=>({freezeScroll:!1}),apply(n,t,e){const{freezeScroll:i}=n.getMeta(Zp)||{},r=Zp?.getState(e);return"boolean"==typeof i?{freezeScroll:i}:r||t}}}));let lhe=1;const che=Promise.resolve(),$y={};function Fj(n){return n in $y&&(delete $y[n],!0)}const jj={setImmediate(n){const t=lhe++;return $y[t]=!0,che.then(()=>Fj(t)&&n()),t},clearImmediate(n){Fj(n)}},OD=new class dhe extends Mo{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=jj.setImmediate(t.flush.bind(t,null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(jj.clearImmediate(e),t.scheduled=void 0)}});function Vj(n){return!!n&&(n instanceof mt||"function"==typeof n.lift&&"function"==typeof n.subscribe)}function Jp(...n){return t=>{let e;return"function"==typeof n[n.length-1]&&(e=n.pop()),t.lift(new hhe(n,e))}}class hhe{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new phe(t,this.observables,this.project))}}class phe extends bN{constructor(t,e,i){super(t),this.observables=e,this.project=i,this.toRespond=[];const r=e.length;this.values=new Array(r);for(let o=0;o0){const o=r.indexOf(i);-1!==o&&r.splice(o,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(i){return void this.destination.error(i)}this.destination.next(e)}}class mhe{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new ghe(t,this.compare,this.keySelector))}}class ghe extends ut{constructor(t,e,i){super(t),this.keySelector=i,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:r}=this;e=r?r(t):t}catch(r){return this.destination.error(r)}let i=!1;if(this.hasKey)try{const{compare:r}=this;i=r(this.key,e)}catch(r){return this.destination.error(r)}else this.hasKey=!0;i||(this.key=e,this.destination.next(t))}}const bhe=new se("@ngrx/component-store Initial State");let Xp=(()=>{class n{constructor(e){this.destroySubject$=new Lg(1),this.destroy$=this.destroySubject$.asObservable(),this.stateSubject$=new Lg(1),this.isInitialized=!1,this.state$=this.select(i=>i),this.\u0275hasProvider=!1,e&&this.initState(e),this.checkProviderForHooks()}ngOnDestroy(){this.stateSubject$.complete(),this.destroySubject$.next()}updater(e){return i=>{let o,r=!0;const a=(Vj(i)?i:_e(i)).pipe(function AG(n,t=0){return function(i){return i.lift(new NG(n,t))}}(yw),Mt(()=>this.assertStateIsInitialized()),Jp(this.stateSubject$),me(([l,c])=>e(c,l)),Mt(l=>this.stateSubject$.next(l)),ui(l=>r?(o=l,To):Ir(()=>l)),Rt(this.destroy$)).subscribe();if(o)throw o;return r=!1,a}}initState(e){Rf([e],yw).subscribe(i=>{this.isInitialized=!0,this.stateSubject$.next(i)})}setState(e){"function"!=typeof e?this.initState(e):this.updater(e)()}patchState(e){const i="function"==typeof e?e(this.get()):e;this.updater((r,o)=>({...r,...o}))(i)}get(e){let i;return this.assertStateIsInitialized(),this.stateSubject$.pipe(Gt(1)).subscribe(r=>{i=e?e(r):r}),i}select(...e){const{observablesOrSelectorsObject:i,projector:r,config:o}=function Che(n){const t=Array.from(n);let e={debounce:!1};if(function whe(n){return typeof n.debounce<"u"}(t[t.length-1])&&(e={...e,...t.pop()}),1===t.length&&"function"!=typeof t[0])return{observablesOrSelectorsObject:t[0],projector:void 0,config:e};const i=t.pop();return{observablesOrSelectorsObject:t,projector:i,config:e}}(e);return(function She(n,t){return Array.isArray(n)&&0===n.length&&t}(i,r)?this.stateSubject$:function t_(...n){let t,e;return la(n[n.length-1])&&(e=n.pop()),"function"==typeof n[n.length-1]&&(t=n.pop()),1===n.length&&oi(n[0])&&(n=n[0]),ua(n,e).lift(new cY(t))}(i)).pipe(o.debounce?function vhe(){return n=>new mt(t=>{let e,i;const r=new ft;return r.add(n.subscribe({complete:()=>{e&&t.next(i),t.complete()},error:o=>{t.error(o)},next:o=>{i=o,e||(e=OD.schedule(()=>{t.next(i),e=void 0}),r.add(e))}})),r})}():n=>n,r?me(a=>i.length>0&&Array.isArray(a)?r(...a):r(a)):n=>n,function fhe(n,t){return e=>e.lift(new mhe(n,t))}(),function _he(n,t,e){let i;return i=n&&"object"==typeof n?n:{bufferSize:n,windowTime:t,refCount:!1,scheduler:e},r=>r.lift(function yhe({bufferSize:n=Number.POSITIVE_INFINITY,windowTime:t=Number.POSITIVE_INFINITY,refCount:e,scheduler:i}){let r,s,o=0,a=!1,l=!1;return function(u){let d;o++,!r||a?(a=!1,r=new Lg(n,t,i),d=r.subscribe(this),s=u.subscribe({next(h){r.next(h)},error(h){a=!0,r.error(h)},complete(){l=!0,s=void 0,r.complete()}}),l&&(s=void 0)):d=r.subscribe(this),this.add(()=>{o--,d.unsubscribe(),d=void 0,s&&!l&&e&&0===o&&(s.unsubscribe(),s=void 0,r=void 0)})}}(i))}({refCount:!0,bufferSize:1}),Rt(this.destroy$))}effect(e){const i=new ye;return e(i).pipe(Rt(this.destroy$)).subscribe(),r=>(Vj(r)?r:_e(r)).pipe(Rt(this.destroy$)).subscribe(s=>{i.next(s)})}checkProviderForHooks(){OD.schedule(()=>{})}assertStateIsInitialized(){if(!this.isInitialized)throw new Error(`${this.constructor.name} has not been initialized yet. Please make sure it is initialized before updating/getting.`)}}return n.\u0275fac=function(e){return new(e||n)(U(bhe,8))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function ND(n,t,e){return i=>i.pipe(Mt({next:n,complete:e}),ui(r=>(t(r),To)))}const Nhe=(new Et("dotAITextContent"),["headerchkbox"]),Lhe=["filter"];function Phe(n,t){1&n&&ce(0)}function Rhe(n,t){if(1&n&&(S(0,"div",7),ln(1),C(2,Phe,1,0,"ng-container",8),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.headerTemplate)}}const Bj=function(n){return{"p-checkbox-disabled":n}},Fhe=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}},Uj=function(n){return{"pi pi-check":n}};function jhe(n,t){if(1&n){const e=q();S(0,"div",12)(1,"div",13)(2,"input",14),P("focus",function(){return I(e),x(y(2).onHeaderCheckboxFocus())})("blur",function(){return I(e),x(y(2).onHeaderCheckboxBlur())})("keydown.space",function(r){return I(e),x(y(2).toggleAll(r))}),D()(),S(3,"div",15,16),P("click",function(r){return I(e),x(y(2).toggleAll(r))}),F(5,"span",17),D()()}if(2&n){const e=y(2);g("ngClass",te(5,Bj,e.disabled||e.toggleAllDisabled)),v(2),g("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),v(1),g("ngClass",Hr(7,Fhe,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),v(2),g("ngClass",te(11,Uj,e.allChecked))}}function Vhe(n,t){1&n&&ce(0)}const zhe=function(n){return{options:n}};function Bhe(n,t){if(1&n&&(ae(0),C(1,Vhe,1,0,"ng-container",18),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,zhe,e.filterOptions))}}function Uhe(n,t){if(1&n){const e=q();S(0,"div",20)(1,"input",21,22),P("input",function(r){return I(e),x(y(3).onFilter(r))}),D(),F(3,"span",23),D()}if(2&n){const e=y(3);v(1),g("value",e.filterValue||"")("disabled",e.disabled),he("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function Hhe(n,t){1&n&&C(0,Uhe,4,4,"div",19),2&n&&g("ngIf",y(2).filter)}function $he(n,t){if(1&n&&(S(0,"div",7),C(1,jhe,6,13,"div",9),C(2,Bhe,2,4,"ng-container",10),C(3,Hhe,1,1,"ng-template",null,11,yt),D()),2&n){const e=Pe(4),i=y();v(1),g("ngIf",i.checkbox&&i.multiple&&i.showToggleAll),v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function Whe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function Ghe(n,t){1&n&&ce(0)}function qhe(n,t){1&n&&ce(0)}const PD=function(n){return{$implicit:n}};function Khe(n,t){if(1&n&&(S(0,"li",25),C(1,Whe,2,1,"span",3),C(2,Ghe,1,0,"ng-container",18),D(),C(3,qhe,1,0,"ng-container",18)),2&n){const e=t.$implicit,i=y(2),r=Pe(8);v(1),g("ngIf",!i.groupTemplate),v(1),g("ngTemplateOutlet",i.groupTemplate)("ngTemplateOutletContext",te(5,PD,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(7,PD,i.getOptionGroupChildren(e)))}}function Yhe(n,t){if(1&n&&(ae(0),C(1,Khe,4,9,"ng-template",24),le()),2&n){const e=y();v(1),g("ngForOf",e.optionsToRender)}}function Qhe(n,t){1&n&&ce(0)}function Zhe(n,t){if(1&n&&(ae(0),C(1,Qhe,1,0,"ng-container",18),le()),2&n){const e=y(),i=Pe(8);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,PD,e.optionsToRender))}}const Jhe=function(n){return{"p-highlight":n}};function Xhe(n,t){if(1&n&&(S(0,"div",12)(1,"div",28),F(2,"span",17),D()()),2&n){const e=y().$implicit,i=y(2);g("ngClass",te(3,Bj,i.disabled||i.isOptionDisabled(e))),v(1),g("ngClass",te(5,Jhe,i.isSelected(e))),v(1),g("ngClass",te(7,Uj,i.isSelected(e)))}}function epe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(2);v(1),ve(i.getOptionLabel(e))}}function tpe(n,t){1&n&&ce(0)}const npe=function(n,t){return{"p-listbox-item":!0,"p-highlight":n,"p-disabled":t}},ipe=function(n,t){return{$implicit:n,index:t}};function rpe(n,t){if(1&n){const e=q();S(0,"li",27),P("click",function(r){const s=I(e).$implicit;return x(y(2).onOptionClick(r,s))})("dblclick",function(r){const s=I(e).$implicit;return x(y(2).onOptionDoubleClick(r,s))})("touchend",function(){const o=I(e).$implicit;return x(y(2).onOptionTouchEnd(o))})("keydown",function(r){const s=I(e).$implicit;return x(y(2).onOptionKeyDown(r,s))}),C(1,Xhe,3,9,"div",9),C(2,epe,2,1,"span",3),C(3,tpe,1,0,"ng-container",18),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(2);g("ngClass",ot(8,npe,r.isSelected(e),r.isOptionDisabled(e))),he("tabindex",r.disabled||r.isOptionDisabled(e)?null:"0")("aria-label",r.getOptionLabel(e))("aria-selected",r.isSelected(e)),v(1),g("ngIf",r.checkbox&&r.multiple),v(1),g("ngIf",!r.itemTemplate),v(1),g("ngTemplateOutlet",r.itemTemplate)("ngTemplateOutletContext",ot(11,ipe,e,i))}}function ope(n,t){1&n&&C(0,rpe,4,14,"li",26),2&n&&g("ngForOf",t.$implicit)}function spe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function ape(n,t){1&n&&ce(0,null,30)}function lpe(n,t){if(1&n&&(S(0,"li",29),C(1,spe,2,1,"ng-container",10),C(2,ape,2,0,"ng-container",8),D()),2&n){const e=y();v(1),g("ngIf",!e.emptyFilterTemplate&&!e.emptyTemplate)("ngIfElse",e.emptyFilter),v(1),g("ngTemplateOutlet",e.emptyFilterTemplate||e.emptyTemplate)}}function cpe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),xt(" ",e.emptyMessageLabel," ")}}function upe(n,t){1&n&&ce(0,null,31)}function dpe(n,t){if(1&n&&(S(0,"li",29),C(1,cpe,2,1,"ng-container",10),C(2,upe,2,0,"ng-container",8),D()),2&n){const e=y();v(1),g("ngIf",!e.emptyTemplate)("ngIfElse",e.empty),v(1),g("ngTemplateOutlet",e.emptyTemplate)}}function hpe(n,t){1&n&&ce(0)}function ppe(n,t){if(1&n&&(S(0,"div",32),ln(1,1),C(2,hpe,1,0,"ng-container",8),D()),2&n){const e=y();v(2),g("ngTemplateOutlet",e.footerTemplate)}}const fpe=[[["p-header"]],[["p-footer"]]],mpe=function(n){return{"p-listbox p-component":!0,"p-disabled":n}},gpe=["p-header","p-footer"],_pe={provide:wn,useExisting:$e(()=>Hj),multi:!0};let Hj=(()=>{class n{constructor(e,i,r,o){this.el=e,this.cd=i,this.filterService=r,this.config=o,this.checkbox=!1,this.filter=!1,this.filterMatchMode="contains",this.metaKeySelection=!0,this.showToggleAll=!0,this.optionGroupChildren="items",this.onChange=new R,this.onClick=new R,this.onDblClick=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get options(){return this._options}set options(e){this._options=e,this.hasFilter()&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()}),this.filterBy&&(this.filterOptions={filter:e=>this.onFilter(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template}})}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):this.optionLabel||void 0===e.value?e:e.value}isOptionDisabled(e){return this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):void 0!==e.disabled&&e.disabled}writeValue(e){this.value=e,this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||(this.multiple?this.checkbox?this.onOptionClickCheckbox(e,i):this.onOptionClickMultiple(e,i):this.onOptionClickSingle(e,i),this.onClick.emit({originalEvent:e,option:i,value:this.value}),this.optionTouched=!1)}onOptionTouchEnd(e){this.disabled||this.isOptionDisabled(e)||this.readonly||(this.optionTouched=!0)}onOptionDoubleClick(e,i){this.disabled||this.isOptionDisabled(i)||this.readonly||this.onDblClick.emit({originalEvent:e,option:i,value:this.value})}onOptionClickSingle(e,i){let r=this.isSelected(i),o=!1;!this.optionTouched&&this.metaKeySelection?r?(e.metaKey||e.ctrlKey)&&(this.value=null,o=!0):(this.value=this.getOptionValue(i),o=!0):(this.value=r?null:this.getOptionValue(i),o=!0),o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickMultiple(e,i){let r=this.isSelected(i),o=!1;if(!this.optionTouched&&this.metaKeySelection){let a=e.metaKey||e.ctrlKey;r?(a?this.removeOption(i):this.value=[this.getOptionValue(i)],o=!0):(this.value=a&&this.value||[],this.value=[...this.value,this.getOptionValue(i)],o=!0)}else r?this.removeOption(i):this.value=[...this.value||[],this.getOptionValue(i)],o=!0;o&&(this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}onOptionClickCheckbox(e,i){this.disabled||this.readonly||(this.isSelected(i)?this.removeOption(i):(this.value=this.value?this.value:[],this.value=[...this.value,this.getOptionValue(i)]),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}))}removeOption(e){this.value=this.value.filter(i=>!Oe.equals(i,this.getOptionValue(e),this.dataKey))}isSelected(e){let i=!1,r=this.getOptionValue(e);if(this.multiple){if(this.value)for(let o of this.value)if(Oe.equals(o,r,this.dataKey)){i=!0;break}}else i=Oe.equals(this.value,r,this.dataKey);return i}get allChecked(){let e=this.optionsToRender;if(!e||0===e.length)return!1;{let i=0,r=0,o=0,s=this.group?0:this.optionsToRender.length;for(let a of e)if(this.group)for(let l of this.getOptionGroupChildren(a)){let c=this.isOptionDisabled(l),u=this.isSelected(l);if(c)u?i++:r++;else{if(!u)return!1;o++}s++}else{let l=this.isOptionDisabled(a),c=this.isSelected(a);if(l)c?i++:r++;else{if(!c)return!1;o++}}return s===i||s===o||o&&s===o+r+i}}get optionsToRender(){return this._filteredOptions||this.options}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ln.EMPTY_FILTER_MESSAGE)}hasFilter(){return this._filterValue&&this._filterValue.trim().length>0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilter(e){this._filterValue=e.target.value,this.activateFilter()}activateFilter(){if(this.hasFilter()&&this._options)if(this.group){let e=(this.filterBy||this.optionLabel||"label").split(","),i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this._options.filter(e=>this.filterService.filters[this.filterMatchMode](this.getOptionLabel(e),this._filterValue,this.filterLocale));else this._filteredOptions=null}resetFilter(){this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}get toggleAllDisabled(){let e=this.optionsToRender;if(!e||0===e.length)return!0;for(let i of e)if(!this.isOptionDisabled(i))return!1;return!0}toggleAll(e){this.disabled||this.toggleAllDisabled||this.readonly||(this.allChecked?this.uncheckAll():this.checkAll(),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value}),e.preventDefault())}checkAll(){let i=[];this.optionsToRender.forEach(r=>{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}onOptionKeyDown(e,i){if(this.readonly)return;let r=e.currentTarget;switch(e.which){case 40:var o=this.findNextItem(r);o&&o.focus(),e.preventDefault();break;case 38:var s=this.findPrevItem(r);s&&s.focus(),e.preventDefault();break;case 13:this.onOptionClick(e,i),e.preventDefault()}}findNextItem(e){let i=e.nextElementSibling;return i?A.hasClass(i,"p-disabled")||A.isHidden(i)||A.hasClass(i,"p-listbox-item-group")?this.findNextItem(i):i:null}findPrevItem(e){let i=e.previousElementSibling;return i?A.hasClass(i,"p-disabled")||A.isHidden(i)||A.hasClass(i,"p-listbox-item-group")?this.findPrevItem(i):i:null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}ngOnDestroy(){this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Tt),O(T1),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-listbox"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,M_,5),Vt(r,E_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(Nhe,5),Me(Lhe,5)),2&e){let r;J(r=X())&&(i.headerCheckboxViewChild=r.first),J(r=X())&&(i.filterViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{multiple:"multiple",style:"style",styleClass:"styleClass",listStyle:"listStyle",listStyleClass:"listStyleClass",readonly:"readonly",disabled:"disabled",checkbox:"checkbox",filter:"filter",filterBy:"filterBy",filterMatchMode:"filterMatchMode",filterLocale:"filterLocale",metaKeySelection:"metaKeySelection",dataKey:"dataKey",showToggleAll:"showToggleAll",optionLabel:"optionLabel",optionValue:"optionValue",optionGroupChildren:"optionGroupChildren",optionGroupLabel:"optionGroupLabel",optionDisabled:"optionDisabled",ariaFilterLabel:"ariaFilterLabel",filterPlaceHolder:"filterPlaceHolder",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",group:"group",options:"options",filterValue:"filterValue"},outputs:{onChange:"onChange",onClick:"onClick",onDblClick:"onDblClick"},features:[Ie([_pe])],ngContentSelectors:gpe,decls:12,vars:18,consts:[[3,"ngClass","ngStyle"],["class","p-listbox-header",4,"ngIf"],["role","listbox",1,"p-listbox-list"],[4,"ngIf"],["itemslist",""],["class","p-listbox-empty-message",4,"ngIf"],["class","p-listbox-footer",4,"ngIf"],[1,"p-listbox-header"],[4,"ngTemplateOutlet"],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],[1,"p-checkbox","p-component",3,"ngClass"],[1,"p-hidden-accessible"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],[1,"p-checkbox-box",3,"ngClass","click"],["headerchkbox",""],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-listbox-filter-container",4,"ngIf"],[1,"p-listbox-filter-container"],["type","text",1,"p-listbox-filter","p-inputtext","p-component",3,"value","disabled","input"],["filter",""],[1,"p-listbox-filter-icon","pi","pi-search"],["ngFor","",3,"ngForOf"],[1,"p-listbox-item-group"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown",4,"ngFor","ngForOf"],["pRipple","","role","option",3,"ngClass","click","dblclick","touchend","keydown"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-listbox-empty-message"],["emptyFilter",""],["empty",""],[1,"p-listbox-footer"]],template:function(e,i){1&e&&(li(fpe),S(0,"div",0),C(1,Rhe,3,1,"div",1),C(2,$he,5,3,"div",1),S(3,"div",0)(4,"ul",2),C(5,Yhe,2,1,"ng-container",3),C(6,Zhe,2,4,"ng-container",3),C(7,ope,1,1,"ng-template",null,4,yt),C(9,lpe,3,3,"li",5),C(10,dpe,3,3,"li",5),D()(),C(11,ppe,3,1,"div",6),D()),2&e&&(Ke(i.styleClass),g("ngClass",te(16,mpe,i.disabled))("ngStyle",i.style),v(1),g("ngIf",i.headerFacet||i.headerTemplate),v(1),g("ngIf",i.checkbox&&i.multiple&&i.showToggleAll||i.filter),v(1),Ke(i.listStyleClass),g("ngClass","p-listbox-list-wrapper")("ngStyle",i.listStyle),v(1),he("aria-multiselectable",i.multiple),v(1),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",!i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",i.footerFacet||i.footerTemplate))},dependencies:[Ot,Un,He,Zn,cn,Xr],styles:[".p-listbox-list-wrapper{overflow:auto}.p-listbox-list{list-style-type:none;margin:0;padding:0}.p-listbox-item{cursor:pointer;position:relative;overflow:hidden;display:flex;align-items:center;-webkit-user-select:none;user-select:none}.p-listbox-header{display:flex;align-items:center}.p-listbox-filter-container{position:relative;flex:1 1 auto}.p-listbox-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-listbox-filter{width:100%}\n"],encapsulation:2,changeDetection:0}),n})(),bpe=(()=>{class n{constructor(e){this.el=e}onkeydown(e){if(!0!==this.pFocusTrapDisabled){e.preventDefault();const i=A.getNextFocusableElement(this.el.nativeElement,e.shiftKey);i&&(i.focus(),i.select?.())}}}return n.\u0275fac=function(e){return new(e||n)(O(qe))},n.\u0275dir=de({type:n,selectors:[["","pFocusTrap",""]],hostAttrs:[1,"p-element"],hostBindings:function(e,i){1&e&&P("keydown.tab",function(o){return i.onkeydown(o)})("keydown.shift.tab",function(o){return i.onkeydown(o)})},inputs:{pFocusTrapDisabled:"pFocusTrapDisabled"}}),n})(),Cpe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze]}),n})();const wpe=["titlebar"],Spe=["content"],Dpe=["footer"];function Tpe(n,t){if(1&n){const e=q();S(0,"div",11),P("mousedown",function(r){return I(e),x(y(3).initResize(r))}),D()}}function Mpe(n,t){if(1&n&&(S(0,"span",18),H(1),D()),2&n){const e=y(4);he("id",e.id+"-label"),v(1),ve(e.header)}}function Epe(n,t){1&n&&(S(0,"span",18),ln(1,1),D()),2&n&&he("id",y(4).id+"-label")}function Ipe(n,t){1&n&&ce(0)}const xpe=function(){return{"p-dialog-header-icon p-dialog-header-maximize p-link":!0}};function Ope(n,t){if(1&n){const e=q();S(0,"button",19),P("click",function(){return I(e),x(y(4).maximize())})("keydown.enter",function(){return I(e),x(y(4).maximize())}),F(1,"span",20),D()}if(2&n){const e=y(4);g("ngClass",pn(2,xpe)),v(1),g("ngClass",e.maximized?e.minimizeIcon:e.maximizeIcon)}}const kpe=function(){return{"p-dialog-header-icon p-dialog-header-close p-link":!0}};function Ape(n,t){if(1&n){const e=q();S(0,"button",21),P("click",function(r){return I(e),x(y(4).close(r))})("keydown.enter",function(r){return I(e),x(y(4).close(r))}),F(1,"span",22),D()}if(2&n){const e=y(4);g("ngClass",pn(4,kpe)),he("aria-label",e.closeAriaLabel)("tabindex",e.closeTabindex),v(1),g("ngClass",e.closeIcon)}}function Npe(n,t){if(1&n){const e=q();S(0,"div",12,13),P("mousedown",function(r){return I(e),x(y(3).initDrag(r))}),C(2,Mpe,2,2,"span",14),C(3,Epe,2,1,"span",14),C(4,Ipe,1,0,"ng-container",9),S(5,"div",15),C(6,Ope,2,3,"button",16),C(7,Ape,2,5,"button",17),D()()}if(2&n){const e=y(3);v(2),g("ngIf",!e.headerFacet&&!e.headerTemplate),v(1),g("ngIf",e.headerFacet),v(1),g("ngTemplateOutlet",e.headerTemplate),v(2),g("ngIf",e.maximizable),v(1),g("ngIf",e.closable)}}function Lpe(n,t){1&n&&ce(0)}function Ppe(n,t){1&n&&ce(0)}function Rpe(n,t){if(1&n&&(S(0,"div",23,24),ln(2,2),C(3,Ppe,1,0,"ng-container",9),D()),2&n){const e=y(3);v(3),g("ngTemplateOutlet",e.footerTemplate)}}const Fpe=function(n,t,e,i){return{"p-dialog p-component":!0,"p-dialog-rtl":n,"p-dialog-draggable":t,"p-dialog-resizable":e,"p-dialog-maximized":i}},jpe=function(n,t){return{transform:n,transition:t}},Vpe=function(n){return{value:"visible",params:n}};function zpe(n,t){if(1&n){const e=q();S(0,"div",3,4),P("@animation.start",function(r){return I(e),x(y(2).onAnimationStart(r))})("@animation.done",function(r){return I(e),x(y(2).onAnimationEnd(r))}),C(2,Tpe,1,0,"div",5),C(3,Npe,8,5,"div",6),S(4,"div",7,8),ln(6),C(7,Lpe,1,0,"ng-container",9),D(),C(8,Rpe,4,1,"div",10),D()}if(2&n){const e=y(2);Ke(e.styleClass),g("ngClass",va(15,Fpe,e.rtl,e.draggable,e.resizable,e.maximized))("ngStyle",e.style)("pFocusTrapDisabled",!1===e.focusTrap)("@animation",te(23,Vpe,ot(20,jpe,e.transformOptions,e.transitionOptions))),he("aria-labelledby",e.id+"-label"),v(2),g("ngIf",e.resizable),v(1),g("ngIf",e.showHeader),v(1),Ke(e.contentStyleClass),g("ngClass","p-dialog-content")("ngStyle",e.contentStyle),v(3),g("ngTemplateOutlet",e.contentTemplate),v(1),g("ngIf",e.footerFacet||e.footerTemplate)}}const Bpe=function(n,t,e,i,r,o,s,a,l,c){return{"p-dialog-mask":!0,"p-component-overlay p-component-overlay-enter":n,"p-dialog-mask-scrollblocker":t,"p-dialog-left":e,"p-dialog-right":i,"p-dialog-top":r,"p-dialog-top-left":o,"p-dialog-top-right":s,"p-dialog-bottom":a,"p-dialog-bottom-left":l,"p-dialog-bottom-right":c}};function Upe(n,t){if(1&n&&(S(0,"div",1),C(1,zpe,9,25,"div",2),D()),2&n){const e=y();Ke(e.maskStyleClass),g("ngClass",qC(4,Bpe,[e.modal,e.modal||e.blockScroll,"left"===e.position,"right"===e.position,"top"===e.position,"topleft"===e.position||"top-left"===e.position,"topright"===e.position||"top-right"===e.position,"bottom"===e.position,"bottomleft"===e.position||"bottom-left"===e.position,"bottomright"===e.position||"bottom-right"===e.position])),v(1),g("ngIf",e.visible)}}const Hpe=["*",[["p-header"]],[["p-footer"]]],$pe=["*","p-header","p-footer"],Wpe=Rg([Pt({transform:"{{transform}}",opacity:0}),Bi("{{transition}}")]),Gpe=Rg([Bi("{{transition}}",Pt({transform:"{{transform}}",opacity:0}))]);let Wj=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.renderer=i,this.zone=r,this.cd=o,this.config=s,this.draggable=!0,this.resizable=!0,this.closeOnEscape=!0,this.closable=!0,this.showHeader=!0,this.blockScroll=!1,this.autoZIndex=!0,this.baseZIndex=0,this.minX=0,this.minY=0,this.focusOnShow=!0,this.keepInViewport=!0,this.focusTrap=!0,this.transitionOptions="150ms cubic-bezier(0, 0, 0.2, 1)",this.closeIcon="pi pi-times",this.closeTabindex="-1",this.minimizeIcon="pi pi-window-minimize",this.maximizeIcon="pi pi-window-maximize",this.onShow=new R,this.onHide=new R,this.visibleChange=new R,this.onResizeInit=new R,this.onResizeEnd=new R,this.onDragEnd=new R,this.onMaximize=new R,this.id=T_(),this._style={},this._position="center",this.transformOptions="scale(0.7)"}get positionLeft(){return 0}set positionLeft(e){console.log("positionLeft property is deprecated.")}get positionTop(){return 0}set positionTop(e){console.log("positionTop property is deprecated.")}get responsive(){return!1}set responsive(e){console.log("Responsive property is deprecated.")}get breakpoint(){return 649}set breakpoint(e){console.log("Breakpoint property is not utilized and deprecated, use breakpoints or CSS media queries instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"header":this.headerTemplate=e.template;break;case"content":default:this.contentTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngOnInit(){this.breakpoints&&this.createStyle()}get visible(){return this._visible}set visible(e){this._visible=e,this._visible&&!this.maskVisible&&(this.maskVisible=!0)}get style(){return this._style}set style(e){e&&(this._style={...e},this.originalStyle=e)}get position(){return this._position}set position(e){switch(this._position=e,e){case"topleft":case"bottomleft":case"left":this.transformOptions="translate3d(-100%, 0px, 0px)";break;case"topright":case"bottomright":case"right":this.transformOptions="translate3d(100%, 0px, 0px)";break;case"bottom":this.transformOptions="translate3d(0px, 100%, 0px)";break;case"top":this.transformOptions="translate3d(0px, -100%, 0px)";break;default:this.transformOptions="scale(0.7)"}}focus(){let e=A.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}close(e){this.visibleChange.emit(!1),e.preventDefault()}enableModality(){this.closable&&this.dismissableMask&&(this.maskClickListener=this.renderer.listen(this.wrapper,"mousedown",e=>{this.wrapper&&this.wrapper.isSameNode(e.target)&&this.close(e)})),this.modal&&A.addClass(document.body,"p-overflow-hidden")}disableModality(){this.wrapper&&(this.dismissableMask&&this.unbindMaskClickListener(),this.modal&&A.removeClass(document.body,"p-overflow-hidden"),this.cd.destroyed||this.cd.detectChanges())}maximize(){this.maximized=!this.maximized,!this.modal&&!this.blockScroll&&(this.maximized?A.addClass(document.body,"p-overflow-hidden"):A.removeClass(document.body,"p-overflow-hidden")),this.onMaximize.emit({maximized:this.maximized})}unbindMaskClickListener(){this.maskClickListener&&(this.maskClickListener(),this.maskClickListener=null)}moveOnTop(){this.autoZIndex&&($i.set("modal",this.container,this.baseZIndex+this.config.zIndex.modal),this.wrapper.style.zIndex=String(parseInt(this.container.style.zIndex,10)-1))}createStyle(){if(!this.styleElement){this.styleElement=document.createElement("style"),this.styleElement.type="text/css",document.head.appendChild(this.styleElement);let e="";for(let i in this.breakpoints)e+=`\n @media screen and (max-width: ${i}) {\n .p-dialog[${this.id}] {\n width: ${this.breakpoints[i]} !important;\n }\n }\n `;this.styleElement.innerHTML=e}}initDrag(e){A.hasClass(e.target,"p-dialog-header-icon")||A.hasClass(e.target.parentElement,"p-dialog-header-icon")||this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",A.addClass(document.body,"p-unselectable-text"))}onKeydown(e){if(this.focusTrap&&9===e.which){e.preventDefault();let i=A.getFocusableElements(this.container);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);e.shiftKey?-1==r||0===r?i[i.length-1].focus():i[r-1].focus():-1==r||r===i.length-1?i[0].focus():i[r+1].focus()}else i[0].focus()}}onDrag(e){if(this.dragging){let i=A.getOuterWidth(this.container),r=A.getOuterHeight(this.container),o=e.pageX-this.lastPageX,s=e.pageY-this.lastPageY,a=this.container.getBoundingClientRect(),l=a.left+o,c=a.top+s,u=A.getViewport();this.container.style.position="fixed",this.keepInViewport?(l>=this.minX&&l+i=this.minY&&c+rparseInt(u))&&h.left+lparseInt(d))&&h.top+c{this.documentDragListener=this.onDrag.bind(this),window.document.addEventListener("mousemove",this.documentDragListener)})}unbindDocumentDragListener(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)}bindDocumentDragEndListener(){this.zone.runOutsideAngular(()=>{this.documentDragEndListener=this.endDrag.bind(this),window.document.addEventListener("mouseup",this.documentDragEndListener)})}unbindDocumentDragEndListener(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}bindDocumentResizeListeners(){this.zone.runOutsideAngular(()=>{this.documentResizeListener=this.onResize.bind(this),this.documentResizeEndListener=this.resizeEnd.bind(this),window.document.addEventListener("mousemove",this.documentResizeListener),window.document.addEventListener("mouseup",this.documentResizeEndListener)})}unbindDocumentResizeListeners(){this.documentResizeListener&&this.documentResizeEndListener&&(window.document.removeEventListener("mousemove",this.documentResizeListener),window.document.removeEventListener("mouseup",this.documentResizeEndListener),this.documentResizeListener=null,this.documentResizeEndListener=null)}bindDocumentEscapeListener(){this.documentEscapeListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","keydown",i=>{27==i.which&&this.close(i)})}unbindDocumentEscapeListener(){this.documentEscapeListener&&(this.documentEscapeListener(),this.documentEscapeListener=null)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.wrapper):A.appendChild(this.wrapper,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.wrapper)}onAnimationStart(e){switch(e.toState){case"visible":this.container=e.element,this.wrapper=this.container.parentElement,this.appendContainer(),this.moveOnTop(),this.bindGlobalListeners(),this.container.setAttribute(this.id,""),this.modal&&this.enableModality(),!this.modal&&this.blockScroll&&A.addClass(document.body,"p-overflow-hidden"),this.focusOnShow&&this.focus();break;case"void":this.wrapper&&this.modal&&A.addClass(this.wrapper,"p-component-overlay-leave")}}onAnimationEnd(e){switch(e.toState){case"void":this.onContainerDestroy(),this.onHide.emit({}),this.cd.markForCheck();break;case"visible":this.onShow.emit({})}}onContainerDestroy(){this.unbindGlobalListeners(),this.dragging=!1,this.maskVisible=!1,this.maximized&&(A.removeClass(document.body,"p-overflow-hidden"),this.maximized=!1),this.modal&&this.disableModality(),this.blockScroll&&A.removeClass(document.body,"p-overflow-hidden"),this.container&&this.autoZIndex&&$i.clear(this.container),this.container=null,this.wrapper=null,this._style=this.originalStyle?{...this.originalStyle}:{}}destroyStyle(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)}ngOnDestroy(){this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.destroyStyle()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Xe),O(Tt),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-dialog"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,M_,5),Vt(r,E_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(wpe,5),Me(Spe,5),Me(Dpe,5)),2&e){let r;J(r=X())&&(i.headerViewChild=r.first),J(r=X())&&(i.contentViewChild=r.first),J(r=X())&&(i.footerViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{header:"header",draggable:"draggable",resizable:"resizable",positionLeft:"positionLeft",positionTop:"positionTop",contentStyle:"contentStyle",contentStyleClass:"contentStyleClass",modal:"modal",closeOnEscape:"closeOnEscape",dismissableMask:"dismissableMask",rtl:"rtl",closable:"closable",responsive:"responsive",appendTo:"appendTo",breakpoints:"breakpoints",styleClass:"styleClass",maskStyleClass:"maskStyleClass",showHeader:"showHeader",breakpoint:"breakpoint",blockScroll:"blockScroll",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",minX:"minX",minY:"minY",focusOnShow:"focusOnShow",maximizable:"maximizable",keepInViewport:"keepInViewport",focusTrap:"focusTrap",transitionOptions:"transitionOptions",closeIcon:"closeIcon",closeAriaLabel:"closeAriaLabel",closeTabindex:"closeTabindex",minimizeIcon:"minimizeIcon",maximizeIcon:"maximizeIcon",visible:"visible",style:"style",position:"position"},outputs:{onShow:"onShow",onHide:"onHide",visibleChange:"visibleChange",onResizeInit:"onResizeInit",onResizeEnd:"onResizeEnd",onDragEnd:"onDragEnd",onMaximize:"onMaximize"},ngContentSelectors:$pe,decls:1,vars:1,consts:[[3,"class","ngClass",4,"ngIf"],[3,"ngClass"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","class","pFocusTrapDisabled",4,"ngIf"],["pFocusTrap","","role","dialog",3,"ngClass","ngStyle","pFocusTrapDisabled"],["container",""],["class","p-resizable-handle","style","z-index: 90;",3,"mousedown",4,"ngIf"],["class","p-dialog-header",3,"mousedown",4,"ngIf"],[3,"ngClass","ngStyle"],["content",""],[4,"ngTemplateOutlet"],["class","p-dialog-footer",4,"ngIf"],[1,"p-resizable-handle",2,"z-index","90",3,"mousedown"],[1,"p-dialog-header",3,"mousedown"],["titlebar",""],["class","p-dialog-title",4,"ngIf"],[1,"p-dialog-header-icons"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],["type","button","pRipple","",3,"ngClass","click","keydown.enter",4,"ngIf"],[1,"p-dialog-title"],["type","button","tabindex","-1","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-maximize-icon",3,"ngClass"],["type","button","pRipple","",3,"ngClass","click","keydown.enter"],[1,"p-dialog-header-close-icon",3,"ngClass"],[1,"p-dialog-footer"],["footer",""]],template:function(e,i){1&e&&(li(Hpe),C(0,Upe,2,15,"div",0)),2&e&&g("ngIf",i.maskVisible)},dependencies:[Ot,He,Zn,cn,bpe,Xr],styles:[".p-dialog-mask{position:fixed;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none}.p-dialog-mask.p-component-overlay{pointer-events:auto}.p-dialog{display:flex;flex-direction:column;pointer-events:auto;max-height:90%;transform:scale(1);position:relative}.p-dialog-content{overflow-y:auto;flex-grow:1}.p-dialog-header{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.p-dialog-draggable .p-dialog-header{cursor:move}.p-dialog-footer{flex-shrink:0}.p-dialog .p-dialog-header-icons{display:flex;align-items:center}.p-dialog .p-dialog-header-icon{display:flex;align-items:center;justify-content:center;overflow:hidden;position:relative}.p-fluid .p-dialog-footer .p-button{width:auto}.p-dialog-top .p-dialog,.p-dialog-bottom .p-dialog,.p-dialog-left .p-dialog,.p-dialog-right .p-dialog,.p-dialog-top-left .p-dialog,.p-dialog-top-right .p-dialog,.p-dialog-bottom-left .p-dialog,.p-dialog-bottom-right .p-dialog{margin:.75rem;transform:translateZ(0)}.p-dialog-maximized{transition:none;transform:none;width:100vw!important;height:100vh!important;top:0!important;left:0!important;max-height:100%;height:100%}.p-dialog-maximized .p-dialog-content{flex-grow:1}.p-dialog-left{justify-content:flex-start}.p-dialog-right{justify-content:flex-end}.p-dialog-top{align-items:flex-start}.p-dialog-top-left{justify-content:flex-start;align-items:flex-start}.p-dialog-top-right{justify-content:flex-end;align-items:flex-start}.p-dialog-bottom{align-items:flex-end}.p-dialog-bottom-left{justify-content:flex-start;align-items:flex-end}.p-dialog-bottom-right{justify-content:flex-end;align-items:flex-end}.p-dialog .p-resizable-handle{position:absolute;font-size:.1px;display:block;cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.p-confirm-dialog .p-dialog-content{display:flex;align-items:center}\n"],encapsulation:2,data:{animation:[$l("animation",[Ui("void => visible",[Fg(Wpe)]),Ui("visible => void",[Fg(Gpe)])])]},changeDetection:0}),n})(),Gj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze,Cpe,Ar,Sn]}),n})();function qpe(n,t){1&n&&ce(0)}function Kpe(n,t){if(1&n){const e=q();S(0,"button",5),P("click",function(r){return I(e),x(y(2).onCloseClick(r))})("keydown.enter",function(){return I(e),x(y(2).hide())}),F(1,"span",6),D()}2&n&&he("aria-label",y(2).ariaCloseLabel)}const Ype=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},Qpe=function(n,t){return{value:n,params:t}};function Zpe(n,t){if(1&n){const e=q();S(0,"div",1),P("click",function(r){return I(e),x(y().onOverlayClick(r))})("@animation.start",function(r){return I(e),x(y().onAnimationStart(r))})("@animation.done",function(r){return I(e),x(y().onAnimationEnd(r))}),S(1,"div",2),P("click",function(){return I(e),x(y().onContentClick())})("mousedown",function(){return I(e),x(y().onContentClick())}),ln(2),C(3,qpe,1,0,"ng-container",3),D(),C(4,Kpe,2,1,"button",4),D()}if(2&n){const e=y();Ke(e.styleClass),g("ngClass","p-overlaypanel p-component")("ngStyle",e.style)("@animation",ot(10,Qpe,e.overlayVisible?"open":"close",ot(7,Ype,e.showTransitionOptions,e.hideTransitionOptions))),v(3),g("ngTemplateOutlet",e.contentTemplate),v(1),g("ngIf",e.showCloseIcon)}}const Jpe=["*"];let Xpe=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.dismissable=!0,this.appendTo="body",this.autoZIndex=!0,this.baseZIndex=0,this.focusOnShow=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onShow=new R,this.onHide=new R,this.overlayVisible=!1,this.render=!1,this.isOverlayAnimationInProgress=!1,this.selfClick=!1}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template,this.cd.markForCheck()})}bindDocumentClickListener(){!this.documentClickListener&&this.dismissable&&this.zone.runOutsideAngular(()=>{let e=A.isIOS()?"touchstart":"click";this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document",e,r=>{!this.container.contains(r.target)&&this.target!==r.target&&!this.target.contains(r.target)&&!this.selfClick&&this.zone.run(()=>{this.hide()}),this.selfClick=!1,this.cd.markForCheck()})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null,this.selfClick=!1)}toggle(e,i){this.isOverlayAnimationInProgress||(this.overlayVisible?(this.hasTargetChanged(e,i)&&(this.destroyCallback=()=>{this.show(null,i||e.currentTarget||e.target)}),this.hide()):this.show(e,i))}show(e,i){this.isOverlayAnimationInProgress||(this.target=i||e.currentTarget||e.target,this.overlayVisible=!0,this.render=!0,this.cd.markForCheck())}onOverlayClick(e){this.overlayService.add({originalEvent:e,target:this.el.nativeElement}),this.selfClick=!0}onContentClick(){this.selfClick=!0}hasTargetChanged(e,i){return null!=this.target&&this.target!==(i||e.currentTarget||e.target)}appendContainer(){this.appendTo&&("body"===this.appendTo?document.body.appendChild(this.container):A.appendChild(this.container,this.appendTo))}restoreAppend(){this.container&&this.appendTo&&this.el.nativeElement.appendChild(this.container)}align(){this.autoZIndex&&$i.set("overlay",this.container,this.baseZIndex+this.config.zIndex.overlay),A.absolutePosition(this.container,this.target);const e=A.getOffset(this.container),i=A.getOffset(this.target);let r=0;e.left{this.container&&this.container.contains(i.target)&&(this.selfClick=!0)},this.overlaySubscription=this.overlayService.clickObservable.subscribe(this.overlayEventListener),this.onShow.emit(null)),this.isOverlayAnimationInProgress=!0}onAnimationEnd(e){switch(e.toState){case"void":this.destroyCallback&&(this.destroyCallback(),this.destroyCallback=null),this.overlaySubscription&&this.overlaySubscription.unsubscribe();break;case"close":this.autoZIndex&&$i.clear(this.container),this.overlaySubscription&&this.overlaySubscription.unsubscribe(),this.onContainerDestroy(),this.onHide.emit({}),this.render=!1}this.isOverlayAnimationInProgress=!1}focus(){let e=A.findSingle(this.container,"[autofocus]");e&&this.zone.runOutsideAngular(()=>{setTimeout(()=>e.focus(),5)})}hide(){this.overlayVisible=!1,this.cd.markForCheck()}onCloseClick(e){this.hide(),e.preventDefault()}onWindowResize(e){this.overlayVisible&&!A.isTouchDevice()&&this.hide()}bindDocumentResizeListener(){this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener)}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new I_(this.target,()=>{this.overlayVisible&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}onContainerDestroy(){this.cd.destroyed||(this.target=null),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener()}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.container&&this.autoZIndex&&$i.clear(this.container),this.cd.destroyed||(this.target=null),this.destroyCallback=null,this.container&&(this.restoreAppend(),this.onContainerDestroy()),this.overlaySubscription&&this.overlaySubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(Xe),O(Eo),O(_p))},n.\u0275cmp=Y({type:n,selectors:[["p-overlayPanel"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{dismissable:"dismissable",showCloseIcon:"showCloseIcon",style:"style",styleClass:"styleClass",appendTo:"appendTo",autoZIndex:"autoZIndex",ariaCloseLabel:"ariaCloseLabel",baseZIndex:"baseZIndex",focusOnShow:"focusOnShow",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{onShow:"onShow",onHide:"onHide"},ngContentSelectors:Jpe,decls:1,vars:1,consts:[[3,"ngClass","ngStyle","class","click",4,"ngIf"],[3,"ngClass","ngStyle","click"],[1,"p-overlaypanel-content",3,"click","mousedown"],[4,"ngTemplateOutlet"],["type","button","class","p-overlaypanel-close p-link","pRipple","",3,"click","keydown.enter",4,"ngIf"],["type","button","pRipple","",1,"p-overlaypanel-close","p-link",3,"click","keydown.enter"],[1,"p-overlaypanel-close-icon","pi","pi-times"]],template:function(e,i){1&e&&(li(),C(0,Zpe,5,13,"div",0)),2&e&&g("ngIf",i.render)},dependencies:[Ot,He,Zn,cn,Xr],styles:['.p-overlaypanel{position:absolute;margin-top:10px;top:0;left:0}.p-overlaypanel-flipped{margin-top:0;margin-bottom:10px}.p-overlaypanel-close{display:flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-overlaypanel:after,.p-overlaypanel:before{bottom:100%;left:calc(var(--overlayArrowLeft, 0) + 1.25rem);content:" ";height:0;width:0;position:absolute;pointer-events:none}.p-overlaypanel:after{border-width:8px;margin-left:-8px}.p-overlaypanel:before{border-width:10px;margin-left:-10px}.p-overlaypanel-shifted:after,.p-overlaypanel-shifted:before{left:auto;right:1.25em;margin-left:auto}.p-overlaypanel-flipped:after,.p-overlaypanel-flipped:before{bottom:auto;top:100%}.p-overlaypanel.p-overlaypanel-flipped:after{border-bottom-color:transparent}.p-overlaypanel.p-overlaypanel-flipped:before{border-bottom-color:transparent}\n'],encapsulation:2,data:{animation:[$l("animation",[Bu("void",Pt({transform:"scaleY(0.8)",opacity:0})),Bu("close",Pt({opacity:0})),Bu("open",Pt({transform:"translateY(0)",opacity:1})),Ui("void => open",Bi("{{showTransitionParams}}")),Ui("open => close",Bi("{{hideTransitionParams}}"))])]},changeDetection:0}),n})(),qj=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({imports:[ze,Ar,Sn,Sn]}),n})(),Gy=(()=>{class n{constructor(e,i,r,o,s){this.el=e,this.zone=i,this.config=r,this.renderer=o,this.changeDetector=s,this.escape=!0,this.autoHide=!0,this.fitContent=!0,this._tooltipOptions={tooltipPosition:"right",tooltipEvent:"hover",appendTo:"body",tooltipZIndex:"auto",escape:!0,positionTop:0,positionLeft:0,autoHide:!0}}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.deactivate()}ngAfterViewInit(){this.zone.runOutsideAngular(()=>{if("hover"===this.getOption("tooltipEvent"))this.mouseEnterListener=this.onMouseEnter.bind(this),this.mouseLeaveListener=this.onMouseLeave.bind(this),this.clickListener=this.onInputClick.bind(this),this.el.nativeElement.addEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.addEventListener("click",this.clickListener),this.el.nativeElement.addEventListener("mouseleave",this.mouseLeaveListener);else if("focus"===this.getOption("tooltipEvent")){this.focusListener=this.onFocus.bind(this),this.blurListener=this.onBlur.bind(this);let e=this.getTarget(this.el.nativeElement);e.addEventListener("focus",this.focusListener),e.addEventListener("blur",this.blurListener)}})}ngOnChanges(e){e.tooltipPosition&&this.setOption({tooltipPosition:e.tooltipPosition.currentValue}),e.tooltipEvent&&this.setOption({tooltipEvent:e.tooltipEvent.currentValue}),e.appendTo&&this.setOption({appendTo:e.appendTo.currentValue}),e.positionStyle&&this.setOption({positionStyle:e.positionStyle.currentValue}),e.tooltipStyleClass&&this.setOption({tooltipStyleClass:e.tooltipStyleClass.currentValue}),e.tooltipZIndex&&this.setOption({tooltipZIndex:e.tooltipZIndex.currentValue}),e.escape&&this.setOption({escape:e.escape.currentValue}),e.showDelay&&this.setOption({showDelay:e.showDelay.currentValue}),e.hideDelay&&this.setOption({hideDelay:e.hideDelay.currentValue}),e.life&&this.setOption({life:e.life.currentValue}),e.positionTop&&this.setOption({positionTop:e.positionTop.currentValue}),e.positionLeft&&this.setOption({positionLeft:e.positionLeft.currentValue}),e.disabled&&this.setOption({disabled:e.disabled.currentValue}),e.text&&(this.setOption({tooltipLabel:e.text.currentValue}),this.active&&(e.text.currentValue?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide())),e.autoHide&&this.setOption({autoHide:e.autoHide.currentValue}),e.tooltipOptions&&(this._tooltipOptions={...this._tooltipOptions,...e.tooltipOptions.currentValue},this.deactivate(),this.active&&(this.getOption("tooltipLabel")?this.container&&this.container.offsetParent?(this.updateText(),this.align()):this.show():this.hide()))}isAutoHide(){return this.getOption("autoHide")}onMouseEnter(e){!this.container&&!this.showTimeout&&this.activate()}onMouseLeave(e){(this.isAutoHide()||!(A.hasClass(e.toElement,"p-tooltip")||A.hasClass(e.toElement,"p-tooltip-arrow")||A.hasClass(e.toElement,"p-tooltip-text")||A.hasClass(e.relatedTarget,"p-tooltip")))&&this.deactivate()}onFocus(e){this.activate()}onBlur(e){this.deactivate()}onInputClick(e){this.deactivate()}activate(){if(this.active=!0,this.clearHideTimeout(),this.getOption("showDelay")?this.showTimeout=setTimeout(()=>{this.show()},this.getOption("showDelay")):this.show(),this.getOption("life")){let e=this.getOption("showDelay")?this.getOption("life")+this.getOption("showDelay"):this.getOption("life");this.hideTimeout=setTimeout(()=>{this.hide()},e)}}deactivate(){this.active=!1,this.clearShowTimeout(),this.getOption("hideDelay")?(this.clearHideTimeout(),this.hideTimeout=setTimeout(()=>{this.hide()},this.getOption("hideDelay"))):this.hide()}create(){this.container&&(this.clearHideTimeout(),this.remove()),this.container=document.createElement("div");let e=document.createElement("div");e.className="p-tooltip-arrow",this.container.appendChild(e),this.tooltipText=document.createElement("div"),this.tooltipText.className="p-tooltip-text",this.updateText(),this.getOption("positionStyle")&&(this.container.style.position=this.getOption("positionStyle")),this.container.appendChild(this.tooltipText),"body"===this.getOption("appendTo")?document.body.appendChild(this.container):"target"===this.getOption("appendTo")?A.appendChild(this.container,this.el.nativeElement):A.appendChild(this.container,this.getOption("appendTo")),this.container.style.display="inline-block",this.fitContent&&(this.container.style.width="fit-content"),this.isAutoHide()||this.bindContainerMouseleaveListener()}bindContainerMouseleaveListener(){this.containerMouseleaveListener||(this.containerMouseleaveListener=this.renderer.listen(this.container??this.container.nativeElement,"mouseleave",i=>{this.deactivate()}))}unbindContainerMouseleaveListener(){this.containerMouseleaveListener&&(this.bindContainerMouseleaveListener(),this.containerMouseleaveListener=null)}show(){!this.getOption("tooltipLabel")||this.getOption("disabled")||(this.create(),this.align(),A.fadeIn(this.container,250),"auto"===this.getOption("tooltipZIndex")?$i.set("tooltip",this.container,this.config.zIndex.tooltip):this.container.style.zIndex=this.getOption("tooltipZIndex"),this.bindDocumentResizeListener(),this.bindScrollListener())}hide(){"auto"===this.getOption("tooltipZIndex")&&$i.clear(this.container),this.remove()}updateText(){this.getOption("escape")?(this.tooltipText.innerHTML="",this.tooltipText.appendChild(document.createTextNode(this.getOption("tooltipLabel")))):this.tooltipText.innerHTML=this.getOption("tooltipLabel")}align(){switch(this.getOption("tooltipPosition")){case"top":this.alignTop(),this.isOutOfBounds()&&(this.alignBottom(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"bottom":this.alignBottom(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&this.alignLeft()));break;case"left":this.alignLeft(),this.isOutOfBounds()&&(this.alignRight(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()));break;case"right":this.alignRight(),this.isOutOfBounds()&&(this.alignLeft(),this.isOutOfBounds()&&(this.alignTop(),this.isOutOfBounds()&&this.alignBottom()))}}getHostOffset(){if("body"===this.getOption("appendTo")||"target"===this.getOption("appendTo")){let e=this.el.nativeElement.getBoundingClientRect();return{left:e.left+A.getWindowScrollLeft(),top:e.top+A.getWindowScrollTop()}}return{left:0,top:0}}alignRight(){this.preAlign("right");let e=this.getHostOffset(),i=e.left+A.getOuterWidth(this.el.nativeElement),r=e.top+(A.getOuterHeight(this.el.nativeElement)-A.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignLeft(){this.preAlign("left");let e=this.getHostOffset(),i=e.left-A.getOuterWidth(this.container),r=e.top+(A.getOuterHeight(this.el.nativeElement)-A.getOuterHeight(this.container))/2;this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignTop(){this.preAlign("top");let e=this.getHostOffset(),i=e.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=e.top-A.getOuterHeight(this.container);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}alignBottom(){this.preAlign("bottom");let e=this.getHostOffset(),i=e.left+(A.getOuterWidth(this.el.nativeElement)-A.getOuterWidth(this.container))/2,r=e.top+A.getOuterHeight(this.el.nativeElement);this.container.style.left=i+this.getOption("positionLeft")+"px",this.container.style.top=r+this.getOption("positionTop")+"px"}setOption(e){this._tooltipOptions={...this._tooltipOptions,...e}}getOption(e){return this._tooltipOptions[e]}getTarget(e){return A.hasClass(e,"p-inputwrapper")?A.findSingle(e,"input"):e}preAlign(e){this.container.style.left="-999px",this.container.style.top="-999px";let i="p-tooltip p-component p-tooltip-"+e;this.container.className=this.getOption("tooltipStyleClass")?i+" "+this.getOption("tooltipStyleClass"):i}isOutOfBounds(){let e=this.container.getBoundingClientRect(),i=e.top,r=e.left,o=A.getOuterWidth(this.container),s=A.getOuterHeight(this.container),a=A.getViewport();return r+o>a.width||r<0||i<0||i+s>a.height}onWindowResize(e){this.hide()}bindDocumentResizeListener(){this.zone.runOutsideAngular(()=>{this.resizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.resizeListener)})}unbindDocumentResizeListener(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new I_(this.el.nativeElement,()=>{this.container&&this.hide()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}unbindEvents(){if("hover"===this.getOption("tooltipEvent"))this.el.nativeElement.removeEventListener("mouseenter",this.mouseEnterListener),this.el.nativeElement.removeEventListener("mouseleave",this.mouseLeaveListener),this.el.nativeElement.removeEventListener("click",this.clickListener);else if("focus"===this.getOption("tooltipEvent")){let e=this.getTarget(this.el.nativeElement);e.removeEventListener("focus",this.focusListener),e.removeEventListener("blur",this.blurListener)}this.unbindDocumentResizeListener()}remove(){this.container&&this.container.parentElement&&("body"===this.getOption("appendTo")?document.body.removeChild(this.container):"target"===this.getOption("appendTo")?this.el.nativeElement.removeChild(this.container):A.removeChild(this.container,this.getOption("appendTo"))),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.unbindContainerMouseleaveListener(),this.clearTimeouts(),this.container=null,this.scrollHandler=null}clearShowTimeout(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=null)}clearHideTimeout(){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=null)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout()}ngOnDestroy(){this.unbindEvents(),this.container&&$i.clear(this.container),this.remove(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null)}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Xe),O(Eo),O(Vn),O(Tt))},n.\u0275dir=de({type:n,selectors:[["","pTooltip",""]],hostAttrs:[1,"p-element"],inputs:{tooltipPosition:"tooltipPosition",tooltipEvent:"tooltipEvent",appendTo:"appendTo",positionStyle:"positionStyle",tooltipStyleClass:"tooltipStyleClass",tooltipZIndex:"tooltipZIndex",escape:"escape",showDelay:"showDelay",hideDelay:"hideDelay",life:"life",positionTop:"positionTop",positionLeft:"positionLeft",autoHide:"autoHide",fitContent:"fitContent",text:["pTooltip","text"],disabled:["tooltipDisabled","disabled"],tooltipOptions:"tooltipOptions"},features:[Yn]}),n})();function RD(n){return t=>t.lift(new lfe(n))}class lfe{constructor(t){this.total=t}call(t,e){return e.subscribe(new cfe(t,this.total))}}class cfe extends ut{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){++this.count>this.total&&this.destination.next(t)}}new Et("aiImagePrompt-form"),new Et("aiContentActions-form");const Jj={leading:!0,trailing:!1};class bfe{constructor(t,e,i,r){this.duration=t,this.scheduler=e,this.leading=i,this.trailing=r}call(t,e){return e.subscribe(new Cfe(t,this.duration,this.scheduler,this.leading,this.trailing))}}class Cfe extends ut{constructor(t,e,i,r,o){super(t),this.duration=e,this.scheduler=i,this.leading=r,this.trailing=o,this._hasTrailingValue=!1,this._trailingValue=null}_next(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(wfe,this.duration,{subscriber:this})),this.leading?this.destination.next(t):this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0))}_complete(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()}clearThrottle(){const t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)}}function wfe(n){const{subscriber:t}=n;t.clearThrottle()}const Sfe={loading:!0,preventScroll:!1,contentlets:[],languageId:1,search:"",assetType:null};let Xj=(()=>{class n extends Xp{constructor(e,i){super(Sfe),this.searchService=e,this.dotLanguageService=i,this.vm$=this.select(({contentlets:r,loading:o,preventScroll:s})=>({contentlets:r,loading:o,preventScroll:s})),this.updateContentlets=this.updater((r,o)=>({...r,contentlets:o})),this.updateAssetType=this.updater((r,o)=>({...r,assetType:o})),this.updatelanguageId=this.updater((r,o)=>({...r,languageId:o})),this.updateLoading=this.updater((r,o)=>({...r,loading:o})),this.updatePreventScroll=this.updater((r,o)=>({...r,preventScroll:o})),this.updateSearch=this.updater((r,o)=>({...r,search:o})),this.searchContentlet=this.effect(r=>r.pipe(Mt(o=>{this.updateLoading(!0),this.updateSearch(o)}),Jp(this.state$),me(([o,s])=>({...s,search:o})),Tn(o=>this.searchContentletsRequest(this.params({...o}),[])))),this.nextBatch=this.effect(r=>r.pipe(Jp(this.state$),me(([o,s])=>({...s,offset:o})),Tn(({contentlets:o,...s})=>this.searchContentletsRequest(this.params(s),o)))),this.dotLanguageService.getLanguages().subscribe(r=>{this.languages=r})}searchContentletsRequest(e,i){return this.searchService.get(e).pipe(me(({jsonObjectView:{contentlets:r}})=>{const o=this.setContentletLanguage(r);return this.updateLoading(!1),this.updatePreventScroll(!r?.length),this.updateContentlets([...i,...o])}))}params({search:e,assetType:i,offset:r=0,languageId:o}){return{query:`+catchall:${e.includes("-")?e:`${e}*`} title:'${e}'^15 +languageId:${o} +baseType:(4 OR 9) +metadata.contenttype:${i||""}/* +deleted:false +working:true`,sortOrder:Oy.ASC,limit:20,offset:r}}setContentletLanguage(e){return e.map(i=>({...i,language:this.getLanguage(i.languageId)}))}getLanguage(e){const{languageCode:i,countryCode:r}=this.languages[e];return i&&r?`${i}-${r}`:""}}return n.\u0275fac=function(e){return new(e||n)(U(sle),U(uD))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function Dfe(n,t){if(1&n&&(S(0,"div",3),F(1,"dot-contentlet-thumbnail",4),D()),2&n){const e=y();v(1),g("contentlet",e.contentlet)("cover",!1)("iconSize","72px")("showVideoThumbnail",e.showVideoThumbnail)}}function Tfe(n,t){if(1&n&&(S(0,"h2",5),H(1),D()),2&n){const e=y();v(1),ve((null==e.contentlet?null:e.contentlet.fileName)||(null==e.contentlet?null:e.contentlet.title))}}function Mfe(n,t){if(1&n&&(S(0,"div",6)(1,"span",7),H(2),D(),F(3,"dot-state-icon",8),D()),2&n){const e=y();v(2),ve(e.contentlet.language),v(1),g("state",e.contentlet)}}let Efe=(()=>{class n{constructor(e){this.dotMarketingConfigService=e,this.showVideoThumbnail=!0}ngOnInit(){this.showVideoThumbnail=this.dotMarketingConfigService.getProperty(Xu.SHOW_VIDEO_THUMBNAIL)}getImage(e){return`/dA/${e}/500w/50q`}getContentletIcon(){return"FILEASSET"!==this.contentlet?.baseType?this.contentlet?.contentTypeIcon:this.contentlet?.__icon__}}return n.\u0275fac=function(e){return new(e||n)(O(z3))},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card"]],inputs:{contentlet:"contentlet"},decls:4,vars:1,consts:[["pTemplate","header"],["class","title",4,"pTemplate"],["pTemplate","footer"],[1,"thumbnail-container"],[3,"contentlet","cover","iconSize","showVideoThumbnail"],[1,"title"],[1,"state"],[1,"badge"],["size","16px",3,"state"]],template:function(e,i){1&e&&(S(0,"p-card"),C(1,Dfe,2,4,"ng-template",0),C(2,Tfe,2,1,"h2",1),C(3,Mfe,4,2,"ng-template",2),D()),2&e&&(v(2),g("pTemplate","title"))},dependencies:[bD,mn],styles:["[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:1rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0;height:94px;width:94px;min-height:94px;min-width:94px;border-radius:.25rem 0 0 .25rem}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container{padding:10px;width:100%;height:100%;background:#f3f3f4}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail{width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-header .thumbnail-container dot-contentlet-thumbnail img{object-fit:contain;width:100%;height:100%}[_nghost-%COMP%] .p-card .p-card-body{flex-grow:1;display:flex;flex-direction:column;overflow:hidden;padding:.75rem .75rem .75rem 0}[_nghost-%COMP%] .p-card .p-card-body .p-card-title{flex-grow:1}[_nghost-%COMP%] .p-card .p-card-body .p-card-title h2{font-size:16px;line-height:140%;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}[_nghost-%COMP%] .badge{background:var(--color-palette-primary-100);border-radius:.125rem;color:#14151a;font-size:12px;line-height:140%;padding:.2rem .5rem;display:flex;align-items:center}"],changeDetection:0}),n})(),Ife=(()=>{class n{constructor(){this.shape="rectangle",this.animation="wave",this.borderRadius=null,this.size=null,this.width="100%",this.height="1rem"}containerClass(){return{"p-skeleton p-component":!0,"p-skeleton-circle":"circle"===this.shape,"p-skeleton-none":"none"===this.animation}}containerStyle(){return this.size?{...this.style,width:this.size,height:this.size,borderRadius:this.borderRadius}:{...this.style,width:this.width,height:this.height,borderRadius:this.borderRadius}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-skeleton"]],hostAttrs:[1,"p-element"],inputs:{styleClass:"styleClass",style:"style",shape:"shape",animation:"animation",borderRadius:"borderRadius",size:"size",width:"width",height:"height"},decls:1,vars:4,consts:[[3,"ngClass","ngStyle"]],template:function(e,i){1&e&&F(0,"div",0),2&e&&(Ke(i.styleClass),g("ngClass",i.containerClass())("ngStyle",i.containerStyle()))},dependencies:[Ot,cn],styles:['.p-skeleton{position:relative;overflow:hidden}.p-skeleton:after{content:"";animation:p-skeleton-animation 1.2s infinite;height:100%;left:0;position:absolute;right:0;top:0;transform:translate(-100%);z-index:1}.p-skeleton.p-skeleton-circle{border-radius:50%}.p-skeleton-none:after{animation:none}@keyframes p-skeleton-animation{0%{transform:translate(-100%)}to{transform:translate(100%)}}\n'],encapsulation:2,changeDetection:0}),n})();function xfe(n,t){1&n&&F(0,"p-skeleton",3)}function Ofe(n,t){1&n&&(S(0,"div",4),F(1,"p-skeleton",5)(2,"p-skeleton",6),D())}let kfe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card-skeleton"]],decls:4,vars:0,consts:[["pTemplate","header"],["height","1rem"],["pTemplate","footer"],["shape","square","size","94px"],[1,"state"],["width","2rem","height","1rem"],["shape","circle","size","16px"]],template:function(e,i){1&e&&(S(0,"p-card"),C(1,xfe,1,0,"ng-template",0),F(2,"p-skeleton",1),C(3,Ofe,3,0,"ng-template",2),D())},dependencies:[bD,mn,Ife],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%] .p-card{border:none;box-shadow:0 1px 3px var(--color-palette-black-op-10),0 1px 2px var(--color-palette-black-op-20);cursor:pointer;display:flex;gap:.5rem;height:94px}[_nghost-%COMP%] .p-card .p-card-header{padding:0}[_nghost-%COMP%] .p-card .p-card-body{flex:1;overflow:hidden;padding:.75rem .5rem .75rem 0;display:flex;flex-direction:column}[_nghost-%COMP%] .p-card .p-card-body .p-card-content{flex-grow:1}[_nghost-%COMP%] .state{align-items:center;display:flex;gap:.5rem}"],changeDetection:0}),n})();function Afe(n,t){if(1&n){const e=q();S(0,"dot-asset-card",7),P("click",function(){I(e);const r=y().$implicit;return x(y(2).selectedItem.emit(r[0]))}),D()}2&n&&g("contentlet",y().$implicit[0])}function Nfe(n,t){if(1&n){const e=q();S(0,"dot-asset-card",7),P("click",function(){I(e);const r=y().$implicit;return x(y(2).selectedItem.emit(r[1]))}),D()}2&n&&g("contentlet",y().$implicit[1])}function Lfe(n,t){if(1&n&&(S(0,"div",5),C(1,Afe,1,1,"dot-asset-card",6),C(2,Nfe,1,1,"dot-asset-card",6),D()),2&n){const e=t.$implicit;v(1),g("ngIf",e[0]),v(1),g("ngIf",e[1])}}function Pfe(n,t){if(1&n){const e=q();S(0,"p-scroller",3),P("onScrollIndexChange",function(r){return I(e),x(y().onScrollIndexChange(r))}),C(1,Lfe,3,2,"ng-template",4),D()}if(2&n){const e=y();g("itemSize",110)("items",e.rows)("lazy",!0)}}function Rfe(n,t){1&n&&(S(0,"div",5),F(1,"dot-asset-card-skeleton")(2,"dot-asset-card-skeleton"),D())}function Ffe(n,t){if(1&n&&(S(0,"div",8),C(1,Rfe,3,0,"div",9),D()),2&n){const e=y();v(1),g("ngForOf",e.loadingItems)}}function jfe(n,t){if(1&n&&(S(0,"div",10),F(1,"img",11),S(2,"p"),H(3,"No results found, try searching again"),D()()),2&n){const e=y();v(1),g("src",e.icon,zo)}}let Vfe=(()=>{class n{constructor(){this.nextBatch=new R,this.selectedItem=new R,this.done=!1,this.loading=!0,this.loadingItems=[null,null,null],this.icon=Jo("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDEiIHZpZXdCb3g9IjAgMCA0MCA0MSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTQuMDc2MTcgOC41NTcxMkgwLjA5NTIxNDhWMzYuNDIzOEMwLjA5NTIxNDggMzguNjEzMyAxLjg4NjY0IDQwLjQwNDcgNC4wNzYxNyA0MC40MDQ3SDMxLjk0MjhWMzYuNDIzOEg0LjA3NjE3VjguNTU3MTJaTTM1LjkyMzggMC41OTUyMTVIMTIuMDM4MUM5Ljg0ODU1IDAuNTk1MjE1IDguMDU3MTIgMi4zODY2NCA4LjA1NzEyIDQuNTc2MTdWMjguNDYxOUM4LjA1NzEyIDMwLjY1MTQgOS44NDg1NSAzMi40NDI4IDEyLjAzODEgMzIuNDQyOEgzNS45MjM4QzM4LjExMzMgMzIuNDQyOCAzOS45MDQ3IDMwLjY1MTQgMzkuOTA0NyAyOC40NjE5VjQuNTc2MTdDMzkuOTA0NyAyLjM4NjY0IDM4LjExMzMgMC41OTUyMTUgMzUuOTIzOCAwLjU5NTIxNVpNMzUuOTIzOCAyOC40NjE5SDEyLjAzODFWNC41NzYxN0gzNS45MjM4VjI4LjQ2MTlaTTIxLjk5MDUgMjQuNDgwOUgyNS45NzE0VjE4LjUwOTVIMzEuOTQyOFYxNC41Mjg1SDI1Ljk3MTRWOC41NTcxMkgyMS45OTA1VjE0LjUyODVIMTYuMDE5VjE4LjUwOTVIMjEuOTkwNVYyNC40ODA5WiIgZmlsbD0iIzU3NkJFOCIvPgo8L3N2Zz4K"),this._itemRows=[],this._offset=0}set contentlets(e){this._offset=e?.length||0,this._itemRows=this.createRowItem(e)}get rows(){return[...this._itemRows]}onScrollIndexChange(e){this.done||e.last===this.rows.length&&this.nextBatch.emit(this._offset)}createRowItem(e=[]){const i=[];return e.forEach(r=>{const o=i.length-1;i[o]?.length<2?i[o].push(r):i.push([r])}),i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-card-list"]],inputs:{done:"done",loading:"loading",contentlets:"contentlets"},outputs:{nextBatch:"nextBatch",selectedItem:"selectedItem"},decls:5,vars:2,consts:[["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange",4,"ngIf","ngIfElse"],["loadingBlock",""],["emptyBlock",""],["scrollHeight","20rem",3,"itemSize","items","lazy","onScrollIndexChange"],["pTemplate","item"],[1,"card-list-row"],[3,"contentlet","click",4,"ngIf"],[3,"contentlet","click"],[1,"wrapper","justify-start"],["class","card-list-row",4,"ngFor","ngForOf"],[1,"wrapper"],["width","42px","alt","No results found",3,"src"]],template:function(e,i){if(1&e&&(C(0,Pfe,2,3,"p-scroller",0),C(1,Ffe,2,1,"ng-template",null,1,yt),C(3,jfe,4,1,"ng-template",null,2,yt)),2&e){const r=Pe(2),o=Pe(4);g("ngIf",(null==i.rows?null:i.rows.length)&&!i.loading)("ngIfElse",i.loading?r:o)}},dependencies:[Un,He,mn,N_,Efe,kfe],styles:["[_nghost-%COMP%]{display:flex;width:100%;height:20rem;flex-direction:column}[_nghost-%COMP%] .wrapper[_ngcontent-%COMP%]{padding:0 2rem;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-grow:1;height:250px;gap:0 1rem;overflow:hidden}[_nghost-%COMP%] .justify-start[_ngcontent-%COMP%]{justify-content:flex-start}[_nghost-%COMP%] p[_ngcontent-%COMP%]{margin:1rem 0;font-size:18px}[_nghost-%COMP%] dot-asset-card, [_nghost-%COMP%] dot-asset-card-skeleton{width:calc(50% - .5rem)}[_nghost-%COMP%] .p-scroller-content{padding:0 2rem;max-width:100%}[_nghost-%COMP%] .card-list-row{display:flex;justify-content:space-between;width:100%;min-height:110px;gap:1rem}"],changeDetection:0}),n})();const zfe=["input"];function Bfe(n,t){if(1&n){const e=q();ae(0),S(1,"dot-asset-card-list",6),P("selectedItem",function(r){return I(e),x(y().addAsset.emit(r))})("nextBatch",function(r){return I(e),x(y().offset$.next(r))}),D(),le()}if(2&n){const e=t.ngIf;v(1),g("contentlets",e.contentlets)("done",e.preventScroll)("loading",e.loading)}}let Ufe=(()=>{class n{constructor(e){this.store=e,this.addAsset=new R,this.vm$=this.store.vm$,this.offset$=new zi(0),this.destroy$=new ye}set languageId(e){this.store.updatelanguageId(e)}set type(e){this.store.updateAssetType(e)}ngOnInit(){this.store.searchContentlet(""),this.offset$.pipe(Rt(this.destroy$),RD(1),function vfe(n,t=Sc,e=Jj){return i=>i.lift(new bfe(n,t,e.leading,e.trailing))}(450)).subscribe(this.store.nextBatch),requestAnimationFrame(()=>this.input.nativeElement.focus())}ngAfterViewInit(){D_(this.input.nativeElement,"input").pipe(Rt(this.destroy$),Gp(450)).subscribe(({target:e})=>{this.store.searchContentlet(e.value)})}ngOnDestroy(){this.destroy$.next(!0)}}return n.\u0275fac=function(e){return new(e||n)(O(Xj))},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-search"]],viewQuery:function(e,i){if(1&e&&Me(zfe,5),2&e){let r;J(r=X())&&(i.input=r.first)}},inputs:{languageId:"languageId",type:"type"},outputs:{addAsset:"addAsset"},features:[Ie([Xj])],decls:8,vars:3,consts:[[1,"search-box"],[1,"p-input-icon-right"],["autofocus","","type","text","pInputText","","placeholder","Search",1,"search"],["input",""],[1,"pi","pi-search"],[4,"ngIf"],[3,"contentlets","done","loading","selectedItem","nextBatch"]],template:function(e,i){1&e&&(ae(0),S(1,"div",0)(2,"span",1),F(3,"input",2,3)(5,"i",4),D()(),le(),C(6,Bfe,2,3,"ng-container",5),Ue(7,"async")),2&e&&(v(6),g("ngIf",Ye(7,1,i.vm$)))},dependencies:[He,Aa,Vfe,Vl],styles:["[_nghost-%COMP%]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.search-box[_ngcontent-%COMP%]{padding:0 2rem;flex-grow:1;display:flex;align-items:center}.search-box[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .search-box[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),n})();const Hfe=n=>{switch(n.target.error.code){case n.target.error.MEDIA_ERR_ABORTED:return"You aborted the video playback.";case n.target.error.MEDIA_ERR_NETWORK:return"A network error caused the video download to fail part-way.";case n.target.error.MEDIA_ERR_DECODE:return'Video playback aborted due to browser compatibility issues. Try a different browser or visit MDN Video Support for more information.';case n.target.error.MEDIA_ERR_SRC_NOT_SUPPORTED:return'Invalid URL. Please provide a URL to a .mp4, .webm, .ogv video file, or a YouTube video link. For more info on supported video formats and containers, visit MDN Video Format Support.';default:return'An unknown error occurred. Please contact support'}},$fe=["input"],Gfe=/(youtube\.com\/watch\?v=.*)|(youtu\.be\/.*)/;let qfe=(()=>{class n{constructor(e,i){this.fb=e,this.cd=i,this.addAsset=new R,this.disableAction=!1,this.form=this.fb.group({url:["",[Kr.required,Kr.pattern("^((http|https)://)[-a-zA-Z0-9@:%._\\+~#?&//=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%._\\+~#?&//=]*)$")]]}),this.form.valueChanges.subscribe(({url:r})=>{this.disableAction=!1,"video"===this.type&&!this.isInvalid&&!r.match(Gfe)&&this.tryToPlayVideo(r)}),requestAnimationFrame(()=>this.input.nativeElement.focus())}get placerHolder(){return"https://example.com/"+("video"===this.type?"video.mp4":"image.jpg")}get error(){return this.form.controls.url?.errors?.message||""}get isInvalid(){return this.form.controls.url?.invalid}onSubmit({url:e}){this.addAsset.emit(e)}tryToPlayVideo(e){const i=document.createElement("video");this.disableAction=!0,i.addEventListener("error",r=>{this.form.controls.url.setErrors({message:Hfe(r)}),this.cd.detectChanges()}),i.addEventListener("canplay",()=>{this.form.controls.url.setErrors(null),this.disableAction=!1,this.cd.detectChanges()}),i.src=`${e}#t=0.1`}}return n.\u0275fac=function(e){return new(e||n)(O($h),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-external-asset"]],viewQuery:function(e,i){if(1&e&&Me($fe,5),2&e){let r;J(r=X())&&(i.input=r.first)}},inputs:{type:"type"},outputs:{addAsset:"addAsset"},decls:10,vars:7,consts:[[1,"wrapper",3,"formGroup","ngSubmit"],[1,"form-control"],["dotFieldRequired","","for","url"],["id","url","formControlName","url","autocomplete","off","type","text","pInputText","",3,"placeholder"],["input",""],[1,"footer"],[1,"error-message",3,"innerHTML"],["type","submit","pButton","",3,"disabled"]],template:function(e,i){1&e&&(S(0,"form",0),P("ngSubmit",function(){return i.onSubmit(i.form.value)}),S(1,"div",1)(2,"label",2),H(3),D(),F(4,"input",3,4),D(),S(6,"div",5),F(7,"span",6),S(8,"button",7),H(9,"Insert"),D()()()),2&e&&(g("formGroup",i.form),v(3),xt("Insert ",i.type," URL"),v(1),g("placeholder",i.placerHolder),v(3),Si("hide",!i.isInvalid||i.form.pristine),g("innerHTML",i.error||"Enter a valid url",fu),v(1),g("disabled",i.form.invalid||i.disableAction))},dependencies:[zs,qr,$n,js,Yr,Jn,Nr,Aa],styles:["[_nghost-%COMP%]{width:100%}.wrapper[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-end;flex-direction:column;padding:2rem;gap:1rem}.form-control[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column;gap:.75rem}.footer[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:space-between}.error-message[_ngcontent-%COMP%]{color:#d82b2e;font-size:.813rem;text-align:left;max-width:30rem}.hide[_ngcontent-%COMP%]{visibility:hidden}"],changeDetection:0}),n})();const Kfe=$l("shakeit",[Bu("shakestart",Pt({transform:"scale(1.1)"})),Bu("shakeend",Pt({transform:"scale(1)"})),Ui("shakestart => shakeend",Bi("1000ms ease-in",function XG(n){return{type:5,steps:n}}([Pt({transform:"translate3d(-2px, 0, 0)",offset:.1}),Pt({transform:"translate3d(4px, 0, 0)",offset:.2}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.3}),Pt({transform:"translate3d(4px, 0, 0)",offset:.4}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.5}),Pt({transform:"translate3d(4px, 0, 0)",offset:.6}),Pt({transform:"translate3d(-4px, 0, 0)",offset:.7}),Pt({transform:"translate3d(4px, 0, 0)",offset:.8}),Pt({transform:"translate3d(-2px, 0, 0)",offset:.9})])))]);function FD(n){return!oi(n)&&n-parseFloat(n)+1>=0}function Yfe(n){const{index:t,period:e,subscriber:i}=n;if(i.next(t),!i.closed){if(-1===e)return i.complete();n.index=t+1,this.schedule(n,e)}}function Qfe(n,t){1&n&&F(0,"span",11),2&n&&g("innerHTML",y(2).$implicit.summary,fu)}function Zfe(n,t){1&n&&F(0,"span",12),2&n&&g("innerHTML",y(2).$implicit.detail,fu)}function Jfe(n,t){if(1&n&&(ae(0),C(1,Qfe,1,1,"span",9),C(2,Zfe,1,1,"span",10),le()),2&n){const e=y().$implicit;v(1),g("ngIf",e.summary),v(1),g("ngIf",e.detail)}}function Xfe(n,t){if(1&n&&(S(0,"span",15),H(1),D()),2&n){const e=y(2).$implicit;v(1),ve(e.summary)}}function eme(n,t){if(1&n&&(S(0,"span",16),H(1),D()),2&n){const e=y(2).$implicit;v(1),ve(e.detail)}}function tme(n,t){if(1&n&&(C(0,Xfe,2,1,"span",13),C(1,eme,2,1,"span",14)),2&n){const e=y().$implicit;g("ngIf",e.summary),v(1),g("ngIf",e.detail)}}function nme(n,t){if(1&n){const e=q();S(0,"button",17),P("click",function(){I(e);const r=y().index;return x(y(2).removeMessage(r))}),F(1,"i",18),D()}}const ime=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},rme=function(n){return{value:"visible",params:n}},ome=function(n,t,e,i){return{"pi-info-circle":n,"pi-check":t,"pi-exclamation-triangle":e,"pi-times-circle":i}};function sme(n,t){if(1&n&&(S(0,"div",4)(1,"div",5),F(2,"span",6),C(3,Jfe,3,2,"ng-container",1),C(4,tme,2,2,"ng-template",null,7,yt),C(6,nme,2,0,"button",8),D()()),2&n){const e=t.$implicit,i=Pe(5),r=y(2);Ke("p-message p-message-"+e.severity),g("@messageAnimation",te(12,rme,ot(9,ime,r.showTransitionOptions,r.hideTransitionOptions))),v(2),Ke("p-message-icon pi"+(e.icon?" "+e.icon:"")),g("ngClass",va(14,ome,"info"===e.severity,"success"===e.severity,"warn"===e.severity,"error"===e.severity)),v(1),g("ngIf",!r.escape)("ngIfElse",i),v(3),g("ngIf",r.closable)}}function ame(n,t){if(1&n&&(ae(0),C(1,sme,7,19,"div",3),le()),2&n){const e=y();v(1),g("ngForOf",e.messages)}}function lme(n,t){1&n&&ce(0)}function cme(n,t){if(1&n&&(S(0,"div",19)(1,"div",5),C(2,lme,1,0,"ng-container",20),D()()),2&n){const e=y();g("ngClass","p-message p-message-"+e.severity),v(2),g("ngTemplateOutlet",e.contentTemplate)}}let ume=(()=>{class n{constructor(e,i,r){this.messageService=e,this.el=i,this.cd=r,this.closable=!0,this.enableService=!0,this.escape=!0,this.showTransitionOptions="300ms ease-out",this.hideTransitionOptions="200ms cubic-bezier(0.86, 0, 0.07, 1)",this.valueChange=new R,this.timerSubscriptions=[]}set value(e){this.messages=e,this.startMessageLifes(this.messages)}ngAfterContentInit(){this.templates.forEach(e=>{e.getType(),this.contentTemplate=e.template}),this.messageService&&this.enableService&&!this.contentTemplate&&(this.messageSubscription=this.messageService.messageObserver.subscribe(e=>{if(e){e instanceof Array||(e=[e]);const i=e.filter(r=>this.key===r.key);this.messages=this.messages?[...this.messages,...i]:[...i],this.startMessageLifes(i),this.cd.markForCheck()}}),this.clearSubscription=this.messageService.clearObserver.subscribe(e=>{e?this.key===e&&(this.messages=null):this.messages=null,this.cd.markForCheck()}))}hasMessages(){let e=this.el.nativeElement.parentElement;return!(!e||!e.offsetParent)&&(null!=this.contentTemplate||this.messages&&this.messages.length>0)}clear(){this.messages=[],this.valueChange.emit(this.messages)}removeMessage(e){this.messages=this.messages.filter((i,r)=>r!==e),this.valueChange.emit(this.messages)}get icon(){const e=this.severity||(this.hasMessages()?this.messages[0].severity:null);if(this.hasMessages())switch(e){case"success":return"pi-check";case"info":default:return"pi-info-circle";case"error":return"pi-times";case"warn":return"pi-exclamation-triangle"}return null}ngOnDestroy(){this.messageSubscription&&this.messageSubscription.unsubscribe(),this.clearSubscription&&this.clearSubscription.unsubscribe(),this.timerSubscriptions?.forEach(e=>e.unsubscribe())}startMessageLifes(e){e?.forEach(i=>i.life&&this.startMessageLife(i))}startMessageLife(e){const i=function t4(n=0,t,e){let i=-1;return FD(t)?i=Number(t)<1?1:Number(t):la(t)&&(e=t),la(e)||(e=Sc),new mt(r=>{const o=FD(n)?n:+n-e.now();return e.schedule(Yfe,o,{index:0,period:i,subscriber:r})})}(e.life).subscribe(()=>{this.messages=this.messages?.filter(r=>r!==e),this.timerSubscriptions=this.timerSubscriptions?.filter(r=>r!==i),this.valueChange.emit(this.messages),this.cd.markForCheck()});this.timerSubscriptions.push(i)}}return n.\u0275fac=function(e){return new(e||n)(O(bJ,8),O(qe),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-messages"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{value:"value",closable:"closable",style:"style",styleClass:"styleClass",enableService:"enableService",key:"key",escape:"escape",severity:"severity",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions"},outputs:{valueChange:"valueChange"},decls:4,vars:5,consts:[["role","alert",1,"p-messages","p-component",3,"ngStyle"],[4,"ngIf","ngIfElse"],["staticMessage",""],["role","alert",3,"class",4,"ngFor","ngForOf"],["role","alert"],[1,"p-message-wrapper"],[3,"ngClass"],["escapeOut",""],["class","p-message-close p-link","type","button","pRipple","",3,"click",4,"ngIf"],["class","p-message-summary",3,"innerHTML",4,"ngIf"],["class","p-message-detail",3,"innerHTML",4,"ngIf"],[1,"p-message-summary",3,"innerHTML"],[1,"p-message-detail",3,"innerHTML"],["class","p-message-summary",4,"ngIf"],["class","p-message-detail",4,"ngIf"],[1,"p-message-summary"],[1,"p-message-detail"],["type","button","pRipple","",1,"p-message-close","p-link",3,"click"],[1,"p-message-close-icon","pi","pi-times"],["role","alert",3,"ngClass"],[4,"ngTemplateOutlet"]],template:function(e,i){if(1&e&&(S(0,"div",0),C(1,ame,2,1,"ng-container",1),C(2,cme,3,2,"ng-template",null,2,yt),D()),2&e){const r=Pe(3);Ke(i.styleClass),g("ngStyle",i.style),v(1),g("ngIf",!i.contentTemplate)("ngIfElse",r)}},dependencies:[Ot,Un,He,Zn,cn,Xr],styles:[".p-message-wrapper{display:flex;align-items:center}.p-message-close{display:flex;align-items:center;justify-content:center}.p-message-close.p-link{margin-left:auto;overflow:hidden;position:relative}.p-messages .p-message.ng-animating{overflow:hidden}\n"],encapsulation:2,data:{animation:[$l("messageAnimation",[Ui(":enter",[Pt({opacity:0,transform:"translateY(-25%)"}),Bi("{{showTransitionParams}}")]),Ui(":leave",[Bi("{{hideTransitionParams}}",Pt({height:0,marginTop:0,marginBottom:0,marginLeft:0,marginRight:0,opacity:0}))])])]},changeDetection:0}),n})();function dme(n,t){if(1&n&&(S(0,"div",5),H(1),D()),2&n){const e=y(2);As("display",null!=e.value&&0!==e.value?"flex":"none"),v(1),ya("",e.value,"",e.unit,"")}}function hme(n,t){if(1&n&&(S(0,"div",3),C(1,dme,2,4,"div",4),D()),2&n){const e=y();As("width",e.value+"%")("background",e.color),v(1),g("ngIf",e.showValue)}}function pme(n,t){if(1&n&&(S(0,"div",6),F(1,"div",7),D()),2&n){const e=y();v(1),As("background",e.color)}}const fme=function(n,t){return{"p-progressbar p-component":!0,"p-progressbar-determinate":n,"p-progressbar-indeterminate":t}};let mme=(()=>{class n{constructor(){this.showValue=!0,this.unit="%",this.mode="determinate"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-progressBar"]],hostAttrs:[1,"p-element"],inputs:{value:"value",showValue:"showValue",style:"style",styleClass:"styleClass",unit:"unit",mode:"mode",color:"color"},decls:3,vars:10,consts:[["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle","ngClass"],["class","p-progressbar-value p-progressbar-value-animate","style","display:flex",3,"width","background",4,"ngIf"],["class","p-progressbar-indeterminate-container",4,"ngIf"],[1,"p-progressbar-value","p-progressbar-value-animate",2,"display","flex"],["class","p-progressbar-label",3,"display",4,"ngIf"],[1,"p-progressbar-label"],[1,"p-progressbar-indeterminate-container"],[1,"p-progressbar-value","p-progressbar-value-animate"]],template:function(e,i){1&e&&(S(0,"div",0),C(1,hme,2,5,"div",1),C(2,pme,2,2,"div",2),D()),2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",ot(7,fme,"determinate"===i.mode,"indeterminate"===i.mode)),he("aria-valuenow",i.value),v(1),g("ngIf","determinate"===i.mode),v(1),g("ngIf","indeterminate"===i.mode))},dependencies:[Ot,He,cn],styles:['.p-progressbar{position:relative;overflow:hidden}.p-progressbar-determinate .p-progressbar-value{height:100%;width:0%;position:absolute;display:none;border:0 none;display:flex;align-items:center;justify-content:center;overflow:hidden}.p-progressbar-determinate .p-progressbar-label{display:inline-flex}.p-progressbar-determinate .p-progressbar-value-animate{transition:width 1s ease-in-out}.p-progressbar-indeterminate .p-progressbar-value:before{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.p-progressbar-indeterminate .p-progressbar-value:after{content:"";position:absolute;background-color:inherit;top:0;left:0;bottom:0;will-change:left,right;animation:p-progressbar-indeterminate-anim-short 2.1s cubic-bezier(.165,.84,.44,1) infinite;animation-delay:1.15s}@keyframes p-progressbar-indeterminate-anim{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes p-progressbar-indeterminate-anim-short{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}\n'],encapsulation:2,changeDetection:0}),n})();const gme=["advancedfileinput"],_me=["basicfileinput"],yme=["content"];function vme(n,t){if(1&n){const e=q();S(0,"p-button",17),P("onClick",function(){return I(e),x(y(2).upload())}),D()}if(2&n){const e=y(2);g("label",e.uploadButtonLabel)("icon",e.uploadIcon)("disabled",!e.hasFiles()||e.isFileLimitExceeded())("styleClass",e.uploadStyleClass)}}function bme(n,t){if(1&n){const e=q();S(0,"p-button",17),P("onClick",function(){return I(e),x(y(2).clear())}),D()}if(2&n){const e=y(2);g("label",e.cancelButtonLabel)("icon",e.cancelIcon)("disabled",!e.hasFiles()||e.uploading)("styleClass",e.cancelStyleClass)}}function Cme(n,t){1&n&&ce(0)}function wme(n,t){1&n&&F(0,"p-progressBar",18),2&n&&g("value",y(2).progress)("showValue",!1)}function Sme(n,t){if(1&n){const e=q();S(0,"img",26),P("error",function(r){return I(e),x(y(5).imageError(r))}),D()}if(2&n){const e=y().$implicit,i=y(4);g("src",e.objectURL,zo)("width",i.previewWidth)}}function Dme(n,t){if(1&n){const e=q();S(0,"div",22)(1,"div"),C(2,Sme,1,2,"img",23),D(),S(3,"div",24),H(4),D(),S(5,"div"),H(6),D(),S(7,"div")(8,"button",25),P("click",function(r){const s=I(e).index;return x(y(4).remove(r,s))}),D()()()}if(2&n){const e=t.$implicit,i=y(4);v(2),g("ngIf",i.isImage(e)),v(2),ve(e.name),v(2),ve(i.formatSize(e.size)),v(2),Ke(i.removeStyleClass),g("disabled",i.uploading)}}function Tme(n,t){if(1&n&&(S(0,"div"),C(1,Dme,9,6,"div",21),D()),2&n){const e=y(3);v(1),g("ngForOf",e.files)}}function Mme(n,t){}function Eme(n,t){if(1&n&&(S(0,"div"),C(1,Mme,0,0,"ng-template",27),D()),2&n){const e=y(3);v(1),g("ngForOf",e.files)("ngForTemplate",e.fileTemplate)}}function Ime(n,t){if(1&n&&(S(0,"div",19),C(1,Tme,2,1,"div",20),C(2,Eme,2,2,"div",20),D()),2&n){const e=y(2);v(1),g("ngIf",!e.fileTemplate),v(1),g("ngIf",e.fileTemplate)}}function xme(n,t){1&n&&ce(0)}const Ome=function(n,t){return{"p-focus":n,"p-disabled":t}},kme=function(n){return{$implicit:n}};function Ame(n,t){if(1&n){const e=q();S(0,"div",2)(1,"div",3)(2,"span",4),P("focus",function(){return I(e),x(y().onFocus())})("blur",function(){return I(e),x(y().onBlur())})("click",function(){return I(e),x(y().choose())})("keydown.enter",function(){return I(e),x(y().choose())}),S(3,"input",5,6),P("change",function(r){return I(e),x(y().onFileSelect(r))}),D(),F(5,"span",7),S(6,"span",8),H(7),D()(),C(8,vme,1,4,"p-button",9),C(9,bme,1,4,"p-button",9),C(10,Cme,1,0,"ng-container",10),D(),S(11,"div",11,12),P("dragenter",function(r){return I(e),x(y().onDragEnter(r))})("dragleave",function(r){return I(e),x(y().onDragLeave(r))})("drop",function(r){return I(e),x(y().onDrop(r))}),C(13,wme,1,2,"p-progressBar",13),F(14,"p-messages",14),C(15,Ime,3,2,"div",15),C(16,xme,1,0,"ng-container",16),D()()}if(2&n){const e=y();Ke(e.styleClass),g("ngClass","p-fileupload p-fileupload-advanced p-component")("ngStyle",e.style),v(2),Ke(e.chooseStyleClass),g("ngClass",ot(24,Ome,e.focus,e.disabled||e.isChooseDisabled())),v(1),g("multiple",e.multiple)("accept",e.accept)("disabled",e.disabled||e.isChooseDisabled()),he("title",""),v(2),Ke(e.chooseIcon),g("ngClass","p-button-icon p-button-icon-left"),v(2),ve(e.chooseButtonLabel),v(1),g("ngIf",!e.auto&&e.showUploadButton),v(1),g("ngIf",!e.auto&&e.showCancelButton),v(1),g("ngTemplateOutlet",e.toolbarTemplate),v(3),g("ngIf",e.hasFiles()),v(1),g("value",e.msgs)("enableService",!1),v(1),g("ngIf",e.hasFiles()),v(1),g("ngTemplateOutlet",e.contentTemplate)("ngTemplateOutletContext",te(27,kme,e.files))}}function Nme(n,t){if(1&n&&(S(0,"span",8),H(1),D()),2&n){const e=y(2);v(1),ve(e.basicButtonLabel)}}function Lme(n,t){if(1&n){const e=q();S(0,"input",33,34),P("change",function(r){return I(e),x(y(2).onFileSelect(r))})("focus",function(){return I(e),x(y(2).onFocus())})("blur",function(){return I(e),x(y(2).onBlur())}),D()}if(2&n){const e=y(2);g("accept",e.accept)("multiple",e.multiple)("disabled",e.disabled)}}const Pme=function(n,t,e,i){return{"p-button p-component p-fileupload-choose":!0,"p-button-icon-only":n,"p-fileupload-choose-selected":t,"p-focus":e,"p-disabled":i}};function Rme(n,t){if(1&n){const e=q();S(0,"div",28),F(1,"p-messages",14),S(2,"span",29),P("mouseup",function(){return I(e),x(y().onBasicUploaderClick())})("keydown",function(r){return I(e),x(y().onBasicKeydown(r))}),F(3,"span",30),C(4,Nme,2,1,"span",31),C(5,Lme,2,3,"input",32),D()()}if(2&n){const e=y();v(1),g("value",e.msgs)("enableService",!1),v(1),Ke(e.styleClass),g("ngClass",va(9,Pme,!e.basicButtonLabel,e.hasFiles(),e.focus,e.disabled))("ngStyle",e.style),v(1),g("ngClass",e.hasFiles()&&!e.auto?e.uploadIcon:e.chooseIcon),v(1),g("ngIf",e.basicButtonLabel),v(1),g("ngIf",!e.hasFiles())}}let Fme=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.sanitizer=i,this.zone=r,this.http=o,this.cd=s,this.config=a,this.method="post",this.invalidFileSizeMessageSummary="{0}: Invalid file size, ",this.invalidFileSizeMessageDetail="maximum upload size is {0}.",this.invalidFileTypeMessageSummary="{0}: Invalid file type, ",this.invalidFileTypeMessageDetail="allowed file types: {0}.",this.invalidFileLimitMessageDetail="limit is {0} at most.",this.invalidFileLimitMessageSummary="Maximum number of files exceeded, ",this.previewWidth=50,this.chooseIcon="pi pi-plus",this.uploadIcon="pi pi-upload",this.cancelIcon="pi pi-times",this.showUploadButton=!0,this.showCancelButton=!0,this.mode="advanced",this.onBeforeUpload=new R,this.onSend=new R,this.onUpload=new R,this.onError=new R,this.onClear=new R,this.onRemove=new R,this.onSelect=new R,this.onProgress=new R,this.uploadHandler=new R,this.onImageError=new R,this._files=[],this.progress=0,this.uploadedFileCount=0}set files(e){this._files=[];for(let i=0;i{switch(e.getType()){case"file":default:this.fileTemplate=e.template;break;case"content":this.contentTemplate=e.template;break;case"toolbar":this.toolbarTemplate=e.template}})}ngOnInit(){this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.cd.markForCheck()})}ngAfterViewInit(){"advanced"===this.mode&&this.zone.runOutsideAngular(()=>{this.content&&this.content.nativeElement.addEventListener("dragover",this.onDragOver.bind(this))})}choose(){this.advancedFileInput.nativeElement.click()}onFileSelect(e){if("drop"!==e.type&&this.isIE11()&&this.duplicateIEEvent)return void(this.duplicateIEEvent=!1);this.msgs=[],this.multiple||(this.files=[]);let i=e.dataTransfer?e.dataTransfer.files:e.target.files;for(let r=0;rthis.maxFileSize&&(this.msgs.push({severity:"error",summary:this.invalidFileSizeMessageSummary.replace("{0}",e.name),detail:this.invalidFileSizeMessageDetail.replace("{0}",this.formatSize(this.maxFileSize))}),1))}isFileTypeValid(e){let i=this.accept.split(",").map(r=>r.trim());for(let r of i)if(this.isWildcard(r)?this.getTypeClass(e.type)===this.getTypeClass(r):e.type==r||this.getFileExtension(e).toLowerCase()===r.toLowerCase())return!0;return!1}getTypeClass(e){return e.substring(0,e.indexOf("/"))}isWildcard(e){return-1!==e.indexOf("*")}getFileExtension(e){return"."+e.name.split(".").pop()}isImage(e){return/^image\//.test(e.type)}onImageLoad(e){window.URL.revokeObjectURL(e.src)}upload(){if(this.customUpload)this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.uploadHandler.emit({files:this.files}),this.cd.markForCheck();else{this.uploading=!0,this.msgs=[];let e=new FormData;this.onBeforeUpload.emit({formData:e});for(let i=0;i{switch(i.type){case rn.Sent:this.onSend.emit({originalEvent:i,formData:e});break;case rn.Response:this.uploading=!1,this.progress=0,i.status>=200&&i.status<300?(this.fileLimit&&(this.uploadedFileCount+=this.files.length),this.onUpload.emit({originalEvent:i,files:this.files})):this.onError.emit({files:this.files}),this.clear();break;case rn.UploadProgress:i.loaded&&(this.progress=Math.round(100*i.loaded/i.total)),this.onProgress.emit({originalEvent:i,progress:this.progress})}this.cd.markForCheck()},i=>{this.uploading=!1,this.onError.emit({files:this.files,error:i})})}}clear(){this.files=[],this.onClear.emit(),this.clearInputElement(),this.cd.markForCheck()}remove(e,i){this.clearInputElement(),this.onRemove.emit({originalEvent:e,file:this.files[i]}),this.files.splice(i,1),this.checkFileLimit()}isFileLimitExceeded(){return this.fileLimit&&this.fileLimit<=this.files.length+this.uploadedFileCount&&this.focus&&(this.focus=!1),this.fileLimit&&this.fileLimit0}onDragEnter(e){this.disabled||(e.stopPropagation(),e.preventDefault())}onDragOver(e){this.disabled||(A.addClass(this.content.nativeElement,"p-fileupload-highlight"),this.dragHighlight=!0,e.stopPropagation(),e.preventDefault())}onDragLeave(e){this.disabled||A.removeClass(this.content.nativeElement,"p-fileupload-highlight")}onDrop(e){if(!this.disabled){A.removeClass(this.content.nativeElement,"p-fileupload-highlight"),e.stopPropagation(),e.preventDefault();let i=e.dataTransfer?e.dataTransfer.files:e.target.files;(this.multiple||i&&1===i.length)&&this.onFileSelect(e)}}onFocus(){this.focus=!0}onBlur(){this.focus=!1}formatSize(e){if(0==e)return"0 B";let s=Math.floor(Math.log(e)/Math.log(1e3));return parseFloat((e/Math.pow(1e3,s)).toFixed(3))+" "+["B","KB","MB","GB","TB","PB","EB","ZB","YB"][s]}onBasicUploaderClick(){this.hasFiles()?this.upload():this.basicFileInput.nativeElement.click()}onBasicKeydown(e){switch(e.code){case"Space":case"Enter":this.onBasicUploaderClick(),e.preventDefault()}}imageError(e){this.onImageError.emit(e)}getBlockableElement(){return this.el.nativeElement.children[0]}get chooseButtonLabel(){return this.chooseLabel||this.config.getTranslation(Ln.CHOOSE)}get uploadButtonLabel(){return this.uploadLabel||this.config.getTranslation(Ln.UPLOAD)}get cancelButtonLabel(){return this.cancelLabel||this.config.getTranslation(Ln.CANCEL)}ngOnDestroy(){this.content&&this.content.nativeElement&&this.content.nativeElement.removeEventListener("dragover",this.onDragOver),this.translationSubscription&&this.translationSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(pg),O(Xe),O(Er),O(Tt),O(Eo))},n.\u0275cmp=Y({type:n,selectors:[["p-fileUpload"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(gme,5),Me(_me,5),Me(yme,5)),2&e){let r;J(r=X())&&(i.advancedFileInput=r.first),J(r=X())&&(i.basicFileInput=r.first),J(r=X())&&(i.content=r.first)}},hostAttrs:[1,"p-element"],inputs:{name:"name",url:"url",method:"method",multiple:"multiple",accept:"accept",disabled:"disabled",auto:"auto",withCredentials:"withCredentials",maxFileSize:"maxFileSize",invalidFileSizeMessageSummary:"invalidFileSizeMessageSummary",invalidFileSizeMessageDetail:"invalidFileSizeMessageDetail",invalidFileTypeMessageSummary:"invalidFileTypeMessageSummary",invalidFileTypeMessageDetail:"invalidFileTypeMessageDetail",invalidFileLimitMessageDetail:"invalidFileLimitMessageDetail",invalidFileLimitMessageSummary:"invalidFileLimitMessageSummary",style:"style",styleClass:"styleClass",previewWidth:"previewWidth",chooseLabel:"chooseLabel",uploadLabel:"uploadLabel",cancelLabel:"cancelLabel",chooseIcon:"chooseIcon",uploadIcon:"uploadIcon",cancelIcon:"cancelIcon",showUploadButton:"showUploadButton",showCancelButton:"showCancelButton",mode:"mode",headers:"headers",customUpload:"customUpload",fileLimit:"fileLimit",uploadStyleClass:"uploadStyleClass",cancelStyleClass:"cancelStyleClass",removeStyleClass:"removeStyleClass",chooseStyleClass:"chooseStyleClass",files:"files"},outputs:{onBeforeUpload:"onBeforeUpload",onSend:"onSend",onUpload:"onUpload",onError:"onError",onClear:"onClear",onRemove:"onRemove",onSelect:"onSelect",onProgress:"onProgress",uploadHandler:"uploadHandler",onImageError:"onImageError"},decls:2,vars:2,consts:[[3,"ngClass","ngStyle","class",4,"ngIf"],["class","p-fileupload p-fileupload-basic p-component",4,"ngIf"],[3,"ngClass","ngStyle"],[1,"p-fileupload-buttonbar"],["pRipple","","tabindex","0",1,"p-button","p-component","p-fileupload-choose",3,"ngClass","focus","blur","click","keydown.enter"],["type","file",3,"multiple","accept","disabled","change"],["advancedfileinput",""],[3,"ngClass"],[1,"p-button-label"],["type","button",3,"label","icon","disabled","styleClass","onClick",4,"ngIf"],[4,"ngTemplateOutlet"],[1,"p-fileupload-content",3,"dragenter","dragleave","drop"],["content",""],[3,"value","showValue",4,"ngIf"],[3,"value","enableService"],["class","p-fileupload-files",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["type","button",3,"label","icon","disabled","styleClass","onClick"],[3,"value","showValue"],[1,"p-fileupload-files"],[4,"ngIf"],["class","p-fileupload-row",4,"ngFor","ngForOf"],[1,"p-fileupload-row"],[3,"src","width","error",4,"ngIf"],[1,"p-fileupload-filename"],["type","button","icon","pi pi-times","pButton","",3,"disabled","click"],[3,"src","width","error"],["ngFor","",3,"ngForOf","ngForTemplate"],[1,"p-fileupload","p-fileupload-basic","p-component"],["tabindex","0","pRipple","",3,"ngClass","ngStyle","mouseup","keydown"],[1,"p-button-icon","p-button-icon-left","pi",3,"ngClass"],["class","p-button-label",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur",4,"ngIf"],["type","file",3,"accept","multiple","disabled","change","focus","blur"],["basicfileinput",""]],template:function(e,i){1&e&&(C(0,Ame,17,29,"div",0),C(1,Rme,6,14,"div",1)),2&e&&(g("ngIf","advanced"===i.mode),v(1),g("ngIf","basic"===i.mode))},dependencies:[Ot,Un,He,Zn,cn,Nr,rc,mme,ume,Xr],styles:[".p-fileupload-content{position:relative}.p-fileupload-row{display:flex;align-items:center}.p-fileupload-row>div{flex:1 1 auto;width:25%}.p-fileupload-row>div:last-child{text-align:right}.p-fileupload-content .p-progressbar{width:100%;position:absolute;top:0;left:0}.p-button.p-fileupload-choose{position:relative;overflow:hidden}.p-button.p-fileupload-choose input[type=file],.p-fileupload-choose.p-fileupload-choose-selected input[type=file]{display:none}.p-fluid .p-fileupload .p-button{width:auto}.p-fileupload-filename{word-break:break-all}\n"],encapsulation:2,changeDetection:0}),n})();function jme(n,t){if(1&n&&(ae(0),F(1,"img",3),le()),2&n){const e=y();v(1),g("src",e.src||e.file.objectURL,zo)("alt",e.file.name)}}function Vme(n,t){if(1&n&&(ae(0),S(1,"video",4),F(2,"source",5),D(),le()),2&n){const e=y();v(2),g("src",e.src||e.file.objectURL,zo)}}function zme(n,t){1&n&&(S(0,"p"),H(1,"Select an accepted asset type"),D())}let Bme=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-asset-preview"]],inputs:{type:"type",file:"file",src:"src"},decls:4,vars:3,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"src","alt"],["controls","","preload","metadata"],[3,"src"]],template:function(e,i){1&e&&(ae(0,0),C(1,jme,2,2,"ng-container",1),C(2,Vme,3,1,"ng-container",1),C(3,zme,2,0,"p",2),le()),2&e&&(g("ngSwitch",i.type),v(1),g("ngSwitchCase","image"),v(1),g("ngSwitchCase","video"))},dependencies:[Fs,jl,Ph],styles:["[_nghost-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center}[_nghost-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] video[_ngcontent-%COMP%]{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain}"],changeDetection:0}),n})();function Ume(n,t){if(1&n){const e=q();S(0,"p-fileUpload",2),P("onSelect",function(r){return I(e),x(y().onSelectFile(r.files))}),D()}2&n&&g("accept",y().type+"/*")("customUpload",!0)}function Hme(n,t){if(1&n&&F(0,"dot-asset-preview",11),2&n){const e=y(2);g("type",e.type)("file",e.file)("src",e.src)}}function $me(n,t){if(1&n&&(S(0,"span",13),H(1),D()),2&n){const e=y(3);v(1),ve(e.error)}}function Wme(n,t){1&n&&C(0,$me,2,1,"ng-template",null,12,yt)}function Gme(n,t){if(1&n){const e=q();S(0,"div",3),C(1,Hme,1,3,"dot-asset-preview",4),C(2,Wme,2,0,null,5),D(),S(3,"div",6)(4,"div",7),F(5,"dot-spinner",8),S(6,"span",9),P("@shakeit.done",function(r){return I(e),x(y().shakeEnd(r))}),H(7),D()(),S(8,"button",10),P("click",function(){return I(e),x(y().cancelAction())}),H(9," Cancel "),D()()}if(2&n){const e=y();v(1),g("ngIf","UPLOAD"===e.status),v(1),g("ngIf","ERROR"===e.status),v(3),g("size","30px"),v(1),g("@shakeit",e.animation),v(1),xt(" ",e.errorMessage," ")}}var ds=(()=>(function(n){n.SELECT="SELECT",n.PREVIEW="PREVIEW",n.UPLOAD="UPLOAD",n.ERROR="ERROR"}(ds||(ds={})),ds))();let qme=(()=>{class n{constructor(e,i,r,o){this.sanitizer=e,this.dotUploadFileService=i,this.cd=r,this.el=o,this.uploadedFile=new R,this.preventClose=new R,this.hide=new R,this.status=ds.SELECT,this.animation="shakeend"}get errorMessage(){return` Don't close this window while the ${this.type} uploads`}onClick(e){const i=!this.el.nativeElement.contains(e);this.status===ds.UPLOAD&&i&&this.shakeMe()}ngOnDestroy(){this.preventClose.emit(!1)}onSelectFile(e){const i=e[0],r=new FileReader;this.preventClose.emit(!0),r.onload=o=>this.setFile(i,o.target.result),r.readAsArrayBuffer(i)}cancelAction(){this.file=null,this.status=ds.SELECT,this.cancelUploading(),this.hide.emit(!0)}shakeEnd(){this.animation="shakeend"}shakeMe(){"shakestart"!==this.animation&&(this.animation="shakestart")}uploadFile(){this.controller=new AbortController,this.status=ds.UPLOAD,this.$uploadRequestSubs=this.dotUploadFileService.publishContent({data:this.file,signal:this.controller.signal}).pipe(Gt(1),ui(e=>this.handleError(e))).subscribe(e=>{const i=e[0];this.uploadedFile.emit(i[Object.keys(i)[0]]),this.status=ds.SELECT})}setFile(e,i){const r=new Blob([new Uint8Array(i)],{type:"video/mp4"});this.src=this.sanitizer.bypassSecurityTrustResourceUrl(URL.createObjectURL(r)),this.file=e,this.status=ds.UPLOAD,this.uploadFile(),this.cd.markForCheck()}handleError(e){return this.status=ds.ERROR,this.preventClose.emit(!1),this.error=e?.error?.errors[0]||e.error,console.error(e),Ir(e)}cancelUploading(){this.$uploadRequestSubs.unsubscribe(),this.controller?.abort()}}return n.\u0275fac=function(e){return new(e||n)(O(pg),O(qp),O(Tt),O(qe))},n.\u0275cmp=Y({type:n,selectors:[["dot-upload-asset"]],hostBindings:function(e,i){1&e&&P("click",function(o){return i.onClick(o.target)},0,pC)},inputs:{type:"type"},outputs:{uploadedFile:"uploadedFile",preventClose:"preventClose",hide:"hide"},decls:3,vars:2,consts:[["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect",4,"ngIf","ngIfElse"],["preview",""],["chooseLabel","browse files","mode","basic",3,"accept","customUpload","onSelect"],[1,"preview-container"],[3,"type","file","src",4,"ngIf"],[4,"ngIf"],[1,"action-container"],[1,"loading-message"],[3,"size"],[1,"warning"],["data-test-id","back-btn","pButton","",1,"p-button-outlined",3,"click"],[3,"type","file","src"],["errorTemplate",""],[1,"error"]],template:function(e,i){if(1&e&&(C(0,Ume,1,2,"p-fileUpload",0),C(1,Gme,10,5,"ng-template",null,1,yt)),2&e){const r=Pe(2);g("ngIf","SELECT"===i.status)("ngIfElse",r)}},dependencies:[He,yD,Nr,Fme,Bme],styles:["[_nghost-%COMP%]{height:100%;width:100%;padding:1rem;gap:1rem;display:flex;justify-content:center;align-items:center;flex-direction:column}[_nghost-%COMP%] .error[_ngcontent-%COMP%]{color:#d82b2e;font-size:1.25rem;max-width:100%;white-space:pre-wrap}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%]{align-items:center;display:flex;flex-grow:1;justify-content:center;overflow:hidden;width:100%;flex-direction:column}[_nghost-%COMP%] .preview-container[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{height:100%;width:100%;object-fit:contain}[_nghost-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;height:-moz-fit-content;height:fit-content;justify-content:space-between;width:100%}[_nghost-%COMP%] .loading-message[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;gap:1rem}[_nghost-%COMP%] .warning[_ngcontent-%COMP%]{display:block;font-style:normal;text-align:center;color:#14151a}"],data:{animation:[Kfe]},changeDetection:0}),n})();new class Sge extends Mo{flush(t){this.active=!0,this.scheduled=void 0;const{actions:e}=this;let i,r=-1,o=e.length;t=t||e.shift();do{if(i=t.execute(t.state,t.delay))break}while(++r0?super.requestAsyncId(t,e,i):(t.actions.push(this),t.scheduled||(t.scheduled=requestAnimationFrame(()=>t.flush(null))))}recycleAsyncId(t,e,i=0){if(null!==i&&i>0||null===i&&this.delay>0)return super.recycleAsyncId(t,e,i);0===t.actions.length&&(cancelAnimationFrame(e),t.scheduled=void 0)}});function g_e(n,t){1&n&&ce(0)}function __e(n,t){if(1&n&&(ae(0),C(1,g_e,1,0,"ng-container",3),le()),2&n){const e=y(2);v(1),g("ngTemplateOutlet",e.contentTemplate)}}function y_e(n,t){if(1&n&&(S(0,"div",1),ln(1),C(2,__e,2,1,"ng-container",2),D()),2&n){const e=y();g("hidden",!e.selected),he("id",e.id)("aria-hidden",!e.selected)("aria-labelledby",e.id+"-label"),v(2),g("ngIf",e.contentTemplate&&(e.cache?e.loaded:e.selected))}}const L4=["*"],v_e=["content"],b_e=["navbar"],C_e=["prevBtn"],w_e=["nextBtn"],S_e=["inkbar"];function D_e(n,t){if(1&n){const e=q();S(0,"button",12,13),P("click",function(){return I(e),x(y().navBackward())}),F(2,"span",14),D()}}function T_e(n,t){1&n&&F(0,"span",24),2&n&&g("ngClass",y(3).$implicit.leftIcon)}function M_e(n,t){1&n&&F(0,"span",25),2&n&&g("ngClass",y(3).$implicit.rightIcon)}function E_e(n,t){if(1&n&&(ae(0),C(1,T_e,1,1,"span",21),S(2,"span",22),H(3),D(),C(4,M_e,1,1,"span",23),le()),2&n){const e=y(2).$implicit;v(1),g("ngIf",e.leftIcon),v(2),ve(e.header),v(1),g("ngIf",e.rightIcon)}}function I_e(n,t){1&n&&ce(0)}function x_e(n,t){if(1&n){const e=q();S(0,"span",26),P("click",function(r){I(e);const o=y(2).$implicit;return x(y().close(r,o))}),D()}}const O_e=function(n,t){return{"p-highlight":n,"p-disabled":t}};function k_e(n,t){if(1&n){const e=q();S(0,"li",16)(1,"a",17),P("click",function(r){I(e);const o=y().$implicit;return x(y().open(r,o))})("keydown.enter",function(r){I(e);const o=y().$implicit;return x(y().open(r,o))}),C(2,E_e,5,3,"ng-container",18),C(3,I_e,1,0,"ng-container",19),C(4,x_e,1,0,"span",20),D()()}if(2&n){const e=y().$implicit;Ke(e.headerStyleClass),g("ngClass",ot(16,O_e,e.selected,e.disabled))("ngStyle",e.headerStyle),v(1),g("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),he("id",e.id+"-label")("aria-selected",e.selected)("aria-controls",e.id)("aria-selected",e.selected)("tabindex",e.disabled?null:"0"),v(1),g("ngIf",!e.headerTemplate),v(1),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",e.closable)}}function A_e(n,t){1&n&&C(0,k_e,5,19,"li",15),2&n&&g("ngIf",!t.$implicit.closed)}function N_e(n,t){if(1&n){const e=q();S(0,"button",27,28),P("click",function(){return I(e),x(y().navForward())}),F(2,"span",29),D()}}const L_e=function(n){return{"p-tabview p-component":!0,"p-tabview-scrollable":n}};let P_e=0,P4=(()=>{class n{constructor(e,i,r){this.viewContainer=i,this.cd=r,this.cache=!0,this.tooltipPosition="top",this.tooltipPositionStyle="absolute",this.id="p-tabpanel-"+P_e++,this.tabView=e}ngAfterContentInit(){this.templates.forEach(e=>{"header"===e.getType()?this.headerTemplate=e.template:this.contentTemplate=e.template})}get selected(){return this._selected}set selected(e){this._selected=e,this.loaded||this.cd.detectChanges(),e&&(this.loaded=!0)}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this.tabView.cd.markForCheck()}get header(){return this._header}set header(e){this._header=e,Promise.resolve().then(()=>{this.tabView.updateInkBar(),this.tabView.cd.markForCheck()})}get leftIcon(){return this._leftIcon}set leftIcon(e){this._leftIcon=e,this.tabView.cd.markForCheck()}get rightIcon(){return this._rightIcon}set rightIcon(e){this._rightIcon=e,this.tabView.cd.markForCheck()}ngOnDestroy(){this.view=null}}return n.\u0275fac=function(e){return new(e||n)(O($e(()=>R4)),O(ir),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-tabPanel"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},hostAttrs:[1,"p-element"],inputs:{closable:"closable",headerStyle:"headerStyle",headerStyleClass:"headerStyleClass",cache:"cache",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",selected:"selected",disabled:"disabled",header:"header",leftIcon:"leftIcon",rightIcon:"rightIcon"},ngContentSelectors:L4,decls:1,vars:1,consts:[["class","p-tabview-panel","role","tabpanel",3,"hidden",4,"ngIf"],["role","tabpanel",1,"p-tabview-panel",3,"hidden"],[4,"ngIf"],[4,"ngTemplateOutlet"]],template:function(e,i){1&e&&(li(),C(0,y_e,3,5,"div",0)),2&e&&g("ngIf",!i.closed)},dependencies:[He,Zn],encapsulation:2}),n})(),R4=(()=>{class n{constructor(e,i){this.el=e,this.cd=i,this.orientation="top",this.onChange=new R,this.onClose=new R,this.activeIndexChange=new R,this.backwardIsDisabled=!0,this.forwardIsDisabled=!1}ngAfterContentInit(){this.initTabs(),this.tabChangesSubscription=this.tabPanels.changes.subscribe(e=>{this.initTabs()})}ngAfterViewChecked(){this.tabChanged&&(this.updateInkBar(),this.tabChanged=!1)}ngOnDestroy(){this.tabChangesSubscription&&this.tabChangesSubscription.unsubscribe()}initTabs(){this.tabs=this.tabPanels.toArray(),!this.findSelectedTab()&&this.tabs.length&&(null!=this.activeIndex&&this.tabs.length>this.activeIndex?this.tabs[this.activeIndex].selected=!0:this.tabs[0].selected=!0,this.tabChanged=!0),this.cd.markForCheck()}open(e,i){if(i.disabled)e&&e.preventDefault();else{if(!i.selected){let r=this.findSelectedTab();r&&(r.selected=!1),this.tabChanged=!0,i.selected=!0;let o=this.findTabIndex(i);this.preventActiveIndexPropagation=!0,this.activeIndexChange.emit(o),this.onChange.emit({originalEvent:e,index:o}),this.updateScrollBar(o)}e&&e.preventDefault()}}close(e,i){this.controlClose?this.onClose.emit({originalEvent:e,index:this.findTabIndex(i),close:()=>{this.closeTab(i)}}):(this.closeTab(i),this.onClose.emit({originalEvent:e,index:this.findTabIndex(i)})),e.stopPropagation()}closeTab(e){if(!e.disabled){if(e.selected){this.tabChanged=!0,e.selected=!1;for(let i=0;ithis._activeIndex&&(this.findSelectedTab().selected=!1,this.tabs[this._activeIndex].selected=!0,this.tabChanged=!0,this.updateScrollBar(e))}updateInkBar(){if(this.navbar){const e=A.findSingle(this.navbar.nativeElement,"li.p-highlight");if(!e)return;this.inkbar.nativeElement.style.width=A.getWidth(e)+"px",this.inkbar.nativeElement.style.left=A.getOffset(e).left-A.getOffset(this.navbar.nativeElement).left+"px"}}updateScrollBar(e){this.navbar.nativeElement.children[e].scrollIntoView({block:"nearest"})}updateButtonState(){const e=this.content.nativeElement,{scrollLeft:i,scrollWidth:r}=e,o=A.getWidth(e);this.backwardIsDisabled=0===i,this.forwardIsDisabled=parseInt(i)===r-o}onScroll(e){this.scrollable&&this.updateButtonState(),e.preventDefault()}getVisibleButtonWidths(){return[this.prevBtn?.nativeElement,this.nextBtn?.nativeElement].reduce((e,i)=>i?e+A.getWidth(i):e,0)}navBackward(){const e=this.content.nativeElement,i=A.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft-i;e.scrollLeft=r<=0?0:r}navForward(){const e=this.content.nativeElement,i=A.getWidth(e)-this.getVisibleButtonWidths(),r=e.scrollLeft+i,o=e.scrollWidth-i;e.scrollLeft=r>=o?o:r}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["p-tabView"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,P4,4),2&e){let o;J(o=X())&&(i.tabPanels=o)}},viewQuery:function(e,i){if(1&e&&(Me(v_e,5),Me(b_e,5),Me(C_e,5),Me(w_e,5),Me(S_e,5)),2&e){let r;J(r=X())&&(i.content=r.first),J(r=X())&&(i.navbar=r.first),J(r=X())&&(i.prevBtn=r.first),J(r=X())&&(i.nextBtn=r.first),J(r=X())&&(i.inkbar=r.first)}},hostAttrs:[1,"p-element"],inputs:{orientation:"orientation",style:"style",styleClass:"styleClass",controlClose:"controlClose",scrollable:"scrollable",activeIndex:"activeIndex"},outputs:{onChange:"onChange",onClose:"onClose",activeIndexChange:"activeIndexChange"},ngContentSelectors:L4,decls:13,vars:9,consts:[[3,"ngClass","ngStyle"],[1,"p-tabview-nav-container"],["class","p-tabview-nav-prev p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-nav-content",3,"scroll"],["content",""],["role","tablist",1,"p-tabview-nav"],["navbar",""],["ngFor","",3,"ngForOf"],[1,"p-tabview-ink-bar"],["inkbar",""],["class","p-tabview-nav-next p-tabview-nav-btn p-link","type","button","pRipple","",3,"click",4,"ngIf"],[1,"p-tabview-panels"],["type","button","pRipple","",1,"p-tabview-nav-prev","p-tabview-nav-btn","p-link",3,"click"],["prevBtn",""],[1,"pi","pi-chevron-left"],["role","presentation",3,"ngClass","ngStyle","class",4,"ngIf"],["role","presentation",3,"ngClass","ngStyle"],["role","tab","pRipple","",1,"p-tabview-nav-link",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","click","keydown.enter"],[4,"ngIf"],[4,"ngTemplateOutlet"],["class","p-tabview-close pi pi-times",3,"click",4,"ngIf"],["class","p-tabview-left-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-title"],["class","p-tabview-right-icon",3,"ngClass",4,"ngIf"],[1,"p-tabview-left-icon",3,"ngClass"],[1,"p-tabview-right-icon",3,"ngClass"],[1,"p-tabview-close","pi","pi-times",3,"click"],["type","button","pRipple","",1,"p-tabview-nav-next","p-tabview-nav-btn","p-link",3,"click"],["nextBtn",""],[1,"pi","pi-chevron-right"]],template:function(e,i){1&e&&(li(),S(0,"div",0)(1,"div",1),C(2,D_e,3,0,"button",2),S(3,"div",3,4),P("scroll",function(o){return i.onScroll(o)}),S(5,"ul",5,6),C(7,A_e,1,1,"ng-template",7),F(8,"li",8,9),D()(),C(10,N_e,3,0,"button",10),D(),S(11,"div",11),ln(12),D()()),2&e&&(Ke(i.styleClass),g("ngClass",te(7,L_e,i.scrollable))("ngStyle",i.style),v(2),g("ngIf",i.scrollable&&!i.backwardIsDisabled),v(5),g("ngForOf",i.tabs),v(3),g("ngIf",i.scrollable&&!i.forwardIsDisabled))},dependencies:[Ot,Un,He,Zn,cn,Gy,Xr],styles:[".p-tabview-nav-container{position:relative}.p-tabview-scrollable .p-tabview-nav-container{overflow:hidden}.p-tabview-nav-content{overflow-x:auto;overflow-y:hidden;scroll-behavior:smooth;scrollbar-width:none;overscroll-behavior:contain auto}.p-tabview-nav{display:flex;margin:0;padding:0;list-style-type:none;flex:1 1 auto}.p-tabview-nav-link{cursor:pointer;-webkit-user-select:none;user-select:none;display:flex;align-items:center;position:relative;text-decoration:none;overflow:hidden}.p-tabview-ink-bar{display:none;z-index:1}.p-tabview-nav-link:focus{z-index:1}.p-tabview-title{line-height:1;white-space:nowrap}.p-tabview-nav-btn{position:absolute;top:0;z-index:2;height:100%;display:flex;align-items:center;justify-content:center}.p-tabview-nav-prev{left:0}.p-tabview-nav-next{right:0}.p-tabview-nav-content::-webkit-scrollbar{display:none}.p-tabview-close{z-index:1}\n"],encapsulation:2,changeDetection:0}),n})();function F_e(n,t){1&n&&(S(0,"div",1),F(1,"div",2),S(2,"div",3)(3,"div",4)(4,"div"),F(5,"span",5)(6,"span",6),D(),S(7,"div",7),F(8,"span",8)(9,"span",9),D()()()())}Fn(Z3,[mn,R4,P4,qfe,Ufe,qme],[]),Fn(ky,[Un,He,V3,cD,k3],[]);let j_e=(()=>{class n{constructor(){this.items=Array(4).fill(0)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-suggestion-loading-list"]],decls:1,vars:1,consts:[["class","card",4,"ngFor","ngForOf"],[1,"card"],[1,"image","skeleton"],[1,"body"],[1,"data-wrapper"],[1,"title","skeleton"],[1,"subtitle","skeleton"],[1,"state"],[1,"circle","skeleton"],[1,"meta","skeleton"]],template:function(e,i){1&e&&C(0,F_e,10,0,"div",0),2&e&&g("ngForOf",i.items)},dependencies:[Un],styles:["[_nghost-%COMP%]{width:100%;height:100%;max-height:400px;overflow:auto;display:block}.skeleton[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_skeleton-loading 1s linear infinite alternate}.card[_ngcontent-%COMP%]{width:100%;max-height:80px;box-sizing:border-box;display:flex;gap:1rem;padding:8px;background-color:#fff;cursor:pointer}.image[_ngcontent-%COMP%]{min-width:64px;min-height:64px;background:#14151a}.body[_ngcontent-%COMP%]{display:block;width:100%;height:100%}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%]{overflow:hidden;height:100%;display:flex;flex-direction:column;justify-content:space-between}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .title[_ngcontent-%COMP%], .body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:80%;overflow:hidden;display:block;white-space:nowrap;text-overflow:ellipsis;background-color:#14151a;height:12px;border-radius:5px;margin-bottom:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{width:85%;height:10px}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;align-items:center}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .circle[_ngcontent-%COMP%]{width:16px;height:16px;background:#000;border-radius:100%;margin-right:.5rem}.body[_ngcontent-%COMP%] .data-wrapper[_ngcontent-%COMP%] .state[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%]{width:30px;height:10px;background:#000;border-radius:4px}@keyframes _ngcontent-%COMP%_skeleton-loading{0%{background-color:#ccc}to{background-color:#f2f2f2}}"]}),n})();Fn(hj,[Un,He,Aue],[]),Fn(rj,[He,zs,qr,$n,js,Yr,Jn,Py,Nr,Aa,Mue,ij],[]),Fn(ij,[Un,He,V3,cD,j_e,k3],[]);class z_e extends TypeError{constructor(t,e){const{message:r,explanation:o,...s}=t,{path:a}=t,l=0===a.length?r:`At path: ${a.join(".")} -- ${r}`;super(o??l),null!=o&&(this.cause=l),Object.assign(this,s),this.name=this.constructor.name,this.failures=()=>[t,...e()]}}Ut.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=n=>{const t=n?.node||this.editor.state.doc;return"textSize"===(n?.mode||this.options.mode)?t.textBetween(0,t.content.size,void 0," ").length:t.nodeSize},this.storage.words=n=>{const t=n?.node||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter(r=>""!==r).length}},addProseMirrorPlugins(){return[new pt({key:new Et("characterCount"),filterTransaction:(n,t)=>{const e=this.options.limit;if(!n.docChanged||0===e||null==e)return!0;const i=this.storage.characters({node:t.doc}),r=this.storage.characters({node:n.doc});if(r<=e||i>e&&r>e&&r<=i)return!0;if(i>e&&r>e&&r>i||!n.getMeta("paste"))return!1;const s=n.selection.$head.pos;return n.deleteRange(s-(r-e),s),!(this.storage.characters({node:n.doc})>e)}})]}});const K_e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))$/,Y_e=/(?:^|\s)((?:==)((?:[^~=]+))(?:==))/g,Oc=(Yi.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:n=>n.getAttribute("data-color")||n.style.backgroundColor,renderHTML:n=>n.color?{"data-color":n.color,style:`background-color: ${n.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:n}){return["mark",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setHighlight:n=>({commands:t})=>t.setMark(this.name,n),toggleHighlight:n=>({commands:t})=>t.toggleMark(this.name,n),unsetHighlight:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Cc({find:K_e,type:this.type})]},addPasteRules(){return[Ja({find:Y_e,type:this.type})]}}),(n,t)=>{for(const e in t)n[e]=t[e];return n}),YD="numeric",QD="ascii",ZD="alpha",Jy="asciinumeric",Xy="alphanumeric",JD="domain",Q4="whitespace";function tye(n,t){return n in t||(t[n]=[]),t[n]}function kc(n,t,e){t[YD]&&(t[Jy]=!0,t[Xy]=!0),t[QD]&&(t[Jy]=!0,t[ZD]=!0),t[Jy]&&(t[Xy]=!0),t[ZD]&&(t[Xy]=!0),t[Xy]&&(t[JD]=!0),t.emoji&&(t[JD]=!0);for(const i in t){const r=tye(i,e);r.indexOf(n)<0&&r.push(n)}}function pr(n){void 0===n&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}pr.groups={},pr.prototype={accepts(){return!!this.t},go(n){const t=this,e=t.j[n];if(e)return e;for(let i=0;i=0&&(e[i]=!0);return e}(s.t,i),e);kc(o,l,i)}else e&&kc(o,e,i);s.t=o}return r.j[n]=s,s}};const Se=(n,t,e,i,r)=>n.ta(t,e,i,r),co=(n,t,e,i,r)=>n.tr(t,e,i,r),Z4=(n,t,e,i,r)=>n.ts(t,e,i,r),Z=(n,t,e,i,r)=>n.tt(t,e,i,r),ta="WORD",XD="UWORD",df="LOCALHOST",tT="UTLD",ev="SCHEME",Id="SLASH_SCHEME",xd="OPENBRACE",hf="OPENBRACKET",pf="OPENANGLEBRACKET",ff="OPENPAREN",Ac="CLOSEBRACE",Od="CLOSEBRACKET",kd="CLOSEANGLEBRACKET",Nc="CLOSEPAREN",tv="AMPERSAND",nv="APOSTROPHE",iv="ASTERISK",nl="AT",rv="BACKSLASH",ov="BACKTICK",sv="CARET",il="COLON",rT="COMMA",av="DOLLAR",hs="DOT",lv="EQUALS",oT="EXCLAMATION",ps="HYPHEN",cv="PERCENT",uv="PIPE",dv="PLUS",hv="POUND",pv="QUERY",sT="QUOTE",aT="SEMI",fs="SLASH",mf="TILDE",fv="UNDERSCORE",mv="SYM";var e5=Object.freeze({__proto__:null,WORD:ta,UWORD:XD,LOCALHOST:df,TLD:"TLD",UTLD:tT,SCHEME:ev,SLASH_SCHEME:Id,NUM:"NUM",WS:"WS",NL:"NL",OPENBRACE:xd,OPENBRACKET:hf,OPENANGLEBRACKET:pf,OPENPAREN:ff,CLOSEBRACE:Ac,CLOSEBRACKET:Od,CLOSEANGLEBRACKET:kd,CLOSEPAREN:Nc,AMPERSAND:tv,APOSTROPHE:nv,ASTERISK:iv,AT:nl,BACKSLASH:rv,BACKTICK:ov,CARET:sv,COLON:il,COMMA:rT,DOLLAR:av,DOT:hs,EQUALS:lv,EXCLAMATION:oT,HYPHEN:ps,PERCENT:cv,PIPE:uv,PLUS:dv,POUND:hv,QUERY:pv,QUOTE:sT,SEMI:aT,SLASH:fs,TILDE:mf,UNDERSCORE:fv,EMOJI:"EMOJI",SYM:mv});const Lc=/[a-z]/,gv=/\p{L}/u,_v=/\p{Emoji}/u,yv=/\d/,lT=/\s/;let vv=null,bv=null;function rl(n,t,e,i,r){let o;const s=t.length;for(let a=0;a=0;)o++;if(o>0){t.push(e.join(""));for(let s=parseInt(n.substring(i,i+o),10);s>0;s--)e.pop();i+=o}else e.push(n[i]),i++}return t}const Ad={defaultProtocol:"http",events:null,format:r5,formatHref:r5,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Cv(n,t){void 0===t&&(t=null);let e=Oc({},Ad);n&&(e=Oc(e,n instanceof Cv?n.o:n));const i=e.ignoreTags,r=[];for(let o=0;on,check(n){return this.get("validate",n.toString(),n)},get(n,t,e){const i=null!=t;let r=this.o[n];return r&&("object"==typeof r?(r=e.t in r?r[e.t]:Ad[n],"function"==typeof r&&i&&(r=r(t,e))):"function"==typeof r&&i&&(r=r(t,e.t,e)),r)},getObj(n,t,e){let i=this.o[n];return"function"==typeof i&&null!=t&&(i=i(t,e.t,e)),i},render(n){const t=n.render(this);return(this.get("render",null,n)||this.defaultRender)(t,n.t,n)}},wv.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const t=this.toString(),e=n.get("truncate",t,this),i=n.get("format",t,this);return e&&i.length>e?i.substring(0,e)+"\u2026":i},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return void 0===n&&(n=Ad.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const t=this,e=this.toHref(n.get("defaultProtocol")),i=n.get("formatHref",e,this),r=n.get("tagName",e,t),o=this.toFormattedString(n),s={},a=n.get("className",e,t),l=n.get("target",e,t),c=n.get("rel",e,t),u=n.getObj("attributes",e,t),d=n.getObj("events",e,t);return s.href=i,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),u&&Oc(s,u),{tagName:r,attributes:s,content:o,eventListeners:d}}};const cT=gf("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),uT=gf("text"),o5=gf("nl"),ol=gf("url",{isLink:!0,toHref(n){return void 0===n&&(n=Ad.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==df&&n[1].t===il}}),ii=n=>new pr(n);function dT(n,t,e){return new n(t.slice(e[0].s,e[e.length-1].e),e)}const _f=typeof console<"u"&&console&&console.warn||(()=>{}),wt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function s5(n,t){if(void 0===t&&(t=!1),wt.initialized&&_f(`linkifyjs: already initialized - will not register custom scheme "${n}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error('linkifyjs: incorrect scheme format.\n 1. Must only contain digits, lowercase ASCII letters or "-"\n 2. Cannot start or end with "-"\n 3. "-" cannot repeat');wt.customSchemes.push([n,t])}function a5(n){return wt.initialized||function hye(){wt.scanner=function sye(n){void 0===n&&(n=[]);const t={};pr.groups=t;const e=new pr;null==vv&&(vv=n5("aaa1rp3barth4b0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0faromeo7ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re2s2c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y0eats7k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking0channel11l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t0isalat7u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0at2delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d0network8tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntdoor4ier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5gtv3iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0eles2s3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1nder2le4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster5ia3d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4de2k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0cys3drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7serati6ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic3tual5v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rthwesternmutual14on4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3ssagens7y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cher3ks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w0time7i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ffany5ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0channel7ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lkswagen7vo3te1ing3o2yage5u0elos6wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2")),null==bv&&(bv=n5("\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u062a\u0635\u0627\u0644\u0627\u062a6\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2")),Z(e,"'",nv),Z(e,"{",xd),Z(e,"[",hf),Z(e,"<",pf),Z(e,"(",ff),Z(e,"}",Ac),Z(e,"]",Od),Z(e,">",kd),Z(e,")",Nc),Z(e,"&",tv),Z(e,"*",iv),Z(e,"@",nl),Z(e,"`",ov),Z(e,"^",sv),Z(e,":",il),Z(e,",",rT),Z(e,"$",av),Z(e,".",hs),Z(e,"=",lv),Z(e,"!",oT),Z(e,"-",ps),Z(e,"%",cv),Z(e,"|",uv),Z(e,"+",dv),Z(e,"#",hv),Z(e,"?",pv),Z(e,'"',sT),Z(e,"/",fs),Z(e,";",aT),Z(e,"~",mf),Z(e,"_",fv),Z(e,"\\",rv);const i=co(e,yv,"NUM",{[YD]:!0});co(i,yv,i);const r=co(e,Lc,ta,{[QD]:!0});co(r,Lc,r);const o=co(e,gv,XD,{[ZD]:!0});co(o,Lc),co(o,gv,o);const s=co(e,lT,"WS",{[Q4]:!0});Z(e,"\n","NL",{[Q4]:!0}),Z(s,"\n"),co(s,lT,s);const a=co(e,_v,"EMOJI",{emoji:!0});co(a,_v,a),Z(a,"\ufe0f",a);const l=Z(a,"\u200d");co(l,_v,a);const c=[[Lc,r]],u=[[Lc,null],[gv,o]];for(let d=0;dd[0]>h[0]?1:-1);for(let d=0;d=0?f[JD]=!0:Lc.test(h)?yv.test(h)?f[Jy]=!0:f[QD]=!0:f[YD]=!0,Z4(e,h,h,f)}return Z4(e,"localhost",df,{ascii:!0}),e.jd=new pr(mv),{start:e,tokens:Oc({groups:t},e5)}}(wt.customSchemes);for(let n=0;n=0&&h++,r++,u++;if(h<0)r-=u,r0&&(o.push(dT(uT,t,s)),s=[]),r-=h,u-=h;const p=d.t,f=e.slice(r-u,r);o.push(dT(p,t,f))}}return s.length>0&&o.push(dT(uT,t,s)),o}(wt.parser.start,n,function aye(n,t){const e=function lye(n){const t=[],e=n.length;let i=0;for(;i56319||i+1===e||(o=n.charCodeAt(i+1))<56320||o>57343?n[i]:n.slice(i,i+2);t.push(s),i+=s.length}return t}(t.replace(/[A-Z]/g,a=>a.toLowerCase())),i=e.length,r=[];let o=0,s=0;for(;s=0&&(d+=e[s].length,h++),c+=e[s].length,o+=e[s].length,s++;o-=d,s-=h,c-=d,r.push({t:u.t,v:t.slice(o-c,o),s:o-c,e:o})}return r}(wt.scanner.start,n))}function pT(n,t,e){if(void 0===t&&(t=null),void 0===e&&(e=null),t&&"object"==typeof t){if(e)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);e=t,t=null}const i=new Cv(e),r=a5(n),o=[];for(let s=0;s{const r=t.some(u=>u.docChanged)&&!e.doc.eq(i.doc),o=t.some(u=>u.getMeta("preventAutolink"));if(!r||o)return;const{tr:s}=i,a=function Nse(n,t){const e=new $1(n);return t.forEach(i=>{i.steps.forEach(r=>{e.step(r)})}),e}(e.doc,[...t]),{mapping:l}=a;return function Vse(n){const{mapping:t,steps:e}=n,i=[];return t.maps.forEach((r,o)=>{const s=[];if(r.ranges.length)r.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=e[o];if(void 0===a||void 0===l)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),u=t.slice(o).map(l),d=t.invert().map(c,-1),h=t.invert().map(u);i.push({oldRange:{from:d,to:h},newRange:{from:c,to:u}})})}),function jse(n){const t=function Fse(n,t=JSON.stringify){const e={};return n.filter(i=>{const r=t(i);return!Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=!0)})}(n);return 1===t.length?t:t.filter((e,i)=>!t.filter((o,s)=>s!==i).some(o=>e.oldRange.from>=o.oldRange.from&&e.oldRange.to<=o.oldRange.to&&e.newRange.from>=o.newRange.from&&e.newRange.to<=o.newRange.to))}(i)}(a).forEach(({oldRange:u,newRange:d})=>{My(u.from,u.to,e.doc).filter(m=>m.mark.type===n.type).forEach(m=>{const T=My(l.map(m.from),l.map(m.to),i.doc).filter(V=>V.mark.type===n.type);if(!T.length)return;const M=T[0],w=e.doc.textBetween(m.from,m.to,void 0," "),N=i.doc.textBetween(M.from,M.to,void 0," "),k=l5(w),$=l5(N);k&&!$&&s.removeMark(M.from,M.to,n.type)});const h=function Pse(n,t,e){const i=[];return n.nodesBetween(t.from,t.to,(r,o)=>{e(r)&&i.push({node:r,pos:o})}),i}(i.doc,d,m=>m.isTextblock);let p,f;if(h.length>1?(p=h[0],f=i.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):h.length&&i.doc.textBetween(d.from,d.to," "," ").endsWith(" ")&&(p=h[0],f=i.doc.textBetween(p.pos,d.to,void 0," ")),p&&f){const m=f.split(" ").filter(T=>""!==T);if(m.length<=0)return!1;const _=m[m.length-1],b=p.pos+f.lastIndexOf(_);if(!_)return!1;pT(_).filter(T=>T.isLink).filter(T=>!n.validate||n.validate(T.value)).map(T=>({...T,from:b+T.start+1,to:b+T.end+1})).forEach(T=>{s.addMark(T.from,T.to,n.type.create({href:T.href}))})}}),s.steps.length?s:void 0}})}Yi.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{"string"!=typeof n?s5(n.scheme,n.optionalSlashes):s5(n)})},onDestroy(){!function dye(){pr.groups={},wt.scanner=null,wt.parser=null,wt.tokenQueue=[],wt.pluginQueue=[],wt.customSchemes=[],wt.initialized=!1}()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:n}){return["a",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:t})=>t().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:t})=>t().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ja({find:n=>pT(n).filter(t=>!this.options.validate||this.options.validate(t.value)).filter(t=>t.isLink).map(t=>({text:t.value,index:t.start,data:t})),type:this.type,getAttributes:n=>{var t;return{href:null===(t=n.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(pye({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(function fye(n){return new pt({key:new Et("handleClickLink"),props:{handleClick:(t,e,i)=>{var r,o,s;if(0!==i.button)return!1;const a=function E3(n,t){const e=Dy("string"==typeof t?t:t.name,n.schema);return"node"===e?function Rse(n,t){const e=ni(t,n.schema),{from:i,to:r}=n.selection,o=[];n.doc.nodesBetween(i,r,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===e.name);return s?{...s.attrs}:{}}(n,t):"mark"===e?Ty(n,t):{}}(t.state,n.type.name),l=null===(r=i.target)||void 0===r?void 0:r.closest("a"),c=null!==(o=l?.href)&&void 0!==o?o:a.href,u=null!==(s=l?.target)&&void 0!==s?s:a.target;return!(!l||!c||(window.open(c,u),0))}}})}({type:this.type})),this.options.linkOnPaste&&n.push(function mye(n){return new pt({key:new Et("handlePasteLink"),props:{handlePaste:(t,e,i)=>{const{state:r}=t,{selection:o}=r,{empty:s}=o;if(s)return!1;let a="";i.content.forEach(c=>{a+=c.textContent});const l=pT(a).find(c=>c.isLink&&c.value===a);return!(!a||!l||(n.editor.commands.setMark(n.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),n}}),Yi.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:n=>"sub"===n&&null}],renderHTML({HTMLAttributes:n}){return["sub",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSubscript:()=>({commands:n})=>n.setMark(this.name),toggleSubscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSubscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Yi.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:n=>"super"===n&&null}],renderHTML({HTMLAttributes:n}){return["sup",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setSuperscript:()=>({commands:n})=>n.setMark(this.name),toggleSuperscript:()=>({commands:n})=>n.toggleMark(this.name),unsetSuperscript:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),tn.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:n}){return["tr",vt(this.options.HTMLAttributes,n),0]}}),Ut.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:t})=>!!this.options.alignments.includes(n)&&this.options.types.every(e=>t.updateAttributes(e,{textAlign:n})),unsetTextAlign:()=>({commands:n})=>this.options.types.every(t=>n.resetAttributes(t,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Yi.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("underline")&&{}}],renderHTML({HTMLAttributes:n}){return["u",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});const wye=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/,Sye=/^(https?:\/\/)?(www\.|music\.)?(youtube\.com|youtu\.be)(?!.*\/channel\/)(?!\/@)(.+)?$/g,c5=n=>n?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",Eye=(tn.create({name:"youtube",addOptions:()=>({addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML:()=>[{tag:"div[data-youtube-video] iframe"}],addCommands(){return{setYoutubeVideo:n=>({commands:t})=>!!(n=>n.match(wye))(n.src)&&t.insertContent({type:this.name,attrs:n})}},addPasteRules(){return this.options.addPasteHandler?[dae({find:Sye,type:this.type,getAttributes:n=>({src:n.input})})]:[]},renderHTML({HTMLAttributes:n}){const t=(n=>{const{url:t,allowFullscreen:e,autoplay:i,ccLanguage:r,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:u,ivLoadPolicy:d,loop:h,modestBranding:p,nocookie:f,origin:m,playlist:_,progressBarColor:b,startAt:T}=n;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const $=t.split("/").pop();return $?`${c5(f)}${$}`:null}const w=/v=([-\w]+)/gm.exec(t);if(!w||!w[1])return null;let N=`${c5(f)}${w[1]}`;const k=[];return!1===e&&k.push("fs=0"),i&&k.push("autoplay=1"),r&&k.push(`cc_lang_pref=${r}`),o&&k.push("cc_load_policy=1"),s||k.push("controls=0"),a&&k.push("disablekb=1"),l&&k.push("enablejsapi=1"),c&&k.push(`end=${c}`),u&&k.push(`hl=${u}`),d&&k.push(`iv_load_policy=${d}`),h&&k.push("loop=1"),p&&k.push("modestbranding=1"),m&&k.push(`origin=${m}`),_&&k.push(`playlist=${_}`),T&&k.push(`start=${T}`),b&&k.push(`color=${b}`),k.length&&(N+=`?${k.join("&")}`),N})({url:n.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:n.start||0});return n.src=t,["div",{"data-youtube-video":""},["iframe",vt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor},n)]]}}),/^\s*>\s$/),Iye=tn.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:n}){return["blockquote",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBlockquote:()=>({commands:n})=>n.wrapIn(this.name),toggleBlockquote:()=>({commands:n})=>n.toggleWrap(this.name),unsetBlockquote:()=>({commands:n})=>n.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Hp({find:Eye,type:this.type})]}}),xye=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,Oye=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,kye=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,Aye=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,Nye=Yi.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:n=>"normal"!==n.style.fontWeight&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}],renderHTML({HTMLAttributes:n}){return["strong",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Cc({find:xye,type:this.type}),Cc({find:kye,type:this.type})]},addPasteRules(){return[Ja({find:Oye,type:this.type}),Ja({find:Aye,type:this.type})]}}),Lye=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),u5=Yi.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Ty(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),d5=/^\s*([-+*])\s$/,Pye=tn.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:n}){return["ul",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Lye.name,this.editor.getAttributes(u5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Hp({find:d5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Hp({find:d5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(u5.name),editor:this.editor})),[n]}}),Rye=/(?:^|\s)((?:`)((?:[^`]+))(?:`))$/,Fye=/(?:^|\s)((?:`)((?:[^`]+))(?:`))/g,jye=Yi.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:n}){return["code",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setCode:()=>({commands:n})=>n.setMark(this.name),toggleCode:()=>({commands:n})=>n.toggleMark(this.name),unsetCode:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Cc({find:Rye,type:this.type})]},addPasteRules(){return[Ja({find:Fye,type:this.type})]}}),Vye=/^```([a-z]+)?[\s\n]$/,zye=/^~~~([a-z]+)?[\s\n]$/,Bye=tn.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:n=>{var t;const{languageClassPrefix:e}=this.options;return[...(null===(t=n.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter(s=>s.startsWith(e)).map(s=>s.replace(e,""))[0]||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:n,HTMLAttributes:t}){return["pre",vt(this.options.HTMLAttributes,t),["code",{class:n.attrs.language?this.options.languageClassPrefix+n.attrs.language:null},0]]},addCommands(){return{setCodeBlock:n=>({commands:t})=>t.setNode(this.name,n),toggleCodeBlock:n=>({commands:t})=>t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:n,$anchor:t}=this.editor.state.selection;return!(!n||t.parent.type.name!==this.name)&&!(1!==t.pos&&t.parent.textContent.length)&&this.editor.commands.clearNodes()},Enter:({editor:n})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=n,{selection:e}=t,{$from:i,empty:r}=e;if(!r||i.parent.type!==this.type)return!1;const o=i.parentOffset===i.parent.nodeSize-2,s=i.parent.textContent.endsWith("\n\n");return!(!o||!s)&&n.chain().command(({tr:a})=>(a.delete(i.pos-2,i.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=n,{selection:e,doc:i}=t,{$from:r,empty:o}=e;if(!o||r.parent.type!==this.type||r.parentOffset!==r.parent.nodeSize-2)return!1;const a=r.after();return void 0!==a&&!i.nodeAt(a)&&n.commands.exitCode()}}},addInputRules(){return[sD({find:Vye,type:this.type,getAttributes:n=>({language:n[1]})}),sD({find:zye,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new pt({key:new Et("codeBlockVSCodeHandler"),props:{handlePaste:(n,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const e=t.clipboardData.getData("text/plain"),i=t.clipboardData.getData("vscode-editor-data"),o=(i?JSON.parse(i):void 0)?.mode;if(!e||!o)return!1;const{tr:s}=n.state;return s.replaceSelectionWith(this.type.create({language:o})),s.setSelection(Le.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.insertText(e.replace(/\r\n?/g,"\n")),s.setMeta("paste",!0),n.dispatch(s),!0}}})]}}),Uye=tn.create({name:"doc",topNode:!0,content:"block+"});function Hye(n={}){return new pt({view:t=>new $ye(t,n)})}class $ye{constructor(t,e){var i;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(i=e.width)&&void 0!==i?i:1,this.color=!1===e.color?void 0:e.color||"black",this.class=e.class,this.handlers=["dragover","dragend","drop","dragleave"].map(r=>{let o=s=>{this[r](s)};return t.dom.addEventListener(r,o),{name:r,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:e})=>this.editorView.dom.removeEventListener(t,e))}update(t,e){null!=this.cursorPos&&e.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,null==t?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let i,t=this.editorView.state.doc.resolve(this.cursorPos),e=!t.parent.inlineContent;if(e){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let u=c.getBoundingClientRect(),d=a?u.bottom:u.top;a&&l&&(d=(d+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),i={left:u.left,right:u.right,top:d-this.width/2,bottom:d+this.width/2}}}}if(!i){let a=this.editorView.coordsAtPos(this.cursorPos);i={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let o,s,r=this.editorView.dom.offsetParent;if(this.element||(this.element=r.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",e),this.element.classList.toggle("prosemirror-dropcursor-inline",!e),!r||r==document.body&&"static"==getComputedStyle(r).position)o=-pageXOffset,s=-pageYOffset;else{let a=r.getBoundingClientRect();o=a.left-r.scrollLeft,s=a.top-r.scrollTop}this.element.style.left=i.left-o+"px",this.element.style.top=i.top-s+"px",this.element.style.width=i.right-i.left+"px",this.element.style.height=i.bottom-i.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let e=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),i=e&&e.inside>=0&&this.editorView.state.doc.nodeAt(e.inside),r=i&&i.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,e,t):r;if(e&&!o){let s=e.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=NP(this.editorView.state.doc,s,this.editorView.dragging.slice);null!=a&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}const Wye=Ut.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Hye(this.options)]}});class Dn extends Fe{constructor(t){super(t,t)}map(t,e){let i=t.resolve(e.map(this.head));return Dn.valid(i)?new Dn(i):Fe.near(i)}content(){return ie.empty}eq(t){return t instanceof Dn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,e){if("number"!=typeof e.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new Dn(t.resolve(e.pos))}getBookmark(){return new fT(this.anchor)}static valid(t){let e=t.parent;if(e.isTextblock||!function Gye(n){for(let t=n.depth;t>=0;t--){let e=n.index(t),i=n.node(t);if(0!=e)for(let r=i.child(e-1);;r=r.lastChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t)||!function qye(n){for(let t=n.depth;t>=0;t--){let e=n.indexAfter(t),i=n.node(t);if(e!=i.childCount)for(let r=i.child(e);;r=r.firstChild){if(0==r.childCount&&!r.inlineContent||r.isAtom||r.type.spec.isolating)return!0;if(r.inlineContent)return!1}else if(i.type.spec.isolating)return!0}return!0}(t))return!1;let i=e.type.spec.allowGapCursor;if(null!=i)return i;let r=e.contentMatchAt(t.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,e,i=!1){e:for(;;){if(!i&&Dn.valid(t))return t;let r=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(e>0?t.indexAfter(s)0){o=a.child(e>0?t.indexAfter(s):t.index(s)-1);break}if(0==s)return null;r+=e;let l=t.doc.resolve(r);if(Dn.valid(l))return l}for(;;){let s=e>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!Ee.isSelectable(o)){t=t.doc.resolve(r+o.nodeSize*e),i=!1;continue e}break}o=s,r+=e;let a=t.doc.resolve(r);if(Dn.valid(a))return a}return null}}}Dn.prototype.visible=!1,Dn.findFrom=Dn.findGapCursorFrom,Fe.jsonID("gapcursor",Dn);class fT{constructor(t){this.pos=t}map(t){return new fT(t.map(this.pos))}resolve(t){let e=t.resolve(this.pos);return Dn.valid(e)?new Dn(e):Fe.near(e)}}const Yye=FS({ArrowLeft:Sv("horiz",-1),ArrowRight:Sv("horiz",1),ArrowUp:Sv("vert",-1),ArrowDown:Sv("vert",1)});function Sv(n,t){const e="vert"==n?t>0?"down":"up":t>0?"right":"left";return function(i,r,o){let s=i.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof Le){if(!o.endOfTextblock(e)||0==a.depth)return!1;l=!1,a=i.doc.resolve(t>0?a.after():a.before())}let c=Dn.findGapCursorFrom(a,t,l);return!!c&&(r&&r(i.tr.setSelection(new Dn(c))),!0)}}function Qye(n,t,e){if(!n||!n.editable)return!1;let i=n.state.doc.resolve(t);if(!Dn.valid(i))return!1;let r=n.posAtCoords({left:e.clientX,top:e.clientY});return!(r&&r.inside>-1&&Ee.isSelectable(n.state.doc.nodeAt(r.inside))||(n.dispatch(n.state.tr.setSelection(new Dn(i))),0))}function Zye(n,t){if("insertCompositionText"!=t.inputType||!(n.state.selection instanceof Dn))return!1;let{$from:e}=n.state.selection,i=e.parent.contentMatchAt(e.index()).findWrapping(n.state.schema.nodes.text);if(!i)return!1;let r=G.empty;for(let s=i.length-1;s>=0;s--)r=G.from(i[s].createAndFill(null,r));let o=n.state.tr.replace(e.pos,e.pos,new ie(r,0,0));return o.setSelection(Le.near(o.doc.resolve(e.pos+1))),n.dispatch(o),!1}function Jye(n){if(!(n.selection instanceof Dn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",en.create(n.doc,[Gn.widget(n.selection.head,t,{key:"gapcursor"})])}const Xye=Ut.create({name:"gapCursor",addProseMirrorPlugins:()=>[new pt({props:{decorations:Jye,createSelectionBetween:(n,t,e)=>t.pos==e.pos&&Dn.valid(e)?new Dn(e):null,handleClick:Qye,handleKeyDown:Yye,handleDOMEvents:{beforeinput:Zye}}})],extendNodeSchema(n){var t;return{allowGapCursor:null!==(t=Qe(ge(n,"allowGapCursor",{name:n.name,options:n.options,storage:n.storage})))&&void 0!==t?t:null}}}),eve=tn.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:n}){return["br",vt(this.options.HTMLAttributes,n)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:n,chain:t,state:e,editor:i})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:r,storedMarks:o}=e;if(r.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=i.extensionManager,l=o||r.$to.parentOffset&&r.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:u})=>{if(u&&l&&s){const d=l.filter(h=>a.includes(h.type.name));c.ensureMarks(d)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),tve=tn.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:t}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,vt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.setNode(this.name,n),toggleHeading:n=>({commands:t})=>!!this.options.levels.includes(n.level)&&t.toggleNode(this.name,"paragraph",n)}},addKeyboardShortcuts(){return this.options.levels.reduce((n,t)=>({...n,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(n=>sD({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}});var fi=function(){};fi.prototype.append=function(t){return t.length?(t=fi.from(t),!this.length&&t||t.length<200&&this.leafAppend(t)||this.length<200&&t.leafPrepend(this)||this.appendInner(t)):this},fi.prototype.prepend=function(t){return t.length?fi.from(t).append(this):this},fi.prototype.appendInner=function(t){return new nve(this,t)},fi.prototype.slice=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.length),t>=e?fi.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,e))},fi.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)},fi.prototype.forEach=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length),e<=i?this.forEachInner(t,e,i,0):this.forEachInvertedInner(t,e,i,0)},fi.prototype.map=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=this.length);var r=[];return this.forEach(function(o,s){return r.push(t(o,s))},e,i),r},fi.from=function(t){return t instanceof fi?t:t&&t.length?new h5(t):fi.empty};var h5=function(n){function t(i){n.call(this),this.values=i}n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t;var e={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(r,o){return 0==r&&o==this.length?this:new t(this.values.slice(r,o))},t.prototype.getInner=function(r){return this.values[r]},t.prototype.forEachInner=function(r,o,s,a){for(var l=o;l=s;l--)if(!1===r(this.values[l],a+l))return!1},t.prototype.leafAppend=function(r){if(this.length+r.length<=200)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=200)return new t(r.flatten().concat(this.values))},e.length.get=function(){return this.values.length},e.depth.get=function(){return 0},Object.defineProperties(t.prototype,e),t}(fi);fi.empty=new h5([]);var nve=function(n){function t(e,i){n.call(this),this.left=e,this.right=i,this.length=e.length+i.length,this.depth=Math.max(e.depth,i.depth)+1}return n&&(t.__proto__=n),(t.prototype=Object.create(n&&n.prototype)).constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(i){return ia&&!1===this.right.forEachInner(i,Math.max(r-a,0),Math.min(this.length,o)-a,s+a))return!1},t.prototype.forEachInvertedInner=function(i,r,o,s){var a=this.left.length;if(r>a&&!1===this.right.forEachInvertedInner(i,r-a,Math.max(o,a)-a,s+a)||o=o?this.right.slice(i-o,r-o):this.left.slice(i,o).append(this.right.slice(0,r-o))},t.prototype.leafAppend=function(i){var r=this.right.leafAppend(i);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(i){var r=this.left.leafPrepend(i);if(r)return new t(r,this.right)},t.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new t(this.left,new t(this.right,i)):new t(this,i)},t}(fi);const p5=fi;class ko{constructor(t,e){this.items=t,this.eventCount=e}popEvent(t,e){if(0==this.eventCount)return null;let r,o,i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}e&&(r=this.remapping(i,this.items.length),o=r.maps.length);let a,l,s=t.tr,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step)return r||(r=this.remapping(i,h+1),o=r.maps.length),o--,void u.push(d);if(r){u.push(new ms(d.map));let f,p=d.step.map(r.slice(o));p&&s.maybeStep(p).doc&&(f=s.mapping.maps[s.mapping.maps.length-1],c.push(new ms(f,void 0,void 0,c.length+u.length))),o--,f&&r.appendMap(f,o)}else s.maybeStep(d.step);return d.selection?(a=r?d.selection.map(r.slice(o)):d.selection,l=new ko(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,e,i,r){let o=[],s=this.eventCount,a=this.items,l=!r&&a.length?a.get(a.length-1):null;for(let u=0;uove&&(a=function rve(n,t){let e;return n.forEach((i,r)=>{if(i.selection&&0==t--)return e=r,!1}),n.slice(e)}(a,c),s-=c),new ko(a.append(o),s)}remapping(t,e){let i=new od;return this.items.forEach((r,o)=>{i.appendMap(r.map,null!=r.mirrorOffset&&o-r.mirrorOffset>=t?i.maps.length-r.mirrorOffset:void 0)},t,e),i}addMaps(t){return 0==this.eventCount?this:new ko(this.items.append(t.map(e=>new ms(e))),this.eventCount)}rebased(t,e){if(!this.eventCount)return this;let i=[],r=Math.max(0,this.items.length-e),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},r);let l=e;this.items.forEach(h=>{let p=o.getMirror(--l);if(null==p)return;s=Math.min(s,p);let f=o.maps[p];if(h.step){let m=t.steps[p].invert(t.docs[p]),_=h.selection&&h.selection.map(o.slice(l+1,p));_&&a++,i.push(new ms(f,m,_))}else i.push(new ms(f))},r);let c=[];for(let h=e;h500&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let t=0;return this.items.forEach(e=>{e.step||t++}),t}compress(t=this.items.length){let e=this.remapping(0,t),i=e.maps.length,r=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)r.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(e.slice(i)),c=l&&l.getMap();if(i--,c&&e.appendMap(c,i),l){let u=s.selection&&s.selection.map(e.slice(i));u&&o++;let h,d=new ms(c.invert(),l,u),p=r.length-1;(h=r.length&&r[p].merge(d))?r[p]=h:r.push(d)}}else s.map&&i--},this.items.length,0),new ko(p5.from(r.reverse()),o)}}ko.empty=new ko(p5.empty,0);class ms{constructor(t,e,i,r){this.map=t,this.step=e,this.selection=i,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let e=t.step.merge(this.step);if(e)return new ms(e.getMap().invert(),e,this.selection)}}}class sl{constructor(t,e,i,r,o){this.done=t,this.undone=e,this.prevRanges=i,this.prevTime=r,this.prevComposition=o}}const ove=20;function f5(n){let t=[];return n.forEach((e,i,r,o)=>t.push(r,o)),t}function mT(n,t){if(!n)return null;let e=[];for(let i=0;inew sl(ko.empty,ko.empty,null,0,-1),apply:(t,e,i)=>function sve(n,t,e,i){let o,r=e.getMeta(gs);if(r)return r.historyState;e.getMeta(_5)&&(n=new sl(n.done,n.undone,null,0,-1));let s=e.getMeta("appendedTransaction");if(0==e.steps.length)return n;if(s&&s.getMeta(gs))return s.getMeta(gs).redo?new sl(n.done.addTransform(e,void 0,i,Tv(t)),n.undone,f5(e.mapping.maps[e.steps.length-1]),n.prevTime,n.prevComposition):new sl(n.done,n.undone.addTransform(e,void 0,i,Tv(t)),null,n.prevTime,n.prevComposition);if(!1===e.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=e.getMeta("rebased"))?new sl(n.done.rebased(e,o),n.undone.rebased(e,o),mT(n.prevRanges,e.mapping),n.prevTime,n.prevComposition):new sl(n.done.addMaps(e.mapping.maps),n.undone.addMaps(e.mapping.maps),mT(n.prevRanges,e.mapping),n.prevTime,n.prevComposition);{let a=e.getMeta("composition"),l=0==n.prevTime||!s&&n.prevComposition!=a&&(n.prevTime<(e.time||0)-i.newGroupDelay||!function ave(n,t){if(!t)return!1;if(!n.docChanged)return!0;let e=!1;return n.mapping.maps[0].forEach((i,r)=>{for(let o=0;o=t[o]&&(e=!0)}),e}(e,n.prevRanges)),c=s?mT(n.prevRanges,e.mapping):f5(e.mapping.maps[e.steps.length-1]);return new sl(n.done.addTransform(e,l?t.selection.getBookmark():void 0,i,Tv(t)),ko.empty,c,e.time,a??n.prevComposition)}}(e,i,t,n)},config:n={depth:n.depth||100,newGroupDelay:n.newGroupDelay||500},props:{handleDOMEvents:{beforeinput(t,e){let i=e.inputType,r="historyUndo"==i?y5:"historyRedo"==i?v5:null;return!!r&&(e.preventDefault(),r(t.state,t.dispatch))}}}})}const y5=(n,t)=>{let e=gs.getState(n);return!(!e||0==e.done.eventCount||(t&&m5(e,n,t,!1),0))},v5=(n,t)=>{let e=gs.getState(n);return!(!e||0==e.undone.eventCount||(t&&m5(e,n,t,!0),0))},cve=Ut.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:n,dispatch:t})=>y5(n,t),redo:()=>({state:n,dispatch:t})=>v5(n,t)}),addProseMirrorPlugins(){return[lve(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-\u044f":()=>this.editor.commands.undo(),"Shift-Mod-\u044f":()=>this.editor.commands.redo()}}}),uve=tn.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:n}){return["hr",vt(this.options.HTMLAttributes,n)]},addCommands(){return{setHorizontalRule:()=>({chain:n})=>n().insertContent({type:this.name}).command(({tr:t,dispatch:e})=>{var i;if(e){const{$to:r}=t.selection,o=r.end();if(r.nodeAfter)t.setSelection(Le.create(t.doc,r.pos));else{const s=null===(i=r.parent.type.contentMatch.defaultType)||void 0===i?void 0:i.create();s&&(t.insert(o,s),t.setSelection(Le.create(t.doc,o)))}t.scrollIntoView()}return!0}).run()}},addInputRules(){return[O3({find:/^(?:---|\u2014-|___\s|\*\*\*\s)$/,type:this.type})]}}),dve=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,hve=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,pve=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,fve=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,mve=Yi.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:n=>"normal"!==n.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:n}){return["em",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Cc({find:dve,type:this.type}),Cc({find:pve,type:this.type})]},addPasteRules(){return[Ja({find:hve,type:this.type}),Ja({find:fve,type:this.type})]}}),gve=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),_ve=tn.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:n}){return["li",vt(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),b5=Yi.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:n=>!!n.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:n}){return["span",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:t})=>{const e=Ty(n,this.type);return!!Object.entries(e).some(([,r])=>!!r)||t.unsetMark(this.name)}}}}),C5=/^(\d+)\.\s$/,yve=tn.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:n}){const{start:t,...e}=n;return 1===t?["ol",vt(this.options.HTMLAttributes,e),0]:["ol",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_ve.name,this.editor.getAttributes(b5.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Hp({find:C5,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Hp({find:C5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(b5.name)}),joinPredicate:(t,e)=>e.childCount+e.attrs.start===+t[1],editor:this.editor})),[n]}}),vve=tn.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:n}){return["p",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),bve=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,Cve=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,wve=Yi.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>!!n.includes("line-through")&&{}}],renderHTML({HTMLAttributes:n}){return["s",vt(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-x":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Cc({find:bve,type:this.type})]},addPasteRules(){return[Ja({find:Cve,type:this.type})]}}),Sve=tn.create({name:"text",group:"inline"});Ut.create({name:"starterKit",addExtensions(){var n,t,e,i,r,o,s,a,l,c,u,d,h,p,f,m,_,b;const T=[];return!1!==this.options.blockquote&&T.push(Iye.configure(null===(n=this.options)||void 0===n?void 0:n.blockquote)),!1!==this.options.bold&&T.push(Nye.configure(null===(t=this.options)||void 0===t?void 0:t.bold)),!1!==this.options.bulletList&&T.push(Pye.configure(null===(e=this.options)||void 0===e?void 0:e.bulletList)),!1!==this.options.code&&T.push(jye.configure(null===(i=this.options)||void 0===i?void 0:i.code)),!1!==this.options.codeBlock&&T.push(Bye.configure(null===(r=this.options)||void 0===r?void 0:r.codeBlock)),!1!==this.options.document&&T.push(Uye.configure(null===(o=this.options)||void 0===o?void 0:o.document)),!1!==this.options.dropcursor&&T.push(Wye.configure(null===(s=this.options)||void 0===s?void 0:s.dropcursor)),!1!==this.options.gapcursor&&T.push(Xye.configure(null===(a=this.options)||void 0===a?void 0:a.gapcursor)),!1!==this.options.hardBreak&&T.push(eve.configure(null===(l=this.options)||void 0===l?void 0:l.hardBreak)),!1!==this.options.heading&&T.push(tve.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&T.push(cve.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&T.push(uve.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&T.push(mve.configure(null===(h=this.options)||void 0===h?void 0:h.italic)),!1!==this.options.listItem&&T.push(gve.configure(null===(p=this.options)||void 0===p?void 0:p.listItem)),!1!==this.options.orderedList&&T.push(yve.configure(null===(f=this.options)||void 0===f?void 0:f.orderedList)),!1!==this.options.paragraph&&T.push(vve.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&T.push(wve.configure(null===(_=this.options)||void 0===_?void 0:_.strike)),!1!==this.options.text&&T.push(Sve.configure(null===(b=this.options)||void 0===b?void 0:b.text)),T}});var yf=(()=>(function(n){n.TOP_INITIAL="40px",n.TOP_CURRENT="26px"}(yf||(yf={})),yf))();function Dve(n){return n.replace(/\p{L}+('\p{L}+)?/gu,function(t){return t.charAt(0).toUpperCase()+t.slice(1)})}Ut.create({name:"dotPlaceholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something \u2026",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new pt({key:new Et("dotPlaceholder"),props:{decorations:({doc:n,selection:t})=>{const e=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=t,r=[];if(!e)return null;const o=n.type.createAndFill(),s=o?.sameMarkup(n)&&null===o.content.findDiffStart(n.content);return n.descendants((a,l)=>{if((i>=l&&i<=l+a.nodeSize||!this.options.showOnlyCurrent)&&!a.isLeaf&&!a.childCount){const d=[this.options.emptyNodeClass];s&&d.push(this.options.emptyEditorClass);const h=Gn.widget(l,((n,t,e)=>{const i=document.createElement("button");i.classList.add("add-button"),i.style.position="absolute",i.style.left="-45px",i.style.top="-2px";const r=document.createElement("div");return r.style.position="relative",r.setAttribute("draggable","false"),0===n&&t.type.name===pi.HEADING&&(i.style.top=yf.TOP_INITIAL),0!==n&&t.type.name===pi.HEADING&&(i.style.top=yf.TOP_CURRENT),i.innerHTML='',i.setAttribute("draggable","false"),i.addEventListener("mousedown",o=>{o.preventDefault(),e.chain().insertContent("/").run()},{once:!0}),r.appendChild(i),r})(l,a,this.editor)),p=Gn.node(l,l+a.nodeSize,{class:d.join(" "),"data-placeholder":a.type.name===pi.HEADING?`${Dve(a.type.name)} ${a.attrs.level}`:this.options.placeholder});r.push(p),r.push(h)}return this.options.includeChildren}),en.create(n,r)}}})]}});class Rve{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new _T(t,this.delay,this.scheduler))}}class _T extends ut{constructor(t,e,i){super(t),this.delay=e,this.scheduler=i,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,i=e.queue,r=t.scheduler,o=t.destination;for(;i.length>0&&i[0].time-r.now()<=0;)i.shift().notification.observe(o);if(i.length>0){const s=Math.max(0,i[0].time-r.now());this.schedule(t,s)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(_T.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,i=new Fve(e.now()+this.delay,t);this.queue.push(i),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(or.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(or.createComplete()),this.unsubscribe()}}class Fve{constructor(t,e){this.time=t,this.notification=e}}let vf=(()=>{class n{constructor(){this._accept=[],this._acceptSanitized=[]}get accept(){return this._accept}get maxFileSize(){return this._maxFileSize}setMaxFileSize(e){this._maxFileSize=e}setAccept(e){this._accept=e,this._acceptSanitized=e?.filter(i=>"*/*"!==i).map(i=>i.toLowerCase().replace(/\*/g,""))}isValidType({extension:e,mimeType:i}){if(0===this._acceptSanitized?.length)return!0;const r=e?.replace(".","");return this._acceptSanitized.some(o=>i?.includes(o)||o?.includes(`.${r}`))}isValidSize(e){return!this._maxFileSize||e<=this._maxFileSize}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const jve=["editorRef"],Vve=function(n){return{"binary-field__code-editor--disabled":n}},zve=function(n){return{"editor-mode__helper--visible":n}},Bve={theme:"vs",minimap:{enabled:!1},cursorBlinking:"solid",overviewRulerBorder:!1,mouseWheelZoom:!1,lineNumbers:"on",roundedSelection:!1,automaticLayout:!0,language:"text"};let Uve=(()=>{class n{constructor(){this.fileName="",this.fileContent="",this.tempFileUploaded=new R,this.cancel=new R,this.cd=re(Tt),this.dotUploadService=re(gp),this.dotMessageService=re(tc),this.dotBinaryFieldValidatorService=re(vf),this.extension="",this.invalidFileMessage="",this.form=new Da({name:new Vs("",[Kr.required,Kr.pattern(/^[^.]+\.[^.]+$/)]),content:new Vs("")}),this.editorOptions=Bve,this.mimeType=""}get name(){return this.form.get("name")}get content(){return this.form.get("content")}ngOnInit(){this.setFormValues(),this.name.valueChanges.pipe(Gp(350)).subscribe(e=>this.setEditorLanguage(e)),this.invalidFileMessage=this.dotMessageService.get("dot.binary.field.error.type.file.not.supported.message",this.dotBinaryFieldValidatorService.accept.join(", "))}onEditorInit(){this.editor=this.editorRef.editor,this.fileName&&this.setEditorLanguage(this.fileName)}onSubmit(){if(this.name.invalid)return void this.markControlInvalid(this.name);const e=new File([this.content.value],this.name.value,{type:this.mimeType});this.uploadFile(e)}setFormValues(){this.name.setValue(this.fileName),this.content.setValue(this.fileContent)}markControlInvalid(e){e.markAsDirty(),e.updateValueAndValidity(),this.cd.detectChanges()}uploadFile(e){const i=Yt(this.dotUploadService.uploadFile({file:e}));this.disableEditor(),i.subscribe(r=>{this.enableEditor(),this.tempFileUploaded.emit({...r,content:this.content.value})})}setEditorLanguage(e=""){const i=e?.includes(".")?e.split(".").pop():"",{id:r,mimetypes:o,extensions:s}=this.getLanguage(i)||{};this.mimeType=o?.[0],this.extension=s?.[0];const a=this.dotBinaryFieldValidatorService.isValidType({extension:this.extension,mimeType:this.mimeType});i&&!a&&this.name.setErrors({invalidExtension:this.invalidFileMessage}),this.updateEditorLanguage(r),this.cd.detectChanges()}getLanguage(e){return monaco.languages.getLanguages().find(i=>i.extensions?.includes(`.${e}`))}updateEditorLanguage(e="text"){this.editorOptions={...this.editorOptions,language:e}}disableEditor(){this.form.disable(),this.editor.updateOptions({readOnly:!0})}enableEditor(){this.form.enable(),this.editor.updateOptions({readOnly:!1})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-dot-binary-field-editor"]],viewQuery:function(e,i){if(1&e&&Me(jve,7),2&e){let r;J(r=X())&&(i.editorRef=r.first)}},inputs:{fileName:"fileName",fileContent:"fileContent"},outputs:{tempFileUploaded:"tempFileUploaded",cancel:"cancel"},standalone:!0,features:[$t],decls:20,vars:20,consts:[[1,"editor-mode__form",3,"formGroup","ngSubmit"],[1,"editor-mode__input-container"],["data-testId","editor-label","for","file-name",1,"p-label-input-required"],["id","file-name","type","text","pInputText","","formControlName","name","autocomplete","off","pInputText","","placeholder","Ex. template.html"],[1,"error-message"],["data-testId","error-message",3,"patternErrorMessage","field"],[1,"binary-field__editor-container"],["formControlName","content","data-testId","code-editor",1,"binary-field__code-editor",3,"ngClass","options","init"],["editorRef",""],[1,"editor-mode__helper",3,"ngClass"],[1,"pi","pi-info-circle"],[1,"editor-mode__actions"],["styleClass","p-button-outlined","type","button","aria-label","Cancel button","data-testId","cancel-button",3,"label","click"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label"]],template:function(e,i){1&e&&(S(0,"form",0),P("ngSubmit",function(){return i.onSubmit()}),S(1,"div",1)(2,"label",2),H(3),Ue(4,"dm"),D(),F(5,"input",3),S(6,"div",4),F(7,"dot-field-validation-message",5),D()(),S(8,"div",6)(9,"ngx-monaco-editor",7,8),P("init",function(){return i.onEditorInit()}),D(),S(11,"div",9),F(12,"i",10),S(13,"small"),H(14),D()()(),S(15,"div",11)(16,"p-button",12),P("click",function(){return i.cancel.emit()}),Ue(17,"dm"),D(),F(18,"p-button",13),Ue(19,"dm"),D()()),2&e&&(g("formGroup",i.form),v(3),ve(Ye(4,10,"dot.binary.field.action.create.new.file.label")),v(4),g("patternErrorMessage","dot.binary.field.error.type.file.not.extension")("field",i.form.get("name")),v(2),g("ngClass",te(16,Vve,i.form.disabled))("options",i.editorOptions),v(2),g("ngClass",te(18,zve,i.mimeType)),v(3),xt("Mime Type: ",i.mimeType,""),v(2),g("label",Ye(17,12,"dot.common.cancel")),v(2),g("label",Ye(19,14,"dot.common.save")))},dependencies:[ze,Ot,Eg,h2,Ul,zs,qr,$n,js,Wn,Yr,Jn,oc,Aa,Xn,rc,Zo,M1],styles:[".binary-field__editor-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:flex-start;flex-direction:column;flex:1;width:100%;gap:.5rem}.binary-field__code-editor[_ngcontent-%COMP%]{border:1px solid #d1d4db;display:block;flex-grow:1;width:100%;min-height:20rem;border-radius:.375rem;overflow:auto}.binary-field__code-editor--disabled[_ngcontent-%COMP%]{background-color:#f3f3f4;opacity:.5}.binary-field__code-editor--disabled[_ngcontent-%COMP%] .monaco-mouse-cursor-text, .binary-field__code-editor--disabled[_ngcontent-%COMP%] .overflow-guard{cursor:not-allowed}.editor-mode__form[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.editor-mode__input-container[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;flex-direction:column}.editor-mode__input[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:column}.editor-mode__actions[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;align-items:center;justify-content:flex-end}.editor-mode__helper[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:.5rem;color:#6c7389;font-weight:.813rem;visibility:hidden}.editor-mode__helper--visible[_ngcontent-%COMP%]{visibility:visible}.error-message[_ngcontent-%COMP%]{min-height:1.5rem;justify-content:flex-start;display:flex}"],changeDetection:0}),n})();function Hve(n,t){if(1&n&&(S(0,"div",14)(1,"code"),H(2),D()()),2&n){const e=y();v(2),ve(e.file.content)}}function $ve(n,t){if(1&n&&(S(0,"div",19),F(1,"i",21),S(2,"span"),H(3),D()()),2&n){const e=y(2);v(3),ya("",e.file.width,"px, ",e.file.height,"px")}}function Wve(n,t){if(1&n&&(S(0,"div",15),F(1,"dot-content-thumbnail",16),D(),S(2,"div",17)(3,"span",12),H(4),D(),C(5,$ve,4,2,"div",18),S(6,"div",19),F(7,"i",20),S(8,"span"),H(9),Ue(10,"number"),Ue(11,"dm"),D()()()),2&n){const e=y();v(1),g("dotThumbanilOptions",e.dotThumbnailOptions),v(3),ve(e.file.name),v(1),g("ngIf",e.file.width&&e.file.height),v(4),ya("",Um(10,5,e.file.fileSize,"1.0-2")," ",Ye(11,8,"dot.binary.field.file.bytes"),"")}}function Gve(n,t){if(1&n){const e=q();S(0,"p-button",22),P("click",function(){return I(e),x(y().onEdit())}),Ue(1,"dm"),D()}2&n&&g("label",Ye(1,1,"dot.common.edit"))}function qve(n,t){if(1&n){const e=q();S(0,"p-button",23),P("click",function(){return I(e),x(y().onEdit())}),D()}}function Kve(n,t){if(1&n&&(S(0,"div"),H(1),Ue(2,"dm"),S(3,"span"),H(4),D()()),2&n){const e=y();v(1),xt(" ",Ye(2,3,"dot.binary.field.file.dimension"),": "),v(3),ya("",e.file.width,"px, ",e.file.height,"px")}}function Yve(n,t){if(1&n&&(S(0,"div"),H(1),Ue(2,"dm"),S(3,"span"),H(4),D()()),2&n){const e=y();v(1),xt(" ",Ye(2,2,"dot.binary.field.file.size"),": "),v(3),xt("",e.file.fileSize," Bytes")}}const Qve=function(n){return{"preview-container--fade":n}};var na=(()=>(function(n){n.image="image",n.text="text",n.unknown="unknown"}(na||(na={})),na))();let Zve=(()=>{class n{constructor(){this.editImage=new R,this.editFile=new R,this.removeFile=new R,this.EDITABLE_FILE_FUNCTION_MAP={[na.image]:()=>this.editableImage,[na.text]:()=>!!this.file?.content,[na.unknown]:()=>!!this.file?.content},this.isEditable=!1}get dotThumbnailOptions(){return{tempUrl:this.file.url,inode:this.file.inode,name:this.file.name,contentType:this.file.mimeType,iconSize:"48px",titleImage:this.file.name}}ngOnChanges(){this.setIsEditable()}onEdit(){this.contenttype!==na.image?this.editFile.emit():this.editImage.emit()}setIsEditable(){const e=this.file.mimeType?.split("/")[0];this.contenttype=na[e]||na.unknown,this.isEditable=this.EDITABLE_FILE_FUNCTION_MAP[this.contenttype]()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-binary-field-preview"]],inputs:{file:"file",editableImage:"editableImage"},outputs:{editImage:"editImage",editFile:"editFile",removeFile:"removeFile"},standalone:!0,features:[Yn,$t],decls:19,vars:13,consts:[[1,"preview-container",3,"ngClass"],["class","preview-code_container",4,"ngIf","ngIfElse"],["contentThumnail",""],[1,"preview-metadata__actions"],["styleClass","p-button-link p-button-sm p-button-secondary","data-testId","remove-button","icon","pi pi-trash",3,"label","click"],["severity","secondary","styleClass","p-button-outlined p-button-sm p-button-secondary","data-testId","edit-button","icon","pi pi-pencil",3,"label","click",4,"ngIf"],[1,"preview-metadata__action--responsive"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","edit-button-responsive","icon","pi pi-pencil",3,"click",4,"ngIf"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","infor-button-responsive","icon","pi pi-info",3,"click"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","remove-button-responsive","icon","pi pi-trash",3,"click"],["op",""],[1,"preview-metadata__responsive"],[1,"preview-metadata_header"],[4,"ngIf"],[1,"preview-code_container"],[1,"preview-image__container"],[3,"dotThumbanilOptions"],[1,"preview-metadata__container"],["class","preview-metadata",4,"ngIf"],[1,"preview-metadata"],[1,"pi","pi-file"],[1,"pi","pi-arrows-alt"],["severity","secondary","styleClass","p-button-outlined p-button-sm p-button-secondary","data-testId","edit-button","icon","pi pi-pencil",3,"label","click"],["styleClass","p-button-rounded p-button-secondary p-button-text p-button-semi-transparent","data-testId","edit-button-responsive","icon","pi pi-pencil",3,"click"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0),C(1,Hve,3,1,"div",1),C(2,Wve,12,10,"ng-template",null,2,yt),S(4,"div",3)(5,"p-button",4),P("click",function(){return i.removeFile.emit()}),Ue(6,"dm"),D(),C(7,Gve,2,3,"p-button",5),D(),S(8,"div",6),C(9,qve,1,0,"p-button",7),S(10,"p-button",8),P("click",function(s){return I(r),x(Pe(13).toggle(s))}),D(),S(11,"p-button",9),P("click",function(){return i.removeFile.emit()}),D()()(),S(12,"p-overlayPanel",null,10)(14,"div",11)(15,"span",12),H(16),D(),C(17,Kve,5,5,"div",13),C(18,Yve,5,4,"div",13),D()()}if(2&e){const r=Pe(3);g("ngClass",te(11,Qve,i.file.content)),v(1),g("ngIf",i.file.content)("ngIfElse",r),v(4),g("label",Ye(6,9,"dot.common.remove")),v(2),g("ngIf",i.isEditable),v(2),g("ngIf",i.isEditable),v(7),ve(i.file.name),v(1),g("ngIf",i.file.width&&i.file.height),v(1),g("ngIf",i.file.fileSize)}},dependencies:[ze,Ot,He,Lk,Xn,rc,KJ,x_,qj,Xpe,Zo],styles:['[_nghost-%COMP%]{display:block;width:100%;height:100%}.preview-container[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-start;justify-content:center;height:100%;width:100%;position:relative;container-type:inline-size;container-name:preview}.preview-container[_ngcontent-%COMP%]:only-child{gap:0}.preview-code_container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:100%;width:100%;-webkit-user-select:none;user-select:none}.preview-image__container[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;justify-content:center;align-items:center;background:#f3f3f4}.preview-container--fade[_ngcontent-%COMP%]:after{content:"";background:linear-gradient(0deg,rgb(255,255,255) 0%,rgba(255,255,255,0) 100%);position:absolute;width:100%;height:50%;bottom:0;left:0;border-radius:.375rem}.preview-metadata__container[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%]{flex-grow:1;padding:.5rem;display:none;justify-content:top;flex-direction:column;height:100%;min-width:8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;gap:.75rem}.preview-metadata__container[_ngcontent-%COMP%] .preview-metadata_header[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%] .preview-metadata_header[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;margin:0;color:#14151a}.preview-metadata__container[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .preview-metadata__responsive[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#6c7389}.preview-metadata__responsive[_ngcontent-%COMP%]{display:flex;padding:0;max-width:20rem}.preview-metadata[_ngcontent-%COMP%]{display:flex;justify-content:flex-start;align-items:center;gap:.5rem}.preview-metadata__actions[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;display:none;justify-content:flex-end;align-items:center;gap:.5rem;width:100%;z-index:100}.preview-metadata__action--responsive[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;right:.5rem;display:flex;flex-direction:column;gap:.5rem}code[_ngcontent-%COMP%]{background:#ffffff;color:var(--color-palette-primary-500);height:100%;width:100%;white-space:pre-wrap;overflow:hidden}@container preview (min-width: 376px){.preview-metadata__container[_ngcontent-%COMP%], .preview-metadata__actions[_ngcontent-%COMP%]{display:flex}.preview-metadata__action--responsive[_ngcontent-%COMP%]{display:none}.preview-image__container[_ngcontent-%COMP%]{height:100%;max-width:17.5rem}.preview-overlay__container[_ngcontent-%COMP%]{display:none}}'],changeDetection:0}),n})();const Jve=["*"];let Xve=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-binary-field-ui-message"]],inputs:{uiMessage:"uiMessage"},standalone:!0,features:[$t],ngContentSelectors:Jve,decls:6,vars:6,consts:[["data-testId","ui-message-icon-container",1,"icon-container",3,"ngClass"],["data-testId","ui-message-icon",2,"font-size","2rem","width","auto",3,"ngClass"],[1,"text"],["data-testId","ui-message-span",3,"innerHTML"]],template:function(e,i){1&e&&(li(),S(0,"div",0),F(1,"i",1),D(),S(2,"div",2),F(3,"span",3),Ue(4,"dm"),ln(5),D()),2&e&&(g("ngClass",i.uiMessage.severity),v(1),g("ngClass",i.uiMessage.icon),v(2),g("innerHTML",Um(4,3,i.uiMessage.message,i.uiMessage.args),fu))},dependencies:[ze,Ot,Zo],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;height:100%;padding:1rem}.icon-container[_ngcontent-%COMP%]{border-radius:50%;padding:1rem}.icon-container.info[_ngcontent-%COMP%]{color:var(--color-palette-secondary-500);background:var(--color-palette-secondary-200)}.icon-container.error[_ngcontent-%COMP%]{color:#ffb444;background:#fff8ec}.text[_ngcontent-%COMP%]{text-align:center;line-height:140%}"],changeDetection:0}),n})(),S5=(()=>{class n extends Xp{constructor(e,i){super({tempFile:null,isLoading:!1,error:""}),this.dotUploadService=e,this.dotBinaryFieldValidatorService=i,this.vm$=this.select(r=>r),this.tempFile$=this.select(({tempFile:r})=>r),this.error$=this.select(({error:r})=>r),this.setTempFile=this.updater((r,o)=>({...r,tempFile:o,isLoading:!1,error:""})),this.setIsLoading=this.updater((r,o)=>({...r,isLoading:o})),this.setError=this.updater((r,o)=>({...r,isLoading:!1,error:o})),this.uploadFileByUrl=this.effect(r=>r.pipe(Mt(()=>this.setIsLoading(!0)),xn(({url:o,signal:s})=>this.uploadTempFile(o,s)))),this.setMaxFileSize(this.dotBinaryFieldValidatorService.maxFileSize)}uploadTempFile(e,i){return Yt(this.dotUploadService.uploadFile({file:e,maxSize:this._maxFileSize?`${this._maxFileSize}MB`:"",signal:i})).pipe(ND(r=>{this.isValidType(r)?this.setTempFile(r):this.setError("dot.binary.field.import.from.url.error.file.not.supported.message")},r=>{i.aborted?this.setIsLoading(!1):this.setError(r.message)}))}setMaxFileSize(e){this._maxFileSize=this._maxFileSize=e/1048576}isValidType(e){const{fileName:i,mimeType:r}=e,o=i.split(".").pop();return this.dotBinaryFieldValidatorService.isValidType({extension:o,mimeType:r})}}return n.\u0275fac=function(e){return new(e||n)(U(gp),U(vf))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();function ebe(n,t){if(1&n&&(F(0,"dot-field-validation-message",12),Ue(1,"dm")),2&n){const e=y(2);g("message",Ye(1,2,"dot.binary.field.action.import.from.url.error.message"))("field",e.form.get("url"))}}const tbe=function(n){return[n]};function nbe(n,t){if(1&n&&(S(0,"small",13),H(1),Ue(2,"dm"),D()),2&n){const e=y().ngIf,i=y();v(1),xt(" ",Um(2,1,e.error,te(4,tbe,i.acceptTypes))," ")}}function ibe(n,t){1&n&&(F(0,"p-button",14),Ue(1,"dm")),2&n&&g("label",Ye(1,2,"dot.common.import"))("icon","pi pi-download")}function rbe(n,t){1&n&&F(0,"p-button",15),2&n&&g("icon","pi pi-spin pi-spinner")}const obe=function(){return{width:"6.85rem"}};function sbe(n,t){if(1&n){const e=q();S(0,"form",1),P("ngSubmit",function(){return I(e),x(y().onSubmit())}),S(1,"div",2)(2,"label",3),H(3),Ue(4,"dm"),D(),S(5,"input",4),P("focus",function(){return I(e),x(y().handleFocus())}),D(),S(6,"div",5),C(7,ebe,2,4,"dot-field-validation-message",6),C(8,nbe,3,6,"ng-template",null,7,yt),D()(),S(10,"div",8)(11,"p-button",9),P("click",function(){return I(e),x(y().cancelUpload())}),Ue(12,"dm"),D(),S(13,"div"),C(14,ibe,2,4,"p-button",10),C(15,rbe,1,1,"ng-template",null,11,yt),D()()()}if(2&n){const e=t.ngIf,i=Pe(9),r=Pe(16);g("formGroup",y().form),v(3),ve(Ye(4,9,"dot.binary.field.action.import.from.url")),v(4),g("ngIf",!e.error)("ngIfElse",i),v(4),g("label",Ye(12,11,"dot.common.cancel")),v(2),jt(pn(13,obe)),v(1),g("ngIf",!e.isLoading)("ngIfElse",r)}}let abe=(()=>{class n{constructor(){this.tempFileUploaded=new R,this.cancel=new R,this.store=re(S5),this.dotBinaryFieldValidatorService=re(vf),this.validators=[Kr.required,Kr.pattern(/^(ftp|http|https):\/\/[^ "]+$/)],this.form=new Da({url:new Vs("",this.validators)}),this.vm$=this.store.vm$.pipe(Mt(({isLoading:e})=>this.toggleForm(e))),this.tempFileChanged$=this.store.tempFile$,this.destroy$=new ye}get acceptTypes(){return this.dotBinaryFieldValidatorService.accept.join(",")}ngOnInit(){this.tempFileChanged$.pipe(Rt(this.destroy$),Wt(e=>null!==e)).subscribe(e=>{this.tempFileUploaded.emit(e)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.abortController?.abort()}onSubmit(){if(this.form.invalid)return;const e=this.form.get("url").value;this.abortController=new AbortController,this.store.uploadFileByUrl({url:e,signal:this.abortController.signal}),this.form.reset({url:e})}cancelUpload(){this.abortController?.abort(),this.cancel.emit()}handleFocus(){this.store.setError("")}toggleForm(e){e?this.form.disable():this.form.enable()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["dot-dot-binary-field-url-mode"]],outputs:{tempFileUploaded:"tempFileUploaded",cancel:"cancel"},standalone:!0,features:[Ie([S5]),$t],decls:2,vars:3,consts:[["class","url-mode__form","data-testId","form",3,"formGroup","ngSubmit",4,"ngIf"],["data-testId","form",1,"url-mode__form",3,"formGroup","ngSubmit"],[1,"url-mode__input-container"],["for","url-input"],["id","url-input","type","text","autocomplete","off","formControlName","url","pInputText","","placeholder","https://www.dotcms.com/image.png","aria-label","URL input field","data-testId","url-input",3,"focus"],[1,"error-messsage__container"],["data-testId","error-message",3,"message","field",4,"ngIf","ngIfElse"],["serverError",""],[1,"url-mode__actions"],["styleClass","p-button-outlined","type","button","aria-label","Cancel button","data-testId","cancel-button",3,"label","click"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label","icon",4,"ngIf","ngIfElse"],["loadingButton",""],["data-testId","error-message",3,"message","field"],["data-testId","error-msg",1,"p-invalid"],["type","submit","aria-label","Import button","data-testId","import-button",3,"label","icon"],["type","button","aria-label","Loading button","data-testId","loading-button",3,"icon"]],template:function(e,i){1&e&&(C(0,sbe,17,14,"form",0),Ue(1,"async")),2&e&&g("ngIf",Ye(1,1,i.vm$))},dependencies:[ze,He,Vl,Ul,zs,qr,$n,js,Wn,Yr,Jn,Xn,rc,oc,Aa,Zo,M1],styles:["[_nghost-%COMP%] {display:block;width:32rem}[_nghost-%COMP%] .p-button{width:100%}[_nghost-%COMP%] .error-messsage__container{min-height:1.5rem}.url-mode__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;justify-content:center;align-items:flex-start}.url-mode__input-container[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;flex-direction:column}.url-mode__actions[_ngcontent-%COMP%]{width:100%;display:flex;gap:.5rem;align-items:center;justify-content:flex-end}"],changeDetection:0}),n})();var ia=(()=>(function(n){n.DROPZONE="DROPZONE",n.URL="URL",n.EDITOR="EDITOR"}(ia||(ia={})),ia))(),Fr=(()=>(function(n){n.INIT="INIT",n.UPLOADING="UPLOADING",n.PREVIEW="PREVIEW"}(Fr||(Fr={})),Fr))(),Nd=(()=>(function(n){n.DEFAULT="DEFAULT",n.SERVER_ERROR="SERVER_ERROR"}(Nd||(Nd={})),Nd))();let D5=(()=>{class n{constructor(){this.subject=new zi(null)}editedImage(){return this.subject.asObservable()}openImageEditor({inode:e,tempId:i,variable:r}){this.variable=r;const o=new CustomEvent(`binaryField-open-image-editor-${r}`,{detail:{inode:e,tempId:i,variable:r}});document.dispatchEvent(o),this.listenToEditedImage(),this.listenToCloseImageEditor()}listenToEditedImage(){document.addEventListener(`binaryField-tempfile-${this.variable}`,this.handleNewImage.bind(this))}listenToCloseImageEditor(){document.addEventListener(`binaryField-close-image-editor-${this.variable}`,this.removeListener.bind(this))}removeListener(){document.removeEventListener(`binaryField-tempfile-${this.variable}`,this.handleNewImage.bind(this)),document.removeEventListener(`binaryField-close-image-editor-${this.variable}`,this.removeListener.bind(this))}handleNewImage({detail:e}){this.subject.next(e.tempFile),this.removeListener()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const lbe={DEFAULT:{message:"dot.binary.field.drag.and.drop.message",severity:"info",icon:"pi pi-upload"},SERVER_ERROR:{message:"dot.binary.field.drag.and.drop.error.server.error.message",severity:"error",icon:"pi pi-exclamation-triangle"},FILE_TYPE_MISMATCH:{message:"dot.binary.field.drag.and.drop.error.file.not.supported.message",severity:"error",icon:"pi pi-exclamation-triangle"},MAX_FILE_SIZE_EXCEEDED:{message:"dot.binary.field.drag.and.drop.error.file.maxsize.exceeded.message",severity:"error",icon:"pi pi-exclamation-triangle"},MULTIPLE_FILES_DROPPED:{message:"dot.binary.field.drag.and.drop.error.multiple.files.dropped.message",severity:"error",icon:"pi pi-exclamation-triangle"}},Mv=(n,...t)=>({...lbe[n],args:t}),cbe={file:null,value:null,mode:ia.DROPZONE,status:Fr.INIT,dropZoneActive:!1,uiMessage:Mv(Nd.DEFAULT),isEnterprise:!1};let T5=(()=>{class n extends Xp{constructor(e,i,r){super(cbe),this.dotUploadService=e,this.dotLicenseService=i,this.http=r,this._maxFileSizeInMB=0,this.vm$=this.select(o=>({...o,isLoading:o.status===Fr.UPLOADING})),this.value$=this.select(o=>o.value),this.setDropZoneActive=this.updater((o,s)=>({...o,dropZoneActive:s})),this.setTempFile=this.updater((o,s)=>({...o,status:Fr.PREVIEW,value:s.id,file:this.getFileFromTempFile(s),tempFile:s})),this.setFile=this.updater((o,s)=>({...o,status:Fr.PREVIEW,file:s})),this.setValue=this.updater((o,s)=>({...o,value:s})),this.setUiMessage=this.updater((o,s)=>({...o,uiMessage:s})),this.setMode=this.updater((o,s)=>({...o,mode:s})),this.setStatus=this.updater((o,s)=>({...o,status:s})),this.setIsEnterprise=this.updater((o,s)=>({...o,isEnterprise:s})),this.setUploading=this.updater(o=>({...o,dropZoneActive:!1,uiMessage:Mv(Nd.DEFAULT),status:Fr.UPLOADING})),this.setError=this.updater((o,s)=>({...o,uiMessage:s,status:Fr.INIT,tempFile:null})),this.invalidFile=this.updater((o,s)=>({...o,dropZoneActive:!1,uiMessage:s,status:Fr.INIT})),this.removeFile=this.updater(o=>({...o,file:null,value:"",status:Fr.INIT})),this.handleUploadFile=this.effect(o=>o.pipe(Mt(()=>this.setUploading()),xn(s=>Yt(this.dotUploadService.uploadFile({file:s,maxSize:this._maxFileSizeInMB?`${this._maxFileSizeInMB}MB`:"",signal:null})).pipe(ND(a=>this.setTempFile(a),()=>this.setError(Mv(Nd.SERVER_ERROR))))))),this.setFileAndContent=this.effect(o=>o.pipe(Mt(()=>this.setUploading()),xn(s=>{const{url:a,mimeType:l}=s;return(this.shouldGetFileContent(l)?this.getFileContent(a):_e("")).pipe(Mt(u=>{this.setFile({...s,content:u})}))}))),this.dotLicenseService.isEnterprise().subscribe(o=>{this.setIsEnterprise(o)})}setMaxFileSize(e){this._maxFileSizeInMB=e/1048576}shouldGetFileContent(e){return e.includes("text")||e.includes("json")}getFileContent(e){return this.http.get(e,{responseType:"text"})}getFileFromTempFile({length:e,thumbnailUrl:i,referenceUrl:r,fileName:o,mimeType:s,content:a=""}){return{url:i||r,fileSize:e,mimeType:s,name:o,content:a}}}return n.\u0275fac=function(e){return new(e||n)(U(gp),U(BL),U(Er))},n.\u0275prov=K({token:n,factory:n.\u0275fac}),n})();const ube=["inputFile"],dbe=function(n){return{"binary-field__drop-zone--active":n}};function hbe(n,t){if(1&n){const e=q();ae(0),S(1,"div",9)(2,"dot-drop-zone",10),P("fileDragOver",function(){return I(e),x(y(2).setDropZoneActiveState(!0))})("fileDragLeave",function(){return I(e),x(y(2).setDropZoneActiveState(!1))})("fileDropped",function(r){return I(e),x(y(2).handleFileDrop(r))}),S(3,"dot-binary-field-ui-message",11)(4,"button",12),P("click",function(){return I(e),x(y(2).openFilePicker())}),H(5),Ue(6,"dm"),D()()(),S(7,"input",13,14),P("change",function(r){return I(e),x(y(2).handleFileSelection(r))}),D()(),S(9,"div",15)(10,"p-button",16),P("click",function(){I(e);const r=y(2);return x(r.openDialog(r.BinaryFieldMode.URL))}),Ue(11,"dm"),D(),S(12,"p-button",17),P("click",function(){I(e);const r=y(2);return x(r.openDialog(r.BinaryFieldMode.EDITOR))}),Ue(13,"dm"),D()(),le()}if(2&n){const e=y().ngIf,i=y();v(1),g("ngClass",te(14,dbe,e.dropZoneActive)),v(1),g("accept",i.accept)("maxFileSize",i.maxFileSize),v(1),g("uiMessage",e.uiMessage),v(2),xt(" ",Ye(6,8,"dot.binary.field.action.choose.file")," "),v(2),g("accept",i.accept.join(",")),v(3),g("label",Ye(11,10,"dot.binary.field.action.import.from.url")),v(2),g("label",Ye(13,12,"dot.binary.field.action.create.new.file"))}}function pbe(n,t){1&n&&F(0,"dot-spinner",18)}function fbe(n,t){if(1&n){const e=q();S(0,"dot-binary-field-preview",19),P("removeFile",function(){return I(e),x(y(2).removeFile())})("editFile",function(){return I(e),x(y(2).onEditFile())})("editImage",function(){return I(e),x(y(2).onEditImage())}),D()}if(2&n){const e=y().ngIf;g("file",e.file)("editableImage",e.isEnterprise)}}function mbe(n,t){if(1&n){const e=q();S(0,"dot-dot-binary-field-url-mode",20),P("tempFileUploaded",function(r){return I(e),x(y(2).setTempFile(r))})("cancel",function(){return I(e),x(y(2).closeDialog())}),D()}}function gbe(n,t){if(1&n){const e=q();S(0,"dot-dot-binary-field-editor",21),P("tempFileUploaded",function(r){return I(e),x(y(2).setTempFile(r))})("cancel",function(){return I(e),x(y(2).closeDialog())}),D()}if(2&n){const e=y().ngIf;g("fileName",null==e.file?null:e.file.name)("fileContent",null==e.file?null:e.file.content)}}const _be=function(n,t){return{"binary-field__container--uploading":n,"binary-field__container--empty":t}},ybe=function(){return{}};function vbe(n,t){if(1&n){const e=q();S(0,"div",1),C(1,hbe,14,16,"ng-container",2),C(2,pbe,1,0,"dot-spinner",3),C(3,fbe,1,2,"dot-binary-field-preview",4),S(4,"p-dialog",5),P("visibleChange",function(r){return I(e),x(y().dialogOpen=r)}),Ue(5,"dm"),ae(6,6),C(7,mbe,1,0,"dot-dot-binary-field-url-mode",7),C(8,gbe,1,2,"dot-dot-binary-field-editor",8),le(),D()()}if(2&n){const e=t.ngIf,i=y();g("ngClass",ot(20,_be,e.status===i.BinaryFieldStatus.UPLOADING,e.status===i.BinaryFieldStatus.INIT)),v(1),g("ngIf",e.status===i.BinaryFieldStatus.INIT),v(1),g("ngIf",e.status===i.BinaryFieldStatus.UPLOADING),v(1),g("ngIf",e.status===i.BinaryFieldStatus.PREVIEW),v(1),jt(e.mode===i.BinaryFieldMode.EDITOR?i.dialogFullScreenStyles:pn(23,ybe)),g("visible",i.dialogOpen)("keepInViewport",!1)("modal",!0)("header",Ye(5,18,i.dialogHeaderMap[e.mode]))("draggable",!1)("resizable",!1)("closeOnEscape",!1)("appendTo","body")("maskStyleClass","p-dialog-mask-transparent"),v(2),g("ngSwitch",e.mode),v(1),g("ngSwitchCase",i.BinaryFieldMode.URL),v(1),g("ngSwitchCase",i.BinaryFieldMode.EDITOR)}}let Ev=(()=>{class n{constructor(e,i,r,o,s){this.dotBinaryFieldStore=e,this.dotMessageService=i,this.dotBinaryFieldEditImageService=r,this.DotBinaryFieldValidatorService=o,this.cd=s,this.valueUpdated=new R,this.dialogFullScreenStyles={height:"90%",width:"90%"},this.dialogHeaderMap={[ia.URL]:"dot.binary.field.dialog.import.from.url.header",[ia.EDITOR]:"dot.binary.field.dialog.create.new.file.header"},this.BinaryFieldStatus=Fr,this.BinaryFieldMode=ia,this.vm$=this.dotBinaryFieldStore.vm$,this.tempId="",this.dialogOpen=!1,this.dotMessageService.init()}get variable(){return this.field.variable}get metaDataKey(){const{baseType:e}=this.contentlet;return"FILEASSET"===e?"metaData":this.variable+"MetaData"}get maxFileSize(){return this.DotBinaryFieldValidatorService.maxFileSize}get accept(){return this.DotBinaryFieldValidatorService.accept}ngOnInit(){this.dotBinaryFieldStore.value$.pipe(RD(1)).subscribe(e=>{this.tempId=e,this.valueUpdated.emit(e),this.onChange&&(this.onChange(e),this.onTouched())}),this.dotBinaryFieldEditImageService.editedImage().pipe(Wt(e=>!!e),Mt(()=>this.dotBinaryFieldStore.setStatus(Fr.UPLOADING)),function Pve(n,t=Sc){const i=function Lve(n){return n instanceof Date&&!isNaN(+n)}(n)?+n-t.now():Math.abs(n);return r=>r.lift(new Rve(i,t))}(500)).subscribe(e=>this.setTempFile(e)),this.dotBinaryFieldStore.setMaxFileSize(this.maxFileSize)}ngAfterViewInit(){this.setFieldVariables(),this.existFileMetadata()&&this.setPreviewFile(),this.cd.detectChanges()}writeValue(){}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}ngOnDestroy(){this.dotBinaryFieldEditImageService.removeListener()}openDialog(e){this.dialogOpen=!0,this.dotBinaryFieldStore.setMode(e)}closeDialog(){this.dialogOpen=!1,this.dotBinaryFieldStore.setMode(ia.DROPZONE)}openFilePicker(){this.inputFile.nativeElement.click()}handleFileSelection(e){this.dotBinaryFieldStore.handleUploadFile(e.target.files[0])}removeFile(){this.dotBinaryFieldStore.removeFile()}setTempFile(e){this.dotBinaryFieldStore.setTempFile(e),this.closeDialog()}onEditFile(){this.openDialog(ia.EDITOR)}onEditImage(){this.dotBinaryFieldEditImageService.openImageEditor({inode:this.contentlet?.inode,tempId:this.tempId,variable:this.field.variable})}setDropZoneActiveState(e){this.dotBinaryFieldStore.setDropZoneActive(e)}handleFileDrop({validity:e,file:i}){e.valid?this.dotBinaryFieldStore.handleUploadFile(i):this.handleFileDropError(e)}setPreviewFile(){const{titleImage:e,inode:i,[this.metaDataKey]:r,[this.variable]:o}=this.contentlet,{contentType:s}=r;this.dotBinaryFieldStore.setFileAndContent({inode:i,titleImage:e,mimeType:s,url:o,...r})}setFieldVariables(){const{accept:e,maxFileSize:i=0}=this.getFieldVariables();this.DotBinaryFieldValidatorService.setAccept(e?e.split(","):[]),this.DotBinaryFieldValidatorService.setMaxFileSize(Number(i))}getFieldVariables(){return this.field?.fieldVariables.reduce((e,{key:i,value:r})=>({...e,[i]:r}),{})}handleFileDropError({errorsType:e}){const i={[ka.FILE_TYPE_MISMATCH]:this.accept.join(", "),[ka.MAX_FILE_SIZE_EXCEEDED]:`${this.maxFileSize} bytes`},r=e[0],o=Mv(r,i[r]);this.dotBinaryFieldStore.invalidFile(o)}existFileMetadata(){return!!this.contentlet&&!!this.contentlet[this.metaDataKey]}}return n.\u0275fac=function(e){return new(e||n)(O(T5),O(tc),O(D5),O(vf),O(Tt))},n.\u0275cmp=Y({type:n,selectors:[["dot-edit-content-binary-field"]],viewQuery:function(e,i){if(1&e&&Me(ube,5),2&e){let r;J(r=X())&&(i.inputFile=r.first)}},inputs:{field:"field",contentlet:"contentlet"},outputs:{valueUpdated:"valueUpdated"},standalone:!0,features:[Ie([T5,BL,D5,vf,{multi:!0,provide:wn,useExisting:$e(()=>n)}]),$t],decls:2,vars:3,consts:[["class","binary-field__container",3,"ngClass",4,"ngIf"],[1,"binary-field__container",3,"ngClass"],[4,"ngIf"],["data-testId","loading",4,"ngIf"],["data-testId","preview",3,"file","editableImage","removeFile","editFile","editImage",4,"ngIf"],[3,"visible","keepInViewport","modal","header","draggable","resizable","closeOnEscape","appendTo","maskStyleClass","visibleChange"],[3,"ngSwitch"],["data-testId","url-mode",3,"tempFileUploaded","cancel",4,"ngSwitchCase"],["data-testId","editor-mode",3,"fileName","fileContent","tempFileUploaded","cancel",4,"ngSwitchCase"],[1,"binary-field__drop-zone",3,"ngClass"],["data-testId","dropzone",3,"accept","maxFileSize","fileDragOver","fileDragLeave","fileDropped"],[3,"uiMessage"],["type","button","data-testId","choose-file-btn",1,"binary-field__drop-zone-btn",3,"click"],["type","file","data-testId","binary-field__file-input",3,"accept","change"],["inputFile",""],[1,"binary-field__actions"],["data-testId","action-url-btn","styleClass","p-button-link p-button-secondary p-button-sm","icon","pi pi-link",3,"label","click"],["data-testId","action-editor-btn","styleClass","p-button-link p-button-secondary p-button-sm","icon","pi pi-code",3,"label","click"],["data-testId","loading"],["data-testId","preview",3,"file","editableImage","removeFile","editFile","editImage"],["data-testId","url-mode",3,"tempFileUploaded","cancel"],["data-testId","editor-mode",3,"fileName","fileContent","tempFileUploaded","cancel"]],template:function(e,i){1&e&&(C(0,vbe,9,24,"div",0),Ue(1,"async")),2&e&&g("ngIf",Ye(1,1,i.vm$))},dependencies:[ze,Ot,He,Fs,jl,Vl,Xn,rc,Gj,Wj,OJ,Eg,Zo,Xve,x_,yD,kg,Uve,oc,abe,Zve],styles:["[_nghost-%COMP%]{display:block;container-type:inline-size;container-name:binaryField}.binary-field__container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;width:100%;border-radius:.375rem;border:1.5px solid #d1d4db;padding:.5rem;height:12.5rem;min-width:12.5rem}.binary-field__container--uploading[_ngcontent-%COMP%]{border:1.5px dashed #d1d4db}.binary-field__actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;justify-content:center;align-items:flex-start}.binary-field__actions[_ngcontent-%COMP%] .p-button[_ngcontent-%COMP%]{display:inline-flex;-webkit-user-select:none;user-select:none;align-items:center;vertical-align:bottom;text-align:center}.binary-field__drop-zone[_ngcontent-%COMP%]{border:1.5px dashed #afb3c0;border-radius:.375rem;margin-right:.5rem;height:100%;flex:1;overflow:auto}.binary-field__drop-zone-btn[_ngcontent-%COMP%]{border:none;background:none;color:var(--color-palette-primary-500);text-decoration:underline;font-size:1rem;font-family:Assistant,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;padding:revert;cursor:pointer}.binary-field__drop-zone--active[_ngcontent-%COMP%]{border-radius:.375rem;border-color:var(--color-palette-secondary-500);background:#ffffff;box-shadow:0 0 4px #14151a0a,0 8px 16px #14151a14}input[type=file][_ngcontent-%COMP%]{display:none}@container binaryField (max-width: 306px){.binary-field__container--empty[_ngcontent-%COMP%]{height:auto;flex-direction:column;justify-content:center;align-items:flex-start}.binary-field__drop-zone[_ngcontent-%COMP%]{width:100%;margin:0;margin-bottom:.5rem}}"],changeDetection:0}),n})();const bbe=["container"],Cbe=["inputfield"],wbe=["contentWrapper"];function Sbe(n,t){if(1&n){const e=q();S(0,"i",8),P("click",function(){return I(e),x(y(2).clear())}),D()}}function Dbe(n,t){if(1&n){const e=q();S(0,"button",9),P("click",function(r){I(e),y();const o=Pe(1);return x(y().onButtonClick(r,o))}),D()}if(2&n){const e=y(2);g("icon",e.icon)("disabled",e.disabled),he("aria-label",e.iconAriaLabel)}}function Tbe(n,t){if(1&n){const e=q();S(0,"input",4,5),P("focus",function(r){return I(e),x(y().onInputFocus(r))})("keydown",function(r){return I(e),x(y().onInputKeydown(r))})("click",function(){return I(e),x(y().onInputClick())})("blur",function(r){return I(e),x(y().onInputBlur(r))})("input",function(r){return I(e),x(y().onUserInput(r))}),D(),C(2,Sbe,1,0,"i",6),C(3,Dbe,1,3,"button",7)}if(2&n){const e=y();Ke(e.inputStyleClass),g("value",e.inputFieldValue)("readonly",e.readonlyInput)("ngStyle",e.inputStyle)("placeholder",e.placeholder||"")("disabled",e.disabled)("ngClass","p-inputtext p-component"),he("id",e.inputId)("name",e.name)("required",e.required)("aria-required",e.required)("tabindex",e.tabindex)("inputmode",e.touchUI?"off":null)("aria-labelledby",e.ariaLabelledBy),v(2),g("ngIf",e.showClear&&!e.disabled&&null!=e.value),v(1),g("ngIf",e.showIcon)}}function Mbe(n,t){1&n&&ce(0)}function Ebe(n,t){if(1&n){const e=q();S(0,"button",30),P("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(4).onPrevButtonClick(r))}),F(1,"span",31),D()}}function Ibe(n,t){if(1&n){const e=q();S(0,"button",32),P("click",function(r){return I(e),x(y(4).switchToMonthView(r))})("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))}),H(1),D()}if(2&n){const e=y().$implicit,i=y(3);g("disabled",i.switchViewButtonDisabled()),v(1),xt(" ",i.getMonthName(e.month)," ")}}function xbe(n,t){if(1&n){const e=q();S(0,"button",33),P("click",function(r){return I(e),x(y(4).switchToYearView(r))})("keydown",function(r){return I(e),x(y(4).onContainerButtonKeydown(r))}),H(1),D()}if(2&n){const e=y().$implicit,i=y(3);g("disabled",i.switchViewButtonDisabled()),v(1),xt(" ",i.getYear(e)," ")}}function Obe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(5);v(1),ya("",e.yearPickerValues()[0]," - ",e.yearPickerValues()[e.yearPickerValues().length-1],"")}}function kbe(n,t){1&n&&ce(0)}const M5=function(n){return{$implicit:n}};function Abe(n,t){if(1&n&&(S(0,"span",34),C(1,Obe,2,2,"ng-container",13),C(2,kbe,1,0,"ng-container",35),D()),2&n){const e=y(4);v(1),g("ngIf",!e.decadeTemplate),v(1),g("ngTemplateOutlet",e.decadeTemplate)("ngTemplateOutletContext",te(3,M5,e.yearPickerValues))}}function Nbe(n,t){if(1&n&&(S(0,"th",41)(1,"span"),H(2),D()()),2&n){const e=y(5);v(2),ve(e.getTranslation("weekHeader"))}}function Lbe(n,t){if(1&n&&(S(0,"th",42)(1,"span"),H(2),D()()),2&n){const e=t.$implicit;v(2),ve(e)}}function Pbe(n,t){if(1&n&&(S(0,"td",45)(1,"span",46),H(2),D()()),2&n){const e=y().index,i=y(2).$implicit;v(2),xt(" ",i.weekNumbers[e]," ")}}function Rbe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2).$implicit;v(1),ve(e.day)}}function Fbe(n,t){1&n&&ce(0)}const E5=function(n,t){return{"p-highlight":n,"p-disabled":t}};function jbe(n,t){if(1&n){const e=q();ae(0),S(1,"span",48),P("click",function(r){I(e);const o=y().$implicit;return x(y(6).onDateSelect(r,o))})("keydown",function(r){I(e);const o=y().$implicit,s=y(3).index;return x(y(3).onDateCellKeydown(r,o,s))}),C(2,Rbe,2,1,"ng-container",13),C(3,Fbe,1,0,"ng-container",35),D(),le()}if(2&n){const e=y().$implicit,i=y(6);v(1),g("ngClass",ot(4,E5,i.isSelected(e),!e.selectable)),v(1),g("ngIf",!i.dateTemplate),v(1),g("ngTemplateOutlet",i.dateTemplate)("ngTemplateOutletContext",te(7,M5,e))}}const Vbe=function(n,t){return{"p-datepicker-other-month":n,"p-datepicker-today":t}};function zbe(n,t){if(1&n&&(S(0,"td",47),C(1,jbe,4,9,"ng-container",13),D()),2&n){const e=t.$implicit,i=y(6);g("ngClass",ot(2,Vbe,e.otherMonth,e.today)),v(1),g("ngIf",!e.otherMonth||i.showOtherMonths)}}function Bbe(n,t){if(1&n&&(S(0,"tr"),C(1,Pbe,3,1,"td",43),C(2,zbe,2,5,"td",44),D()),2&n){const e=t.$implicit,i=y(5);v(1),g("ngIf",i.showWeek),v(1),g("ngForOf",e)}}function Ube(n,t){if(1&n&&(S(0,"div",36)(1,"table",37)(2,"thead")(3,"tr"),C(4,Nbe,3,1,"th",38),C(5,Lbe,3,1,"th",39),D()(),S(6,"tbody"),C(7,Bbe,3,2,"tr",40),D()()()),2&n){const e=y().$implicit,i=y(3);v(4),g("ngIf",i.showWeek),v(1),g("ngForOf",i.weekDays),v(2),g("ngForOf",e.dates)}}function Hbe(n,t){if(1&n){const e=q();S(0,"div",20)(1,"div",21),C(2,Ebe,2,0,"button",22),S(3,"div",23),C(4,Ibe,2,2,"button",24),C(5,xbe,2,2,"button",25),C(6,Abe,3,5,"span",26),D(),S(7,"button",27),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).onNextButtonClick(r))}),F(8,"span",28),D()(),C(9,Ube,8,3,"div",29),D()}if(2&n){const e=t.index,i=y(3);v(2),g("ngIf",0===e),v(2),g("ngIf","date"===i.currentView),v(1),g("ngIf","year"!==i.currentView),v(1),g("ngIf","year"===i.currentView),v(1),As("display",1===i.numberOfMonths||e===i.numberOfMonths-1?"inline-flex":"none"),v(2),g("ngIf","date"===i.currentView)}}function $be(n,t){if(1&n){const e=q();S(0,"span",51),P("click",function(r){const s=I(e).index;return x(y(4).onMonthSelect(r,s))})("keydown",function(r){const s=I(e).index;return x(y(4).onMonthCellKeydown(r,s))}),H(1),D()}if(2&n){const e=t.$implicit,i=t.index,r=y(4);g("ngClass",ot(2,E5,r.isMonthSelected(i),r.isMonthDisabled(i))),v(1),xt(" ",e," ")}}function Wbe(n,t){if(1&n&&(S(0,"div",49),C(1,$be,2,5,"span",50),D()),2&n){const e=y(3);v(1),g("ngForOf",e.monthPickerValues())}}const Gbe=function(n){return{"p-highlight":n}};function qbe(n,t){if(1&n){const e=q();S(0,"span",54),P("click",function(r){const s=I(e).$implicit;return x(y(4).onYearSelect(r,s))})("keydown",function(r){const s=I(e).$implicit;return x(y(4).onYearCellKeydown(r,s))}),H(1),D()}if(2&n){const e=t.$implicit,i=y(4);g("ngClass",te(2,Gbe,i.isYearSelected(e))),v(1),xt(" ",e," ")}}function Kbe(n,t){if(1&n&&(S(0,"div",52),C(1,qbe,2,4,"span",53),D()),2&n){const e=y(3);v(1),g("ngForOf",e.yearPickerValues())}}function Ybe(n,t){if(1&n&&(ae(0),S(1,"div",16),C(2,Hbe,10,7,"div",17),D(),C(3,Wbe,2,1,"div",18),C(4,Kbe,2,1,"div",19),le()),2&n){const e=y(2);v(2),g("ngForOf",e.months),v(1),g("ngIf","month"===e.currentView),v(1),g("ngIf","year"===e.currentView)}}function Qbe(n,t){1&n&&(ae(0),H(1,"0"),le())}function Zbe(n,t){1&n&&(ae(0),H(1,"0"),le())}function Jbe(n,t){if(1&n&&(S(0,"div",60)(1,"span"),H(2),D()()),2&n){const e=y(3);v(2),ve(e.timeSeparator)}}function Xbe(n,t){1&n&&(ae(0),H(1,"0"),le())}function eCe(n,t){if(1&n){const e=q();S(0,"div",65)(1,"button",57),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(3).incrementSecond(r))})("keydown.space",function(r){return I(e),x(y(3).incrementSecond(r))})("mousedown",function(r){return I(e),x(y(3).onTimePickerElementMouseDown(r,2,1))})("mouseup",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(3).onTimePickerElementMouseLeave())}),F(2,"span",58),D(),S(3,"span"),C(4,Xbe,2,0,"ng-container",13),H(5),D(),S(6,"button",57),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(3).decrementSecond(r))})("keydown.space",function(r){return I(e),x(y(3).decrementSecond(r))})("mousedown",function(r){return I(e),x(y(3).onTimePickerElementMouseDown(r,2,-1))})("mouseup",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(3).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(3).onTimePickerElementMouseLeave())}),F(7,"span",59),D()()}if(2&n){const e=y(3);v(4),g("ngIf",e.currentSecond<10),v(1),ve(e.currentSecond)}}function tCe(n,t){if(1&n){const e=q();S(0,"div",66)(1,"button",67),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).toggleAMPM(r))})("keydown.enter",function(r){return I(e),x(y(3).toggleAMPM(r))}),F(2,"span",58),D(),S(3,"span"),H(4),D(),S(5,"button",67),P("keydown",function(r){return I(e),x(y(3).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(3).toggleAMPM(r))})("keydown.enter",function(r){return I(e),x(y(3).toggleAMPM(r))}),F(6,"span",59),D()()}if(2&n){const e=y(3);v(4),ve(e.pm?"PM":"AM")}}function nCe(n,t){if(1&n){const e=q();S(0,"div",55)(1,"div",56)(2,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).incrementHour(r))})("keydown.space",function(r){return I(e),x(y(2).incrementHour(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,0,1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(3,"span",58),D(),S(4,"span"),C(5,Qbe,2,0,"ng-container",13),H(6),D(),S(7,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).decrementHour(r))})("keydown.space",function(r){return I(e),x(y(2).decrementHour(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,0,-1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(8,"span",59),D()(),S(9,"div",60)(10,"span"),H(11),D()(),S(12,"div",61)(13,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).incrementMinute(r))})("keydown.space",function(r){return I(e),x(y(2).incrementMinute(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,1,1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(14,"span",58),D(),S(15,"span"),C(16,Zbe,2,0,"ng-container",13),H(17),D(),S(18,"button",57),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("keydown.enter",function(r){return I(e),x(y(2).decrementMinute(r))})("keydown.space",function(r){return I(e),x(y(2).decrementMinute(r))})("mousedown",function(r){return I(e),x(y(2).onTimePickerElementMouseDown(r,1,-1))})("mouseup",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.enter",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("keyup.space",function(r){return I(e),x(y(2).onTimePickerElementMouseUp(r))})("mouseleave",function(){return I(e),x(y(2).onTimePickerElementMouseLeave())}),F(19,"span",59),D()(),C(20,Jbe,3,1,"div",62),C(21,eCe,8,2,"div",63),C(22,tCe,7,1,"div",64),D()}if(2&n){const e=y(2);v(5),g("ngIf",e.currentHour<10),v(1),ve(e.currentHour),v(5),ve(e.timeSeparator),v(5),g("ngIf",e.currentMinute<10),v(1),ve(e.currentMinute),v(3),g("ngIf",e.showSeconds),v(1),g("ngIf",e.showSeconds),v(1),g("ngIf","12"==e.hourFormat)}}const I5=function(n){return[n]};function iCe(n,t){if(1&n){const e=q();S(0,"div",68)(1,"button",69),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(2).onTodayButtonClick(r))}),D(),S(2,"button",69),P("keydown",function(r){return I(e),x(y(2).onContainerButtonKeydown(r))})("click",function(r){return I(e),x(y(2).onClearButtonClick(r))}),D()()}if(2&n){const e=y(2);v(1),g("label",e.getTranslation("today"))("ngClass",te(4,I5,e.todayButtonStyleClass)),v(1),g("label",e.getTranslation("clear"))("ngClass",te(6,I5,e.clearButtonStyleClass))}}function rCe(n,t){1&n&&ce(0)}const oCe=function(n,t,e,i,r,o){return{"p-datepicker p-component":!0,"p-datepicker-inline":n,"p-disabled":t,"p-datepicker-timeonly":e,"p-datepicker-multiple-month":i,"p-datepicker-monthpicker":r,"p-datepicker-touch-ui":o}},x5=function(n,t){return{showTransitionParams:n,hideTransitionParams:t}},sCe=function(n){return{value:"visibleTouchUI",params:n}},aCe=function(n){return{value:"visible",params:n}};function lCe(n,t){if(1&n){const e=q();S(0,"div",10,11),P("@overlayAnimation.start",function(r){return I(e),x(y().onOverlayAnimationStart(r))})("@overlayAnimation.done",function(r){return I(e),x(y().onOverlayAnimationDone(r))})("click",function(r){return I(e),x(y().onOverlayClick(r))}),ln(2),C(3,Mbe,1,0,"ng-container",12),C(4,Ybe,5,3,"ng-container",13),C(5,nCe,23,8,"div",14),C(6,iCe,3,8,"div",15),ln(7,1),C(8,rCe,1,0,"ng-container",12),D()}if(2&n){const e=y();Ke(e.panelStyleClass),g("ngStyle",e.panelStyle)("ngClass",function nO(n,t,e,i,r,o,s,a,l){const c=Ri()+n,u=W(),d=Ur(u,c,e,i,r,o);return Al(u,c+4,s,a)||d?Ho(u,c+6,l?t.call(l,e,i,r,o,s,a):t(e,i,r,o,s,a)):yh(u,c+6)}(11,oCe,e.inline,e.disabled,e.timeOnly,e.numberOfMonths>1,"month"===e.view,e.touchUI))("@overlayAnimation",e.touchUI?te(21,sCe,ot(18,x5,e.showTransitionOptions,e.hideTransitionOptions)):te(26,aCe,ot(23,x5,e.showTransitionOptions,e.hideTransitionOptions)))("@.disabled",!0===e.inline),v(3),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",!e.timeOnly),v(1),g("ngIf",(e.showTime||e.timeOnly)&&"date"===e.currentView),v(1),g("ngIf",e.showButtonBar),v(2),g("ngTemplateOutlet",e.footerTemplate)}}const cCe=[[["p-header"]],[["p-footer"]]],uCe=function(n,t,e,i){return{"p-calendar":!0,"p-calendar-w-btn":n,"p-calendar-timeonly":t,"p-calendar-disabled":e,"p-focus":i}},dCe=["p-header","p-footer"],hCe={provide:wn,useExisting:$e(()=>O5),multi:!0};let O5=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.config=s,this.overlayService=a,this.multipleSeparator=",",this.rangeSeparator="-",this.inline=!1,this.showOtherMonths=!0,this.icon="pi pi-calendar",this.shortYearCutoff="+10",this.hourFormat="24",this.stepHour=1,this.stepMinute=1,this.stepSecond=1,this.showSeconds=!1,this.showOnFocus=!0,this.showWeek=!1,this.showClear=!1,this.dataType="date",this.selectionMode="single",this.todayButtonStyleClass="p-button-text",this.clearButtonStyleClass="p-button-text",this.autoZIndex=!0,this.baseZIndex=0,this.keepInvalid=!1,this.hideOnDateTimeSelect=!0,this.timeSeparator=":",this.focusTrap=!0,this.showTransitionOptions=".12s cubic-bezier(0, 0, 0.2, 1)",this.hideTransitionOptions=".1s linear",this.onFocus=new R,this.onBlur=new R,this.onClose=new R,this.onSelect=new R,this.onClear=new R,this.onInput=new R,this.onTodayClick=new R,this.onClearClick=new R,this.onMonthChange=new R,this.onYearChange=new R,this.onClickOutside=new R,this.onShow=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.inputFieldValue=null,this.navigationState=null,this._numberOfMonths=1,this._view="date",this.convertTo24Hour=function(l,c){return"12"==this.hourFormat?12===l?c?12:0:c?l+12:l:l}}set content(e){this.contentViewChild=e,this.contentViewChild&&(this.isMonthNavigate?(Promise.resolve(null).then(()=>this.updateFocus()),this.isMonthNavigate=!1):this.focus||this.initFocusableCell())}get view(){return this._view}set view(e){this._view=e,this.currentView=this._view}get defaultDate(){return this._defaultDate}set defaultDate(e){if(this._defaultDate=e,this.initialized){const i=e||new Date;this.currentMonth=i.getMonth(),this.currentYear=i.getFullYear(),this.initTime(i),this.createMonths(this.currentMonth,this.currentYear)}}get minDate(){return this._minDate}set minDate(e){this._minDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get maxDate(){return this._maxDate}set maxDate(e){this._maxDate=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDates(){return this._disabledDates}set disabledDates(e){this._disabledDates=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get disabledDays(){return this._disabledDays}set disabledDays(e){this._disabledDays=e,null!=this.currentMonth&&null!=this.currentMonth&&this.currentYear&&this.createMonths(this.currentMonth,this.currentYear)}get yearRange(){return this._yearRange}set yearRange(e){if(this._yearRange=e,e){const i=e.split(":"),r=parseInt(i[0]),o=parseInt(i[1]);this.populateYearOptions(r,o)}}get showTime(){return this._showTime}set showTime(e){this._showTime=e,void 0===this.currentHour&&this.initTime(this.value||new Date),this.updateInputfield()}get locale(){return this._locale}get responsiveOptions(){return this._responsiveOptions}set responsiveOptions(e){this._responsiveOptions=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get numberOfMonths(){return this._numberOfMonths}set numberOfMonths(e){this._numberOfMonths=e,this.destroyResponsiveStyleElement(),this.createResponsiveStyle()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek=e,this.createWeekDays()}set locale(e){console.warn("Locale property has no effect, use new i18n API instead.")}ngOnInit(){this.attributeSelector=T_();const e=this.defaultDate||new Date;this.createResponsiveStyle(),this.currentMonth=e.getMonth(),this.currentYear=e.getFullYear(),this.currentView=this.view,"date"===this.view&&(this.createWeekDays(),this.initTime(e),this.createMonths(this.currentMonth,this.currentYear),this.ticksTo1970=24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7),this.translationSubscription=this.config.translationObserver.subscribe(()=>{this.createWeekDays(),this.cd.markForCheck()}),this.initialized=!0}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"date":default:this.dateTemplate=e.template;break;case"decade":this.decadeTemplate=e.template;break;case"disabledDate":this.disabledDateTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"footer":this.footerTemplate=e.template}})}ngAfterViewInit(){this.inline&&(this.contentViewChild&&this.contentViewChild.nativeElement.setAttribute(this.attributeSelector,""),this.disabled||(this.initFocusableCell(),1===this.numberOfMonths&&(this.contentViewChild.nativeElement.style.width=A.getOuterWidth(this.containerViewChild.nativeElement)+"px")))}getTranslation(e){return this.config.getTranslation(e)}populateYearOptions(e,i){this.yearOptions=[];for(let r=e;r<=i;r++)this.yearOptions.push(r)}createWeekDays(){this.weekDays=[];let e=this.getFirstDateOfWeek(),i=this.getTranslation(Ln.DAY_NAMES_MIN);for(let r=0;r<7;r++)this.weekDays.push(i[e]),e=6==e?0:++e}monthPickerValues(){let e=[];for(let i=0;i<=11;i++)e.push(this.config.getTranslation("monthNamesShort")[i]);return e}yearPickerValues(){let e=[],i=this.currentYear-this.currentYear%10;for(let r=0;r<10;r++)e.push(i+r);return e}createMonths(e,i){this.months=this.months=[];for(let r=0;r11&&(o=o%11-1,s=i+1),this.months.push(this.createMonth(o,s))}}getWeekNumber(e){let i=new Date(e.getTime());i.setDate(i.getDate()+4-(i.getDay()||7));let r=i.getTime();return i.setMonth(0),i.setDate(1),Math.floor(Math.round((r-i.getTime())/864e5)/7)+1}createMonth(e,i){let r=[],o=this.getFirstDayOfMonthIndex(e,i),s=this.getDaysCountInMonth(e,i),a=this.getDaysCountInPrevMonth(e,i),l=1,c=new Date,u=[],d=Math.ceil((s+o)/7);for(let h=0;hs){let m=this.getNextMonthAndYear(e,i);p.push({day:l-s,month:m.month,year:m.year,otherMonth:!0,today:this.isToday(c,l-s,m.month,m.year),selectable:this.isSelectable(l-s,m.month,m.year,!0)})}else p.push({day:l,month:e,year:i,today:this.isToday(c,l,e,i),selectable:this.isSelectable(l,e,i,!1)});l++}this.showWeek&&u.push(this.getWeekNumber(new Date(p[0].year,p[0].month,p[0].day))),r.push(p)}return{month:e,year:i,dates:r,weekNumbers:u}}initTime(e){this.pm=e.getHours()>11,this.showTime?(this.currentMinute=e.getMinutes(),this.currentSecond=e.getSeconds(),this.setCurrentHourPM(e.getHours())):this.timeOnly&&(this.currentMinute=0,this.currentHour=0,this.currentSecond=0)}navBackward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.decrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.decrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(0===this.currentMonth?(this.currentMonth=11,this.decrementYear()):this.currentMonth--,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}navForward(e){this.disabled?e.preventDefault():(this.isMonthNavigate=!0,"month"===this.currentView?(this.incrementYear(),setTimeout(()=>{this.updateFocus()},1)):"year"===this.currentView?(this.incrementDecade(),setTimeout(()=>{this.updateFocus()},1)):(11===this.currentMonth?(this.currentMonth=0,this.incrementYear()):this.currentMonth++,this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)))}decrementYear(){if(this.currentYear--,this.yearNavigator&&this.currentYearthis.yearOptions[this.yearOptions.length-1]){let e=this.yearOptions[this.yearOptions.length-1]-this.yearOptions[0];this.populateYearOptions(this.yearOptions[0]+e,this.yearOptions[this.yearOptions.length-1]+e)}}switchToMonthView(e){this.setCurrentView("month"),e.preventDefault()}switchToYearView(e){this.setCurrentView("year"),e.preventDefault()}onDateSelect(e,i){!this.disabled&&i.selectable?(this.isMultipleSelection()&&this.isSelected(i)?(this.value=this.value.filter((r,o)=>!this.isDateEquals(r,i)),0===this.value.length&&(this.value=null),this.updateModel(this.value)):this.shouldSelectDate(i)&&this.selectDate(i),this.isSingleSelection()&&this.hideOnDateTimeSelect&&setTimeout(()=>{e.preventDefault(),this.hideOverlay(),this.mask&&this.disableModality(),this.cd.markForCheck()},150),this.updateInputfield(),e.preventDefault()):e.preventDefault()}shouldSelectDate(e){return!this.isMultipleSelection()||null==this.maxDateCount||this.maxDateCount>(this.value?this.value.length:0)}onMonthSelect(e,i){"month"===this.view?this.onDateSelect(e,{year:this.currentYear,month:i,day:1,selectable:!0}):(this.currentMonth=i,this.createMonths(this.currentMonth,this.currentYear),this.setCurrentView("date"),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}))}onYearSelect(e,i){"year"===this.view?this.onDateSelect(e,{year:i,month:0,day:1,selectable:!0}):(this.currentYear=i,this.setCurrentView("month"),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}))}updateInputfield(){let e="";if(this.value)if(this.isSingleSelection())e=this.formatDateTime(this.value);else if(this.isMultipleSelection())for(let i=0;i11,this.currentHour=e>=12?12==e?12:e-12:0==e?12:e):this.currentHour=e}setCurrentView(e){this.currentView=e,this.cd.detectChanges(),this.alignOverlay()}selectDate(e){let i=new Date(e.year,e.month,e.day);if(this.showTime&&(i.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),i.setMinutes(this.currentMinute),i.setSeconds(this.currentSecond)),this.minDate&&this.minDate>i&&(i=this.minDate,this.setCurrentHourPM(i.getHours()),this.currentMinute=i.getMinutes(),this.currentSecond=i.getSeconds()),this.maxDate&&this.maxDate=r.getTime()?o=i:(r=i,o=null),this.updateModel([r,o])}else this.updateModel([i,null]);this.onSelect.emit(i)}updateModel(e){if(this.value=e,"date"==this.dataType)this.onModelChange(this.value);else if("string"==this.dataType)if(this.isSingleSelection())this.onModelChange(this.formatDateTime(this.value));else{let i=null;this.value&&(i=this.value.map(r=>this.formatDateTime(r))),this.onModelChange(i)}}getFirstDayOfMonthIndex(e,i){let r=new Date;r.setDate(1),r.setMonth(e),r.setFullYear(i);let o=r.getDay()+this.getSundayIndex();return o>=7?o-7:o}getDaysCountInMonth(e,i){return 32-this.daylightSavingAdjust(new Date(i,e,32)).getDate()}getDaysCountInPrevMonth(e,i){let r=this.getPreviousMonthAndYear(e,i);return this.getDaysCountInMonth(r.month,r.year)}getPreviousMonthAndYear(e,i){let r,o;return 0===e?(r=11,o=i-1):(r=e-1,o=i),{month:r,year:o}}getNextMonthAndYear(e,i){let r,o;return 11===e?(r=0,o=i+1):(r=e+1,o=i),{month:r,year:o}}getSundayIndex(){let e=this.getFirstDateOfWeek();return e>0?7-e:0}isSelected(e){if(!this.value)return!1;if(this.isSingleSelection())return this.isDateEquals(this.value,e);if(this.isMultipleSelection()){let i=!1;for(let r of this.value)if(i=this.isDateEquals(r,e),i)break;return i}return this.isRangeSelection()?this.value[1]?this.isDateEquals(this.value[0],e)||this.isDateEquals(this.value[1],e)||this.isDateBetween(this.value[0],this.value[1],e):this.isDateEquals(this.value[0],e):void 0}isComparable(){return null!=this.value&&"string"!=typeof this.value}isMonthSelected(e){if(this.isComparable()&&!this.isMultipleSelection()){const[i,r]=this.isRangeSelection()?this.value:[this.value,this.value],o=new Date(this.currentYear,e,1);return o>=i&&o<=(r??i)}return!1}isMonthDisabled(e){for(let i=1;i=s.getTime()}return!1}isSingleSelection(){return"single"===this.selectionMode}isRangeSelection(){return"range"===this.selectionMode}isMultipleSelection(){return"multiple"===this.selectionMode}isToday(e,i,r,o){return e.getDate()===i&&e.getMonth()===r&&e.getFullYear()===o}isSelectable(e,i,r,o){let s=!0,a=!0,l=!0,c=!0;return!(o&&!this.selectOtherMonths)&&(this.minDate&&(this.minDate.getFullYear()>r||this.minDate.getFullYear()===r&&(this.minDate.getMonth()>i||this.minDate.getMonth()===i&&this.minDate.getDate()>e))&&(s=!1),this.maxDate&&(this.maxDate.getFullYear()1||this.disabled}onPrevButtonClick(e){this.navigationState={backward:!0,button:!0},this.navBackward(e)}onNextButtonClick(e){this.navigationState={backward:!1,button:!0},this.navForward(e)}onContainerButtonKeydown(e){switch(e.which){case 9:this.inline||this.trapFocus(e);break;case 27:this.overlayVisible=!1,e.preventDefault()}}onInputKeydown(e){this.isKeydown=!0,40===e.keyCode&&this.contentViewChild?this.trapFocus(e):27===e.keyCode||13===e.keyCode?this.overlayVisible&&(this.overlayVisible=!1,e.preventDefault()):9===e.keyCode&&this.contentViewChild&&(A.getFocusableElements(this.contentViewChild.nativeElement).forEach(i=>i.tabIndex="-1"),this.overlayVisible&&(this.overlayVisible=!1))}onDateCellKeydown(e,i,r){const o=e.currentTarget,s=o.parentElement;switch(e.which){case 40:{o.tabIndex="-1";let a=A.index(s),l=s.parentElement.nextElementSibling;l?A.hasClass(l.children[a].children[0],"p-disabled")?(this.navigationState={backward:!1},this.navForward(e)):(l.children[a].children[0].tabIndex="0",l.children[a].children[0].focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 38:{o.tabIndex="-1";let a=A.index(s),l=s.parentElement.previousElementSibling;if(l){let c=l.children[a].children[0];A.hasClass(c,"p-disabled")?(this.navigationState={backward:!0},this.navBackward(e)):(c.tabIndex="0",c.focus())}else this.navigationState={backward:!0},this.navBackward(e);e.preventDefault();break}case 37:{o.tabIndex="-1";let a=s.previousElementSibling;if(a){let l=a.children[0];A.hasClass(l,"p-disabled")||A.hasClass(l.parentElement,"p-datepicker-weeknumber")?this.navigateToMonth(!0,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!0,r);e.preventDefault();break}case 39:{o.tabIndex="-1";let a=s.nextElementSibling;if(a){let l=a.children[0];A.hasClass(l,"p-disabled")?this.navigateToMonth(!1,r):(l.tabIndex="0",l.focus())}else this.navigateToMonth(!1,r);e.preventDefault();break}case 13:case 32:this.onDateSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onMonthCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=A.index(r);let a=o[40===e.which?s+3:s-3];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:this.onMonthSelect(e,i),e.preventDefault();break;case 13:case 32:case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.inline||this.trapFocus(e)}}onYearCellKeydown(e,i){const r=e.currentTarget;switch(e.which){case 38:case 40:{r.tabIndex="-1";var o=r.parentElement.children,s=A.index(r);let a=o[40===e.which?s+2:s-2];a&&(a.tabIndex="0",a.focus()),e.preventDefault();break}case 37:{r.tabIndex="-1";let a=r.previousElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!0},this.navBackward(e)),e.preventDefault();break}case 39:{r.tabIndex="-1";let a=r.nextElementSibling;a?(a.tabIndex="0",a.focus()):(this.navigationState={backward:!1},this.navForward(e)),e.preventDefault();break}case 13:case 32:this.onYearSelect(e,i),e.preventDefault();break;case 27:this.overlayVisible=!1,e.preventDefault();break;case 9:this.trapFocus(e)}}navigateToMonth(e,i){if(e)if(1===this.numberOfMonths||0===i)this.navigationState={backward:!0},this.navBackward(event);else{let o=A.find(this.contentViewChild.nativeElement.children[i-1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),s=o[o.length-1];s.tabIndex="0",s.focus()}else if(1===this.numberOfMonths||i===this.numberOfMonths-1)this.navigationState={backward:!1},this.navForward(event);else{let o=A.findSingle(this.contentViewChild.nativeElement.children[i+1],".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");o.tabIndex="0",o.focus()}}updateFocus(){let e;if(this.navigationState){if(this.navigationState.button)this.initFocusableCell(),this.navigationState.backward?A.findSingle(this.contentViewChild.nativeElement,".p-datepicker-prev").focus():A.findSingle(this.contentViewChild.nativeElement,".p-datepicker-next").focus();else{if(this.navigationState.backward){let i;i=A.find(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)"),i&&i.length>0&&(e=i[i.length-1])}else e=A.findSingle(this.contentViewChild.nativeElement,"month"===this.currentView?".p-monthpicker .p-monthpicker-month:not(.p-disabled)":"year"===this.currentView?".p-yearpicker .p-yearpicker-year:not(.p-disabled)":".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)");e&&(e.tabIndex="0",e.focus())}this.navigationState=null}else this.initFocusableCell()}initFocusableCell(){const e=this.contentViewChild?.nativeElement;let i;if("month"===this.currentView){let r=A.find(e,".p-monthpicker .p-monthpicker-month:not(.p-disabled)"),o=A.findSingle(e,".p-monthpicker .p-monthpicker-month.p-highlight");r.forEach(s=>s.tabIndex=-1),i=o||r[0],0===r.length&&A.find(e,'.p-monthpicker .p-monthpicker-month.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if("year"===this.currentView){let r=A.find(e,".p-yearpicker .p-yearpicker-year:not(.p-disabled)"),o=A.findSingle(e,".p-yearpicker .p-yearpicker-year.p-highlight");r.forEach(s=>s.tabIndex=-1),i=o||r[0],0===r.length&&A.find(e,'.p-yearpicker .p-yearpicker-year.p-disabled[tabindex = "0"]').forEach(a=>a.tabIndex=-1)}else if(i=A.findSingle(e,"span.p-highlight"),!i){let r=A.findSingle(e,"td.p-datepicker-today span:not(.p-disabled):not(.p-ink)");i=r||A.findSingle(e,".p-datepicker-calendar td span:not(.p-disabled):not(.p-ink)")}i&&(i.tabIndex="0",!this.preventFocus&&(!this.navigationState||!this.navigationState.button)&&setTimeout(()=>{this.disabled||i.focus()},1),this.preventFocus=!1)}trapFocus(e){let i=A.getFocusableElements(this.contentViewChild.nativeElement);if(i&&i.length>0)if(i[0].ownerDocument.activeElement){let r=i.indexOf(i[0].ownerDocument.activeElement);if(e.shiftKey)if(-1==r||0===r)if(this.focusTrap)i[i.length-1].focus();else{if(-1===r)return this.hideOverlay();if(0===r)return}else i[r-1].focus();else if(-1==r||r===i.length-1){if(!this.focusTrap&&-1!=r)return this.hideOverlay();i[0].focus()}else i[r+1].focus()}else i[0].focus();e.preventDefault()}onMonthDropdownChange(e){this.currentMonth=parseInt(e),this.onMonthChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}onYearDropdownChange(e){this.currentYear=parseInt(e),this.onYearChange.emit({month:this.currentMonth+1,year:this.currentYear}),this.createMonths(this.currentMonth,this.currentYear)}validateTime(e,i,r,o){let s=this.value;const a=this.convertTo24Hour(e,o);this.isRangeSelection()&&(s=this.value[1]||this.value[0]),this.isMultipleSelection()&&(s=this.value[this.value.length-1]);const l=s?s.toDateString():null;return!(this.minDate&&l&&this.minDate.toDateString()===l&&(this.minDate.getHours()>a||this.minDate.getHours()===a&&(this.minDate.getMinutes()>i||this.minDate.getMinutes()===i&&this.minDate.getSeconds()>r))||this.maxDate&&l&&this.maxDate.toDateString()===l&&(this.maxDate.getHours()=24?r-24:r:"12"==this.hourFormat&&(this.currentHour<12&&r>11&&(o=!this.pm),r=r>=13?r-12:r),this.validateTime(r,this.currentMinute,this.currentSecond,o)&&(this.currentHour=r,this.pm=o),e.preventDefault()}onTimePickerElementMouseDown(e,i,r){this.disabled||(this.repeat(e,null,i,r),e.preventDefault())}onTimePickerElementMouseUp(e){this.disabled||(this.clearTimePickerTimer(),this.updateTime())}onTimePickerElementMouseLeave(){!this.disabled&&this.timePickerTimer&&(this.clearTimePickerTimer(),this.updateTime())}repeat(e,i,r,o){let s=i||500;switch(this.clearTimePickerTimer(),this.timePickerTimer=setTimeout(()=>{this.repeat(e,100,r,o),this.cd.markForCheck()},s),r){case 0:1===o?this.incrementHour(e):this.decrementHour(e);break;case 1:1===o?this.incrementMinute(e):this.decrementMinute(e);break;case 2:1===o?this.incrementSecond(e):this.decrementSecond(e)}this.updateInputfield()}clearTimePickerTimer(){this.timePickerTimer&&(clearTimeout(this.timePickerTimer),this.timePickerTimer=null)}decrementHour(e){let i=this.currentHour-this.stepHour,r=this.pm;"24"==this.hourFormat?i=i<0?24+i:i:"12"==this.hourFormat&&(12===this.currentHour&&(r=!this.pm),i=i<=0?12+i:i),this.validateTime(i,this.currentMinute,this.currentSecond,r)&&(this.currentHour=i,this.pm=r),e.preventDefault()}incrementMinute(e){let i=this.currentMinute+this.stepMinute;i=i>59?i-60:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}decrementMinute(e){let i=this.currentMinute-this.stepMinute;i=i<0?60+i:i,this.validateTime(this.currentHour,i,this.currentSecond,this.pm)&&(this.currentMinute=i),e.preventDefault()}incrementSecond(e){let i=this.currentSecond+this.stepSecond;i=i>59?i-60:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}decrementSecond(e){let i=this.currentSecond-this.stepSecond;i=i<0?60+i:i,this.validateTime(this.currentHour,this.currentMinute,i,this.pm)&&(this.currentSecond=i),e.preventDefault()}updateTime(){let e=this.value;this.isRangeSelection()&&(e=this.value[1]||this.value[0]),this.isMultipleSelection()&&(e=this.value[this.value.length-1]),e=e?new Date(e.getTime()):new Date,e.setHours("12"==this.hourFormat?12===this.currentHour?this.pm?12:0:this.pm?this.currentHour+12:this.currentHour:this.currentHour),e.setMinutes(this.currentMinute),e.setSeconds(this.currentSecond),this.isRangeSelection()&&(e=this.value[1]?[this.value[0],e]:[e,null]),this.isMultipleSelection()&&(e=[...this.value.slice(0,-1),e]),this.updateModel(e),this.onSelect.emit(e),this.updateInputfield()}toggleAMPM(e){const i=!this.pm;this.validateTime(this.currentHour,this.currentMinute,this.currentSecond,i)&&(this.pm=i,this.updateTime()),e.preventDefault()}onUserInput(e){if(!this.isKeydown)return;this.isKeydown=!1;let i=e.target.value;try{let r=this.parseValueFromString(i);this.isValidSelection(r)&&(this.updateModel(r),this.updateUI())}catch{this.updateModel(this.keepInvalid?i:null)}this.filled=null!=i&&i.length,this.onInput.emit(e)}isValidSelection(e){let i=!0;return this.isSingleSelection()?this.isSelectable(e.getDate(),e.getMonth(),e.getFullYear(),!1)||(i=!1):e.every(r=>this.isSelectable(r.getDate(),r.getMonth(),r.getFullYear(),!1))&&this.isRangeSelection()&&(i=e.length>1&&e[1]>e[0]),i}parseValueFromString(e){if(!e||0===e.trim().length)return null;let i;if(this.isSingleSelection())i=this.parseDateTime(e);else if(this.isMultipleSelection()){let r=e.split(this.multipleSeparator);i=[];for(let o of r)i.push(this.parseDateTime(o.trim()))}else if(this.isRangeSelection()){let r=e.split(" "+this.rangeSeparator+" ");i=[];for(let o=0;o{this.disableModality()}),document.body.appendChild(this.mask),A.addClass(document.body,"p-overflow-hidden"))}disableModality(){this.mask&&(A.addClass(this.mask,"p-component-overlay-leave"),this.animationEndListener=this.destroyMask.bind(this),this.mask.addEventListener("animationend",this.animationEndListener))}destroyMask(){if(!this.mask)return;document.body.removeChild(this.mask);let i,e=document.body.children;for(let r=0;r{const d=r+1{let p=""+d;if(o(u))for(;p.lengtho(u)?p[d]:h[d];let l="",c=!1;if(e)for(r=0;r11&&12!=r&&(r-=12),i+="12"==this.hourFormat&&0===r?12:r<10?"0"+r:r,i+=":",i+=o<10?"0"+o:o,this.showSeconds&&(i+=":",i+=s<10?"0"+s:s),"12"==this.hourFormat&&(i+=e.getHours()>11?" PM":" AM"),i}parseTime(e){let i=e.split(":");if(i.length!==(this.showSeconds?3:2))throw"Invalid time";let o=parseInt(i[0]),s=parseInt(i[1]),a=this.showSeconds?parseInt(i[2]):null;if(isNaN(o)||isNaN(s)||o>23||s>59||"12"==this.hourFormat&&o>12||this.showSeconds&&(isNaN(a)||a>59))throw"Invalid time";return"12"==this.hourFormat&&(12!==o&&this.pm?o+=12:!this.pm&&12===o&&(o-=12)),{hour:o,minute:s,second:a}}parseDate(e,i){if(null==i||null==e)throw"Invalid arguments";if(""===(e="object"==typeof e?e.toString():e+""))return null;let r,o,s,f,a=0,l="string"!=typeof this.shortYearCutoff?this.shortYearCutoff:(new Date).getFullYear()%100+parseInt(this.shortYearCutoff,10),c=-1,u=-1,d=-1,h=-1,p=!1,m=M=>{let w=r+1{let w=m(M),N="@"===M?14:"!"===M?20:"y"===M&&w?4:"o"===M?3:2,$=new RegExp("^\\d{"+("y"===M?N:1)+","+N+"}"),V=e.substring(a).match($);if(!V)throw"Missing number at position "+a;return a+=V[0].length,parseInt(V[0],10)},b=(M,w,N)=>{let k=-1,$=m(M)?N:w,V=[];for(let pe=0;pe<$.length;pe++)V.push([pe,$[pe]]);V.sort((pe,De)=>-(pe[1].length-De[1].length));for(let pe=0;pe{if(e.charAt(a)!==i.charAt(r))throw"Unexpected literal at position "+a;a++};for("month"===this.view&&(d=1),r=0;r-1)for(u=1,d=h;o=this.getDaysCountInMonth(c,u-1),!(d<=o);)u++,d-=o;if("year"===this.view&&(u=-1===u?1:u,d=-1===d?1:d),f=this.daylightSavingAdjust(new Date(c,u-1,d)),f.getFullYear()!==c||f.getMonth()+1!==u||f.getDate()!==d)throw"Invalid date";return f}daylightSavingAdjust(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null}updateFilledState(){this.filled=this.inputFieldValue&&""!=this.inputFieldValue}onTodayButtonClick(e){let i=new Date,r={day:i.getDate(),month:i.getMonth(),year:i.getFullYear(),otherMonth:i.getMonth()!==this.currentMonth||i.getFullYear()!==this.currentYear,today:!0,selectable:!0};this.onDateSelect(e,r),this.onTodayClick.emit(e)}onClearButtonClick(e){this.updateModel(null),this.updateInputfield(),this.hideOverlay(),this.onClearClick.emit(e)}createResponsiveStyle(){if(this.numberOfMonths>1&&this.responsiveOptions){this.responsiveStyleElement||(this.responsiveStyleElement=document.createElement("style"),this.responsiveStyleElement.type="text/css",document.body.appendChild(this.responsiveStyleElement));let e="";if(this.responsiveOptions){let i=[...this.responsiveOptions].filter(r=>!(!r.breakpoint||!r.numMonths)).sort((r,o)=>-1*r.breakpoint.localeCompare(o.breakpoint,void 0,{numeric:!0}));for(let r=0;r{this.documentClickListener=this.renderer.listen(this.el?this.el.nativeElement.ownerDocument:"document","mousedown",i=>{this.isOutsideClicked(i)&&this.overlayVisible&&this.zone.run(()=>{this.hideOverlay(),this.onClickOutside.emit(i),this.cd.markForCheck()})})})}unbindDocumentClickListener(){this.documentClickListener&&(this.documentClickListener(),this.documentClickListener=null)}bindDocumentResizeListener(){!this.documentResizeListener&&!this.touchUI&&(this.documentResizeListener=this.onWindowResize.bind(this),window.addEventListener("resize",this.documentResizeListener))}unbindDocumentResizeListener(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}bindScrollListener(){this.scrollHandler||(this.scrollHandler=new I_(this.containerViewChild.nativeElement,()=>{this.overlayVisible&&this.hideOverlay()})),this.scrollHandler.bindScrollListener()}unbindScrollListener(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()}isOutsideClicked(e){return!(this.el.nativeElement.isSameNode(e.target)||this.isNavIconClicked(e)||this.el.nativeElement.contains(e.target)||this.overlay&&this.overlay.contains(e.target))}isNavIconClicked(e){return A.hasClass(e.target,"p-datepicker-prev")||A.hasClass(e.target,"p-datepicker-prev-icon")||A.hasClass(e.target,"p-datepicker-next")||A.hasClass(e.target,"p-datepicker-next-icon")}onWindowResize(){this.overlayVisible&&!A.isTouchDevice()&&this.hideOverlay()}onOverlayHide(){this.currentView=this.view,this.mask&&this.destroyMask(),this.unbindDocumentClickListener(),this.unbindDocumentResizeListener(),this.unbindScrollListener(),this.overlay=null}ngOnDestroy(){this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.translationSubscription&&this.translationSubscription.unsubscribe(),this.overlay&&this.autoZIndex&&$i.clear(this.overlay),this.destroyResponsiveStyleElement(),this.clearTimePickerTimer(),this.restoreOverlayAppend(),this.onOverlayHide()}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(Xe),O(Eo),O(_p))},n.\u0275cmp=Y({type:n,selectors:[["p-calendar"]],contentQueries:function(e,i,r){if(1&e&&Vt(r,mn,4),2&e){let o;J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(bbe,5),Me(Cbe,5),Me(wbe,5)),2&e){let r;J(r=X())&&(i.containerViewChild=r.first),J(r=X())&&(i.inputfieldViewChild=r.first),J(r=X())&&(i.content=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,i){2&e&&Si("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus)("p-calendar-clearable",i.showClear&&!i.disabled)},inputs:{style:"style",styleClass:"styleClass",inputStyle:"inputStyle",inputId:"inputId",name:"name",inputStyleClass:"inputStyleClass",placeholder:"placeholder",ariaLabelledBy:"ariaLabelledBy",iconAriaLabel:"iconAriaLabel",disabled:"disabled",dateFormat:"dateFormat",multipleSeparator:"multipleSeparator",rangeSeparator:"rangeSeparator",inline:"inline",showOtherMonths:"showOtherMonths",selectOtherMonths:"selectOtherMonths",showIcon:"showIcon",icon:"icon",appendTo:"appendTo",readonlyInput:"readonlyInput",shortYearCutoff:"shortYearCutoff",monthNavigator:"monthNavigator",yearNavigator:"yearNavigator",hourFormat:"hourFormat",timeOnly:"timeOnly",stepHour:"stepHour",stepMinute:"stepMinute",stepSecond:"stepSecond",showSeconds:"showSeconds",required:"required",showOnFocus:"showOnFocus",showWeek:"showWeek",showClear:"showClear",dataType:"dataType",selectionMode:"selectionMode",maxDateCount:"maxDateCount",showButtonBar:"showButtonBar",todayButtonStyleClass:"todayButtonStyleClass",clearButtonStyleClass:"clearButtonStyleClass",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",panelStyleClass:"panelStyleClass",panelStyle:"panelStyle",keepInvalid:"keepInvalid",hideOnDateTimeSelect:"hideOnDateTimeSelect",touchUI:"touchUI",timeSeparator:"timeSeparator",focusTrap:"focusTrap",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",tabindex:"tabindex",view:"view",defaultDate:"defaultDate",minDate:"minDate",maxDate:"maxDate",disabledDates:"disabledDates",disabledDays:"disabledDays",yearRange:"yearRange",showTime:"showTime",responsiveOptions:"responsiveOptions",numberOfMonths:"numberOfMonths",firstDayOfWeek:"firstDayOfWeek",locale:"locale"},outputs:{onFocus:"onFocus",onBlur:"onBlur",onClose:"onClose",onSelect:"onSelect",onClear:"onClear",onInput:"onInput",onTodayClick:"onTodayClick",onClearClick:"onClearClick",onMonthChange:"onMonthChange",onYearChange:"onYearChange",onClickOutside:"onClickOutside",onShow:"onShow"},features:[Ie([hCe])],ngContentSelectors:dCe,decls:4,vars:11,consts:[[3,"ngClass","ngStyle"],["container",""],[3,"ngIf"],[3,"class","ngStyle","ngClass","click",4,"ngIf"],["type","text","autocomplete","off",3,"value","readonly","ngStyle","placeholder","disabled","ngClass","focus","keydown","click","blur","input"],["inputfield",""],["class","p-calendar-clear-icon pi pi-times",3,"click",4,"ngIf"],["type","button","pButton","","pRipple","","class","p-datepicker-trigger","tabindex","0",3,"icon","disabled","click",4,"ngIf"],[1,"p-calendar-clear-icon","pi","pi-times",3,"click"],["type","button","pButton","","pRipple","","tabindex","0",1,"p-datepicker-trigger",3,"icon","disabled","click"],[3,"ngStyle","ngClass","click"],["contentWrapper",""],[4,"ngTemplateOutlet"],[4,"ngIf"],["class","p-timepicker",4,"ngIf"],["class","p-datepicker-buttonbar",4,"ngIf"],[1,"p-datepicker-group-container"],["class","p-datepicker-group",4,"ngFor","ngForOf"],["class","p-monthpicker",4,"ngIf"],["class","p-yearpicker",4,"ngIf"],[1,"p-datepicker-group"],[1,"p-datepicker-header"],["class","p-datepicker-prev p-link","type","button","pRipple","",3,"keydown","click",4,"ngIf"],[1,"p-datepicker-title"],["type","button","class","p-datepicker-month p-link",3,"disabled","click","keydown",4,"ngIf"],["type","button","class","p-datepicker-year p-link",3,"disabled","click","keydown",4,"ngIf"],["class","p-datepicker-decade",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-next","p-link",3,"keydown","click"],[1,"p-datepicker-next-icon","pi","pi-chevron-right"],["class","p-datepicker-calendar-container",4,"ngIf"],["type","button","pRipple","",1,"p-datepicker-prev","p-link",3,"keydown","click"],[1,"p-datepicker-prev-icon","pi","pi-chevron-left"],["type","button",1,"p-datepicker-month","p-link",3,"disabled","click","keydown"],["type","button",1,"p-datepicker-year","p-link",3,"disabled","click","keydown"],[1,"p-datepicker-decade"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"p-datepicker-calendar-container"],[1,"p-datepicker-calendar"],["class","p-datepicker-weekheader p-disabled",4,"ngIf"],["scope","col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"p-datepicker-weekheader","p-disabled"],["scope","col"],["class","p-datepicker-weeknumber",4,"ngIf"],[3,"ngClass",4,"ngFor","ngForOf"],[1,"p-datepicker-weeknumber"],[1,"p-disabled"],[3,"ngClass"],["draggable","false","pRipple","",3,"ngClass","click","keydown"],[1,"p-monthpicker"],["class","p-monthpicker-month","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-monthpicker-month",3,"ngClass","click","keydown"],[1,"p-yearpicker"],["class","p-yearpicker-year","pRipple","",3,"ngClass","click","keydown",4,"ngFor","ngForOf"],["pRipple","",1,"p-yearpicker-year",3,"ngClass","click","keydown"],[1,"p-timepicker"],[1,"p-hour-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","keydown.enter","keydown.space","mousedown","mouseup","keyup.enter","keyup.space","mouseleave"],[1,"pi","pi-chevron-up"],[1,"pi","pi-chevron-down"],[1,"p-separator"],[1,"p-minute-picker"],["class","p-separator",4,"ngIf"],["class","p-second-picker",4,"ngIf"],["class","p-ampm-picker",4,"ngIf"],[1,"p-second-picker"],[1,"p-ampm-picker"],["type","button","pRipple","",1,"p-link",3,"keydown","click","keydown.enter"],[1,"p-datepicker-buttonbar"],["type","button","pButton","","pRipple","",3,"label","ngClass","keydown","click"]],template:function(e,i){1&e&&(li(cCe),S(0,"span",0,1),C(2,Tbe,4,17,"ng-template",2),C(3,lCe,9,28,"div",3),D()),2&e&&(Ke(i.styleClass),g("ngClass",va(6,uCe,i.showIcon,i.timeOnly,i.disabled,i.focus))("ngStyle",i.style),v(2),g("ngIf",!i.inline),v(1),g("ngIf",i.inline||i.overlayVisible))},dependencies:[Ot,Un,He,Zn,cn,Nr,Xr],styles:[".p-calendar{position:relative;display:inline-flex;max-width:100%}.p-calendar .p-inputtext{flex:1 1 auto;width:1%}.p-calendar-w-btn .p-inputtext{border-top-right-radius:0;border-bottom-right-radius:0}.p-calendar-w-btn .p-datepicker-trigger{border-top-left-radius:0;border-bottom-left-radius:0}.p-fluid .p-calendar{display:flex}.p-fluid .p-calendar .p-inputtext{width:1%}.p-calendar .p-datepicker{min-width:100%}.p-datepicker{width:auto;position:absolute;top:0;left:0}.p-datepicker-inline{display:inline-block;position:static;overflow-x:auto}.p-datepicker-header{display:flex;align-items:center;justify-content:space-between}.p-datepicker-header .p-datepicker-title{margin:0 auto}.p-datepicker-prev,.p-datepicker-next{cursor:pointer;display:inline-flex;justify-content:center;align-items:center;overflow:hidden;position:relative}.p-datepicker-multiple-month .p-datepicker-group-container .p-datepicker-group{flex:1 1 auto}.p-datepicker-multiple-month .p-datepicker-group-container{display:flex}.p-datepicker table{width:100%;border-collapse:collapse}.p-datepicker td>span{display:flex;justify-content:center;align-items:center;cursor:pointer;margin:0 auto;overflow:hidden;position:relative}.p-monthpicker-month{width:33.3%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-datepicker-buttonbar{display:flex;justify-content:space-between;align-items:center}.p-timepicker{display:flex;justify-content:center;align-items:center}.p-timepicker button{display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-timepicker>div{display:flex;align-items:center;flex-direction:column}.p-datepicker-touch-ui,.p-calendar .p-datepicker-touch-ui{position:fixed;top:50%;left:50%;min-width:80vw;transform:translate(-50%,-50%)}.p-yearpicker-year{width:50%;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden;position:relative}.p-calendar-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-calendar-clearable{position:relative}\n"],encapsulation:2,data:{animation:[$l("overlayAnimation",[Bu("visibleTouchUI",Pt({transform:"translate(-50%,-50%)",opacity:1})),Ui("void => visible",[Pt({opacity:0,transform:"scaleY(0.8)"}),Bi("{{showTransitionParams}}",Pt({opacity:1,transform:"*"}))]),Ui("visible => void",[Bi("{{hideTransitionParams}}",Pt({opacity:0}))]),Ui("void => visibleTouchUI",[Pt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}),Bi("{{showTransitionParams}}")]),Ui("visibleTouchUI => void",[Bi("{{hideTransitionParams}}",Pt({opacity:0,transform:"translate3d(-50%, -40%, 0) scale(0.9)"}))])])]},changeDetection:0}),n})();function bCe(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y();v(1),ve(e.label)}}function CCe(n,t){1&n&&ce(0)}const bf=function(n){return{height:n}},wCe=function(n,t){return{"p-highlight":n,"p-disabled":t}},SCe=function(n){return{"p-highlight":n}},P5=function(n){return{"pi pi-check":n}},Cf=function(n){return{$implicit:n}},DCe=["container"],TCe=["overlay"],MCe=["filterInput"],ECe=["in"],ICe=["items"],xCe=["scroller"];function OCe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),ve(e.valuesAsString||"empty")}}function kCe(n,t){if(1&n){const e=q();S(0,"span",20),P("click",function(r){I(e);const o=y().$implicit;return x(y(3).removeChip(o,r))}),D()}}function ACe(n,t){if(1&n&&(S(0,"div",16,17)(2,"span",18),H(3),D(),C(4,kCe,1,0,"span",19),D()),2&n){const e=t.$implicit,i=y(3);v(3),ve(i.findLabelByValue(e)),v(1),g("ngIf",!i.disabled)}}function NCe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(3);v(1),ve(e.placeholder||e.defaultLabel||"empty")}}function LCe(n,t){if(1&n&&(ae(0),C(1,ACe,5,2,"div",15),C(2,NCe,2,1,"ng-container",7),le()),2&n){const e=y(2);v(1),g("ngForOf",e.value),v(1),g("ngIf",!e.value||0===e.value.length)}}function PCe(n,t){if(1&n&&(ae(0),C(1,OCe,2,1,"ng-container",7),C(2,LCe,3,2,"ng-container",7),le()),2&n){const e=y();v(1),g("ngIf","comma"===e.display),v(1),g("ngIf","chip"===e.display)}}function RCe(n,t){1&n&&ce(0)}function FCe(n,t){if(1&n){const e=q();S(0,"i",21),P("click",function(r){return I(e),x(y().clear(r))}),D()}}function jCe(n,t){1&n&&ce(0)}function VCe(n,t){1&n&&ce(0)}const R5=function(n){return{options:n}};function zCe(n,t){if(1&n&&(ae(0),C(1,VCe,1,0,"ng-container",8),le()),2&n){const e=y(3);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,R5,e.filterOptions))}}const BCe=function(n){return{"p-checkbox-disabled":n}},UCe=function(n,t,e){return{"p-highlight":n,"p-focus":t,"p-disabled":e}};function HCe(n,t){if(1&n){const e=q();S(0,"div",36)(1,"div",2)(2,"input",37),P("focus",function(){return I(e),x(y(4).onHeaderCheckboxFocus())})("blur",function(){return I(e),x(y(4).onHeaderCheckboxBlur())})("keydown.space",function(r){return I(e),x(y(4).toggleAll(r))}),D()(),S(3,"div",38),P("click",function(r){return I(e),x(y(4).toggleAll(r))}),F(4,"span",39),D()()}if(2&n){const e=y(4);g("ngClass",te(6,BCe,e.disabled||e.toggleAllDisabled)),v(2),g("checked",e.allChecked)("disabled",e.disabled||e.toggleAllDisabled),v(1),g("ngClass",Hr(8,UCe,e.allChecked,e.headerCheckboxFocus,e.disabled||e.toggleAllDisabled)),he("aria-checked",e.allChecked),v(1),g("ngClass",te(12,P5,e.allChecked))}}function $Ce(n,t){if(1&n){const e=q();S(0,"div",40)(1,"input",41,42),P("input",function(r){return I(e),x(y(4).onFilterInputChange(r))}),D(),F(3,"span",43),D()}if(2&n){const e=y(4);v(1),g("value",e.filterValue||"")("disabled",e.disabled),he("autocomplete",e.autocomplete)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel)}}function WCe(n,t){if(1&n){const e=q();C(0,HCe,5,14,"div",32),C(1,$Ce,4,5,"div",33),S(2,"button",34),P("click",function(r){return I(e),x(y(3).close(r))}),F(3,"span",35),D()}if(2&n){const e=y(3);g("ngIf",e.showToggleAll&&!e.selectionLimit),v(1),g("ngIf",e.filter)}}function GCe(n,t){if(1&n&&(S(0,"div",28),ln(1),C(2,jCe,1,0,"ng-container",29),C(3,zCe,2,4,"ng-container",30),C(4,WCe,4,2,"ng-template",null,31,yt),D()),2&n){const e=Pe(5),i=y(2);v(2),g("ngTemplateOutlet",i.headerTemplate),v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function qCe(n,t){1&n&&ce(0)}const F5=function(n,t){return{$implicit:n,options:t}};function KCe(n,t){if(1&n&&C(0,qCe,1,0,"ng-container",8),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(6))("ngTemplateOutletContext",ot(2,F5,e,i))}}function YCe(n,t){1&n&&ce(0)}function QCe(n,t){if(1&n&&C(0,YCe,1,0,"ng-container",8),2&n){const e=t.options;g("ngTemplateOutlet",y(4).loaderTemplate)("ngTemplateOutletContext",te(2,R5,e))}}function ZCe(n,t){1&n&&(ae(0),C(1,QCe,1,4,"ng-template",46),le())}function JCe(n,t){if(1&n){const e=q();S(0,"p-scroller",44,45),P("onLazyLoad",function(r){return I(e),x(y(2).onLazyLoad.emit(r))}),C(2,KCe,1,5,"ng-template",14),C(3,ZCe,2,0,"ng-container",7),D()}if(2&n){const e=y(2);jt(te(9,bf,e.scrollHeight)),g("items",e.optionsToRender)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("tabindex",-1)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function XCe(n,t){1&n&&ce(0)}const e0e=function(){return{}};function t0e(n,t){if(1&n&&(ae(0),C(1,XCe,1,0,"ng-container",8),le()),2&n){y();const e=Pe(6),i=y();v(1),g("ngTemplateOutlet",e)("ngTemplateOutletContext",ot(3,F5,i.optionsToRender,pn(2,e0e)))}}function n0e(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(4);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function i0e(n,t){1&n&&ce(0)}function r0e(n,t){1&n&&ce(0)}function o0e(n,t){if(1&n&&(S(0,"li",52),C(1,n0e,2,1,"span",7),C(2,i0e,1,0,"ng-container",8),D(),C(3,r0e,1,0,"ng-container",8)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y(2);g("ngStyle",te(6,bf,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,Cf,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",te(10,Cf,o.getOptionGroupChildren(e)))}}function s0e(n,t){if(1&n&&(ae(0),C(1,o0e,4,12,"ng-template",51),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function a0e(n,t){1&n&&ce(0)}function l0e(n,t){if(1&n&&(ae(0),C(1,a0e,1,0,"ng-container",8),le()),2&n){const e=y().$implicit,i=Pe(5);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",te(2,Cf,e))}}function c0e(n,t){if(1&n){const e=q();S(0,"p-multiSelectItem",53),P("onClick",function(r){return I(e),x(y(4).onOptionClick(r))})("onKeydown",function(r){return I(e),x(y(4).onOptionKeydown(r))}),D()}if(2&n){const e=t.$implicit,i=y(2).options,r=y(2);g("option",e)("selected",r.isSelected(e))("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)("itemSize",i.itemSize)}}function u0e(n,t){1&n&&C(0,c0e,1,6,"ng-template",51),2&n&&g("ngForOf",t.$implicit)}function d0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function h0e(n,t){1&n&&ce(0,null,55)}function p0e(n,t){if(1&n&&(S(0,"li",54),C(1,d0e,2,1,"ng-container",30),C(2,h0e,2,0,"ng-container",29),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,bf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),v(1),g("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function f0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyMessageLabel," ")}}function m0e(n,t){1&n&&ce(0,null,56)}function g0e(n,t){if(1&n&&(S(0,"li",54),C(1,f0e,2,1,"ng-container",30),C(2,m0e,2,0,"ng-container",29),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,bf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function _0e(n,t){if(1&n&&(S(0,"ul",47,48),C(2,s0e,2,1,"ng-container",7),C(3,l0e,2,4,"ng-container",7),C(4,u0e,1,1,"ng-template",null,49,yt),C(6,p0e,3,6,"li",50),C(7,g0e,3,6,"li",50),D()),2&n){const e=t.options,i=y(2);jt(e.contentStyle),g("ngClass",e.contentStyleClass),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.hasFilter()&&i.isEmpty()),v(1),g("ngIf",!i.hasFilter()&&i.isEmpty())}}function y0e(n,t){1&n&&ce(0)}function v0e(n,t){if(1&n&&(S(0,"div",57),ln(1,1),C(2,y0e,1,0,"ng-container",29),D()),2&n){const e=y(2);v(2),g("ngTemplateOutlet",e.footerTemplate)}}const b0e=function(){return["p-multiselect-panel p-component"]};function C0e(n,t){if(1&n){const e=q();S(0,"div",22),P("keydown",function(r){return I(e),x(y().onKeydown(r))}),C(1,GCe,6,3,"div",23),S(2,"div",24),C(3,JCe,4,11,"p-scroller",25),C(4,t0e,2,6,"ng-container",7),C(5,_0e,8,7,"ng-template",null,26,yt),D(),C(7,v0e,3,1,"div",27),D()}if(2&n){const e=y();Ke(e.panelStyleClass),g("ngClass",pn(10,b0e))("ngStyle",e.panelStyle),v(1),g("ngIf",e.showHeader),v(1),As("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),v(1),g("ngIf",e.virtualScroll),v(1),g("ngIf",!e.virtualScroll),v(3),g("ngIf",e.footerFacet||e.footerTemplate)}}const w0e=[[["p-header"]],[["p-footer"]]],S0e=function(n,t,e,i){return{"p-multiselect p-component":!0,"p-multiselect-open":n,"p-multiselect-chip":t,"p-focus":e,"p-disabled":i}},D0e=function(n,t){return{"p-placeholder":n,"p-multiselect-label-empty":t}},T0e=function(){return{"p-multiselect-trigger":!0}},M0e=["p-header","p-footer"],E0e={provide:wn,useExisting:$e(()=>j5),multi:!0};let I0e=(()=>{class n{constructor(){this.onClick=new R,this.onKeydown=new R}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option,selected:this.selected})}onOptionKeydown(e){this.onKeydown.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-multiSelectItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick",onKeydown:"onKeydown"},decls:6,vars:20,consts:[["pRipple","",1,"p-multiselect-item",3,"ngStyle","ngClass","click","keydown"],[1,"p-checkbox","p-component"],[1,"p-checkbox-box",3,"ngClass"],[1,"p-checkbox-icon",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(S(0,"li",0),P("click",function(o){return i.onOptionClick(o)})("keydown",function(o){return i.onOptionKeydown(o)}),S(1,"div",1)(2,"div",2),F(3,"span",3),D()(),C(4,bCe,2,1,"span",4),C(5,CCe,1,0,"ng-container",5),D()),2&e&&(g("ngStyle",te(9,bf,i.itemSize+"px"))("ngClass",ot(11,wCe,i.selected,i.disabled)),he("aria-label",i.label)("tabindex",i.disabled?null:"0"),v(2),g("ngClass",te(14,SCe,i.selected)),v(1),g("ngClass",te(16,P5,i.selected)),v(1),g("ngIf",!i.template),v(1),g("ngTemplateOutlet",i.template)("ngTemplateOutletContext",te(18,Cf,i.option)))},dependencies:[Ot,He,Zn,cn,Xr],encapsulation:2}),n})(),j5=(()=>{class n{constructor(e,i,r,o,s,a,l){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.overlayService=l,this.filter=!0,this.displaySelectedLabel=!0,this.maxSelectedLabels=3,this.selectedItemsLabel="ellipsis",this.showToggleAll=!0,this.emptyFilterMessage="",this.emptyMessage="",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.showHeader=!0,this.scrollHeight="200px",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.display="comma",this.autocomplete="on",this.showClear=!1,this.onChange=new R,this.onFilter=new R,this.onFocus=new R,this.onBlur=new R,this.onClick=new R,this.onClear=new R,this.onPanelShow=new R,this.onPanelHide=new R,this.onLazyLoad=new R,this.onRemove=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}set defaultLabel(e){this._defaultLabel=e,this.updateLabel()}get defaultLabel(){return this._defaultLabel}set placeholder(e){this._placeholder=e,this.updateLabel()}get placeholder(){return this._placeholder}get options(){return this._options}set options(e){this._options=e,this.updateLabel()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}ngOnInit(){this.updateLabel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"selectedItems":this.selectedItemsTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngAfterViewInit(){this.overlayVisible&&this.show()}ngAfterViewChecked(){this.filtered&&(this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild?.alignOverlay()},1)}),this.filtered=!1)}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):e&&null!=e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):e&&null!=e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}isOptionDisabled(e){return(this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled)||this.maxSelectionLimitReached&&!this.isSelected(e)}writeValue(e){this.value=e,this.updateLabel(),this.updateFilledState(),this.checkSelectionLimit(),this.cd.markForCheck()}checkSelectionLimit(){this.maxSelectionLimitReached=!(!this.selectionLimit||!this.value||this.value.length!==this.selectionLimit)}updateFilledState(){this.filled=this.value&&this.value.length>0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onOptionClick(e){let i=e.option;if(this.isOptionDisabled(i))return;let r=this.getOptionValue(i),o=this.findSelectionIndex(r);-1!=o?(this.value=this.value.filter((s,a)=>a!=o),this.onRemove.emit({newValue:this.value,removed:r}),this.selectionLimit&&(this.maxSelectionLimitReached=!1)):((!this.selectionLimit||!this.value||this.value.length{if(this.group){let o=this.getOptionGroupChildren(r);o&&o.forEach(s=>{let a=this.isOptionDisabled(s);(!a||a&&this.isSelected(s))&&i.push(this.getOptionValue(s))})}else{let o=this.isOptionDisabled(r);(!o||o&&this.isSelected(r))&&i.push(this.getOptionValue(r))}}),this.value=i}uncheckAll(){let i=[];this.optionsToRender.forEach(r=>{this.group?r.items&&r.items.forEach(o=>{this.isOptionDisabled(o)&&this.isSelected(o)&&i.push(this.getOptionValue(o))}):this.isOptionDisabled(r)&&this.isSelected(r)&&i.push(this.getOptionValue(r))}),this.value=i}show(){this.overlayVisible||(this.overlayVisible=!0,this.preventDocumentDefault=!0,this.cd.markForCheck())}onOverlayAnimationStart(e){switch(e.toState){case"visible":this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild.nativeElement),this.filterInputChild&&this.filterInputChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterInputChild.nativeElement.focus()),this.onPanelShow.emit();break;case"void":this.onModelTouched()}}hide(){this.overlayVisible=!1,this.resetFilterOnHide&&this.resetFilter(),this.onPanelHide.emit(),this.cd.markForCheck()}resetFilter(){this.filterInputChild&&this.filterInputChild.nativeElement&&(this.filterInputChild.nativeElement.value=""),this._filterValue=null,this._filteredOptions=null}close(e){this.hide(),e.preventDefault(),e.stopPropagation()}clear(e){this.value=null,this.updateLabel(),this.updateFilledState(),this.onClear.emit(),this.onModelChange(this.value),e.stopPropagation()}onMouseclick(e,i){this.disabled||this.readonly||e.target.isSameNode(this.accessibleViewChild.nativeElement)||(this.onClick.emit(e),!this.overlayViewChild?.el?.nativeElement?.contains(e.target)&&!A.hasClass(e.target,"p-multiselect-token-icon")&&(this.overlayVisible?this.hide():this.show(),i.focus()))}removeChip(e,i){this.value=this.value.filter(r=>!Oe.equals(r,e,this.dataKey)),this.onModelChange(this.value),this.checkSelectionLimit(),this.onChange.emit({originalEvent:i,value:this.value,itemValue:e}),this.updateLabel(),this.updateFilledState()}onInputFocus(e){this.focus=!0,this.onFocus.emit({originalEvent:e})}onInputBlur(e){this.focus=!1,this.onBlur.emit({originalEvent:e}),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onOptionKeydown(e){if(!this.readonly)switch(e.originalEvent.which){case 40:var i=this.findNextItem(e.originalEvent.target.parentElement);i&&i.focus(),e.originalEvent.preventDefault();break;case 38:var r=this.findPrevItem(e.originalEvent.target.parentElement);r&&r.focus(),e.originalEvent.preventDefault();break;case 13:this.onOptionClick(e),e.originalEvent.preventDefault();break;case 27:case 9:this.hide()}}findNextItem(e){let i=e.nextElementSibling;return i?A.hasClass(i.children[0],"p-disabled")||A.isHidden(i.children[0])||A.hasClass(i,"p-multiselect-item-group")?this.findNextItem(i):i.children[0]:null}findPrevItem(e){let i=e.previousElementSibling;return i?A.hasClass(i.children[0],"p-disabled")||A.isHidden(i.children[0])||A.hasClass(i,"p-multiselect-item-group")?this.findPrevItem(i):i.children[0]:null}onKeydown(e){switch(e.which){case 40:!this.overlayVisible&&e.altKey&&(this.show(),e.preventDefault());break;case 32:this.overlayVisible||(this.show(),e.preventDefault());break;case 27:this.hide()}}updateLabel(){if(this.value&&this.options&&this.value.length&&this.displaySelectedLabel){let e="";for(let i=0;i0&&(e+=", "),e+=r)}if(this.value.length<=this.maxSelectedLabels||"ellipsis"===this.selectedItemsLabel)this.valuesAsString=e;else{let i=/{(.*?)}/;this.valuesAsString=i.test(this.selectedItemsLabel)?this.selectedItemsLabel.replace(this.selectedItemsLabel.match(i)[0],this.value.length+""):this.selectedItemsLabel}}else this.valuesAsString=this.placeholder||this.defaultLabel}findLabelByValue(e){if(this.group){let i=null;for(let r=0;r0}isEmpty(){return!this.optionsToRender||this.optionsToRender&&0===this.optionsToRender.length}onFilterInputChange(e){this._filterValue=e.target.value,this.activateFilter(),this.onFilter.emit({originalEvent:e,filter:this._filterValue}),this.cd.detectChanges()}activateFilter(){if(this.hasFilter()&&this._options){let e=(this.filterBy||this.optionLabel||"label").split(",");if(this.group){let i=[];for(let r of this.options){let o=this.filterService.filter(this.getOptionGroupChildren(r),e,this.filterValue,this.filterMatchMode,this.filterLocale);o&&o.length&&i.push({...r,[this.optionGroupChildren]:o})}this._filteredOptions=i}else this._filteredOptions=this.filterService.filter(this.options,e,this._filterValue,this.filterMatchMode,this.filterLocale)}else this._filteredOptions=null}onHeaderCheckboxFocus(){this.headerCheckboxFocus=!0}onHeaderCheckboxBlur(){this.headerCheckboxFocus=!1}}return n.\u0275fac=function(e){return new(e||n)(O(qe),O(Vn),O(Tt),O(Xe),O(T1),O(Eo),O(_p))},n.\u0275cmp=Y({type:n,selectors:[["p-multiSelect"]],contentQueries:function(e,i,r){if(1&e&&(Vt(r,E_,5),Vt(r,M_,5),Vt(r,mn,4)),2&e){let o;J(o=X())&&(i.footerFacet=o.first),J(o=X())&&(i.headerFacet=o.first),J(o=X())&&(i.templates=o)}},viewQuery:function(e,i){if(1&e&&(Me(DCe,5),Me(TCe,5),Me(MCe,5),Me(ECe,5),Me(ICe,5),Me(xCe,5)),2&e){let r;J(r=X())&&(i.containerViewChild=r.first),J(r=X())&&(i.overlayViewChild=r.first),J(r=X())&&(i.filterInputChild=r.first),J(r=X())&&(i.accessibleViewChild=r.first),J(r=X())&&(i.itemsViewChild=r.first),J(r=X())&&(i.scroller=r.first)}},hostAttrs:[1,"p-element","p-inputwrapper"],hostVars:6,hostBindings:function(e,i){2&e&&Si("p-inputwrapper-filled",i.filled)("p-inputwrapper-focus",i.focus||i.overlayVisible)("p-multiselect-clearable",i.showClear&&!i.disabled)},inputs:{style:"style",styleClass:"styleClass",panelStyle:"panelStyle",panelStyleClass:"panelStyleClass",inputId:"inputId",disabled:"disabled",readonly:"readonly",group:"group",filter:"filter",filterPlaceHolder:"filterPlaceHolder",filterLocale:"filterLocale",overlayVisible:"overlayVisible",tabindex:"tabindex",appendTo:"appendTo",dataKey:"dataKey",name:"name",label:"label",ariaLabelledBy:"ariaLabelledBy",displaySelectedLabel:"displaySelectedLabel",maxSelectedLabels:"maxSelectedLabels",selectionLimit:"selectionLimit",selectedItemsLabel:"selectedItemsLabel",showToggleAll:"showToggleAll",emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",resetFilterOnHide:"resetFilterOnHide",dropdownIcon:"dropdownIcon",optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",showHeader:"showHeader",filterBy:"filterBy",scrollHeight:"scrollHeight",lazy:"lazy",virtualScroll:"virtualScroll",virtualScrollItemSize:"virtualScrollItemSize",virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",filterMatchMode:"filterMatchMode",tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",autofocusFilter:"autofocusFilter",display:"display",autocomplete:"autocomplete",showClear:"showClear",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",defaultLabel:"defaultLabel",placeholder:"placeholder",options:"options",filterValue:"filterValue",itemSize:"itemSize"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onClear:"onClear",onPanelShow:"onPanelShow",onPanelHide:"onPanelHide",onLazyLoad:"onLazyLoad",onRemove:"onRemove"},features:[Ie([E0e])],ngContentSelectors:M0e,decls:15,vars:41,consts:[[3,"ngClass","ngStyle","click"],["container",""],[1,"p-hidden-accessible"],["type","text","readonly","readonly","aria-haspopup","listbox","role","listbox",3,"disabled","focus","blur","keydown"],["in",""],[1,"p-multiselect-label-container",3,"pTooltip","tooltipPosition","positionStyle","tooltipStyleClass"],[1,"p-multiselect-label",3,"ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","p-multiselect-clear-icon pi pi-times",3,"click",4,"ngIf"],[3,"ngClass"],[1,"p-multiselect-trigger-icon",3,"ngClass"],[3,"visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions","visibleChange","onAnimationStart","onHide"],["overlay",""],["pTemplate","content"],["class","p-multiselect-token",4,"ngFor","ngForOf"],[1,"p-multiselect-token"],["token",""],[1,"p-multiselect-token-label"],["class","p-multiselect-token-icon pi pi-times-circle",3,"click",4,"ngIf"],[1,"p-multiselect-token-icon","pi","pi-times-circle",3,"click"],[1,"p-multiselect-clear-icon","pi","pi-times",3,"click"],[3,"ngClass","ngStyle","keydown"],["class","p-multiselect-header",4,"ngIf"],[1,"p-multiselect-items-wrapper"],[3,"items","style","itemSize","autoSize","tabindex","lazy","options","onLazyLoad",4,"ngIf"],["buildInItems",""],["class","p-multiselect-footer",4,"ngIf"],[1,"p-multiselect-header"],[4,"ngTemplateOutlet"],[4,"ngIf","ngIfElse"],["builtInFilterElement",""],["class","p-checkbox p-component",3,"ngClass",4,"ngIf"],["class","p-multiselect-filter-container",4,"ngIf"],["type","button","pRipple","",1,"p-multiselect-close","p-link",3,"click"],[1,"p-multiselect-close-icon","pi","pi-times"],[1,"p-checkbox","p-component",3,"ngClass"],["type","checkbox","readonly","readonly",3,"checked","disabled","focus","blur","keydown.space"],["role","checkbox",1,"p-checkbox-box",3,"ngClass","click"],[1,"p-checkbox-icon",3,"ngClass"],[1,"p-multiselect-filter-container"],["type","text","role","textbox",1,"p-multiselect-filter","p-inputtext","p-component",3,"value","disabled","input"],["filterInput",""],[1,"p-multiselect-filter-icon","pi","pi-search"],[3,"items","itemSize","autoSize","tabindex","lazy","options","onLazyLoad"],["scroller",""],["pTemplate","loader"],["role","listbox","aria-multiselectable","true",1,"p-multiselect-items","p-component",3,"ngClass"],["items",""],["itemslist",""],["class","p-multiselect-empty-message",3,"ngStyle",4,"ngIf"],["ngFor","",3,"ngForOf"],[1,"p-multiselect-item-group",3,"ngStyle"],[3,"option","selected","label","disabled","template","itemSize","onClick","onKeydown"],[1,"p-multiselect-empty-message",3,"ngStyle"],["emptyFilter",""],["empty",""],[1,"p-multiselect-footer"]],template:function(e,i){if(1&e){const r=q();li(w0e),S(0,"div",0,1),P("click",function(s){I(r);const a=Pe(4);return x(i.onMouseclick(s,a))}),S(2,"div",2)(3,"input",3,4),P("focus",function(s){return i.onInputFocus(s)})("blur",function(s){return i.onInputBlur(s)})("keydown",function(s){return i.onKeydown(s)}),D()(),S(5,"div",5)(6,"div",6),C(7,PCe,3,2,"ng-container",7),C(8,RCe,1,0,"ng-container",8),D(),C(9,FCe,1,0,"i",9),D(),S(10,"div",10),F(11,"span",11),D(),S(12,"p-overlay",12,13),P("visibleChange",function(s){return i.overlayVisible=s})("onAnimationStart",function(s){return i.onOverlayAnimationStart(s)})("onHide",function(){return i.hide()}),C(14,C0e,8,11,"ng-template",14),D()()}2&e&&(Ke(i.styleClass),g("ngClass",va(30,S0e,i.overlayVisible,"chip"===i.display,i.focus,i.disabled))("ngStyle",i.style),v(3),g("disabled",i.disabled),he("label",i.label)("id",i.inputId)("name",i.name)("tabindex",i.tabindex)("aria-expanded",i.overlayVisible)("aria-labelledby",i.ariaLabelledBy),v(2),g("pTooltip",i.tooltip)("tooltipPosition",i.tooltipPosition)("positionStyle",i.tooltipPositionStyle)("tooltipStyleClass",i.tooltipStyleClass),v(1),g("ngClass",ot(35,D0e,i.valuesAsString===(i.defaultLabel||i.placeholder),!(null!=i.valuesAsString&&0!==i.valuesAsString.length||null!=i.placeholder&&0!==i.placeholder.length))),v(1),g("ngIf",!i.selectedItemsTemplate),v(1),g("ngTemplateOutlet",i.selectedItemsTemplate)("ngTemplateOutletContext",te(38,Cf,i.value)),v(1),g("ngIf",null!=i.value&&i.filled&&!i.disabled&&i.showClear),v(1),g("ngClass",pn(40,T0e)),v(1),g("ngClass",i.dropdownIcon),v(1),g("visible",i.overlayVisible)("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("autoZIndex",i.autoZIndex)("baseZIndex",i.baseZIndex)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions))},dependencies:[Ot,Un,He,Zn,cn,A_,mn,Gy,Xr,N_,I0e],styles:[".p-multiselect{display:inline-flex;cursor:pointer;position:relative;-webkit-user-select:none;user-select:none}.p-multiselect-trigger{display:flex;align-items:center;justify-content:center;flex-shrink:0}.p-multiselect-label-container{overflow:hidden;flex:1 1 auto;cursor:pointer}.p-multiselect-label{display:block;white-space:nowrap;cursor:pointer;overflow:hidden;text-overflow:ellipsis}.p-multiselect-chip .p-multiselect-label{display:flex}.p-multiselect-label-empty{overflow:hidden;visibility:hidden}.p-multiselect-token{cursor:default;display:inline-flex;align-items:center;flex:0 0 auto}.p-multiselect-token-icon{cursor:pointer}.p-multiselect-items-wrapper{overflow:auto}.p-multiselect-items{margin:0;padding:0;list-style-type:none}.p-multiselect-item{cursor:pointer;display:flex;align-items:center;font-weight:400;white-space:nowrap;position:relative;overflow:hidden}.p-multiselect-header{display:flex;align-items:center;justify-content:space-between}.p-multiselect-filter-container{position:relative;flex:1 1 auto}.p-multiselect-filter-icon{position:absolute;top:50%;margin-top:-.5rem}.p-multiselect-filter-container .p-inputtext{width:100%}.p-multiselect-close{display:flex;align-items:center;justify-content:center;flex-shrink:0;overflow:hidden;position:relative}.p-fluid .p-multiselect{display:flex}.p-multiselect-clear-icon{position:absolute;top:50%;margin-top:-.5rem;cursor:pointer}.p-multiselect-clearable{position:relative}\n"],encapsulation:2,changeDetection:0}),n})();const O0e=["rb"],k0e=function(n,t,e){return{"p-radiobutton-label":!0,"p-radiobutton-label-active":n,"p-disabled":t,"p-radiobutton-label-focus":e}};function A0e(n,t){if(1&n){const e=q();S(0,"label",4),P("click",function(r){return I(e),x(y().select(r))}),H(1),D()}if(2&n){const e=y(),i=Pe(3);Ke(e.labelStyleClass),g("ngClass",Hr(5,k0e,i.checked,e.disabled,e.focused)),he("for",e.inputId),v(1),ve(e.label)}}const N0e=function(n,t,e){return{"p-radiobutton p-component":!0,"p-radiobutton-checked":n,"p-radiobutton-disabled":t,"p-radiobutton-focused":e}},L0e=function(n,t,e){return{"p-radiobutton-box":!0,"p-highlight":n,"p-disabled":t,"p-focus":e}},P0e={provide:wn,useExisting:$e(()=>z5),multi:!0};let R0e=(()=>{class n{constructor(){this.accessors=[]}add(e,i){this.accessors.push([e,i])}remove(e){this.accessors=this.accessors.filter(i=>i[1]!==e)}select(e){this.accessors.forEach(i=>{this.isSameGroup(i,e)&&i[1]!==e&&i[1].writeValue(e.value)})}isSameGroup(e,i){return!!e[0].control&&e[0].control.root===i.control.control.root&&e[1].name===i.name}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=K({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),z5=(()=>{class n{constructor(e,i,r){this.cd=e,this.injector=i,this.registry=r,this.onClick=new R,this.onFocus=new R,this.onBlur=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{}}ngOnInit(){this.control=this.injector.get(Go),this.checkName(),this.registry.add(this.control,this)}handleClick(e,i,r){e.preventDefault(),!this.disabled&&(this.select(e),r&&i.focus())}select(e){this.disabled||(this.inputViewChild.nativeElement.checked=!0,this.checked=!0,this.onModelChange(this.value),this.registry.select(this),this.onClick.emit({originalEvent:e,value:this.value}))}writeValue(e){this.checked=e==this.value,this.inputViewChild&&this.inputViewChild.nativeElement&&(this.inputViewChild.nativeElement.checked=this.checked),this.cd.markForCheck()}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onModelTouched(),this.onBlur.emit(e)}onChange(e){this.select(e)}focus(){this.inputViewChild.nativeElement.focus()}ngOnDestroy(){this.registry.remove(this)}checkName(){this.name&&this.formControlName&&this.name!==this.formControlName&&this.throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)}throwNameError(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: \n ')}}return n.\u0275fac=function(e){return new(e||n)(O(Tt),O(Ci),O(R0e))},n.\u0275cmp=Y({type:n,selectors:[["p-radioButton"]],viewQuery:function(e,i){if(1&e&&Me(O0e,5),2&e){let r;J(r=X())&&(i.inputViewChild=r.first)}},hostAttrs:[1,"p-element"],inputs:{value:"value",formControlName:"formControlName",name:"name",disabled:"disabled",label:"label",tabindex:"tabindex",inputId:"inputId",ariaLabelledBy:"ariaLabelledBy",ariaLabel:"ariaLabel",style:"style",styleClass:"styleClass",labelStyleClass:"labelStyleClass"},outputs:{onClick:"onClick",onFocus:"onFocus",onBlur:"onBlur"},features:[Ie([P0e])],decls:7,vars:23,consts:[[3,"ngStyle","ngClass"],[1,"p-hidden-accessible"],["type","radio",3,"checked","disabled","change","focus","blur"],["rb",""],[3,"ngClass","click"],[1,"p-radiobutton-icon"],[3,"class","ngClass","click",4,"ngIf"]],template:function(e,i){if(1&e){const r=q();S(0,"div",0)(1,"div",1)(2,"input",2,3),P("change",function(s){return i.onChange(s)})("focus",function(s){return i.onInputFocus(s)})("blur",function(s){return i.onInputBlur(s)}),D()(),S(4,"div",4),P("click",function(s){I(r);const a=Pe(3);return x(i.handleClick(s,a,!0))}),F(5,"span",5),D()(),C(6,A0e,2,9,"label",6)}2&e&&(Ke(i.styleClass),g("ngStyle",i.style)("ngClass",Hr(15,N0e,i.checked,i.disabled,i.focused)),v(2),g("checked",i.checked)("disabled",i.disabled),he("id",i.inputId)("name",i.name)("value",i.value)("tabindex",i.tabindex)("aria-checked",i.checked)("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledBy),v(2),g("ngClass",Hr(19,L0e,i.checked,i.disabled,i.focused)),v(2),g("ngIf",i.label))},dependencies:[Ot,He,cn],encapsulation:2,changeDetection:0}),n})();function V0e(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y();let i;v(1),ve(null!==(i=e.label)&&void 0!==i?i:"empty")}}function z0e(n,t){1&n&&ce(0)}const wf=function(n){return{height:n}},B0e=function(n,t){return{"p-dropdown-item":!0,"p-highlight":n,"p-disabled":t}},vT=function(n){return{$implicit:n}},U0e=["container"],H0e=["filter"],$0e=["in"],W0e=["editableInput"],G0e=["items"],q0e=["scroller"],K0e=["overlay"];function Y0e(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(2);v(1),ve(e.label||"empty")}}function Q0e(n,t){1&n&&ce(0)}const Z0e=function(n){return{"p-dropdown-label p-inputtext":!0,"p-dropdown-label-empty":n}};function J0e(n,t){if(1&n&&(S(0,"span",14),C(1,Y0e,2,1,"ng-container",15),C(2,Q0e,1,0,"ng-container",16),D()),2&n){const e=y();g("ngClass",te(9,Z0e,null==e.label||0===e.label.length))("pTooltip",e.tooltip)("tooltipPosition",e.tooltipPosition)("positionStyle",e.tooltipPositionStyle)("tooltipStyleClass",e.tooltipStyleClass),he("id",e.labelId),v(1),g("ngIf",!e.selectedItemTemplate),v(1),g("ngTemplateOutlet",e.selectedItemTemplate)("ngTemplateOutletContext",te(11,vT,e.selectedOption))}}const X0e=function(n){return{"p-dropdown-label p-inputtext p-placeholder":!0,"p-dropdown-label-empty":n}};function ewe(n,t){if(1&n&&(S(0,"span",17),H(1),D()),2&n){const e=y();g("ngClass",te(2,X0e,null==e.placeholder||0===e.placeholder.length)),v(1),ve(e.placeholder||"empty")}}function twe(n,t){if(1&n){const e=q();S(0,"input",18,19),P("input",function(r){return I(e),x(y().onEditableInputChange(r))})("focus",function(r){return I(e),x(y().onEditableInputFocus(r))})("blur",function(r){return I(e),x(y().onInputBlur(r))}),D()}if(2&n){const e=y();g("disabled",e.disabled),he("maxlength",e.maxlength)("placeholder",e.placeholder)("aria-expanded",e.overlayVisible)}}function nwe(n,t){if(1&n){const e=q();S(0,"i",20),P("click",function(r){return I(e),x(y().clear(r))}),D()}}function iwe(n,t){1&n&&ce(0)}function rwe(n,t){1&n&&ce(0)}const U5=function(n){return{options:n}};function owe(n,t){if(1&n&&(ae(0),C(1,rwe,1,0,"ng-container",16),le()),2&n){const e=y(3);v(1),g("ngTemplateOutlet",e.filterTemplate)("ngTemplateOutletContext",te(2,U5,e.filterOptions))}}function swe(n,t){if(1&n){const e=q();S(0,"div",30)(1,"input",31,32),P("keydown.enter",function(r){return r.preventDefault()})("keydown",function(r){return I(e),x(y(3).onKeydown(r,!1))})("input",function(r){return I(e),x(y(3).onFilterInputChange(r))}),D(),F(3,"span",33),D()}if(2&n){const e=y(3);v(1),g("value",e.filterValue||""),he("placeholder",e.filterPlaceholder)("aria-label",e.ariaFilterLabel)("aria-activedescendant",e.overlayVisible?"p-highlighted-option":e.labelId)}}function awe(n,t){if(1&n&&(S(0,"div",27),P("click",function(i){return i.stopPropagation()}),C(1,owe,2,4,"ng-container",28),C(2,swe,4,4,"ng-template",null,29,yt),D()),2&n){const e=Pe(3),i=y(2);v(1),g("ngIf",i.filterTemplate)("ngIfElse",e)}}function lwe(n,t){1&n&&ce(0)}const H5=function(n,t){return{$implicit:n,options:t}};function cwe(n,t){if(1&n&&C(0,lwe,1,0,"ng-container",16),2&n){const e=t.$implicit,i=t.options;y(2),g("ngTemplateOutlet",Pe(7))("ngTemplateOutletContext",ot(2,H5,e,i))}}function uwe(n,t){1&n&&ce(0)}function dwe(n,t){if(1&n&&C(0,uwe,1,0,"ng-container",16),2&n){const e=t.options;g("ngTemplateOutlet",y(4).loaderTemplate)("ngTemplateOutletContext",te(2,U5,e))}}function hwe(n,t){1&n&&(ae(0),C(1,dwe,1,4,"ng-template",36),le())}function pwe(n,t){if(1&n){const e=q();S(0,"p-scroller",34,35),P("onLazyLoad",function(r){return I(e),x(y(2).onLazyLoad.emit(r))}),C(2,cwe,1,5,"ng-template",13),C(3,hwe,2,0,"ng-container",15),D()}if(2&n){const e=y(2);jt(te(8,wf,e.scrollHeight)),g("items",e.optionsToDisplay)("itemSize",e.virtualScrollItemSize||e._itemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions),v(3),g("ngIf",e.loaderTemplate)}}function fwe(n,t){1&n&&ce(0)}const mwe=function(){return{}};function gwe(n,t){if(1&n&&(ae(0),C(1,fwe,1,0,"ng-container",16),le()),2&n){y();const e=Pe(7),i=y();v(1),g("ngTemplateOutlet",e)("ngTemplateOutletContext",ot(3,H5,i.optionsToDisplay,pn(2,mwe)))}}function _we(n,t){if(1&n&&(S(0,"span"),H(1),D()),2&n){const e=y().$implicit,i=y(4);v(1),ve(i.getOptionGroupLabel(e)||"empty")}}function ywe(n,t){1&n&&ce(0)}function vwe(n,t){1&n&&ce(0)}const $5=function(n,t){return{$implicit:n,selectedOption:t}};function bwe(n,t){if(1&n&&(S(0,"li",42),C(1,_we,2,1,"span",15),C(2,ywe,1,0,"ng-container",16),D(),C(3,vwe,1,0,"ng-container",16)),2&n){const e=t.$implicit,i=y(2).options,r=Pe(5),o=y(2);g("ngStyle",te(6,wf,i.itemSize+"px")),v(1),g("ngIf",!o.groupTemplate),v(1),g("ngTemplateOutlet",o.groupTemplate)("ngTemplateOutletContext",te(8,vT,e)),v(1),g("ngTemplateOutlet",r)("ngTemplateOutletContext",ot(10,$5,o.getOptionGroupChildren(e),o.selectedOption))}}function Cwe(n,t){if(1&n&&(ae(0),C(1,bwe,4,13,"ng-template",41),le()),2&n){const e=y().$implicit;v(1),g("ngForOf",e)}}function wwe(n,t){1&n&&ce(0)}function Swe(n,t){if(1&n&&(ae(0),C(1,wwe,1,0,"ng-container",16),le()),2&n){const e=y().$implicit,i=Pe(5),r=y(2);v(1),g("ngTemplateOutlet",i)("ngTemplateOutletContext",ot(2,$5,e,r.selectedOption))}}function Dwe(n,t){if(1&n){const e=q();S(0,"p-dropdownItem",43),P("onClick",function(r){return I(e),x(y(4).onItemClick(r))}),D()}if(2&n){const e=t.$implicit,i=y().selectedOption,r=y(3);g("option",e)("selected",i==e)("label",r.getOptionLabel(e))("disabled",r.isOptionDisabled(e))("template",r.itemTemplate)}}function Twe(n,t){1&n&&C(0,Dwe,1,5,"ng-template",41),2&n&&g("ngForOf",t.$implicit)}function Mwe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyFilterMessageLabel," ")}}function Ewe(n,t){1&n&&ce(0,null,45)}function Iwe(n,t){if(1&n&&(S(0,"li",44),C(1,Mwe,2,1,"ng-container",28),C(2,Ewe,2,0,"ng-container",22),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,wf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyFilterTemplate&&!i.emptyTemplate)("ngIfElse",i.emptyFilter),v(1),g("ngTemplateOutlet",i.emptyFilterTemplate||i.emptyTemplate)}}function xwe(n,t){if(1&n&&(ae(0),H(1),le()),2&n){const e=y(4);v(1),xt(" ",e.emptyMessageLabel," ")}}function Owe(n,t){1&n&&ce(0,null,46)}function kwe(n,t){if(1&n&&(S(0,"li",44),C(1,xwe,2,1,"ng-container",28),C(2,Owe,2,0,"ng-container",22),D()),2&n){const e=y().options,i=y(2);g("ngStyle",te(4,wf,e.itemSize+"px")),v(1),g("ngIf",!i.emptyTemplate)("ngIfElse",i.empty),v(1),g("ngTemplateOutlet",i.emptyTemplate)}}function Awe(n,t){if(1&n&&(S(0,"ul",37,38),C(2,Cwe,2,1,"ng-container",15),C(3,Swe,2,5,"ng-container",15),C(4,Twe,1,1,"ng-template",null,39,yt),C(6,Iwe,3,6,"li",40),C(7,kwe,3,6,"li",40),D()),2&n){const e=t.options,i=y(2);jt(e.contentStyle),g("ngClass",e.contentStyleClass),he("id",i.listId),v(2),g("ngIf",i.group),v(1),g("ngIf",!i.group),v(3),g("ngIf",i.filterValue&&i.isEmpty()),v(1),g("ngIf",!i.filterValue&&i.isEmpty())}}function Nwe(n,t){1&n&&ce(0)}function Lwe(n,t){if(1&n&&(S(0,"div",21),C(1,iwe,1,0,"ng-container",22),C(2,awe,4,2,"div",23),S(3,"div",24),C(4,pwe,4,10,"p-scroller",25),C(5,gwe,2,6,"ng-container",15),C(6,Awe,8,8,"ng-template",null,26,yt),D(),C(8,Nwe,1,0,"ng-container",22),D()),2&n){const e=y();Ke(e.panelStyleClass),g("ngClass","p-dropdown-panel p-component")("ngStyle",e.panelStyle),v(1),g("ngTemplateOutlet",e.headerTemplate),v(1),g("ngIf",e.filter),v(1),As("max-height",e.virtualScroll?"auto":e.scrollHeight||"auto"),v(1),g("ngIf",e.virtualScroll),v(1),g("ngIf",!e.virtualScroll),v(3),g("ngTemplateOutlet",e.footerTemplate)}}const Pwe=function(n,t,e,i){return{"p-dropdown p-component":!0,"p-disabled":n,"p-dropdown-open":t,"p-focus":e,"p-dropdown-clearable":i}},Rwe={provide:wn,useExisting:$e(()=>W5),multi:!0};let Fwe=(()=>{class n{constructor(){this.onClick=new R}onOptionClick(e){this.onClick.emit({originalEvent:e,option:this.option})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=Y({type:n,selectors:[["p-dropdownItem"]],hostAttrs:[1,"p-element"],inputs:{option:"option",selected:"selected",label:"label",disabled:"disabled",visible:"visible",itemSize:"itemSize",template:"template"},outputs:{onClick:"onClick"},decls:3,vars:15,consts:[["role","option","pRipple","",3,"ngStyle","id","ngClass","click"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,i){1&e&&(S(0,"li",0),P("click",function(o){return i.onOptionClick(o)}),C(1,V0e,2,1,"span",1),C(2,z0e,1,0,"ng-container",2),D()),2&e&&(g("ngStyle",te(8,wf,i.itemSize+"px"))("id",i.selected?"p-highlighted-option":"")("ngClass",ot(10,B0e,i.selected,i.disabled)),he("aria-label",i.label)("aria-selected",i.selected),v(1),g("ngIf",!i.template),v(1),g("ngTemplateOutlet",i.template)("ngTemplateOutletContext",te(13,vT,i.option)))},dependencies:[Ot,He,Zn,cn,Xr],encapsulation:2}),n})(),W5=(()=>{class n{constructor(e,i,r,o,s,a){this.el=e,this.renderer=i,this.cd=r,this.zone=o,this.filterService=s,this.config=a,this.scrollHeight="200px",this.resetFilterOnHide=!1,this.dropdownIcon="pi pi-chevron-down",this.optionGroupChildren="items",this.autoDisplayFirst=!0,this.emptyFilterMessage="",this.emptyMessage="",this.lazy=!1,this.filterMatchMode="contains",this.tooltip="",this.tooltipPosition="right",this.tooltipPositionStyle="absolute",this.autofocusFilter=!0,this.overlayDirection="end",this.onChange=new R,this.onFilter=new R,this.onFocus=new R,this.onBlur=new R,this.onClick=new R,this.onShow=new R,this.onHide=new R,this.onClear=new R,this.onLazyLoad=new R,this.onModelChange=()=>{},this.onModelTouched=()=>{},this.id=T_()}get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.warn("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.warn("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.warn("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.warn("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.warn("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":default:this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template}})}ngOnInit(){this.optionsToDisplay=this.options,this.updateSelectedOption(null),this.labelId=this.id+"_label",this.listId=this.id+"_list",this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}get options(){return this._options}set options(e){this._options=e,this.optionsToDisplay=this._options,this.updateSelectedOption(this.value),this.selectedOption=this.findOption(this.value,this.optionsToDisplay),!this.selectedOption&&Oe.isNotEmpty(this.value)&&!this.editable&&(this.value=null,this.onModelChange(this.value)),this.optionsChanged=!0,this._filterValue&&this._filterValue.length&&this.activateFilter()}get filterValue(){return this._filterValue}set filterValue(e){this._filterValue=e,this.activateFilter()}ngAfterViewInit(){this.editable&&this.updateEditableLabel()}get label(){return"number"==typeof this.selectedOption&&(this.selectedOption=this.selectedOption.toString()),this.selectedOption?this.getOptionLabel(this.selectedOption):null}get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(Ln.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(Ln.EMPTY_FILTER_MESSAGE)}get filled(){return"string"==typeof this.value?!!this.value:this.value||null!=this.value||null!=this.value}get isVisibleClearIcon(){return null!=this.value&&""!==this.value&&this.showClear&&!this.disabled}updateEditableLabel(){this.editableInputViewChild&&this.editableInputViewChild.nativeElement&&(this.editableInputViewChild.nativeElement.value=this.selectedOption?this.getOptionLabel(this.selectedOption):this.value||"")}getOptionLabel(e){return this.optionLabel?Oe.resolveFieldData(e,this.optionLabel):e&&void 0!==e.label?e.label:e}getOptionValue(e){return this.optionValue?Oe.resolveFieldData(e,this.optionValue):!this.optionLabel&&e&&void 0!==e.value?e.value:e}isOptionDisabled(e){return this.optionDisabled?Oe.resolveFieldData(e,this.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled}getOptionGroupLabel(e){return this.optionGroupLabel?Oe.resolveFieldData(e,this.optionGroupLabel):e&&void 0!==e.label?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren?Oe.resolveFieldData(e,this.optionGroupChildren):e.items}onItemClick(e){const i=e.option;this.isOptionDisabled(i)||(this.selectItem(e.originalEvent,i),this.accessibleViewChild.nativeElement.focus({preventScroll:!0})),setTimeout(()=>{this.hide()},1)}selectItem(e,i){this.selectedOption!=i&&(this.selectedOption=i,this.value=this.getOptionValue(i),this.onModelChange(this.value),this.updateEditableLabel(),this.onChange.emit({originalEvent:e,value:this.value}))}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,"li.p-highlight");e&&A.scrollInView(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.updateSelectedOption(e),this.updateEditableLabel(),this.cd.markForCheck()}resetFilter(){this._filterValue=null,this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value=""),this.optionsToDisplay=this.options}updateSelectedOption(e){this.selectedOption=this.findOption(e,this.optionsToDisplay),this.autoDisplayFirst&&!this.placeholder&&!this.selectedOption&&this.optionsToDisplay&&this.optionsToDisplay.length&&!this.editable&&(this.selectedOption=this.group?this.optionsToDisplay[0].items[0]:this.optionsToDisplay[0],this.value=this.getOptionValue(this.selectedOption),this.onModelChange(this.value)),this.selectedOptionUpdated=!0}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onMouseclick(e){this.disabled||this.readonly||this.isInputClick(e)||(this.onClick.emit(e),this.accessibleViewChild.nativeElement.focus({preventScroll:!0}),this.overlayVisible?this.hide():this.show(),this.cd.detectChanges())}isInputClick(e){return A.hasClass(e.target,"p-dropdown-clear-icon")||e.target.isSameNode(this.accessibleViewChild.nativeElement)||this.editableInputViewChild&&e.target.isSameNode(this.editableInputViewChild.nativeElement)}isEmpty(){return!this.optionsToDisplay||this.optionsToDisplay&&0===this.optionsToDisplay.length}onEditableInputFocus(e){this.focused=!0,this.hide(),this.onFocus.emit(e)}onEditableInputChange(e){this.value=e.target.value,this.updateSelectedOption(this.value),this.onModelChange(this.value),this.onChange.emit({originalEvent:e,value:this.value})}show(){this.overlayVisible=!0,this.cd.markForCheck()}onOverlayAnimationStart(e){if("visible"===e.toState){if(this.itemsWrapper=A.findSingle(this.overlayViewChild.overlayViewChild.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller.setContentEl(this.itemsViewChild.nativeElement),this.options&&this.options.length)if(this.virtualScroll){const i=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;-1!==i&&this.scroller.scrollToIndex(i)}else{let i=A.findSingle(this.itemsWrapper,".p-dropdown-item.p-highlight");i&&i.scrollIntoView({block:"nearest",inline:"center"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}"void"===e.toState&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(){this.overlayVisible=!1,this.filter&&this.resetFilterOnHide&&this.resetFilter(),this.cd.markForCheck()}onInputFocus(e){this.focused=!0,this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}findPrevEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e-1;0<=r;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}if(!i)for(let r=this.optionsToDisplay.length-1;r>=e;r--){let o=this.optionsToDisplay[r];if(!this.isOptionDisabled(o)){i=o;break}}}return i}findNextEnabledOption(e){let i;if(this.optionsToDisplay&&this.optionsToDisplay.length){for(let r=e+1;r0&&this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[0])[0])}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findNextEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 38:if(this.group){let r=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;if(-1!==r){let o=r.itemIndex-1;if(o>=0)this.selectItem(e,this.getOptionGroupChildren(this.optionsToDisplay[r.groupIndex])[o]),this.selectedOptionUpdated=!0;else if(o<0){let s=this.optionsToDisplay[r.groupIndex-1];s&&(this.selectItem(e,this.getOptionGroupChildren(s)[this.getOptionGroupChildren(s).length-1]),this.selectedOptionUpdated=!0)}}}else{let r=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1,o=this.findPrevEnabledOption(r);o&&(this.selectItem(e,o),this.selectedOptionUpdated=!0)}e.preventDefault();break;case 32:i&&(this.overlayVisible?this.hide():this.show(),e.preventDefault());break;case 13:this.overlayVisible&&(!this.filter||this.optionsToDisplay&&this.optionsToDisplay.length>0)?this.hide():this.overlayVisible||this.show(),e.preventDefault();break;case 27:case 9:this.hide();break;default:i&&!e.metaKey&&17!==e.which&&this.search(e)}}search(e){this.searchTimeout&&clearTimeout(this.searchTimeout);const i=e.key;let r;if(this.previousSearchChar=this.currentSearchChar,this.currentSearchChar=i,this.searchValue=this.previousSearchChar===this.currentSearchChar?this.currentSearchChar:this.searchValue?this.searchValue+i:i,this.group){let o=this.selectedOption?this.findOptionGroupIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):{groupIndex:0,itemIndex:0};r=this.searchOptionWithinGroup(o)}else{let o=this.selectedOption?this.findOptionIndex(this.getOptionValue(this.selectedOption),this.optionsToDisplay):-1;r=this.searchOption(++o)}r&&!this.isOptionDisabled(r)&&(this.selectItem(e,r),this.selectedOptionUpdated=!0),this.searchTimeout=setTimeout(()=>{this.searchValue=null},250)}searchOption(e){let i;return this.searchValue&&(i=this.searchOptionInRange(e,this.optionsToDisplay.length),i||(i=this.searchOptionInRange(0,e))),i}searchOptionInRange(e,i){for(let r=e;r{class n{constructor(e){this.injector=e}ngDoBootstrap(){try{d1e.forEach(({tag:e,component:i})=>{if(customElements.get(e))return;const r=function ZG(n,t){const e=function $G(n,t){return t.get(Ol).resolveComponentFactory(n).inputs}(n,t.injector),i=t.strategyFactory||new KG(n,t.injector),r=function HG(n){const t={};return n.forEach(({propName:e,templateName:i})=>{t[function jG(n){return n.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}(i)]=e}),t}(e);class o extends QG{get ngElementStrategy(){if(!this._ngElementStrategy){const a=this._ngElementStrategy=i.create(this.injector||t.injector);e.forEach(({propName:l})=>{if(!this.hasOwnProperty(l))return;const c=this[l];delete this[l],a.setInputValue(l,c)})}return this._ngElementStrategy}constructor(a){super(),this.injector=a}attributeChangedCallback(a,l,c,u){this.ngElementStrategy.setInputValue(r[a],c)}connectedCallback(){let a=!1;this.ngElementStrategy.events&&(this.subscribeToEvents(),a=!0),this.ngElementStrategy.connect(this),a||this.subscribeToEvents()}disconnectedCallback(){this._ngElementStrategy&&this._ngElementStrategy.disconnect(),this.ngElementEventsSubscription&&(this.ngElementEventsSubscription.unsubscribe(),this.ngElementEventsSubscription=null)}subscribeToEvents(){this.ngElementEventsSubscription=this.ngElementStrategy.events.subscribe(a=>{const l=new CustomEvent(a.name,{detail:a.value});this.dispatchEvent(l)})}}return o.observedAttributes=Object.keys(r),e.forEach(({propName:s})=>{Object.defineProperty(o.prototype,s,{get(){return this.ngElementStrategy.getInputValue(s)},set(a){this.ngElementStrategy.setInputValue(s,a)},configurable:!0,enumerable:!0})}),o}(i,{injector:this.injector});customElements.define(e,r)})}catch(e){console.error(e)}}}return n.\u0275fac=function(e){return new(e||n)(U(Ci))},n.\u0275mod=Ce({type:n}),n.\u0275inj=ke({providers:[tc,gp],imports:[rA,JK,kg,Ev,Eg]}),n})();W$().bootstrapModule(h1e).catch(n=>console.error(n))},88222:(Zi,oa,mr)=>{Zi=mr.nmd(Zi);var ki="__lodash_hash_undefined__",ho=9007199254740991,oi="[object Arguments]",ll="[object Array]",cl="[object Boolean]",ft="[object Date]",Rd="[object Error]",ul="[object Function]",ut="[object Map]",Fd="[object Number]",sa="[object Object]",aa="[object Promise]",jc="[object RegExp]",dl="[object Set]",mt="[object String]",po="[object WeakMap]",jd="[object ArrayBuffer]",hl="[object DataView]",TT=/^\[object .+?Constructor\]$/,$v=/^(?:0|[1-9]\d*)$/,Ht={};Ht["[object Float32Array]"]=Ht["[object Float64Array]"]=Ht["[object Int8Array]"]=Ht["[object Int16Array]"]=Ht["[object Int32Array]"]=Ht["[object Uint8Array]"]=Ht["[object Uint8ClampedArray]"]=Ht["[object Uint16Array]"]=Ht["[object Uint32Array]"]=!0,Ht[oi]=Ht[ll]=Ht[jd]=Ht[cl]=Ht[hl]=Ht[ft]=Ht[Rd]=Ht[ul]=Ht[ut]=Ht[Fd]=Ht[sa]=Ht[jc]=Ht[dl]=Ht[mt]=Ht[po]=!1;var Vd="object"==typeof global&&global&&global.Object===Object&&global,kf="object"==typeof self&&self&&self.Object===Object&&self,gr=Vd||kf||Function("return this")(),Af=oa&&!oa.nodeType&&oa,Nf=Af&&Zi&&!Zi.nodeType&&Zi,zc=Nf&&Nf.exports===Af,zd=zc&&Vd.process,Lf=function(){try{return zd&&zd.binding&&zd.binding("util")}catch{}}(),Pf=Lf&&Lf.isTypedArray;function pl(E,L){for(var B=-1,oe=null==E?0:E.length;++Byn))return!1;var Ct=Ve.get(E);if(Ct&&Ve.get(L))return Ct==L;var Rn=-1,yr=!0,Y=2&B?new ht:void 0;for(Ve.set(E,L),Ve.set(L,E);++Rn-1},fo.prototype.set=function LT(E,L){var B=this.__data__,oe=Gc(B,E);return oe<0?(++this.size,B.push([E,L])):B[oe][1]=L,this},da.prototype.clear=function Qv(){this.size=0,this.__data__={hash:new ws,map:new(bs||fo),string:new ws}},da.prototype.delete=function PT(E){var L=It(this,E).delete(E);return this.size-=L?1:0,L},da.prototype.get=function Zv(E){return It(this,E).get(E)},da.prototype.has=function RT(E){return It(this,E).has(E)},da.prototype.set=function Ji(E,L){var B=It(this,E),oe=B.size;return B.set(E,L),this.size+=B.size==oe?0:1,this},ht.prototype.add=ht.prototype.push=function FT(E){return this.__data__.set(E,ki),this},ht.prototype.has=function jT(E){return this.__data__.has(E)},Ss.prototype.clear=function K(){this.__data__=new fo,this.size=0},Ss.prototype.delete=function VT(E){var L=this.__data__,B=L.delete(E);return this.size=L.size,B},Ss.prototype.get=function ke(E){return this.__data__.get(E)},Ss.prototype.has=function Wc(E){return this.__data__.has(E)},Ss.prototype.set=function Jv(E,L){var B=this.__data__;if(B instanceof fo){var oe=B.__data__;if(!bs||oe.length<199)return oe.push([E,L]),this.size=++B.size,this;B=this.__data__=new da(oe)}return B.set(E,L),this.size=B.size,this};var BT=Bf?function(E){return null==E?[]:(E=Object(E),function Rf(E,L){for(var B=-1,oe=null==E?0:E.length,Te=0,Ve=[];++B-1&&E%1==0&&E-1&&E%1==0&&E<=ho}function ma(E){var L=typeof E;return null!=E&&("object"==L||"function"==L)}function bl(E){return null!=E&&"object"==typeof E}var Gf=Pf?function fl(E){return function(L){return E(L)}}(Pf):function Ae(E){return bl(E)&&Zc(E.length)&&!!Ht[ha(E)]};function ob(E){return function U(E){return null!=E&&Zc(E.length)&&!vl(E)}(E)?function Uf(E,L){var B=Yc(E),oe=!B&&fa(E),Te=!B&&!oe&&Qc(E),Ve=!B&&!oe&&!Te&&Gf(E),Qt=B||oe||Te||Ve,yn=Qt?function MT(E,L){for(var B=-1,oe=Array(E);++B{var ri={"./ar-DZ/_lib/formatDistance/index.js":[28066,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,8592,9493],"./ar-DZ/_lib/formatRelative/index.js":[89786,8592],"./ar-DZ/_lib/localize/index.js":[36207,8592,4373],"./ar-DZ/_lib/match/index.js":[53371,8592,2877],"./ar-DZ/index.js":[76327,8592,4288],"./ar-EG/_lib/formatDistance/index.js":[95932,8592],"./ar-EG/_lib/formatLong/index.js":[46023,8592,3639],"./ar-EG/_lib/formatRelative/index.js":[74621,8592],"./ar-EG/_lib/localize/index.js":[93376,8592,1378],"./ar-EG/_lib/match/index.js":[76456,8592,9284],"./ar-EG/index.js":[30830,8592,8477],"./ar-MA/_lib/formatDistance/index.js":[25565,8592],"./ar-MA/_lib/formatLong/index.js":[81783,8592,7236],"./ar-MA/_lib/formatRelative/index.js":[90030,8592],"./ar-MA/_lib/localize/index.js":[60503,8592,7995],"./ar-MA/_lib/match/index.js":[83427,8592,8213],"./ar-MA/index.js":[96094,8592,9736],"./ar-SA/_lib/formatDistance/index.js":[3797,8592],"./ar-SA/_lib/formatLong/index.js":[73212,8592,9090],"./ar-SA/_lib/formatRelative/index.js":[79009,8592],"./ar-SA/_lib/localize/index.js":[12535,8592,124],"./ar-SA/_lib/match/index.js":[14710,8592,2912],"./ar-SA/index.js":[54370,8592,6562],"./ar-TN/_lib/formatDistance/index.js":[56566,8592],"./ar-TN/_lib/formatLong/index.js":[4585,8592,3753],"./ar-TN/_lib/formatRelative/index.js":[5374,8592],"./ar-TN/_lib/localize/index.js":[85963,8592,4843],"./ar-TN/_lib/match/index.js":[13401,8592,2581],"./ar-TN/index.js":[37373,8592,6426],"./be-tarask/_lib/formatDistance/index.js":[82665,8592],"./be-tarask/_lib/formatLong/index.js":[9662,8592,5806],"./be-tarask/_lib/formatRelative/index.js":[4653,4,8592],"./be-tarask/_lib/localize/index.js":[40591,8592,1283],"./be-tarask/_lib/match/index.js":[34412,8592,9938],"./be-tarask/index.js":[27840,4,8592,7840],"./de-AT/_lib/localize/index.js":[44821,8592,8300],"./de-AT/index.js":[21782,8592,243],"./en-AU/_lib/formatLong/index.js":[65493,8592,6237],"./en-AU/index.js":[87747,8592,1128],"./en-CA/_lib/formatDistance/index.js":[80780,8592],"./en-CA/_lib/formatLong/index.js":[26153,8592,7747],"./en-CA/index.js":[21413,8592,7555],"./en-GB/_lib/formatLong/index.js":[33819,8592,4547],"./en-GB/index.js":[33035,8592,1228],"./en-IE/index.js":[61959,8592,463],"./en-IN/_lib/formatLong/index.js":[20862,8592,3191],"./en-IN/index.js":[82873,8592,8757],"./en-NZ/_lib/formatLong/index.js":[36336,8592,3197],"./en-NZ/index.js":[26041,8592,5966],"./en-US/_lib/formatDistance/index.js":[39563,9563],"./en-US/_lib/formatLong/index.js":[66929,6929],"./en-US/_lib/formatRelative/index.js":[21656,1656],"./en-US/_lib/localize/index.js":[31098,9350],"./en-US/_lib/match/index.js":[53239,3239],"./en-US/index.js":[33338,3338],"./en-ZA/_lib/formatLong/index.js":[9221,8592,6951],"./en-ZA/index.js":[11543,8592,4093],"./fa-IR/_lib/formatDistance/index.js":[76726,8592],"./fa-IR/_lib/formatLong/index.js":[10749,8592,7612],"./fa-IR/_lib/formatRelative/index.js":[7220,8592],"./fa-IR/_lib/localize/index.js":[72441,8592,9371],"./fa-IR/_lib/match/index.js":[81488,8592,7743],"./fa-IR/index.js":[84996,8592,5974],"./fr-CA/_lib/formatLong/index.js":[85947,8592,4367],"./fr-CA/index.js":[73723,8592,1688],"./fr-CH/_lib/formatLong/index.js":[27414,8592,3603],"./fr-CH/_lib/formatRelative/index.js":[66155,8592],"./fr-CH/index.js":[24565,8592,4087],"./it-CH/_lib/formatLong/index.js":[31519,8592,6685],"./it-CH/index.js":[87736,8592,2324],"./ja-Hira/_lib/formatDistance/index.js":[84703,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,8592,7336],"./ja-Hira/_lib/formatRelative/index.js":[93381,8592],"./ja-Hira/_lib/localize/index.js":[35710,8592,3665],"./ja-Hira/_lib/match/index.js":[69417,8592,3148],"./ja-Hira/index.js":[12944,8592,1464],"./nl-BE/_lib/formatDistance/index.js":[16129,8592],"./nl-BE/_lib/formatLong/index.js":[17657,8592,3039],"./nl-BE/_lib/formatRelative/index.js":[89811,8592],"./nl-BE/_lib/localize/index.js":[58816,8592,1681],"./nl-BE/_lib/match/index.js":[28333,8592,2237],"./nl-BE/index.js":[70296,8592,4862],"./pt-BR/_lib/formatDistance/index.js":[52638,8592],"./pt-BR/_lib/formatLong/index.js":[33247,8592,4753],"./pt-BR/_lib/formatRelative/index.js":[25492,8592],"./pt-BR/_lib/localize/index.js":[81046,8592,2258],"./pt-BR/_lib/match/index.js":[63770,8592,9792],"./pt-BR/index.js":[47569,8592,1100],"./sr-Latn/_lib/formatDistance/index.js":[69014,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,8592,275],"./sr-Latn/_lib/formatRelative/index.js":[42428,8592],"./sr-Latn/_lib/localize/index.js":[92773,8592,7136],"./sr-Latn/_lib/match/index.js":[7766,8592,3177],"./sr-Latn/index.js":[99064,8592,2152],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,8592,160],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,8592,2654],"./uz-Cyrl/_lib/match/index.js":[75798,8592,1360],"./uz-Cyrl/index.js":[14527,8592,8932],"./zh-CN/_lib/formatDistance/index.js":[33437,8592],"./zh-CN/_lib/formatLong/index.js":[91583,8592,485],"./zh-CN/_lib/formatRelative/index.js":[95629,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,8592,9169],"./zh-CN/_lib/match/index.js":[71362,8592,7103],"./zh-CN/index.js":[86335,8592,8664],"./zh-HK/_lib/formatDistance/index.js":[37348,8592],"./zh-HK/_lib/formatLong/index.js":[60924,8592,3215],"./zh-HK/_lib/formatRelative/index.js":[22164,8592],"./zh-HK/_lib/localize/index.js":[39264,8592,1780],"./zh-HK/_lib/match/index.js":[50358,8592,5641],"./zh-HK/index.js":[59277,8592,2336],"./zh-TW/_lib/formatDistance/index.js":[31613,8592],"./zh-TW/_lib/formatLong/index.js":[1239,8592,248],"./zh-TW/_lib/formatRelative/index.js":[13240,8592],"./zh-TW/_lib/localize/index.js":[29850,8592,9886],"./zh-TW/_lib/match/index.js":[38819,8592,8041],"./zh-TW/index.js":[74565,8592,8978]};function ki(an){if(!mr.o(ri,an))return Promise.resolve().then(()=>{var oi=new Error("Cannot find module '"+an+"'");throw oi.code="MODULE_NOT_FOUND",oi});var gi=ri[an],ho=gi[0];return Promise.all(gi.slice(1).map(mr.e)).then(()=>mr.t(ho,23))}ki.keys=()=>Object.keys(ri),ki.id=13131,Zi.exports=ki},71213:(Zi,oa,mr)=>{var ri={"./_lib/buildFormatLongFn/index.js":[88995,7,8995],"./_lib/buildLocalizeFn/index.js":[77579,7,7579],"./_lib/buildMatchFn/index.js":[84728,7,4728],"./_lib/buildMatchPatternFn/index.js":[27223,7,7223],"./af/_lib/formatDistance/index.js":[55864,7,8592],"./af/_lib/formatLong/index.js":[25358,7,8592,9848],"./af/_lib/formatRelative/index.js":[25892,7,8592],"./af/_lib/localize/index.js":[18874,7,8592,459],"./af/_lib/match/index.js":[22146,7,8592,4568],"./af/index.js":[72399,7,8592,6595],"./ar-DZ/_lib/formatDistance/index.js":[28066,7,8592],"./ar-DZ/_lib/formatLong/index.js":[86369,7,8592,9493],"./ar-DZ/_lib/formatRelative/index.js":[89786,7,8592],"./ar-DZ/_lib/localize/index.js":[36207,7,8592,4373],"./ar-DZ/_lib/match/index.js":[53371,7,8592,2877],"./ar-DZ/index.js":[76327,7,8592,4288],"./ar-EG/_lib/formatDistance/index.js":[95932,7,8592],"./ar-EG/_lib/formatLong/index.js":[46023,7,8592,3639],"./ar-EG/_lib/formatRelative/index.js":[74621,7,8592],"./ar-EG/_lib/localize/index.js":[93376,7,8592,1378],"./ar-EG/_lib/match/index.js":[76456,7,8592,9284],"./ar-EG/index.js":[30830,7,8592,8477],"./ar-MA/_lib/formatDistance/index.js":[25565,7,8592],"./ar-MA/_lib/formatLong/index.js":[81783,7,8592,7236],"./ar-MA/_lib/formatRelative/index.js":[90030,7,8592],"./ar-MA/_lib/localize/index.js":[60503,7,8592,7995],"./ar-MA/_lib/match/index.js":[83427,7,8592,8213],"./ar-MA/index.js":[96094,7,8592,9736],"./ar-SA/_lib/formatDistance/index.js":[3797,7,8592],"./ar-SA/_lib/formatLong/index.js":[73212,7,8592,9090],"./ar-SA/_lib/formatRelative/index.js":[79009,7,8592],"./ar-SA/_lib/localize/index.js":[12535,7,8592,124],"./ar-SA/_lib/match/index.js":[14710,7,8592,2912],"./ar-SA/index.js":[54370,7,8592,6562],"./ar-TN/_lib/formatDistance/index.js":[56566,7,8592],"./ar-TN/_lib/formatLong/index.js":[4585,7,8592,3753],"./ar-TN/_lib/formatRelative/index.js":[5374,7,8592],"./ar-TN/_lib/localize/index.js":[85963,7,8592,4843],"./ar-TN/_lib/match/index.js":[13401,7,8592,2581],"./ar-TN/index.js":[37373,7,8592,6426],"./ar/_lib/formatDistance/index.js":[91118,7,8592],"./ar/_lib/formatLong/index.js":[90899,7,8592,319],"./ar/_lib/formatRelative/index.js":[18739,7,8592],"./ar/_lib/localize/index.js":[64620,7,8592,9521],"./ar/_lib/match/index.js":[32101,7,8592,6574],"./ar/index.js":[91780,7,8592,7519],"./az/_lib/formatDistance/index.js":[2541,7,8592],"./az/_lib/formatLong/index.js":[6246,7,8592,1481],"./az/_lib/formatRelative/index.js":[33557,7,8592],"./az/_lib/localize/index.js":[89347,7,8592,38],"./az/_lib/match/index.js":[75242,7,8592,5991],"./az/index.js":[170,7,8592,6265],"./be-tarask/_lib/formatDistance/index.js":[82665,7,8592],"./be-tarask/_lib/formatLong/index.js":[9662,7,8592,5806],"./be-tarask/_lib/formatRelative/index.js":[4653,7,4,8592],"./be-tarask/_lib/localize/index.js":[40591,7,8592,1283],"./be-tarask/_lib/match/index.js":[34412,7,8592,9938],"./be-tarask/index.js":[27840,7,4,8592,7840],"./be/_lib/formatDistance/index.js":[9006,7,8592],"./be/_lib/formatLong/index.js":[58343,7,8592,193],"./be/_lib/formatRelative/index.js":[20369,7,4,8592],"./be/_lib/localize/index.js":[30768,7,8592,36],"./be/_lib/match/index.js":[35637,7,8592,7910],"./be/index.js":[94646,7,4,8592,4646],"./bg/_lib/formatDistance/index.js":[54037,7,8592],"./bg/_lib/formatLong/index.js":[44221,7,8592,8416],"./bg/_lib/formatRelative/index.js":[24925,7,8592,9491],"./bg/_lib/localize/index.js":[60958,7,8592,7265],"./bg/_lib/match/index.js":[99124,7,8592,4480],"./bg/index.js":[90948,7,8592,6516],"./bn/_lib/formatDistance/index.js":[5190,7,8592,9310],"./bn/_lib/formatLong/index.js":[10846,7,8592,6590],"./bn/_lib/formatRelative/index.js":[90009,7,8592],"./bn/_lib/localize/index.js":[32143,9,8592,6288],"./bn/_lib/match/index.js":[71701,7,8592,9531],"./bn/index.js":[76982,7,8592,1832],"./bs/_lib/formatDistance/index.js":[3504,7,8592],"./bs/_lib/formatLong/index.js":[47625,7,8592,8960],"./bs/_lib/formatRelative/index.js":[69642,7,8592],"./bs/_lib/localize/index.js":[19781,7,8592,5350],"./bs/_lib/match/index.js":[98469,7,8592,7403],"./bs/index.js":[21670,7,8592,6919],"./ca/_lib/formatDistance/index.js":[78470,7,8592],"./ca/_lib/formatLong/index.js":[37682,7,8592,1927],"./ca/_lib/formatRelative/index.js":[73019,7,8592],"./ca/_lib/localize/index.js":[94354,7,8592,6716],"./ca/_lib/match/index.js":[87821,7,8592,4111],"./ca/index.js":[59800,7,8592,2376],"./cs/_lib/formatDistance/index.js":[84712,7,8592],"./cs/_lib/formatLong/index.js":[25366,7,8592,3353],"./cs/_lib/formatRelative/index.js":[30404,7,8592],"./cs/_lib/localize/index.js":[1944,7,8592,7884],"./cs/_lib/match/index.js":[8302,7,8592,4925],"./cs/index.js":[27463,7,8592,9494],"./cy/_lib/formatDistance/index.js":[53860,7,8592],"./cy/_lib/formatLong/index.js":[5355,7,8592,6718],"./cy/_lib/formatRelative/index.js":[11612,7,8592],"./cy/_lib/localize/index.js":[79008,7,8592,6502],"./cy/_lib/match/index.js":[69946,7,8592,9797],"./cy/index.js":[87955,7,8592,7039],"./da/_lib/formatDistance/index.js":[32439,7,8592],"./da/_lib/formatLong/index.js":[40114,7,8592,8688],"./da/_lib/formatRelative/index.js":[33452,7,8592],"./da/_lib/localize/index.js":[22653,7,8592,2710],"./da/_lib/match/index.js":[1416,7,8592,7195],"./da/index.js":[11295,7,8592,2630],"./de-AT/_lib/localize/index.js":[44821,7,8592,8300],"./de-AT/index.js":[21782,7,8592,243],"./de/_lib/formatDistance/index.js":[98815,7,8592],"./de/_lib/formatLong/index.js":[47173,7,8592,4801],"./de/_lib/formatRelative/index.js":[5278,7,8592],"./de/_lib/localize/index.js":[54552,7,8592,6131],"./de/_lib/match/index.js":[31871,7,8592,5131],"./de/index.js":[94086,7,8592,9616],"./el/_lib/formatDistance/index.js":[39298,7,8592],"./el/_lib/formatLong/index.js":[94460,7,8592,2027],"./el/_lib/formatRelative/index.js":[72435,7,8592],"./el/_lib/localize/index.js":[674,7,8592,7538],"./el/_lib/match/index.js":[40588,7,8592,2187],"./el/index.js":[26106,7,8592,5382],"./en-AU/_lib/formatLong/index.js":[65493,7,8592,6237],"./en-AU/index.js":[87747,7,8592,1128],"./en-CA/_lib/formatDistance/index.js":[80780,7,8592],"./en-CA/_lib/formatLong/index.js":[26153,7,8592,7747],"./en-CA/index.js":[21413,7,8592,7555],"./en-GB/_lib/formatLong/index.js":[33819,7,8592,4547],"./en-GB/index.js":[33035,7,8592,1228],"./en-IE/index.js":[61959,7,8592,463],"./en-IN/_lib/formatLong/index.js":[20862,7,8592,3191],"./en-IN/index.js":[82873,7,8592,8757],"./en-NZ/_lib/formatLong/index.js":[36336,7,8592,3197],"./en-NZ/index.js":[26041,7,8592,5966],"./en-US/_lib/formatDistance/index.js":[39563,7,9563],"./en-US/_lib/formatLong/index.js":[66929,7,6929],"./en-US/_lib/formatRelative/index.js":[21656,7,1656],"./en-US/_lib/localize/index.js":[31098,7,9350],"./en-US/_lib/match/index.js":[53239,7,3239],"./en-US/index.js":[33338,7,3338],"./en-ZA/_lib/formatLong/index.js":[9221,7,8592,6951],"./en-ZA/index.js":[11543,7,8592,4093],"./eo/_lib/formatDistance/index.js":[43549,7,8592],"./eo/_lib/formatLong/index.js":[25567,7,8592,8118],"./eo/_lib/formatRelative/index.js":[30410,7,8592],"./eo/_lib/localize/index.js":[27249,7,8592,1634],"./eo/_lib/match/index.js":[75687,7,8592,8199],"./eo/index.js":[63574,7,8592,1411],"./es/_lib/formatDistance/index.js":[66660,7,8592],"./es/_lib/formatLong/index.js":[39055,7,8592,8248],"./es/_lib/formatRelative/index.js":[63774,7,8592],"./es/_lib/localize/index.js":[38835,7,8592,7568],"./es/_lib/match/index.js":[38662,7,8592,6331],"./es/index.js":[23413,7,8592,7412],"./et/_lib/formatDistance/index.js":[64334,7,8592],"./et/_lib/formatLong/index.js":[32045,7,8592,7372],"./et/_lib/formatRelative/index.js":[47074,7,8592],"./et/_lib/localize/index.js":[42462,7,8592,6778],"./et/_lib/match/index.js":[85999,7,8592,7670],"./et/index.js":[65861,7,8592,8138],"./eu/_lib/formatDistance/index.js":[91793,7,8592],"./eu/_lib/formatLong/index.js":[17350,7,8592,2069],"./eu/_lib/formatRelative/index.js":[25688,7,8592],"./eu/_lib/localize/index.js":[28061,7,8592,8759],"./eu/_lib/match/index.js":[11113,7,8592,7462],"./eu/index.js":[29618,7,8592,7969],"./fa-IR/_lib/formatDistance/index.js":[76726,7,8592],"./fa-IR/_lib/formatLong/index.js":[10749,7,8592,7612],"./fa-IR/_lib/formatRelative/index.js":[7220,7,8592],"./fa-IR/_lib/localize/index.js":[72441,7,8592,9371],"./fa-IR/_lib/match/index.js":[81488,7,8592,7743],"./fa-IR/index.js":[84996,7,8592,5974],"./fi/_lib/formatDistance/index.js":[97929,7,8592],"./fi/_lib/formatLong/index.js":[63741,7,8592,694],"./fi/_lib/formatRelative/index.js":[23234,7,8592],"./fi/_lib/localize/index.js":[5936,7,8592,1090],"./fi/_lib/match/index.js":[157,7,8592,5464],"./fi/index.js":[3596,7,8592,4420],"./fr-CA/_lib/formatLong/index.js":[85947,7,8592,4367],"./fr-CA/index.js":[73723,7,8592,1688],"./fr-CH/_lib/formatLong/index.js":[27414,7,8592,3603],"./fr-CH/_lib/formatRelative/index.js":[66155,7,8592],"./fr-CH/index.js":[24565,7,8592,4087],"./fr/_lib/formatDistance/index.js":[26839,7,8592],"./fr/_lib/formatLong/index.js":[32554,7,8592,7586],"./fr/_lib/formatRelative/index.js":[15328,7,8592],"./fr/_lib/localize/index.js":[29821,7,8592,6409],"./fr/_lib/match/index.js":[57047,7,8592,7405],"./fr/index.js":[34153,7,8592,5146],"./fy/_lib/formatDistance/index.js":[60373,7,8592],"./fy/_lib/formatLong/index.js":[97771,7,8592,7654],"./fy/_lib/formatRelative/index.js":[33851,7,8592],"./fy/_lib/localize/index.js":[86993,7,8592,6579],"./fy/_lib/match/index.js":[48603,7,8592,5284],"./fy/index.js":[73434,7,8592,7176],"./gd/_lib/formatDistance/index.js":[45690,7,8592],"./gd/_lib/formatLong/index.js":[2660,7,8592,2e3],"./gd/_lib/formatRelative/index.js":[30700,7,8592],"./gd/_lib/localize/index.js":[40751,7,8592,8987],"./gd/_lib/match/index.js":[40421,7,8592,8809],"./gd/index.js":[48569,7,8592,296],"./gl/_lib/formatDistance/index.js":[35871,7,8592],"./gl/_lib/formatLong/index.js":[30449,7,8592,359],"./gl/_lib/formatRelative/index.js":[95563,7,8592],"./gl/_lib/localize/index.js":[61905,7,8592,594],"./gl/_lib/match/index.js":[33150,7,8592,5012],"./gl/index.js":[96508,7,8592,4612],"./gu/_lib/formatDistance/index.js":[88210,7,8592],"./gu/_lib/formatLong/index.js":[63333,7,8592,7308],"./gu/_lib/formatRelative/index.js":[89348,7,8592],"./gu/_lib/localize/index.js":[50143,7,8592,6108],"./gu/_lib/match/index.js":[50932,7,8592,7091],"./gu/index.js":[75732,7,8592,6971],"./he/_lib/formatDistance/index.js":[42191,7,8592],"./he/_lib/formatLong/index.js":[13925,7,8592,7992],"./he/_lib/formatRelative/index.js":[11481,7,8592],"./he/_lib/localize/index.js":[19661,7,8592,5989],"./he/_lib/match/index.js":[41291,7,8592,5362],"./he/index.js":[86517,7,8592,340],"./hi/_lib/formatDistance/index.js":[52573,7,8592,9170],"./hi/_lib/formatLong/index.js":[30535,7,8592,9664],"./hi/_lib/formatRelative/index.js":[65379,7,8592],"./hi/_lib/localize/index.js":[35423,9,8592,383],"./hi/_lib/match/index.js":[78198,7,8592,652],"./hi/index.js":[29562,7,8592,2592],"./hr/_lib/formatDistance/index.js":[7652,7,8592],"./hr/_lib/formatLong/index.js":[29577,7,8592,6290],"./hr/_lib/formatRelative/index.js":[27603,7,8592],"./hr/_lib/localize/index.js":[12512,7,8592,5734],"./hr/_lib/match/index.js":[83880,7,8592,8808],"./hr/index.js":[41499,7,8592,9108],"./ht/_lib/formatDistance/index.js":[17743,7,8592],"./ht/_lib/formatLong/index.js":[50596,7,8592,1669],"./ht/_lib/formatRelative/index.js":[66473,7,8592],"./ht/_lib/localize/index.js":[98942,7,8592,5217],"./ht/_lib/match/index.js":[18649,7,8592,4042],"./ht/index.js":[91792,7,8592,6132],"./hu/_lib/formatDistance/index.js":[74406,7,8592],"./hu/_lib/formatLong/index.js":[53971,7,8592,7275],"./hu/_lib/formatRelative/index.js":[48580,7,8592],"./hu/_lib/localize/index.js":[6998,7,8592,8730],"./hu/_lib/match/index.js":[69897,7,8592,4330],"./hu/index.js":[85980,7,8592,7955],"./hy/_lib/formatDistance/index.js":[50897,7,8592],"./hy/_lib/formatLong/index.js":[11837,7,8592,1408],"./hy/_lib/formatRelative/index.js":[3543,7,8592],"./hy/_lib/localize/index.js":[90151,7,8592,81],"./hy/_lib/match/index.js":[97177,7,8592,4931],"./hy/index.js":[83268,7,8592,5803],"./id/_lib/formatDistance/index.js":[70846,7,8592],"./id/_lib/formatLong/index.js":[53405,7,8592,7106],"./id/_lib/formatRelative/index.js":[97180,7,8592],"./id/_lib/localize/index.js":[35645,7,8592,4320],"./id/_lib/match/index.js":[87601,7,8592,3434],"./id/index.js":[90146,7,8592,3963],"./is/_lib/formatDistance/index.js":[2370,7,8592],"./is/_lib/formatLong/index.js":[74096,7,8592,1427],"./is/_lib/formatRelative/index.js":[42141,7,8592],"./is/_lib/localize/index.js":[12161,7,8592,5221],"./is/_lib/match/index.js":[20798,7,8592,4321],"./is/index.js":[84111,7,8592,5121],"./it-CH/_lib/formatLong/index.js":[31519,7,8592,6685],"./it-CH/index.js":[87736,7,8592,2324],"./it/_lib/formatDistance/index.js":[40358,7,8592],"./it/_lib/formatLong/index.js":[29588,7,8592,7173],"./it/_lib/formatRelative/index.js":[91403,7,8592,5096],"./it/_lib/localize/index.js":[62007,7,8592,5232],"./it/_lib/match/index.js":[94070,7,8592,4604],"./it/index.js":[93722,7,8592,6815],"./ja-Hira/_lib/formatDistance/index.js":[84703,7,8592],"./ja-Hira/_lib/formatLong/index.js":[56574,7,8592,7336],"./ja-Hira/_lib/formatRelative/index.js":[93381,7,8592],"./ja-Hira/_lib/localize/index.js":[35710,7,8592,3665],"./ja-Hira/_lib/match/index.js":[69417,7,8592,3148],"./ja-Hira/index.js":[12944,7,8592,1464],"./ja/_lib/formatDistance/index.js":[68018,7,8592],"./ja/_lib/formatLong/index.js":[45602,7,8592,1264],"./ja/_lib/formatRelative/index.js":[65297,7,8592],"./ja/_lib/localize/index.js":[77420,7,8592,800],"./ja/_lib/match/index.js":[83926,7,8592,4403],"./ja/index.js":[89251,7,8592,6422],"./ka/_lib/formatDistance/index.js":[39442,7,8592],"./ka/_lib/formatLong/index.js":[960,7,8592,6634],"./ka/_lib/formatRelative/index.js":[18861,7,8592],"./ka/_lib/localize/index.js":[85798,7,8592,599],"./ka/_lib/match/index.js":[55077,7,8592,3545],"./ka/index.js":[34010,7,8592,1289],"./kk/_lib/formatDistance/index.js":[44502,7,8592],"./kk/_lib/formatLong/index.js":[79591,7,8592,1473],"./kk/_lib/formatRelative/index.js":[80876,7,8592,1098],"./kk/_lib/localize/index.js":[16163,7,8592,9023],"./kk/_lib/match/index.js":[11079,7,8592,1038],"./kk/index.js":[61615,7,8592,9444],"./km/_lib/formatDistance/index.js":[69355,7,8592],"./km/_lib/formatLong/index.js":[64335,7,8592,5713],"./km/_lib/formatRelative/index.js":[68462,7,8592],"./km/_lib/localize/index.js":[32885,7,8592,5727],"./km/_lib/match/index.js":[49242,7,8592,3286],"./km/index.js":[98510,7,8592,2044],"./kn/_lib/formatDistance/index.js":[93557,7,8592],"./kn/_lib/formatLong/index.js":[19335,7,8592,2367],"./kn/_lib/formatRelative/index.js":[19080,7,8592],"./kn/_lib/localize/index.js":[83848,7,8592,61],"./kn/_lib/match/index.js":[36809,7,8592,4054],"./kn/index.js":[99517,7,8592,1417],"./ko/_lib/formatDistance/index.js":[21540,7,8592],"./ko/_lib/formatLong/index.js":[47237,7,8592,5780],"./ko/_lib/formatRelative/index.js":[91078,7,8592],"./ko/_lib/localize/index.js":[89409,7,8592,1075],"./ko/_lib/match/index.js":[38567,7,8592,9545],"./ko/index.js":[15058,7,8592,404],"./lb/_lib/formatDistance/index.js":[81904,7,8592],"./lb/_lib/formatLong/index.js":[53103,7,8592,5735],"./lb/_lib/formatRelative/index.js":[64861,7,8592],"./lb/_lib/localize/index.js":[13317,7,8592,8947],"./lb/_lib/match/index.js":[72652,7,8592,6123],"./lb/index.js":[61953,7,8592,9937],"./lt/_lib/formatDistance/index.js":[55348,7,8592],"./lt/_lib/formatLong/index.js":[18290,7,8592,5214],"./lt/_lib/formatRelative/index.js":[53257,7,8592],"./lt/_lib/localize/index.js":[62395,7,8592,6006],"./lt/_lib/match/index.js":[5825,7,8592,8766],"./lt/index.js":[35901,7,8592,1422],"./lv/_lib/formatDistance/index.js":[28910,7,8592],"./lv/_lib/formatLong/index.js":[86421,7,8592,2624],"./lv/_lib/formatRelative/index.js":[60151,7,8592,3746],"./lv/_lib/localize/index.js":[44960,7,8592,406],"./lv/_lib/match/index.js":[4876,7,8592,4139],"./lv/index.js":[82008,7,8592,2537],"./mk/_lib/formatDistance/index.js":[38992,7,8592],"./mk/_lib/formatLong/index.js":[7479,7,8592,6156],"./mk/_lib/formatRelative/index.js":[41655,7,8592,903],"./mk/_lib/localize/index.js":[23458,7,8592,4893],"./mk/_lib/match/index.js":[82975,7,8592,9858],"./mk/index.js":[21880,7,8592,2683],"./mn/_lib/formatDistance/index.js":[61341,7,8592],"./mn/_lib/formatLong/index.js":[19732,7,8592,5992],"./mn/_lib/formatRelative/index.js":[98225,7,8592],"./mn/_lib/localize/index.js":[89576,7,8592,4261],"./mn/_lib/match/index.js":[33306,7,8592,5055],"./mn/index.js":[31937,7,8592,4446],"./ms/_lib/formatDistance/index.js":[97808,7,8592],"./ms/_lib/formatLong/index.js":[61962,7,8592,6623],"./ms/_lib/formatRelative/index.js":[68530,7,8592],"./ms/_lib/localize/index.js":[13241,7,8592,3368],"./ms/_lib/match/index.js":[67079,7,8592,9302],"./ms/index.js":[25098,7,8592,5705],"./mt/_lib/formatDistance/index.js":[14611,7,8592],"./mt/_lib/formatLong/index.js":[65011,7,8592,1161],"./mt/_lib/formatRelative/index.js":[44521,7,8592],"./mt/_lib/localize/index.js":[69408,7,8592,6433],"./mt/_lib/match/index.js":[29726,7,8592,4216],"./mt/index.js":[12811,7,8592,1911],"./nb/_lib/formatDistance/index.js":[59968,7,8592],"./nb/_lib/formatLong/index.js":[20511,7,8592,5168],"./nb/_lib/formatRelative/index.js":[11639,7,8592],"./nb/_lib/localize/index.js":[94249,7,8592,4378],"./nb/_lib/match/index.js":[63498,7,8592,9691],"./nb/index.js":[61295,7,8592,2392],"./nl-BE/_lib/formatDistance/index.js":[16129,7,8592],"./nl-BE/_lib/formatLong/index.js":[17657,7,8592,3039],"./nl-BE/_lib/formatRelative/index.js":[89811,7,8592],"./nl-BE/_lib/localize/index.js":[58816,7,8592,1681],"./nl-BE/_lib/match/index.js":[28333,7,8592,2237],"./nl-BE/index.js":[70296,7,8592,4862],"./nl/_lib/formatDistance/index.js":[57117,7,8592],"./nl/_lib/formatLong/index.js":[57197,7,8592,2377],"./nl/_lib/formatRelative/index.js":[62818,7,8592],"./nl/_lib/localize/index.js":[67706,7,8592,3283],"./nl/_lib/match/index.js":[61430,7,8592,9229],"./nl/index.js":[80775,7,8592,9354],"./nn/_lib/formatDistance/index.js":[4563,7,8592],"./nn/_lib/formatLong/index.js":[89212,7,8592,169],"./nn/_lib/formatRelative/index.js":[2565,7,8592],"./nn/_lib/localize/index.js":[28456,7,8592,4340],"./nn/_lib/match/index.js":[51571,7,8592,9185],"./nn/index.js":[34632,7,8592,7506],"./oc/_lib/formatDistance/index.js":[16585,7,8592],"./oc/_lib/formatLong/index.js":[96725,7,8592,415],"./oc/_lib/formatRelative/index.js":[7548,7,8592],"./oc/_lib/localize/index.js":[93417,7,8592,5746],"./oc/_lib/match/index.js":[18145,7,8592,7829],"./oc/index.js":[68311,7,8592,7250],"./pl/_lib/formatDistance/index.js":[62056,7,8592],"./pl/_lib/formatLong/index.js":[47448,7,8592,5539],"./pl/_lib/formatRelative/index.js":[65991,7,8592,6160],"./pl/_lib/localize/index.js":[4306,7,8592,3498],"./pl/_lib/match/index.js":[76075,7,8592,7768],"./pl/index.js":[8554,7,8592,9134],"./pt-BR/_lib/formatDistance/index.js":[52638,7,8592],"./pt-BR/_lib/formatLong/index.js":[33247,7,8592,4753],"./pt-BR/_lib/formatRelative/index.js":[25492,7,8592],"./pt-BR/_lib/localize/index.js":[81046,7,8592,2258],"./pt-BR/_lib/match/index.js":[63770,7,8592,9792],"./pt-BR/index.js":[47569,7,8592,1100],"./pt/_lib/formatDistance/index.js":[55488,7,8592],"./pt/_lib/formatLong/index.js":[5133,7,8592,2741],"./pt/_lib/formatRelative/index.js":[7493,7,8592],"./pt/_lib/localize/index.js":[58360,7,8592,3713],"./pt/_lib/match/index.js":[37200,7,8592,7033],"./pt/index.js":[24239,7,8592,3530],"./ro/_lib/formatDistance/index.js":[18199,7,8592],"./ro/_lib/formatLong/index.js":[84311,7,8592,173],"./ro/_lib/formatRelative/index.js":[97974,7,8592],"./ro/_lib/localize/index.js":[64729,7,8592,470],"./ro/_lib/match/index.js":[9202,7,8592,9975],"./ro/index.js":[51055,7,8592,5563],"./ru/_lib/formatDistance/index.js":[90650,7,8592],"./ru/_lib/formatLong/index.js":[12580,7,8592,9390],"./ru/_lib/formatRelative/index.js":[15994,7,8592,1338],"./ru/_lib/localize/index.js":[66943,7,8592,6325],"./ru/_lib/match/index.js":[86374,7,8592,7339],"./ru/index.js":[27413,7,8592,9896],"./sk/_lib/formatDistance/index.js":[32882,7,8592],"./sk/_lib/formatLong/index.js":[95087,7,8592,6050],"./sk/_lib/formatRelative/index.js":[35507,7,8592,3951],"./sk/_lib/localize/index.js":[37369,7,8592,3264],"./sk/_lib/match/index.js":[74329,7,8592,9460],"./sk/index.js":[17065,7,8592,5064],"./sl/_lib/formatDistance/index.js":[57613,7,8592],"./sl/_lib/formatLong/index.js":[66302,7,8592,2857],"./sl/_lib/formatRelative/index.js":[92131,7,8592],"./sl/_lib/localize/index.js":[2942,7,8592,6363],"./sl/_lib/match/index.js":[36326,7,8592,7341],"./sl/index.js":[62166,7,8592,2157],"./sq/_lib/formatDistance/index.js":[82569,7,8592],"./sq/_lib/formatLong/index.js":[32784,7,8592,314],"./sq/_lib/formatRelative/index.js":[44390,7,8592],"./sq/_lib/localize/index.js":[26425,7,8592,9930],"./sq/_lib/match/index.js":[72140,7,8592,1445],"./sq/index.js":[70797,7,8592,8556],"./sr-Latn/_lib/formatDistance/index.js":[69014,7,8592],"./sr-Latn/_lib/formatLong/index.js":[99257,7,8592,275],"./sr-Latn/_lib/formatRelative/index.js":[42428,7,8592],"./sr-Latn/_lib/localize/index.js":[92773,7,8592,7136],"./sr-Latn/_lib/match/index.js":[7766,7,8592,3177],"./sr-Latn/index.js":[99064,7,8592,2152],"./sr/_lib/formatDistance/index.js":[55503,7,8592],"./sr/_lib/formatLong/index.js":[13465,7,8592,232],"./sr/_lib/formatRelative/index.js":[25743,7,8592],"./sr/_lib/localize/index.js":[30172,7,8592,5864],"./sr/_lib/match/index.js":[81613,7,8592,7316],"./sr/index.js":[15930,7,8592,5831],"./sv/_lib/formatDistance/index.js":[81387,7,8592],"./sv/_lib/formatLong/index.js":[20660,7,8592,5204],"./sv/_lib/formatRelative/index.js":[43502,7,8592],"./sv/_lib/localize/index.js":[32384,7,8592,4345],"./sv/_lib/match/index.js":[69940,7,8592,7105],"./sv/index.js":[81413,7,8592,5396],"./ta/_lib/formatDistance/index.js":[66840,7,8592],"./ta/_lib/formatLong/index.js":[49391,7,8592,5892],"./ta/_lib/formatRelative/index.js":[99284,7,8592],"./ta/_lib/localize/index.js":[61290,7,8592,6239],"./ta/_lib/match/index.js":[33749,7,8592,4720],"./ta/index.js":[21486,7,8592,7983],"./te/_lib/formatDistance/index.js":[38,7,8592],"./te/_lib/formatLong/index.js":[34703,7,8592,4094],"./te/_lib/formatRelative/index.js":[46611,7,8592],"./te/_lib/localize/index.js":[86184,7,8592,118],"./te/_lib/match/index.js":[17208,7,8592,7193],"./te/index.js":[52492,7,8592,7183],"./th/_lib/formatDistance/index.js":[32939,7,8592],"./th/_lib/formatLong/index.js":[96146,7,8592,8475],"./th/_lib/formatRelative/index.js":[97294,7,8592],"./th/_lib/localize/index.js":[44204,7,8592,6203],"./th/_lib/match/index.js":[59829,7,8592,2626],"./th/index.js":[74785,7,8592,4008],"./tr/_lib/formatDistance/index.js":[77216,7,8592],"./tr/_lib/formatLong/index.js":[68379,7,8592,5102],"./tr/_lib/formatRelative/index.js":[93999,7,8592],"./tr/_lib/localize/index.js":[8830,7,8592,7157],"./tr/_lib/match/index.js":[58828,7,8592,3128],"./tr/index.js":[63131,7,8592,8302],"./ug/_lib/formatDistance/index.js":[69442,7,8592],"./ug/_lib/formatLong/index.js":[36922,7,8592,5002],"./ug/_lib/formatRelative/index.js":[20290,7,8592],"./ug/_lib/localize/index.js":[82490,7,8592,6604],"./ug/_lib/match/index.js":[85282,7,8592,8004],"./ug/index.js":[60182,7,8592,6934],"./uk/_lib/formatDistance/index.js":[10017,7,8592],"./uk/_lib/formatLong/index.js":[26136,7,8592,8806],"./uk/_lib/formatRelative/index.js":[88271,7,4,8592],"./uk/_lib/localize/index.js":[10954,7,8592,1193],"./uk/_lib/match/index.js":[71680,7,8592,6954],"./uk/index.js":[12509,7,4,8592,2509],"./uz-Cyrl/_lib/formatDistance/index.js":[67778,7,8592],"./uz-Cyrl/_lib/formatLong/index.js":[64095,7,8592,160],"./uz-Cyrl/_lib/formatRelative/index.js":[83734,7,8592],"./uz-Cyrl/_lib/localize/index.js":[17670,7,8592,2654],"./uz-Cyrl/_lib/match/index.js":[75798,7,8592,1360],"./uz-Cyrl/index.js":[14527,7,8592,8932],"./uz/_lib/formatDistance/index.js":[27197,7,8592],"./uz/_lib/formatLong/index.js":[27810,7,8592,4328],"./uz/_lib/formatRelative/index.js":[22175,7,8592],"./uz/_lib/localize/index.js":[6881,7,8592,6425],"./uz/_lib/match/index.js":[19263,7,8592,2880],"./uz/index.js":[44203,7,8592,6896],"./vi/_lib/formatDistance/index.js":[61664,7,8592],"./vi/_lib/formatLong/index.js":[42296,7,8592,3405],"./vi/_lib/formatRelative/index.js":[55191,7,8592],"./vi/_lib/localize/index.js":[67431,7,8592,5843],"./vi/_lib/match/index.js":[98442,7,8592,3319],"./vi/index.js":[48875,7,8592,6677],"./zh-CN/_lib/formatDistance/index.js":[33437,7,8592],"./zh-CN/_lib/formatLong/index.js":[91583,7,8592,485],"./zh-CN/_lib/formatRelative/index.js":[95629,7,8592,5441],"./zh-CN/_lib/localize/index.js":[17939,7,8592,9169],"./zh-CN/_lib/match/index.js":[71362,7,8592,7103],"./zh-CN/index.js":[86335,7,8592,8664],"./zh-HK/_lib/formatDistance/index.js":[37348,7,8592],"./zh-HK/_lib/formatLong/index.js":[60924,7,8592,3215],"./zh-HK/_lib/formatRelative/index.js":[22164,7,8592],"./zh-HK/_lib/localize/index.js":[39264,7,8592,1780],"./zh-HK/_lib/match/index.js":[50358,7,8592,5641],"./zh-HK/index.js":[59277,7,8592,2336],"./zh-TW/_lib/formatDistance/index.js":[31613,7,8592],"./zh-TW/_lib/formatLong/index.js":[1239,7,8592,248],"./zh-TW/_lib/formatRelative/index.js":[13240,7,8592],"./zh-TW/_lib/localize/index.js":[29850,7,8592,9886],"./zh-TW/_lib/match/index.js":[38819,7,8592,8041],"./zh-TW/index.js":[74565,7,8592,8978]};function ki(an){if(!mr.o(ri,an))return Promise.resolve().then(()=>{var oi=new Error("Cannot find module '"+an+"'");throw oi.code="MODULE_NOT_FOUND",oi});var gi=ri[an],ho=gi[0];return Promise.all(gi.slice(2).map(mr.e)).then(()=>mr.t(ho,16|gi[1]))}ki.keys=()=>Object.keys(ri),ki.id=71213,Zi.exports=ki}},Zi=>{Zi(Zi.s=2514)}]); \ No newline at end of file