@beterdichtbij/component-library 0.57.0 → 0.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,7 @@
58
58
  `,B6="\u2028",R6="\u2029";function $6(t){const e=t;let n=0,r=1,o=1,i=0;const s=T=>e[T]===P6&&e[T+1]===It,c=T=>e[T]===It,a=T=>e[T]===R6,d=T=>e[T]===B6,u=T=>s(T)||c(T)||a(T)||d(T),f=()=>n,h=()=>r,p=()=>o,m=()=>i,g=T=>s(T)||a(T)||d(T)?It:e[T],v=()=>g(n),y=()=>g(n+i);function b(){return i=0,u(n)&&(r++,o=0),s(n)&&n++,n++,o++,e[n]}function E(){return s(n+i)&&i++,i++,e[n+i]}function C(){n=0,r=1,o=1,i=0}function S(T=0){i=T}function _(){const T=n+i;for(;T!==n;)b();i=0}return{index:f,line:h,column:p,peekOffset:m,charAt:g,currentChar:v,currentPeek:y,next:b,peek:E,reset:C,resetPeek:S,skipToPeek:_}}const Gn=void 0,F6=".",Ip="'",z6="tokenizer";function U6(t,e={}){const n=e.location!==!1,r=$6(t),o=()=>r.index(),i=()=>_6(r.line(),r.column(),r.index()),s=i(),c=o(),a={currentType:13,offset:c,startLoc:s,endLoc:s,lastType:13,lastOffset:c,lastStartLoc:s,lastEndLoc:s,braceNest:0,inLinked:!1,text:""},d=()=>a,{onError:u}=e;function f(A,x,B,...Z){const q=d();if(x.column+=B,x.offset+=B,u){const te=n?qc(q.startLoc,x):null,se=zo(A,te,{domain:z6,args:Z});u(se)}}function h(A,x,B){A.endLoc=i(),A.currentType=x;const Z={type:x};return n&&(Z.loc=qc(A.startLoc,A.endLoc)),B!=null&&(Z.value=B),Z}const p=A=>h(A,13);function m(A,x){return A.currentChar()===x?(A.next(),x):(f(Ie.EXPECTED_TOKEN,i(),0,x),"")}function g(A){let x="";for(;A.currentPeek()===_n||A.currentPeek()===It;)x+=A.currentPeek(),A.peek();return x}function v(A){const x=g(A);return A.skipToPeek(),x}function y(A){if(A===Gn)return!1;const x=A.charCodeAt(0);return x>=97&&x<=122||x>=65&&x<=90||x===95}function b(A){if(A===Gn)return!1;const x=A.charCodeAt(0);return x>=48&&x<=57}function E(A,x){const{currentType:B}=x;if(B!==2)return!1;g(A);const Z=y(A.currentPeek());return A.resetPeek(),Z}function C(A,x){const{currentType:B}=x;if(B!==2)return!1;g(A);const Z=A.currentPeek()==="-"?A.peek():A.currentPeek(),q=b(Z);return A.resetPeek(),q}function S(A,x){const{currentType:B}=x;if(B!==2)return!1;g(A);const Z=A.currentPeek()===Ip;return A.resetPeek(),Z}function _(A,x){const{currentType:B}=x;if(B!==7)return!1;g(A);const Z=A.currentPeek()===".";return A.resetPeek(),Z}function T(A,x){const{currentType:B}=x;if(B!==8)return!1;g(A);const Z=y(A.currentPeek());return A.resetPeek(),Z}function D(A,x){const{currentType:B}=x;if(!(B===7||B===11))return!1;g(A);const Z=A.currentPeek()===":";return A.resetPeek(),Z}function G(A,x){const{currentType:B}=x;if(B!==9)return!1;const Z=()=>{const te=A.currentPeek();return te==="{"?y(A.peek()):te==="@"||te==="|"||te===":"||te==="."||te===_n||!te?!1:te===It?(A.peek(),Z()):j(A,!1)},q=Z();return A.resetPeek(),q}function $(A){g(A);const x=A.currentPeek()==="|";return A.resetPeek(),x}function j(A,x=!0){const B=(q=!1,te="")=>{const se=A.currentPeek();return se==="{"||se==="@"||!se?q:se==="|"?!(te===_n||te===It):se===_n?(A.peek(),B(!0,_n)):se===It?(A.peek(),B(!0,It)):!0},Z=B();return x&&A.resetPeek(),Z}function W(A,x){const B=A.currentChar();return B===Gn?Gn:x(B)?(A.next(),B):null}function Y(A){const x=A.charCodeAt(0);return x>=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===95||x===36}function z(A){return W(A,Y)}function U(A){const x=A.charCodeAt(0);return x>=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===95||x===36||x===45}function F(A){return W(A,U)}function X(A){const x=A.charCodeAt(0);return x>=48&&x<=57}function H(A){return W(A,X)}function ee(A){const x=A.charCodeAt(0);return x>=48&&x<=57||x>=65&&x<=70||x>=97&&x<=102}function ne(A){return W(A,ee)}function ae(A){let x="",B="";for(;x=H(A);)B+=x;return B}function pe(A){let x="";for(;;){const B=A.currentChar();if(B==="{"||B==="}"||B==="@"||B==="|"||!B)break;if(B===_n||B===It)if(j(A))x+=B,A.next();else{if($(A))break;x+=B,A.next()}else x+=B,A.next()}return x}function me(A){v(A);let x="",B="";for(;x=F(A);)B+=x;const Z=A.currentChar();if(Z&&Z!=="}"&&Z!==Gn&&Z!==_n&&Z!==It&&Z!==" "){const q=I(A);return f(Ie.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,B+q),B+q}return A.currentChar()===Gn&&f(Ie.UNTERMINATED_CLOSING_BRACE,i(),0),B}function be(A){v(A);let x="";return A.currentChar()==="-"?(A.next(),x+=`-${ae(A)}`):x+=ae(A),A.currentChar()===Gn&&f(Ie.UNTERMINATED_CLOSING_BRACE,i(),0),x}function Ee(A){return A!==Ip&&A!==It}function Te(A){v(A),m(A,"'");let x="",B="";for(;x=W(A,Ee);)x==="\\"?B+=ve(A):B+=x;const Z=A.currentChar();return Z===It||Z===Gn?(f(Ie.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,i(),0),Z===It&&(A.next(),m(A,"'")),B):(m(A,"'"),B)}function ve(A){const x=A.currentChar();switch(x){case"\\":case"'":return A.next(),`\\${x}`;case"u":return N(A,x,4);case"U":return N(A,x,6);default:return f(Ie.UNKNOWN_ESCAPE_SEQUENCE,i(),0,x),""}}function N(A,x,B){m(A,x);let Z="";for(let q=0;q<B;q++){const te=ne(A);if(!te){f(Ie.INVALID_UNICODE_ESCAPE_SEQUENCE,i(),0,`\\${x}${Z}${A.currentChar()}`);break}Z+=te}return`\\${x}${Z}`}function M(A){return A!=="{"&&A!=="}"&&A!==_n&&A!==It}function I(A){v(A);let x="",B="";for(;x=W(A,M);)B+=x;return B}function O(A){let x="",B="";for(;x=z(A);)B+=x;return B}function k(A){const x=B=>{const Z=A.currentChar();return Z==="{"||Z==="@"||Z==="|"||Z==="("||Z===")"||!Z||Z===_n?B:(B+=Z,A.next(),x(B))};return x("")}function w(A){v(A);const x=m(A,"|");return v(A),x}function P(A,x){let B=null;switch(A.currentChar()){case"{":return x.braceNest>=1&&f(Ie.NOT_ALLOW_NEST_PLACEHOLDER,i(),0),A.next(),B=h(x,2,"{"),v(A),x.braceNest++,B;case"}":return x.braceNest>0&&x.currentType===2&&f(Ie.EMPTY_PLACEHOLDER,i(),0),A.next(),B=h(x,3,"}"),x.braceNest--,x.braceNest>0&&v(A),x.inLinked&&x.braceNest===0&&(x.inLinked=!1),B;case"@":return x.braceNest>0&&f(Ie.UNTERMINATED_CLOSING_BRACE,i(),0),B=R(A,x)||p(x),x.braceNest=0,B;default:{let q=!0,te=!0,se=!0;if($(A))return x.braceNest>0&&f(Ie.UNTERMINATED_CLOSING_BRACE,i(),0),B=h(x,1,w(A)),x.braceNest=0,x.inLinked=!1,B;if(x.braceNest>0&&(x.currentType===4||x.currentType===5||x.currentType===6))return f(Ie.UNTERMINATED_CLOSING_BRACE,i(),0),x.braceNest=0,K(A,x);if(q=E(A,x))return B=h(x,4,me(A)),v(A),B;if(te=C(A,x))return B=h(x,5,be(A)),v(A),B;if(se=S(A,x))return B=h(x,6,Te(A)),v(A),B;if(!q&&!te&&!se)return B=h(x,12,I(A)),f(Ie.INVALID_TOKEN_IN_PLACEHOLDER,i(),0,B.value),v(A),B;break}}return B}function R(A,x){const{currentType:B}=x;let Z=null;const q=A.currentChar();switch((B===7||B===8||B===11||B===9)&&(q===It||q===_n)&&f(Ie.INVALID_LINKED_FORMAT,i(),0),q){case"@":return A.next(),Z=h(x,7,"@"),x.inLinked=!0,Z;case".":return v(A),A.next(),h(x,8,".");case":":return v(A),A.next(),h(x,9,":");default:return $(A)?(Z=h(x,1,w(A)),x.braceNest=0,x.inLinked=!1,Z):_(A,x)||D(A,x)?(v(A),R(A,x)):T(A,x)?(v(A),h(x,11,O(A))):G(A,x)?(v(A),q==="{"?P(A,x)||Z:h(x,10,k(A))):(B===7&&f(Ie.INVALID_LINKED_FORMAT,i(),0),x.braceNest=0,x.inLinked=!1,K(A,x))}}function K(A,x){let B={type:13};if(x.braceNest>0)return P(A,x)||p(x);if(x.inLinked)return R(A,x)||p(x);switch(A.currentChar()){case"{":return P(A,x)||p(x);case"}":return f(Ie.UNBALANCED_CLOSING_BRACE,i(),0),A.next(),h(x,3,"}");case"@":return R(A,x)||p(x);default:{if($(A))return B=h(x,1,w(A)),x.braceNest=0,x.inLinked=!1,B;if(j(A))return h(x,0,pe(A));break}}return B}function Q(){const{currentType:A,offset:x,startLoc:B,endLoc:Z}=a;return a.lastType=A,a.lastOffset=x,a.lastStartLoc=B,a.lastEndLoc=Z,a.offset=o(),a.startLoc=i(),r.currentChar()===Gn?h(a,13):K(r,a)}return{nextToken:Q,currentOffset:o,currentPosition:i,context:d}}const H6="parser",j6=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function W6(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function K6(t={}){const e=t.location!==!1,{onError:n}=t;function r(y,b,E,C,...S){const _=y.currentPosition();if(_.offset+=C,_.column+=C,n){const T=e?qc(E,_):null,D=zo(b,T,{domain:H6,args:S});n(D)}}function o(y,b,E){const C={type:y};return e&&(C.start=b,C.end=b,C.loc={start:E,end:E}),C}function i(y,b,E,C){e&&(y.end=b,y.loc&&(y.loc.end=E))}function s(y,b){const E=y.context(),C=o(3,E.offset,E.startLoc);return C.value=b,i(C,y.currentOffset(),y.currentPosition()),C}function c(y,b){const E=y.context(),{lastOffset:C,lastStartLoc:S}=E,_=o(5,C,S);return _.index=parseInt(b,10),y.nextToken(),i(_,y.currentOffset(),y.currentPosition()),_}function a(y,b){const E=y.context(),{lastOffset:C,lastStartLoc:S}=E,_=o(4,C,S);return _.key=b,y.nextToken(),i(_,y.currentOffset(),y.currentPosition()),_}function d(y,b){const E=y.context(),{lastOffset:C,lastStartLoc:S}=E,_=o(9,C,S);return _.value=b.replace(j6,W6),y.nextToken(),i(_,y.currentOffset(),y.currentPosition()),_}function u(y){const b=y.nextToken(),E=y.context(),{lastOffset:C,lastStartLoc:S}=E,_=o(8,C,S);return b.type!==11?(r(y,Ie.UNEXPECTED_EMPTY_LINKED_MODIFIER,E.lastStartLoc,0),_.value="",i(_,C,S),{nextConsumeToken:b,node:_}):(b.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Nn(b)),_.value=b.value||"",i(_,y.currentOffset(),y.currentPosition()),{node:_})}function f(y,b){const E=y.context(),C=o(7,E.offset,E.startLoc);return C.value=b,i(C,y.currentOffset(),y.currentPosition()),C}function h(y){const b=y.context(),E=o(6,b.offset,b.startLoc);let C=y.nextToken();if(C.type===8){const S=u(y);E.modifier=S.node,C=S.nextConsumeToken||y.nextToken()}switch(C.type!==9&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(C)),C=y.nextToken(),C.type===2&&(C=y.nextToken()),C.type){case 10:C.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(C)),E.key=f(y,C.value||"");break;case 4:C.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(C)),E.key=a(y,C.value||"");break;case 5:C.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(C)),E.key=c(y,C.value||"");break;case 6:C.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(C)),E.key=d(y,C.value||"");break;default:{r(y,Ie.UNEXPECTED_EMPTY_LINKED_KEY,b.lastStartLoc,0);const S=y.context(),_=o(7,S.offset,S.startLoc);return _.value="",i(_,S.offset,S.startLoc),E.key=_,i(E,S.offset,S.startLoc),{nextConsumeToken:C,node:E}}}return i(E,y.currentOffset(),y.currentPosition()),{node:E}}function p(y){const b=y.context(),E=b.currentType===1?y.currentOffset():b.offset,C=b.currentType===1?b.endLoc:b.startLoc,S=o(2,E,C);S.items=[];let _=null;do{const G=_||y.nextToken();switch(_=null,G.type){case 0:G.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(G)),S.items.push(s(y,G.value||""));break;case 5:G.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(G)),S.items.push(c(y,G.value||""));break;case 4:G.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(G)),S.items.push(a(y,G.value||""));break;case 6:G.value==null&&r(y,Ie.UNEXPECTED_LEXICAL_ANALYSIS,b.lastStartLoc,0,Nn(G)),S.items.push(d(y,G.value||""));break;case 7:{const $=h(y);S.items.push($.node),_=$.nextConsumeToken||null;break}}}while(b.currentType!==13&&b.currentType!==1);const T=b.currentType===1?b.lastOffset:y.currentOffset(),D=b.currentType===1?b.lastEndLoc:y.currentPosition();return i(S,T,D),S}function m(y,b,E,C){const S=y.context();let _=C.items.length===0;const T=o(1,b,E);T.cases=[],T.cases.push(C);do{const D=p(y);_||(_=D.items.length===0),T.cases.push(D)}while(S.currentType!==13);return _&&r(y,Ie.MUST_HAVE_MESSAGES_IN_PLURAL,E,0),i(T,y.currentOffset(),y.currentPosition()),T}function g(y){const b=y.context(),{offset:E,startLoc:C}=b,S=p(y);return b.currentType===13?S:m(y,E,C,S)}function v(y){const b=U6(y,gt({},t)),E=b.context(),C=o(0,E.offset,E.startLoc);return e&&C.loc&&(C.loc.source=y),C.body=g(b),t.onCacheKey&&(C.cacheKey=t.onCacheKey(y)),E.currentType!==13&&r(b,Ie.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,y[E.offset]||""),i(C,b.currentOffset(),b.currentPosition()),C}return{parse:v}}function Nn(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function Y6(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:i=>(n.helpers.add(i),i)}}function _p(t,e){for(let n=0;n<t.length;n++)Vc(t[n],e)}function Vc(t,e){switch(t.type){case 1:_p(t.cases,e),e.helper("plural");break;case 2:_p(t.items,e);break;case 6:{Vc(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function G6(t,e={}){const n=Y6(t);n.helper("normalize"),t.body&&Vc(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function Q6(t){const e=t.body;return e.type===2?Np(e):e.cases.forEach(n=>Np(n)),t}function Np(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const r=t.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===t.items.length){t.static=Xc(e);for(let n=0;n<t.items.length;n++){const r=t.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const Z6="minifier";function Uo(t){switch(t.t=t.type,t.type){case 0:{const e=t;Uo(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,n=e.cases;for(let r=0;r<n.length;r++)Uo(n[r]);e.c=n,delete e.cases;break}case 2:{const e=t,n=e.items;for(let r=0;r<n.length;r++)Uo(n[r]);e.i=n,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;Uo(e.key),e.k=e.key,delete e.key,e.modifier&&(Uo(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw zo(Ie.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:Z6,args:[t.type]})}delete t.type}const J6="parser";function X6(t,e){const{filename:n,breakLineCode:r,needIndent:o}=e,i=e.location!==!1,s={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:o,indentLevel:0};i&&t.loc&&(s.source=t.loc.source);const c=()=>s;function a(g,v){s.code+=g}function d(g,v=!0){const y=v?r:"";a(o?y+" ".repeat(g):y)}function u(g=!0){const v=++s.indentLevel;g&&d(v)}function f(g=!0){const v=--s.indentLevel;g&&d(v)}function h(){d(s.indentLevel)}return{context:c,push:a,indent:u,deindent:f,newline:h,helper:g=>`_${g}`,needIndent:()=>s.needIndent}}function q6(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Ho(t,e.key),e.modifier?(t.push(", "),Ho(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function V6(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const o=e.items.length;for(let i=0;i<o&&(Ho(t,e.items[i]),i!==o-1);i++)t.push(", ");t.deindent(r()),t.push("])")}function eC(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const o=e.cases.length;for(let i=0;i<o&&(Ho(t,e.cases[i]),i!==o-1);i++)t.push(", ");t.deindent(r()),t.push("])")}}function tC(t,e){e.body?Ho(t,e.body):t.push("null")}function Ho(t,e){const{helper:n}=t;switch(e.type){case 0:tC(t,e);break;case 1:eC(t,e);break;case 2:V6(t,e);break;case 6:q6(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw zo(Ie.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:J6,args:[e.type]})}}const nC=(t,e={})=>{const n=Ce(e.mode)?e.mode:"normal",r=Ce(e.filename)?e.filename:"message.intl";e.sourceMap;const o=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
59
59
  `,i=e.needIndent?e.needIndent:n!=="arrow",s=t.helpers||[],c=X6(t,{filename:r,breakLineCode:o,needIndent:i});c.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),c.indent(i),s.length>0&&(c.push(`const { ${Xc(s.map(u=>`${u}: _${u}`),", ")} } = ctx`),c.newline()),c.push("return "),Ho(c,t),c.deindent(i),c.push("}"),delete t.helpers;const{code:a,map:d}=c.context();return{ast:t,code:a,map:d?d.toJSON():void 0}};function rC(t,e={}){const n=gt({},e),r=!!n.jit,o=!!n.minify,i=n.optimize==null?!0:n.optimize,c=K6(n).parse(t);return r?(i&&Q6(c),o&&Uo(c),{ast:c,code:""}):(G6(c,n),nC(c,n))}function oC(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(no().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(no().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function bn(t){return Ue(t)&&ed(t)===0&&(yn(t,"b")||yn(t,"body"))}const Op=["b","body"];function iC(t){return mr(t,Op)}const Mp=["c","cases"];function sC(t){return mr(t,Mp,[])}const Lp=["s","static"];function aC(t){return mr(t,Lp)}const Dp=["i","items"];function lC(t){return mr(t,Dp,[])}const Pp=["t","type"];function ed(t){return mr(t,Pp)}const Bp=["v","value"];function ha(t,e){const n=mr(t,Bp);if(n!=null)return n;throw Ni(e)}const Rp=["m","modifier"];function cC(t){return mr(t,Rp)}const $p=["k","key"];function dC(t){const e=mr(t,$p);if(e)return e;throw Ni(6)}function mr(t,e,n){for(let r=0;r<e.length;r++){const o=e[r];if(yn(t,o)&&t[o]!=null)return t[o]}return n}const Fp=[...Op,...Mp,...Lp,...Dp,...$p,...Rp,...Bp,...Pp];function Ni(t){return new Error(`unhandled node type: ${t}`)}function td(t){return n=>uC(n,t)}function uC(t,e){const n=iC(e);if(n==null)throw Ni(0);if(ed(n)===1){const i=sC(n);return t.plural(i.reduce((s,c)=>[...s,zp(t,c)],[]))}else return zp(t,n)}function zp(t,e){const n=aC(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=lC(e).reduce((o,i)=>[...o,nd(t,i)],[]);return t.normalize(r)}}function nd(t,e){const n=ed(e);switch(n){case 3:return ha(e,n);case 9:return ha(e,n);case 4:{const r=e;if(yn(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(yn(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw Ni(n)}case 5:{const r=e;if(yn(r,"i")&&mt(r.i))return t.interpolate(t.list(r.i));if(yn(r,"index")&&mt(r.index))return t.interpolate(t.list(r.index));throw Ni(n)}case 6:{const r=e,o=cC(r),i=dC(r);return t.linked(nd(t,i),o?nd(t,o):void 0,t.type)}case 7:return ha(e,n);case 8:return ha(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const fC="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function hC(t,e){e&&D6(t)&&In(la(fC,{source:t}))}const pC=t=>t;let pa=We();function mC(t,e={}){let n=!1;const r=e.onError||M6;return e.onError=o=>{n=!0,r(o)},{...rC(t,e),detectError:n}}function gC(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Ce(t)){const n=st(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&hC(t,n);const o=(e.onCacheKey||pC)(t),i=pa[o];if(i)return i;const{ast:s,detectError:c}=mC(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),a=td(s);return c?a:pa[o]=a}else{if(process.env.NODE_ENV!=="production"&&!bn(t))return In(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),(()=>t);const n=t.cacheKey;if(n){const r=pa[n];return r||(pa[n]=td(t))}else return td(t)}}let Oi=null;function vC(t){Oi=t}function yC(t,e,n){Oi&&Oi.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const bC=CC("function:translate");function CC(t){return e=>Oi&&Oi.emit(t,e)}const _t={INVALID_ARGUMENT:N6,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},EC=24;function Qn(t){return zo(t,null,process.env.NODE_ENV!=="production"?{messages:kC}:void 0)}const kC={[_t.INVALID_ARGUMENT]:"Invalid arguments",[_t.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[_t.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[_t.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[_t.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[_t.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[_t.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function rd(t,e){return e.locale!=null?Up(e.locale):Up(t.locale)}let od;function Up(t){if(Ce(t))return t;if(Je(t)){if(t.resolvedOnce&&od!=null)return od;if(t.constructor.name==="Function"){const e=t();if(A6(e))throw Qn(_t.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return od=e}else throw Qn(_t.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Qn(_t.NOT_SUPPORT_LOCALE_TYPE)}function wC(t,e,n){return[...new Set([n,...it(e)?e:Ue(e)?Object.keys(e):Ce(e)?[e]:[n]])]}function Hp(t,e,n){const r=Ce(n)?n:ga,o=t;o.__localeChainCache||(o.__localeChainCache=new Map);let i=o.__localeChainCache.get(r);if(!i){i=[];let s=[n];for(;it(s);)s=jp(i,s,e);const c=it(e)||!He(e)?e:e.default?e.default:null;s=Ce(c)?[c]:c,it(s)&&jp(i,s,!1),o.__localeChainCache.set(r,i)}return i}function jp(t,e,n){let r=!0;for(let o=0;o<e.length&&st(r);o++){const i=e[o];Ce(i)&&(r=SC(t,e[o],n))}return r}function SC(t,e,n){let r;const o=e.split("-");do{const i=o.join("-");r=AC(t,i,n),o.splice(-1,1)}while(o.length&&r===!0);return r}function AC(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const o=e.replace(/!/g,"");t.push(o),(it(n)||He(n))&&n[o]&&(r=n[o])}return r}const gr=[];gr[0]={w:[0],i:[3,0],"[":[4],o:[7]},gr[1]={w:[1],".":[2],"[":[4],o:[7]},gr[2]={w:[2],i:[3,0],0:[3,0]},gr[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},gr[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},gr[5]={"'":[4,0],o:8,l:[5,0]},gr[6]={'"':[4,0],o:8,l:[6,0]};const xC=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function TC(t){return xC.test(t)}function IC(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function _C(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function NC(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:TC(e)?IC(e):"*"+e}function OC(t){const e=[];let n=-1,r=0,o=0,i,s,c,a,d,u,f;const h=[];h[0]=()=>{s===void 0?s=c:s+=c},h[1]=()=>{s!==void 0&&(e.push(s),s=void 0)},h[2]=()=>{h[0](),o++},h[3]=()=>{if(o>0)o--,r=4,h[0]();else{if(o=0,s===void 0||(s=NC(s),s===!1))return!1;h[1]()}};function p(){const m=t[n+1];if(r===5&&m==="'"||r===6&&m==='"')return n++,c="\\"+m,h[0](),!0}for(;r!==null;)if(n++,i=t[n],!(i==="\\"&&p())){if(a=_C(i),f=gr[r],d=f[a]||f.l||8,d===8||(r=d[0],d[1]!==void 0&&(u=h[d[1]],u&&(c=i,u()===!1))))return;if(r===7)return e}}const Wp=new Map;function MC(t,e){return Ue(t)?t[e]:null}function LC(t,e){if(!Ue(t))return null;let n=Wp.get(e);if(n||(n=OC(e),n&&Wp.set(e,n)),!n)return null;const r=n.length;let o=t,i=0;for(;i<r;){const s=n[i];if(Fp.includes(s)&&bn(o))return null;const c=o[s];if(c===void 0||Je(o))return null;o=c,i++}return o}const Ut={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},DC=8,PC={[Ut.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[Ut.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[Ut.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[Ut.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[Ut.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[Ut.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[Ut.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function ro(t,...e){return la(PC[t],...e)}const BC="11.2.8",ma=-1,ga="en-US",va="",Kp=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function RC(){return{upper:(t,e)=>e==="text"&&Ce(t)?t.toUpperCase():e==="vnode"&&Ue(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Ce(t)?t.toLowerCase():e==="vnode"&&Ue(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Ce(t)?Kp(t):e==="vnode"&&Ue(t)&&"__v_isVNode"in t?Kp(t.children):t}}let Yp;function $C(t){Yp=t}let Gp;function FC(t){Gp=t}let Qp;function zC(t){Qp=t}let Zp=null;const UC=t=>{Zp=t},HC=()=>Zp;let Jp=null;const Xp=t=>{Jp=t},jC=()=>Jp;let qp=0;function WC(t={}){const e=Je(t.onWarn)?t.onWarn:In,n=Ce(t.version)?t.version:BC,r=Ce(t.locale)||Je(t.locale)?t.locale:ga,o=Je(r)?ga:r,i=it(t.fallbackLocale)||He(t.fallbackLocale)||Ce(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:o,s=He(t.messages)?t.messages:id(o),c=He(t.datetimeFormats)?t.datetimeFormats:id(o),a=He(t.numberFormats)?t.numberFormats:id(o),d=gt(We(),t.modifiers,RC()),u=t.pluralRules||We(),f=Je(t.missing)?t.missing:null,h=st(t.missingWarn)||ca(t.missingWarn)?t.missingWarn:!0,p=st(t.fallbackWarn)||ca(t.fallbackWarn)?t.fallbackWarn:!0,m=!!t.fallbackFormat,g=!!t.unresolving,v=Je(t.postTranslation)?t.postTranslation:null,y=He(t.processor)?t.processor:null,b=st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,E=!!t.escapeParameter,C=Je(t.messageCompiler)?t.messageCompiler:Yp;process.env.NODE_ENV!=="production"&&Je(t.messageCompiler)&&v6(ro(Ut.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const S=Je(t.messageResolver)?t.messageResolver:Gp||MC,_=Je(t.localeFallbacker)?t.localeFallbacker:Qp||wC,T=Ue(t.fallbackContext)?t.fallbackContext:void 0,D=t,G=Ue(D.__datetimeFormatters)?D.__datetimeFormatters:new Map,$=Ue(D.__numberFormatters)?D.__numberFormatters:new Map,j=Ue(D.__meta)?D.__meta:{};qp++;const W={version:n,cid:qp,locale:r,fallbackLocale:i,messages:s,modifiers:d,pluralRules:u,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:m,unresolving:g,postTranslation:v,processor:y,warnHtmlMessage:b,escapeParameter:E,messageCompiler:C,messageResolver:S,localeFallbacker:_,fallbackContext:T,onWarn:e,__meta:j};return W.datetimeFormats=c,W.numberFormats=a,W.__datetimeFormatters=G,W.__numberFormatters=$,process.env.NODE_ENV!=="production"&&(W.__v_emitter=D.__v_emitter!=null?D.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&yC(W,n,j),W}const id=t=>({[t]:We()});function ya(t,e){return t instanceof RegExp?t.test(e):t}function Vp(t,e){return t instanceof RegExp?t.test(e):t}function sd(t,e,n,r,o){const{missing:i,onWarn:s}=t;if(process.env.NODE_ENV!=="production"){const c=t.__v_emitter;c&&c.emit("missing",{locale:n,key:e,type:o,groupId:`${o}:${e}`})}if(i!==null){const c=i(t,n,e,o);return Ce(c)?c:e}else return process.env.NODE_ENV!=="production"&&Vp(r,e)&&s(ro(Ut.NOT_FOUND_KEY,{key:e,locale:n})),e}function Mi(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function e1(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function KC(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(e1(t,e[r]))return!0;return!1}const t1=typeof Intl<"u",n1={dateTimeFormat:t1&&typeof Intl.DateTimeFormat<"u",numberFormat:t1&&typeof Intl.NumberFormat<"u"};function r1(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:i,localeFallbacker:s}=t,{__datetimeFormatters:c}=t;if(process.env.NODE_ENV!=="production"&&!n1.dateTimeFormat)return i(ro(Ut.CANNOT_FORMAT_DATE)),va;const[a,d,u,f]=ad(...e),h=st(u.missingWarn)?u.missingWarn:t.missingWarn,p=st(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=rd(t,u),v=s(t,o,g);if(!Ce(a)||a==="")return new Intl.DateTimeFormat(g,f).format(d);let y={},b,E=null,C=g,S=null;const _="datetime format";for(let G=0;G<v.length;G++){if(b=S=v[G],process.env.NODE_ENV!=="production"&&g!==b&&ya(p,a)&&i(ro(Ut.FALLBACK_TO_DATE_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=t.__v_emitter;$&&$.emit("fallback",{type:_,key:a,from:C,to:S,groupId:`${_}:${a}`})}if(y=n[b]||{},E=y[a],He(E))break;sd(t,a,b,h,_),C=S}if(!He(E)||!Ce(b))return r?ma:a;let T=`${b}__${a}`;da(f)||(T=`${T}__${JSON.stringify(f)}`);let D=c.get(T);return D||(D=new Intl.DateTimeFormat(b,gt({},E,f)),c.set(T,D)),m?D.formatToParts(d):D.format(d)}const o1=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function ad(...t){const[e,n,r,o]=t,i=We();let s=We(),c;if(Ce(e)){const a=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw Qn(_t.INVALID_ISO_DATE_ARGUMENT);const d=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();c=new Date(d);try{c.toISOString()}catch{throw Qn(_t.INVALID_ISO_DATE_ARGUMENT)}}else if(E6(e)){if(isNaN(e.getTime()))throw Qn(_t.INVALID_DATE_ARGUMENT);c=e}else if(mt(e))c=e;else throw Qn(_t.INVALID_ARGUMENT);return Ce(n)?i.key=n:He(n)&&Object.keys(n).forEach(a=>{o1.includes(a)?s[a]=n[a]:i[a]=n[a]}),Ce(r)?i.locale=r:He(r)&&(s=r),He(o)&&(s=o),[i.key||"",c,i,s]}function i1(t,e,n){const r=t;for(const o in n){const i=`${e}__${o}`;r.__datetimeFormatters.has(i)&&r.__datetimeFormatters.delete(i)}}function s1(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:i,localeFallbacker:s}=t,{__numberFormatters:c}=t;if(process.env.NODE_ENV!=="production"&&!n1.numberFormat)return i(ro(Ut.CANNOT_FORMAT_NUMBER)),va;const[a,d,u,f]=ld(...e),h=st(u.missingWarn)?u.missingWarn:t.missingWarn,p=st(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn,m=!!u.part,g=rd(t,u),v=s(t,o,g);if(!Ce(a)||a==="")return new Intl.NumberFormat(g,f).format(d);let y={},b,E=null,C=g,S=null;const _="number format";for(let G=0;G<v.length;G++){if(b=S=v[G],process.env.NODE_ENV!=="production"&&g!==b&&ya(p,a)&&i(ro(Ut.FALLBACK_TO_NUMBER_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=t.__v_emitter;$&&$.emit("fallback",{type:_,key:a,from:C,to:S,groupId:`${_}:${a}`})}if(y=n[b]||{},E=y[a],He(E))break;sd(t,a,b,h,_),C=S}if(!He(E)||!Ce(b))return r?ma:a;let T=`${b}__${a}`;da(f)||(T=`${T}__${JSON.stringify(f)}`);let D=c.get(T);return D||(D=new Intl.NumberFormat(b,gt({},E,f)),c.set(T,D)),m?D.formatToParts(d):D.format(d)}const a1=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function ld(...t){const[e,n,r,o]=t,i=We();let s=We();if(!mt(e))throw Qn(_t.INVALID_ARGUMENT);const c=e;return Ce(n)?i.key=n:He(n)&&Object.keys(n).forEach(a=>{a1.includes(a)?s[a]=n[a]:i[a]=n[a]}),Ce(r)?i.locale=r:He(r)&&(s=r),He(o)&&(s=o),[i.key||"",c,i,s]}function l1(t,e,n){const r=t;for(const o in n){const i=`${e}__${o}`;r.__numberFormatters.has(i)&&r.__numberFormatters.delete(i)}}const YC=t=>t,GC=t=>"",QC="text",ZC=t=>t.length===0?"":Xc(t),JC=x6;function c1(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function XC(t){const e=mt(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(mt(t.named.count)||mt(t.named.n))?mt(t.named.count)?t.named.count:mt(t.named.n)?t.named.n:e:e}function qC(t,e){e.count||(e.count=t),e.n||(e.n=t)}function VC(t={}){const e=t.locale,n=XC(t),r=Ue(t.pluralRules)&&Ce(e)&&Je(t.pluralRules[e])?t.pluralRules[e]:c1,o=Ue(t.pluralRules)&&Ce(e)&&Je(t.pluralRules[e])?c1:void 0,i=y=>y[r(n,y.length,o)],s=t.list||[],c=y=>s[y],a=t.named||We();mt(t.pluralIndex)&&qC(n,a);const d=y=>a[y];function u(y,b){const E=Je(t.messages)?t.messages(y,!!b):Ue(t.messages)?t.messages[y]:!1;return E||(t.parent?t.parent.message(y):GC)}const f=y=>t.modifiers?t.modifiers[y]:YC,h=He(t.processor)&&Je(t.processor.normalize)?t.processor.normalize:ZC,p=He(t.processor)&&Je(t.processor.interpolate)?t.processor.interpolate:JC,m=He(t.processor)&&Ce(t.processor.type)?t.processor.type:QC,v={list:c,named:d,plural:i,linked:(y,...b)=>{const[E,C]=b;let S="text",_="";b.length===1?Ue(E)?(_=E.modifier||_,S=E.type||S):Ce(E)&&(_=E||_):b.length===2&&(Ce(E)&&(_=E||_),Ce(C)&&(S=C||S));const T=u(y,!0)(v),D=S==="vnode"&&it(T)&&_?T[0]:T;return _?f(_)(D,S):D},message:u,type:m,interpolate:p,normalize:h,values:gt(We(),s,a)};return v}const d1=()=>"",nn=t=>Je(t);function u1(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:i,fallbackLocale:s,messages:c}=t,[a,d]=cd(...e),u=st(d.missingWarn)?d.missingWarn:t.missingWarn,f=st(d.fallbackWarn)?d.fallbackWarn:t.fallbackWarn,h=st(d.escapeParameter)?d.escapeParameter:t.escapeParameter,p=!!d.resolvedMessage,m=Ce(d.default)||st(d.default)?st(d.default)?i?a:()=>a:d.default:n?i?a:()=>a:null,g=n||m!=null&&(Ce(m)||Je(m)),v=rd(t,d);h&&e9(d);let[y,b,E]=p?[a,v,c[v]||We()]:f1(t,a,v,s,f,u),C=y,S=a;if(!p&&!(Ce(C)||bn(C)||nn(C))&&g&&(C=m,S=C),!p&&(!(Ce(C)||bn(C)||nn(C))||!Ce(b)))return o?ma:a;if(process.env.NODE_ENV!=="production"&&Ce(C)&&t.messageCompiler==null)return In(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${a}'.`),a;let _=!1;const T=()=>{_=!0},D=nn(C)?C:h1(t,a,b,C,S,T);if(_)return C;const G=o9(t,b,E,d),$=VC(G),j=t9(t,D,$);let W=r?r(j,a):j;if(h&&Ce(W)&&(W=w6(W)),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const Y={timestamp:Date.now(),key:Ce(a)?a:nn(C)?C.key:"",locale:b||(nn(C)?C.locale:""),format:Ce(C)?C:nn(C)?C.source:"",message:W};Y.meta=gt({},t.__meta,HC()||{}),bC(Y)}return W}function e9(t){it(t.list)?t.list=t.list.map(e=>Ce(e)?Sp(e):e):Ue(t.named)&&Object.keys(t.named).forEach(e=>{Ce(t.named[e])&&(t.named[e]=Sp(t.named[e]))})}function f1(t,e,n,r,o,i){const{messages:s,onWarn:c,messageResolver:a,localeFallbacker:d}=t,u=d(t,r,n);let f=We(),h,p=null,m=n,g=null;const v="translate";for(let y=0;y<u.length;y++){if(h=g=u[y],process.env.NODE_ENV!=="production"&&n!==h&&!e1(n,h)&&ya(o,e)&&c(ro(Ut.FALLBACK_TO_TRANSLATE,{key:e,target:h})),process.env.NODE_ENV!=="production"&&n!==h){const S=t.__v_emitter;S&&S.emit("fallback",{type:v,key:e,from:m,to:g,groupId:`${v}:${e}`})}f=s[h]||We();let b=null,E,C;if(process.env.NODE_ENV!=="production"&&Kn&&(b=window.performance.now(),E="intlify-message-resolve-start",C="intlify-message-resolve-end",Zt&&Zt(E)),(p=a(f,e))===null&&(p=f[e]),process.env.NODE_ENV!=="production"&&Kn){const S=window.performance.now(),_=t.__v_emitter;_&&b&&p&&_.emit("message-resolve",{type:"message-resolve",key:e,message:p,time:S-b,groupId:`${v}:${e}`}),E&&C&&Zt&&to&&(Zt(C),to("intlify message resolve",E,C))}if(Ce(p)||bn(p)||nn(p))break;if(!KC(h,u)){const S=sd(t,e,h,i,v);S!==e&&(p=S)}m=g}return[p,h,f]}function h1(t,e,n,r,o,i){const{messageCompiler:s,warnHtmlMessage:c}=t;if(nn(r)){const h=r;return h.locale=h.locale||n,h.key=h.key||e,h}if(s==null){const h=(()=>r);return h.locale=n,h.key=e,h}let a=null,d,u;process.env.NODE_ENV!=="production"&&Kn&&(a=window.performance.now(),d="intlify-message-compilation-start",u="intlify-message-compilation-end",Zt&&Zt(d));const f=s(r,n9(t,n,o,r,c,i));if(process.env.NODE_ENV!=="production"&&Kn){const h=window.performance.now(),p=t.__v_emitter;p&&a&&p.emit("message-compilation",{type:"message-compilation",message:r,time:h-a,groupId:`translate:${e}`}),d&&u&&Zt&&to&&(Zt(u),to("intlify message compilation",d,u))}return f.locale=n,f.key=e,f.source=r,f}function t9(t,e,n){let r=null,o,i;process.env.NODE_ENV!=="production"&&Kn&&(r=window.performance.now(),o="intlify-message-evaluation-start",i="intlify-message-evaluation-end",Zt&&Zt(o));const s=e(n);if(process.env.NODE_ENV!=="production"&&Kn){const c=window.performance.now(),a=t.__v_emitter;a&&r&&a.emit("message-evaluation",{type:"message-evaluation",value:s,time:c-r,groupId:`translate:${e.key}`}),o&&i&&Zt&&to&&(Zt(i),to("intlify message evaluation",o,i))}return s}function cd(...t){const[e,n,r]=t,o=We();if(!Ce(e)&&!mt(e)&&!nn(e)&&!bn(e))throw Qn(_t.INVALID_ARGUMENT);const i=mt(e)?String(e):(nn(e),e);return mt(n)?o.plural=n:Ce(n)?o.default=n:He(n)&&!da(n)?o.named=n:it(n)&&(o.list=n),mt(r)?o.plural=r:Ce(r)?o.default=r:He(r)&&gt(o,r),[i,o]}function n9(t,e,n,r,o,i){return{locale:e,key:n,warnHtmlMessage:o,onError:s=>{if(i&&i(s),process.env.NODE_ENV!=="production"){const c=r9(r),a=`Message compilation error: ${s.message}`,d=s.location&&c&&T6(c,s.location.start.offset,s.location.end.offset),u=t.__v_emitter;u&&c&&u.emit("compile-error",{message:c,error:s.message,start:s.location&&s.location.start.offset,end:s.location&&s.location.end.offset,groupId:`translate:${n}`}),console.error(d?`${a}
60
60
  ${d}`:a)}else throw s},onCacheKey:s=>b6(e,n,s)}}function r9(t){if(Ce(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function o9(t,e,n,r){const{modifiers:o,pluralRules:i,messageResolver:s,fallbackLocale:c,fallbackWarn:a,missingWarn:d,fallbackContext:u}=t,h={locale:e,modifiers:o,pluralRules:i,messages:(p,m)=>{let g=s(n,p);if(g==null&&(u||m)){const[,,v]=f1(u||t,p,e,c,a,d);g=s(v,p)}if(Ce(g)||bn(g)){let v=!1;const b=h1(t,p,e,g,p,()=>{v=!0});return v?d1:b}else return nn(g)?g:d1}};return t.processor&&(h.processor=t.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),mt(r.plural)&&(h.pluralIndex=r.plural),h}oC();const i9="11.2.8";function s9(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(no().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(no().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(no().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(no().__INTLIFY_PROD_DEVTOOLS__=!1)}const kt={UNEXPECTED_RETURN_TYPE:EC,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Li(t,...e){return zo(t,null,process.env.NODE_ENV!=="production"?{messages:a9,args:e}:void 0)}const a9={[kt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[kt.INVALID_ARGUMENT]:"Invalid argument",[kt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[kt.NOT_INSTALLED]:"Need to install with `app.use` function",[kt.UNEXPECTED_ERROR]:"Unexpected error",[kt.REQUIRED_VALUE]:"Required in value: {0}",[kt.INVALID_VALUE]:"Invalid value",[kt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[kt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[kt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[kt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},dd=Yn("__translateVNode"),ud=Yn("__datetimeParts"),fd=Yn("__numberParts"),hd=Yn("__enableEmitter"),pd=Yn("__disableEmitter"),l9=Yn("__setPluralRules"),p1=Yn("__injectWithOption"),md=Yn("__dispose"),On={FALLBACK_TO_ROOT:DC,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},c9={[On.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[On.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[On.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[On.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
61
- About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[On.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[On.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function ba(t,...e){return la(c9[t],...e)}function Di(t){if(!Ue(t)||bn(t))return t;for(const e in t)if(yn(t,e))if(!e.includes("."))Ue(t[e])&&Di(t[e]);else{const n=e.split("."),r=n.length-1;let o=t,i=!1;for(let s=0;s<r;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in o||(o[n[s]]=We()),!Ue(o[n[s]])){process.env.NODE_ENV!=="production"&&In(ba(On.IGNORE_OBJ_FLATTEN,{key:n[s]})),i=!0;break}o=o[n[s]]}if(i||(bn(o)?Fp.includes(n[r])||delete t[e]:(o[n[r]]=t[e],delete t[e])),!bn(o)){const s=o[n[r]];Ue(s)&&Di(s)}}return t}function m1(t,e){const{messages:n,__i18n:r,messageResolver:o,flatJson:i}=e,s=He(n)?n:it(r)?We():{[t]:We()};if(it(r)&&r.forEach(c=>{if("locale"in c&&"resource"in c){const{locale:a,resource:d}=c;a?(s[a]=s[a]||We(),fa(d,s[a])):fa(d,s)}else Ce(c)&&fa(JSON.parse(c),s)}),o==null&&i)for(const c in s)yn(s,c)&&Di(s[c]);return s}function g1(t){return t.type}function d9(t,e,n){let r=Ue(e.messages)?e.messages:We();"__i18nGlobal"in n&&(r=m1(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(i=>{t.mergeLocaleMessage(i,r[i])});{if(Ue(e.datetimeFormats)){const i=Object.keys(e.datetimeFormats);i.length&&i.forEach(s=>{t.mergeDateTimeFormat(s,e.datetimeFormats[s])})}if(Ue(e.numberFormats)){const i=Object.keys(e.numberFormats);i.length&&i.forEach(s=>{t.mergeNumberFormat(s,e.numberFormats[s])})}}}function v1(t){return l.createVNode(l.Text,null,t,0)}function gd(){const t="currentInstance";return t in wc?wc[t]:wc.getCurrentInstance()}const y1="__INTLIFY_META__",b1=()=>[],u9=()=>!1;let C1=0;function E1(t){return((e,n,r,o)=>t(n,r,gd()||void 0,o))}const f9=()=>{const t=gd();let e=null;return t&&(e=g1(t)[y1])?{[y1]:e}:null};function h9(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,o=t.flatJson,i=Kn?l.ref:l.shallowRef;let s=st(t.inheritLocale)?t.inheritLocale:!0;const c=i(e&&s?e.locale.value:Ce(t.locale)?t.locale:ga),a=i(e&&s?e.fallbackLocale.value:Ce(t.fallbackLocale)||it(t.fallbackLocale)||He(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:c.value),d=i(m1(c.value,t)),u=i(He(t.datetimeFormats)?t.datetimeFormats:{[c.value]:{}}),f=i(He(t.numberFormats)?t.numberFormats:{[c.value]:{}});let h=e?e.missingWarn:st(t.missingWarn)||ca(t.missingWarn)?t.missingWarn:!0,p=e?e.fallbackWarn:st(t.fallbackWarn)||ca(t.fallbackWarn)?t.fallbackWarn:!0,m=e?e.fallbackRoot:st(t.fallbackRoot)?t.fallbackRoot:!0,g=!!t.fallbackFormat,v=Je(t.missing)?t.missing:null,y=Je(t.missing)?E1(t.missing):null,b=Je(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const S=e?e.modifiers:He(t.modifiers)?t.modifiers:{};let _=t.pluralRules||e&&e.pluralRules,T;T=(()=>{r&&Xp(null);const J={version:i9,locale:c.value,fallbackLocale:a.value,messages:d.value,modifiers:S,pluralRules:_,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:p,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};J.datetimeFormats=u.value,J.numberFormats=f.value,J.__datetimeFormatters=He(T)?T.__datetimeFormatters:void 0,J.__numberFormatters=He(T)?T.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(J.__v_emitter=He(T)?T.__v_emitter:void 0);const re=WC(J);return r&&Xp(re),re})(),Mi(T,c.value,a.value);function G(){return[c.value,a.value,d.value,u.value,f.value]}const $=l.computed({get:()=>c.value,set:J=>{T.locale=J,c.value=J}}),j=l.computed({get:()=>a.value,set:J=>{T.fallbackLocale=J,a.value=J,Mi(T,c.value,J)}}),W=l.computed(()=>d.value),Y=l.computed(()=>u.value),z=l.computed(()=>f.value);function U(){return Je(b)?b:null}function F(J){b=J,T.postTranslation=J}function X(){return v}function H(J){J!==null&&(y=E1(J)),v=J,T.missing=y}function ee(J,re){return J!=="translate"||!re.resolvedMessage}const ne=(J,re,Se,_e,Oe,nt)=>{G();let pt;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=e?jC():void 0),pt=J(T)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=void 0)}if(Se!=="translate exists"&&mt(pt)&&pt===ma||Se==="translate exists"&&!pt){const[rt,Qr]=re();if(process.env.NODE_ENV!=="production"&&e&&Ce(rt)&&ee(Se,Qr)&&(m&&(ya(p,rt)||Vp(h,rt))&&In(ba(On.FALLBACK_TO_ROOT,{key:rt,type:Se})),process.env.NODE_ENV!=="production")){const{__v_emitter:Tn}=T;Tn&&m&&Tn.emit("fallback",{type:Se,key:rt,to:"global",groupId:`${Se}:${rt}`})}return e&&m?_e(e):Oe(rt)}else{if(nt(pt))return pt;throw Li(kt.UNEXPECTED_RETURN_TYPE)}};function ae(...J){return ne(re=>Reflect.apply(u1,null,[re,...J]),()=>cd(...J),"translate",re=>Reflect.apply(re.t,re,[...J]),re=>re,re=>Ce(re))}function pe(...J){const[re,Se,_e]=J;if(_e&&!Ue(_e))throw Li(kt.INVALID_ARGUMENT);return ae(re,Se,gt({resolvedMessage:!0},_e||{}))}function me(...J){return ne(re=>Reflect.apply(r1,null,[re,...J]),()=>ad(...J),"datetime format",re=>Reflect.apply(re.d,re,[...J]),()=>va,re=>Ce(re)||it(re))}function be(...J){return ne(re=>Reflect.apply(s1,null,[re,...J]),()=>ld(...J),"number format",re=>Reflect.apply(re.n,re,[...J]),()=>va,re=>Ce(re)||it(re))}function Ee(J){return J.map(re=>Ce(re)||mt(re)||st(re)?v1(String(re)):re)}const ve={normalize:Ee,interpolate:J=>J,type:"vnode"};function N(...J){return ne(re=>{let Se;const _e=re;try{_e.processor=ve,Se=Reflect.apply(u1,null,[_e,...J])}finally{_e.processor=null}return Se},()=>cd(...J),"translate",re=>re[dd](...J),re=>[v1(re)],re=>it(re))}function M(...J){return ne(re=>Reflect.apply(s1,null,[re,...J]),()=>ld(...J),"number format",re=>re[fd](...J),b1,re=>Ce(re)||it(re))}function I(...J){return ne(re=>Reflect.apply(r1,null,[re,...J]),()=>ad(...J),"datetime format",re=>re[ud](...J),b1,re=>Ce(re)||it(re))}function O(J){_=J,T.pluralRules=_}function k(J,re){return ne(()=>{if(!J)return!1;const Se=Ce(re)?re:c.value,_e=R(Se),Oe=T.messageResolver(_e,J);return bn(Oe)||nn(Oe)||Ce(Oe)},()=>[J],"translate exists",Se=>Reflect.apply(Se.te,Se,[J,re]),u9,Se=>st(Se))}function w(J){let re=null;const Se=Hp(T,a.value,c.value);for(let _e=0;_e<Se.length;_e++){const Oe=d.value[Se[_e]]||{},nt=T.messageResolver(Oe,J);if(nt!=null){re=nt;break}}return re}function P(J){const re=w(J);return re??(e?e.tm(J)||{}:{})}function R(J){return d.value[J]||{}}function K(J,re){if(o){const Se={[J]:re};for(const _e in Se)yn(Se,_e)&&Di(Se[_e]);re=Se[J]}d.value[J]=re,T.messages=d.value}function Q(J,re){d.value[J]=d.value[J]||{};const Se={[J]:re};if(o)for(const _e in Se)yn(Se,_e)&&Di(Se[_e]);re=Se[J],fa(re,d.value[J]),T.messages=d.value}function A(J){return u.value[J]||{}}function x(J,re){u.value[J]=re,T.datetimeFormats=u.value,i1(T,J,re)}function B(J,re){u.value[J]=gt(u.value[J]||{},re),T.datetimeFormats=u.value,i1(T,J,re)}function Z(J){return f.value[J]||{}}function q(J,re){f.value[J]=re,T.numberFormats=f.value,l1(T,J,re)}function te(J,re){f.value[J]=gt(f.value[J]||{},re),T.numberFormats=f.value,l1(T,J,re)}C1++,e&&Kn&&(l.watch(e.locale,J=>{s&&(c.value=J,T.locale=J,Mi(T,c.value,a.value))}),l.watch(e.fallbackLocale,J=>{s&&(a.value=J,T.fallbackLocale=J,Mi(T,c.value,a.value))}));const se={id:C1,locale:$,fallbackLocale:j,get inheritLocale(){return s},set inheritLocale(J){s=J,J&&e&&(c.value=e.locale.value,a.value=e.fallbackLocale.value,Mi(T,c.value,a.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:W,get modifiers(){return S},get pluralRules(){return _||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(J){h=J,T.missingWarn=h},get fallbackWarn(){return p},set fallbackWarn(J){p=J,T.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(J){m=J},get fallbackFormat(){return g},set fallbackFormat(J){g=J,T.fallbackFormat=g},get warnHtmlMessage(){return E},set warnHtmlMessage(J){E=J,T.warnHtmlMessage=J},get escapeParameter(){return C},set escapeParameter(J){C=J,T.escapeParameter=J},t:ae,getLocaleMessage:R,setLocaleMessage:K,mergeLocaleMessage:Q,getPostTranslationHandler:U,setPostTranslationHandler:F,getMissingHandler:X,setMissingHandler:H,[l9]:O};return se.datetimeFormats=Y,se.numberFormats=z,se.rt=pe,se.te=k,se.tm=P,se.d=me,se.n=be,se.getDateTimeFormat=A,se.setDateTimeFormat=x,se.mergeDateTimeFormat=B,se.getNumberFormat=Z,se.setNumberFormat=q,se.mergeNumberFormat=te,se[p1]=n,se[dd]=N,se[ud]=I,se[fd]=M,process.env.NODE_ENV!=="production"&&(se[hd]=J=>{T.__v_emitter=J},se[pd]=()=>{T.__v_emitter=void 0}),se}function k1(t,e){}const vd={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function p9({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,o)=>[...r,...o.type===l.Fragment?o.children:[o]],[]):e.reduce((n,r)=>{const o=t[r];return o&&(n[r]=o()),n},We())}function w1(){return l.Fragment}gt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>mt(t)||!isNaN(t)}},vd);function m9(t){return it(t)&&!Ce(t[0])}function S1(t,e,n,r){const{slots:o,attrs:i}=e;return()=>{const s={part:!0};let c=We();t.locale&&(s.locale=t.locale),Ce(t.format)?s.key=t.format:Ue(t.format)&&(Ce(t.format.key)&&(s.key=t.format.key),c=Object.keys(t.format).reduce((h,p)=>n.includes(p)?gt(We(),h,{[p]:t.format[p]}):h,We()));const a=r(t.value,s,c);let d=[s.key];it(a)?d=a.map((h,p)=>{const m=o[h.type],g=m?m({[h.type]:h.value,index:p,parts:a}):[h.value];return m9(g)&&(g[0].key=`${h.type}-${p}`),g}):Ce(a)&&(d=[a]);const u=gt(We(),i),f=Ce(t.tag)||Ue(t.tag)?t.tag:w1();return l.h(f,u,d)}}gt({value:{type:Number,required:!0},format:{type:[String,Object]}},vd);const g9=Yn("global-vue-i18n");function Lt(t={}){const e=gd();if(e==null)throw Li(kt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Li(kt.NOT_INSTALLED);const n=v9(e),r=b9(n),o=g1(e),i=y9(t,o);if(i==="global")return d9(r,t,o),r;if(i==="parent"){let a=C9(n,e,t.__useComponent);return a==null&&(process.env.NODE_ENV!=="production"&&In(ba(On.NOT_FOUND_PARENT_SCOPE)),a=r),a}const s=n;let c=s.__getInstance(e);if(c==null){const a=gt({},t);"__i18n"in o&&(a.__i18n=o.__i18n),r&&(a.__root=r),c=h9(a),s.__composerExtend&&(c[md]=s.__composerExtend(c)),k9(s,e,c),s.__setInstance(e,c)}else process.env.NODE_ENV!=="production"&&i==="local"&&In(ba(On.DUPLICATE_USE_I18N_CALLING));return c}function v9(t){const e=l.inject(t.isCE?g9:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Li(t.isCE?kt.NOT_INSTALLED_WITH_PROVIDE:kt.UNEXPECTED_ERROR);return e}function y9(t,e){return da(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function b9(t){return t.mode==="composition"?t.global:t.global.__composer}function C9(t,e,n=!1){let r=null;const o=e.root;let i=E9(e,n);for(;i!=null;){const s=t;if(t.mode==="composition")r=s.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const c=s.__getInstance(i);c!=null&&(r=c.__composer,n&&r&&!r[p1]&&(r=null))}if(r!=null||o===i)break;i=i.parent}return r}function E9(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function k9(t,e,n){let r=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"){e.__VUE_I18N__=n,r=I6();const o=n;o[hd]&&o[hd](r),r.on("*",k1)}},e),l.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",k1),o[pd]&&o[pd](),delete e.__VUE_I18N__),t.__deleteInstance(e);const i=o[md];i&&(i(),delete o[md])},e)}if(gt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},vd),s9(),$C(gC),FC(LC),zC(Hp),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=no();t.__INTLIFY__=!0,vC(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;function Cn(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function yd(t){return typeof t=="function"&&"call"in t&&"apply"in t}function je(t){return!Cn(t)}function vr(t,e=!0){return t instanceof Object&&t.constructor===Object&&(e||Object.keys(t).length!==0)}function A1(t,e){let n=-1;if(je(t))try{n=t.findLastIndex(e)}catch{n=t.lastIndexOf([...t].reverse().find(e))}return n}function Dt(t,...e){return yd(t)?t(...e):t}function Ht(t,e=!0){return typeof t=="string"&&(e||t!=="")}function Mn(t){return Ht(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function bd(t,e="",n={}){let r=Mn(e).split("."),o=r.shift();if(o){if(vr(t)){let i=Object.keys(t).find(s=>Mn(s)===o)||"";return bd(Dt(t[i],n),r.join("."),n)}return}return Dt(t,n)}function x1(t,e=!0){return Array.isArray(t)&&(e||t.length!==0)}function w9(t){return je(t)&&!isNaN(t)}function S9(t=""){return je(t)&&t.length===1&&!!t.match(/\S| /)}function oo(t,e){if(e){let n=e.test(t);return e.lastIndex=0,n}return!1}function Pi(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function A9(t){return Ht(t,!1)?t[0].toUpperCase()+t.slice(1):t}function T1(t){return Ht(t)?t.replace(/(_)/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():t}function Cd(){let t=new Map;return{on(e,n){let r=t.get(e);return r?r.push(n):r=[n],t.set(e,r),this},off(e,n){let r=t.get(e);return r&&r.splice(r.indexOf(n)>>>0,1),this},emit(e,n){let r=t.get(e);r&&r.forEach(o=>{o(n)})},clear(){t.clear()}}}function Bi(...t){if(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n];if(!r)continue;let o=typeof r;if(o==="string"||o==="number")e.push(r);else if(o==="object"){let i=Array.isArray(r)?[Bi(...r)]:Object.entries(r).map(([s,c])=>c?s:void 0);e=i.length?e.concat(i.filter(s=>!!s)):e}}return e.join(" ").trim()}}function x9(t,e){return t?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}function T9(t,e){if(t&&e){let n=r=>{x9(t,r)||(t.classList?t.classList.add(r):t.className+=" "+r)};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function Ed(t,e){if(t&&e){let n=r=>{t.classList?t.classList.remove(r):t.className=t.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function I1(t){for(let e of document?.styleSheets)try{for(let n of e?.cssRules)for(let r of n?.style)if(t.test(r))return{name:r,value:n.style.getPropertyValue(r).trim()}}catch{}return null}function I9(t){let e={width:0,height:0};if(t){let[n,r]=[t.style.visibility,t.style.display],o=t.getBoundingClientRect();t.style.visibility="hidden",t.style.display="block",e.width=o.width||t.offsetWidth,e.height=o.height||t.offsetHeight,t.style.display=r,t.style.visibility=n}return e}function _1(){let t=window,e=document,n=e.documentElement,r=e.getElementsByTagName("body")[0],o=t.innerWidth||n.clientWidth||r.clientWidth,i=t.innerHeight||n.clientHeight||r.clientHeight;return{width:o,height:i}}function kd(t){return t?Math.abs(t.scrollLeft):0}function _9(){let t=document.documentElement;return(window.pageXOffset||kd(t))-(t.clientLeft||0)}function N9(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function O9(t){return t?getComputedStyle(t).direction==="rtl":!1}function M9(t,e,n=!0){var r,o,i,s;if(t){let c=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:I9(t),a=c.height,d=c.width,u=e.offsetHeight,f=e.offsetWidth,h=e.getBoundingClientRect(),p=N9(),m=_9(),g=_1(),v,y,b="top";h.top+u+a>g.height?(v=h.top+p-a,b="bottom",v<0&&(v=p)):v=u+h.top+p,h.left+d>g.width?y=Math.max(0,h.left+m+f-d):y=h.left+m,O9(t)?t.style.insetInlineEnd=y+"px":t.style.insetInlineStart=y+"px",t.style.top=v+"px",t.style.transformOrigin=b,n&&(t.style.marginTop=b==="bottom"?`calc(${(o=(r=I1(/-anchor-gutter$/))==null?void 0:r.value)!=null?o:"2px"} * -1)`:(s=(i=I1(/-anchor-gutter$/))==null?void 0:i.value)!=null?s:"")}}function N1(t,e){t&&(typeof e=="string"?t.style.cssText=e:Object.entries(e||{}).forEach(([n,r])=>t.style[n]=r))}function Ri(t,e){return t instanceof HTMLElement?t.offsetWidth:0}function O1(t){if(t){let e=t.parentNode;return e&&e instanceof ShadowRoot&&e.host&&(e=e.host),e}return null}function L9(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&O1(t))}function $i(t){return typeof Element<"u"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}var wd;function M1(t){{if(wd!=null)return wd;let e=document.createElement("div");N1(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);let n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),wd=n,n}}function Ca(t,e={}){if($i(t)){let n=(r,o)=>{var i,s;let c=(i=t?.$attrs)!=null&&i[r]?[(s=t?.$attrs)==null?void 0:s[r]]:[];return[o].flat().reduce((a,d)=>{if(d!=null){let u=typeof d;if(u==="string"||u==="number")a.push(d);else if(u==="object"){let f=Array.isArray(d)?n(r,d):Object.entries(d).map(([h,p])=>r==="style"&&(p||p===0)?`${h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${p}`:p?h:void 0);a=f.length?a.concat(f.filter(h=>!!h)):a}}return a},c)};Object.entries(e).forEach(([r,o])=>{if(o!=null){let i=r.match(/^on(.+)/);i?t.addEventListener(i[1].toLowerCase(),o):r==="p-bind"||r==="pBind"?Ca(t,o):(o=r==="class"?[...new Set(n("class",o))].join(" ").trim():r==="style"?n("style",o).join(";").trim():o,(t.$attrs=t.$attrs||{})&&(t.$attrs[r]=o),t.setAttribute(r,o))}})}}function D9(t,e={},...n){{let r=document.createElement(t);return Ca(r,e),r.append(...n),r}}function Fi(t,e){return $i(t)?t.matches(e)?t:t.querySelector(e):null}function io(t,e){t&&document.activeElement!==t&&t.focus(e)}function P9(t,e){if($i(t)){let n=t.getAttribute(e);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function L1(t){if(t){let e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),e}return 0}function B9(t){if(t){let[e,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let r=t.offsetHeight;return t.style.display=n,t.style.visibility=e,r}return 0}function R9(t){if(t){let[e,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let r=t.offsetWidth;return t.style.display=n,t.style.visibility=e,r}return 0}function D1(t){if(t){let e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||kd(document.documentElement)||kd(document.body)||0)}}return{top:"auto",left:"auto"}}function P1(t,e){return t?t.offsetHeight:0}function B1(t,e=[]){let n=O1(t);return n===null?e:B1(n,e.concat([n]))}function $9(t){let e=[];if(t){let n=B1(t),r=/(auto|scroll)/,o=i=>{try{let s=window.getComputedStyle(i,null);return r.test(s.getPropertyValue("overflow"))||r.test(s.getPropertyValue("overflowX"))||r.test(s.getPropertyValue("overflowY"))}catch{return!1}};for(let i of n){let s=i.nodeType===1&&i.dataset.scrollselectors;if(s){let c=s.split(",");for(let a of c){let d=Fi(i,a);d&&o(d)&&e.push(d)}}i.nodeType!==9&&o(i)&&e.push(i)}}return e}function R1(t){if(t){let e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),e}return 0}function $1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function F9(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function z9(t,e){var n,r;if(t){let o=t.parentElement,i=D1(o),s=_1(),c=t.offsetParent?t.offsetWidth:R9(t),a=t.offsetParent?t.offsetHeight:B9(t),d=Ri((n=o?.children)==null?void 0:n[0]),u=P1((r=o?.children)==null?void 0:r[0]),f="",h="";i.left+d+c>s.width-M1()?i.left<c?e%2===1?f=i.left?"-"+i.left+"px":"100%":e%2===0&&(f=s.width-c-M1()+"px"):f="-100%":f="100%",t.getBoundingClientRect().top+u+a>s.height?h=`-${a-u}px`:h="0px",t.style.top=h,t.style.insetInlineStart=f}}function U9(t,e="",n){$i(t)&&n!==null&&n!==void 0&&t.setAttribute(e,n)}var Ea={};function H9(t="pui_id_"){return Object.hasOwn(Ea,t)||(Ea[t]=0),Ea[t]++,`${t}${Ea[t]}`}function j9(){let t=[],e=(s,c,a=999)=>{let d=o(s,c,a),u=d.value+(d.key===s?0:a)+1;return t.push({key:s,value:u}),u},n=s=>{t=t.filter(c=>c.value!==s)},r=(s,c)=>o(s).value,o=(s,c,a=0)=>[...t].reverse().find(d=>!0)||{key:s,value:a},i=s=>s&&parseInt(s.style.zIndex,10)||0;return{get:i,set:(s,c,a)=>{c&&(c.style.zIndex=String(e(s,!0,a)))},clear:s=>{s&&(n(i(s)),s.style.zIndex="")},getCurrent:s=>r(s)}}var Sd=j9(),W9=Object.defineProperty,K9=Object.defineProperties,Y9=Object.getOwnPropertyDescriptors,ka=Object.getOwnPropertySymbols,F1=Object.prototype.hasOwnProperty,z1=Object.prototype.propertyIsEnumerable,U1=(t,e,n)=>e in t?W9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,En=(t,e)=>{for(var n in e||(e={}))F1.call(e,n)&&U1(t,n,e[n]);if(ka)for(var n of ka(e))z1.call(e,n)&&U1(t,n,e[n]);return t},Ad=(t,e)=>K9(t,Y9(e)),Zn=(t,e)=>{var n={};for(var r in t)F1.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ka)for(var r of ka(t))e.indexOf(r)<0&&z1.call(t,r)&&(n[r]=t[r]);return n},G9=Cd(),Pt=G9,zi=/{([^}]*)}/g,H1=/(\d+\s+[\+\-\*\/]\s+\d+)/g,j1=/var\([^)]+\)/g;function W1(t){return Ht(t)?t.replace(/[A-Z]/g,(e,n)=>n===0?e:"."+e.toLowerCase()).toLowerCase():t}function Q9(t){return vr(t)&&t.hasOwnProperty("$value")&&t.hasOwnProperty("$type")?t.$value:t}function Z9(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function xd(t="",e=""){return Z9(`${Ht(t,!1)&&Ht(e,!1)?`${t}-`:t}${e}`)}function K1(t="",e=""){return`--${xd(t,e)}`}function J9(t=""){let e=(t.match(/{/g)||[]).length,n=(t.match(/}/g)||[]).length;return(e+n)%2!==0}function Y1(t,e="",n="",r=[],o){if(Ht(t)){let i=t.trim();if(J9(i))return;if(oo(i,zi)){let s=i.replaceAll(zi,c=>{let a=c.replace(/{|}/g,"").split(".").filter(d=>!r.some(u=>oo(d,u)));return`var(${K1(n,T1(a.join("-")))}${je(o)?`, ${o}`:""})`});return oo(s.replace(j1,"0"),H1)?`calc(${s})`:s}return i}else if(w9(t))return t}function X9(t,e,n){Ht(e,!1)&&t.push(`${e}:${n};`)}function jo(t,e){return t?`${t}{${e}}`:""}function G1(t,e){if(t.indexOf("dt(")===-1)return t;function n(s,c){let a=[],d=0,u="",f=null,h=0;for(;d<=s.length;){let p=s[d];if((p==='"'||p==="'"||p==="`")&&s[d-1]!=="\\"&&(f=f===p?null:p),!f&&(p==="("&&h++,p===")"&&h--,(p===","||d===s.length)&&h===0)){let m=u.trim();m.startsWith("dt(")?a.push(G1(m,c)):a.push(r(m)),u="",d++;continue}p!==void 0&&(u+=p),d++}return a}function r(s){let c=s[0];if((c==='"'||c==="'"||c==="`")&&s[s.length-1]===c)return s.slice(1,-1);let a=Number(s);return isNaN(a)?s:a}let o=[],i=[];for(let s=0;s<t.length;s++)if(t[s]==="d"&&t.slice(s,s+3)==="dt(")i.push(s),s+=2;else if(t[s]===")"&&i.length>0){let c=i.pop();i.length===0&&o.push([c,s])}if(!o.length)return t;for(let s=o.length-1;s>=0;s--){let[c,a]=o[s],d=t.slice(c+3,a),u=n(d,e),f=e(...u);t=t.slice(0,c)+f+t.slice(a+1)}return t}var so=(...t)=>q9(Qe.getTheme(),...t),q9=(t={},e,n,r)=>{if(e){let{variable:o,options:i}=Qe.defaults||{},{prefix:s,transform:c}=t?.options||i||{},a=oo(e,zi)?e:`{${e}}`;return r==="value"||Cn(r)&&c==="strict"?Qe.getTokenValue(e):Y1(a,void 0,s,[o.excludedKeyRegex],n)}return""};function wa(t,...e){if(t instanceof Array){let n=t.reduce((r,o,i)=>{var s;return r+o+((s=Dt(e[i],{dt:so}))!=null?s:"")},"");return G1(n,so)}return Dt(t,{dt:so})}function V9(t,e={}){let n=Qe.defaults.variable,{prefix:r=n.prefix,selector:o=n.selector,excludedKeyRegex:i=n.excludedKeyRegex}=e,s=[],c=[],a=[{node:t,path:r}];for(;a.length;){let{node:u,path:f}=a.pop();for(let h in u){let p=u[h],m=Q9(p),g=oo(h,i)?xd(f):xd(f,T1(h));if(vr(m))a.push({node:m,path:g});else{let v=K1(g),y=Y1(m,g,r,[i]);X9(c,v,y);let b=g;r&&b.startsWith(r+"-")&&(b=b.slice(r.length+1)),s.push(b.replace(/-/g,"."))}}}let d=c.join("");return{value:c,tokens:s,declarations:d,css:jo(o,d)}}var kn={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t},:host${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:t,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark)",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let e=Object.keys(this.rules).filter(n=>n!=="custom").map(n=>this.rules[n]);return[t].flat().map(n=>{var r;return(r=e.map(o=>o.resolve(n)).find(o=>o.matched))!=null?r:this.rules.custom.resolve(n)})}},_toVariables(t,e){return V9(t,{prefix:e?.prefix})},getCommon({name:t="",theme:e={},params:n,set:r,defaults:o}){var i,s,c,a,d,u,f;let{preset:h,options:p}=e,m,g,v,y,b,E,C;if(je(h)&&p.transform!=="strict"){let{primitive:S,semantic:_,extend:T}=h,D=_||{},{colorScheme:G}=D,$=Zn(D,["colorScheme"]),j=T||{},{colorScheme:W}=j,Y=Zn(j,["colorScheme"]),z=G||{},{dark:U}=z,F=Zn(z,["dark"]),X=W||{},{dark:H}=X,ee=Zn(X,["dark"]),ne=je(S)?this._toVariables({primitive:S},p):{},ae=je($)?this._toVariables({semantic:$},p):{},pe=je(F)?this._toVariables({light:F},p):{},me=je(U)?this._toVariables({dark:U},p):{},be=je(Y)?this._toVariables({semantic:Y},p):{},Ee=je(ee)?this._toVariables({light:ee},p):{},Te=je(H)?this._toVariables({dark:H},p):{},[ve,N]=[(i=ne.declarations)!=null?i:"",ne.tokens],[M,I]=[(s=ae.declarations)!=null?s:"",ae.tokens||[]],[O,k]=[(c=pe.declarations)!=null?c:"",pe.tokens||[]],[w,P]=[(a=me.declarations)!=null?a:"",me.tokens||[]],[R,K]=[(d=be.declarations)!=null?d:"",be.tokens||[]],[Q,A]=[(u=Ee.declarations)!=null?u:"",Ee.tokens||[]],[x,B]=[(f=Te.declarations)!=null?f:"",Te.tokens||[]];m=this.transformCSS(t,ve,"light","variable",p,r,o),g=N;let Z=this.transformCSS(t,`${M}${O}`,"light","variable",p,r,o),q=this.transformCSS(t,`${w}`,"dark","variable",p,r,o);v=`${Z}${q}`,y=[...new Set([...I,...k,...P])];let te=this.transformCSS(t,`${R}${Q}color-scheme:light`,"light","variable",p,r,o),se=this.transformCSS(t,`${x}color-scheme:dark`,"dark","variable",p,r,o);b=`${te}${se}`,E=[...new Set([...K,...A,...B])],C=Dt(h.css,{dt:so})}return{primitive:{css:m,tokens:g},semantic:{css:v,tokens:y},global:{css:b,tokens:E},style:C}},getPreset({name:t="",preset:e={},options:n,params:r,set:o,defaults:i,selector:s}){var c,a,d;let u,f,h;if(je(e)&&n.transform!=="strict"){let p=t.replace("-directive",""),m=e,{colorScheme:g,extend:v,css:y}=m,b=Zn(m,["colorScheme","extend","css"]),E=v||{},{colorScheme:C}=E,S=Zn(E,["colorScheme"]),_=g||{},{dark:T}=_,D=Zn(_,["dark"]),G=C||{},{dark:$}=G,j=Zn(G,["dark"]),W=je(b)?this._toVariables({[p]:En(En({},b),S)},n):{},Y=je(D)?this._toVariables({[p]:En(En({},D),j)},n):{},z=je(T)?this._toVariables({[p]:En(En({},T),$)},n):{},[U,F]=[(c=W.declarations)!=null?c:"",W.tokens||[]],[X,H]=[(a=Y.declarations)!=null?a:"",Y.tokens||[]],[ee,ne]=[(d=z.declarations)!=null?d:"",z.tokens||[]],ae=this.transformCSS(p,`${U}${X}`,"light","variable",n,o,i,s),pe=this.transformCSS(p,ee,"dark","variable",n,o,i,s);u=`${ae}${pe}`,f=[...new Set([...F,...H,...ne])],h=Dt(y,{dt:so})}return{css:u,tokens:f,style:h}},getPresetC({name:t="",theme:e={},params:n,set:r,defaults:o}){var i;let{preset:s,options:c}=e,a=(i=s?.components)==null?void 0:i[t];return this.getPreset({name:t,preset:a,options:c,params:n,set:r,defaults:o})},getPresetD({name:t="",theme:e={},params:n,set:r,defaults:o}){var i,s;let c=t.replace("-directive",""),{preset:a,options:d}=e,u=((i=a?.components)==null?void 0:i[c])||((s=a?.directives)==null?void 0:s[c]);return this.getPreset({name:c,preset:u,options:d,params:n,set:r,defaults:o})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,e){var n;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?e.options.darkModeSelector:(n=t.darkModeSelector)!=null?n:e.options.darkModeSelector):[]},getLayerOrder(t,e={},n,r){let{cssLayer:o}=e;return o?`@layer ${Dt(o.order||o.name||"primeui",n)}`:""},getCommonStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){let s=this.getCommon({name:t,theme:e,params:n,set:o,defaults:i}),c=Object.entries(r).reduce((a,[d,u])=>a.push(`${d}="${u}"`)&&a,[]).join(" ");return Object.entries(s||{}).reduce((a,[d,u])=>{if(vr(u)&&Object.hasOwn(u,"css")){let f=Pi(u.css),h=`${d}-variables`;a.push(`<style type="text/css" data-primevue-style-id="${h}" ${c}>${f}</style>`)}return a},[]).join("")},getStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){var s;let c={name:t,theme:e,params:n,set:o,defaults:i},a=(s=t.includes("-directive")?this.getPresetD(c):this.getPresetC(c))==null?void 0:s.css,d=Object.entries(r).reduce((u,[f,h])=>u.push(`${f}="${h}"`)&&u,[]).join(" ");return a?`<style type="text/css" data-primevue-style-id="${t}-variables" ${d}>${Pi(a)}</style>`:""},createTokens(t={},e,n="",r="",o={}){let i=function(c,a={},d=[]){if(d.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:c,path:this.path,paths:a,value:void 0};d.push(this.path),a.name=this.path,a.binding||(a.binding={});let u=this.value;if(typeof this.value=="string"&&zi.test(this.value)){let f=this.value.trim().replace(zi,h=>{var p;let m=h.slice(1,-1),g=this.tokens[m];if(!g)return console.warn(`Token not found for path: ${m}`),"__UNRESOLVED__";let v=g.computed(c,a,d);return Array.isArray(v)&&v.length===2?`light-dark(${v[0].value},${v[1].value})`:(p=v?.value)!=null?p:"__UNRESOLVED__"});u=H1.test(f.replace(j1,"0"))?`calc(${f})`:f}return Cn(a.binding)&&delete a.binding,d.pop(),{colorScheme:c,path:this.path,paths:a,value:u.includes("__UNRESOLVED__")?void 0:u}},s=(c,a,d)=>{Object.entries(c).forEach(([u,f])=>{let h=oo(u,e.variable.excludedKeyRegex)?a:a?`${a}.${W1(u)}`:W1(u),p=d?`${d}.${u}`:u;vr(f)?s(f,h,p):(o[h]||(o[h]={paths:[],computed:(m,g={},v=[])=>{if(o[h].paths.length===1)return o[h].paths[0].computed(o[h].paths[0].scheme,g.binding,v);if(m&&m!=="none")for(let y=0;y<o[h].paths.length;y++){let b=o[h].paths[y];if(b.scheme===m)return b.computed(m,g.binding,v)}return o[h].paths.map(y=>y.computed(y.scheme,g[y.scheme],v))}}),o[h].paths.push({path:p,value:f,scheme:p.includes("colorScheme.light")?"light":p.includes("colorScheme.dark")?"dark":"none",computed:i,tokens:o}))})};return s(t,n,r),o},getTokenValue(t,e,n){var r;let o=(c=>c.split(".").filter(a=>!oo(a.toLowerCase(),n.variable.excludedKeyRegex)).join("."))(e),i=e.includes("colorScheme.light")?"light":e.includes("colorScheme.dark")?"dark":void 0,s=[(r=t[o])==null?void 0:r.computed(i)].flat().filter(c=>c);return s.length===1?s[0].value:s.reduce((c={},a)=>{let d=a,{colorScheme:u}=d,f=Zn(d,["colorScheme"]);return c[u]=f,c},void 0)},getSelectorRule(t,e,n,r){return n==="class"||n==="attr"?jo(je(e)?`${t}${e},${t} ${e}`:t,r):jo(t,jo(e??":root,:host",r))},transformCSS(t,e,n,r,o={},i,s,c){if(je(e)){let{cssLayer:a}=o;if(r!=="style"){let d=this.getColorSchemeOption(o,s);e=n==="dark"?d.reduce((u,{type:f,selector:h})=>(je(h)&&(u+=h.includes("[CSS]")?h.replace("[CSS]",e):this.getSelectorRule(h,c,f,e)),u),""):jo(c??":root,:host",e)}if(a){let d={name:"primeui"};vr(a)&&(d.name=Dt(a.name,{name:t,type:r})),je(d.name)&&(e=jo(`@layer ${d.name}`,e),i?.layerNames(d.name))}return e}return""}},Qe={defaults:{variable:{prefix:"p",selector:":root,:host",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:e}=t;e&&(this._theme=Ad(En({},e),{options:En(En({},this.defaults.options),e.options)}),this._tokens=kn.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),Pt.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Ad(En({},this.theme),{preset:t}),this._tokens=kn.createTokens(t,this.defaults),this.clearLoadedStyleNames(),Pt.emit("preset:change",t),Pt.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Ad(En({},this.theme),{options:t}),this.clearLoadedStyleNames(),Pt.emit("options:change",t),Pt.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return kn.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",e){return kn.getCommon({name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",e){let n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPresetC(n)},getDirective(t="",e){let n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPresetD(n)},getCustomPreset(t="",e,n,r){let o={name:t,preset:e,options:this.options,selector:n,params:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPreset(o)},getLayerOrderCSS(t=""){return kn.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",e,n="style",r){return kn.transformCSS(t,e,r,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",e,n={}){return kn.getCommonStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,e,n={}){return kn.getStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:e}){this._loadingStyles.size&&(this._loadingStyles.delete(e),Pt.emit(`theme:${e}:load`,t),!this._loadingStyles.size&&Pt.emit("theme:load"))}},yr={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}},eE=`
61
+ About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[On.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[On.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function ba(t,...e){return la(c9[t],...e)}function Di(t){if(!Ue(t)||bn(t))return t;for(const e in t)if(yn(t,e))if(!e.includes("."))Ue(t[e])&&Di(t[e]);else{const n=e.split("."),r=n.length-1;let o=t,i=!1;for(let s=0;s<r;s++){if(n[s]==="__proto__")throw new Error(`unsafe key: ${n[s]}`);if(n[s]in o||(o[n[s]]=We()),!Ue(o[n[s]])){process.env.NODE_ENV!=="production"&&In(ba(On.IGNORE_OBJ_FLATTEN,{key:n[s]})),i=!0;break}o=o[n[s]]}if(i||(bn(o)?Fp.includes(n[r])||delete t[e]:(o[n[r]]=t[e],delete t[e])),!bn(o)){const s=o[n[r]];Ue(s)&&Di(s)}}return t}function m1(t,e){const{messages:n,__i18n:r,messageResolver:o,flatJson:i}=e,s=He(n)?n:it(r)?We():{[t]:We()};if(it(r)&&r.forEach(c=>{if("locale"in c&&"resource"in c){const{locale:a,resource:d}=c;a?(s[a]=s[a]||We(),fa(d,s[a])):fa(d,s)}else Ce(c)&&fa(JSON.parse(c),s)}),o==null&&i)for(const c in s)yn(s,c)&&Di(s[c]);return s}function g1(t){return t.type}function d9(t,e,n){let r=Ue(e.messages)?e.messages:We();"__i18nGlobal"in n&&(r=m1(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(i=>{t.mergeLocaleMessage(i,r[i])});{if(Ue(e.datetimeFormats)){const i=Object.keys(e.datetimeFormats);i.length&&i.forEach(s=>{t.mergeDateTimeFormat(s,e.datetimeFormats[s])})}if(Ue(e.numberFormats)){const i=Object.keys(e.numberFormats);i.length&&i.forEach(s=>{t.mergeNumberFormat(s,e.numberFormats[s])})}}}function v1(t){return l.createVNode(l.Text,null,t,0)}function gd(){const t="currentInstance";return t in wc?wc[t]:wc.getCurrentInstance()}const y1="__INTLIFY_META__",b1=()=>[],u9=()=>!1;let C1=0;function E1(t){return((e,n,r,o)=>t(n,r,gd()||void 0,o))}const f9=()=>{const t=gd();let e=null;return t&&(e=g1(t)[y1])?{[y1]:e}:null};function h9(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,o=t.flatJson,i=Kn?l.ref:l.shallowRef;let s=st(t.inheritLocale)?t.inheritLocale:!0;const c=i(e&&s?e.locale.value:Ce(t.locale)?t.locale:ga),a=i(e&&s?e.fallbackLocale.value:Ce(t.fallbackLocale)||it(t.fallbackLocale)||He(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:c.value),d=i(m1(c.value,t)),u=i(He(t.datetimeFormats)?t.datetimeFormats:{[c.value]:{}}),f=i(He(t.numberFormats)?t.numberFormats:{[c.value]:{}});let h=e?e.missingWarn:st(t.missingWarn)||ca(t.missingWarn)?t.missingWarn:!0,p=e?e.fallbackWarn:st(t.fallbackWarn)||ca(t.fallbackWarn)?t.fallbackWarn:!0,m=e?e.fallbackRoot:st(t.fallbackRoot)?t.fallbackRoot:!0,g=!!t.fallbackFormat,v=Je(t.missing)?t.missing:null,y=Je(t.missing)?E1(t.missing):null,b=Je(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:st(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const S=e?e.modifiers:He(t.modifiers)?t.modifiers:{};let _=t.pluralRules||e&&e.pluralRules,T;T=(()=>{r&&Xp(null);const J={version:i9,locale:c.value,fallbackLocale:a.value,messages:d.value,modifiers:S,pluralRules:_,missing:y===null?void 0:y,missingWarn:h,fallbackWarn:p,fallbackFormat:g,unresolving:!0,postTranslation:b===null?void 0:b,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};J.datetimeFormats=u.value,J.numberFormats=f.value,J.__datetimeFormatters=He(T)?T.__datetimeFormatters:void 0,J.__numberFormatters=He(T)?T.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(J.__v_emitter=He(T)?T.__v_emitter:void 0);const re=WC(J);return r&&Xp(re),re})(),Mi(T,c.value,a.value);function G(){return[c.value,a.value,d.value,u.value,f.value]}const $=l.computed({get:()=>c.value,set:J=>{T.locale=J,c.value=J}}),j=l.computed({get:()=>a.value,set:J=>{T.fallbackLocale=J,a.value=J,Mi(T,c.value,J)}}),W=l.computed(()=>d.value),Y=l.computed(()=>u.value),z=l.computed(()=>f.value);function U(){return Je(b)?b:null}function F(J){b=J,T.postTranslation=J}function X(){return v}function H(J){J!==null&&(y=E1(J)),v=J,T.missing=y}function ee(J,re){return J!=="translate"||!re.resolvedMessage}const ne=(J,re,Se,Ne,Oe,nt)=>{G();let pt;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=e?jC():void 0),pt=J(T)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(T.fallbackContext=void 0)}if(Se!=="translate exists"&&mt(pt)&&pt===ma||Se==="translate exists"&&!pt){const[rt,Qr]=re();if(process.env.NODE_ENV!=="production"&&e&&Ce(rt)&&ee(Se,Qr)&&(m&&(ya(p,rt)||Vp(h,rt))&&In(ba(On.FALLBACK_TO_ROOT,{key:rt,type:Se})),process.env.NODE_ENV!=="production")){const{__v_emitter:Tn}=T;Tn&&m&&Tn.emit("fallback",{type:Se,key:rt,to:"global",groupId:`${Se}:${rt}`})}return e&&m?Ne(e):Oe(rt)}else{if(nt(pt))return pt;throw Li(kt.UNEXPECTED_RETURN_TYPE)}};function ae(...J){return ne(re=>Reflect.apply(u1,null,[re,...J]),()=>cd(...J),"translate",re=>Reflect.apply(re.t,re,[...J]),re=>re,re=>Ce(re))}function pe(...J){const[re,Se,Ne]=J;if(Ne&&!Ue(Ne))throw Li(kt.INVALID_ARGUMENT);return ae(re,Se,gt({resolvedMessage:!0},Ne||{}))}function me(...J){return ne(re=>Reflect.apply(r1,null,[re,...J]),()=>ad(...J),"datetime format",re=>Reflect.apply(re.d,re,[...J]),()=>va,re=>Ce(re)||it(re))}function be(...J){return ne(re=>Reflect.apply(s1,null,[re,...J]),()=>ld(...J),"number format",re=>Reflect.apply(re.n,re,[...J]),()=>va,re=>Ce(re)||it(re))}function Ee(J){return J.map(re=>Ce(re)||mt(re)||st(re)?v1(String(re)):re)}const ve={normalize:Ee,interpolate:J=>J,type:"vnode"};function N(...J){return ne(re=>{let Se;const Ne=re;try{Ne.processor=ve,Se=Reflect.apply(u1,null,[Ne,...J])}finally{Ne.processor=null}return Se},()=>cd(...J),"translate",re=>re[dd](...J),re=>[v1(re)],re=>it(re))}function M(...J){return ne(re=>Reflect.apply(s1,null,[re,...J]),()=>ld(...J),"number format",re=>re[fd](...J),b1,re=>Ce(re)||it(re))}function I(...J){return ne(re=>Reflect.apply(r1,null,[re,...J]),()=>ad(...J),"datetime format",re=>re[ud](...J),b1,re=>Ce(re)||it(re))}function O(J){_=J,T.pluralRules=_}function k(J,re){return ne(()=>{if(!J)return!1;const Se=Ce(re)?re:c.value,Ne=R(Se),Oe=T.messageResolver(Ne,J);return bn(Oe)||nn(Oe)||Ce(Oe)},()=>[J],"translate exists",Se=>Reflect.apply(Se.te,Se,[J,re]),u9,Se=>st(Se))}function w(J){let re=null;const Se=Hp(T,a.value,c.value);for(let Ne=0;Ne<Se.length;Ne++){const Oe=d.value[Se[Ne]]||{},nt=T.messageResolver(Oe,J);if(nt!=null){re=nt;break}}return re}function P(J){const re=w(J);return re??(e?e.tm(J)||{}:{})}function R(J){return d.value[J]||{}}function K(J,re){if(o){const Se={[J]:re};for(const Ne in Se)yn(Se,Ne)&&Di(Se[Ne]);re=Se[J]}d.value[J]=re,T.messages=d.value}function Q(J,re){d.value[J]=d.value[J]||{};const Se={[J]:re};if(o)for(const Ne in Se)yn(Se,Ne)&&Di(Se[Ne]);re=Se[J],fa(re,d.value[J]),T.messages=d.value}function A(J){return u.value[J]||{}}function x(J,re){u.value[J]=re,T.datetimeFormats=u.value,i1(T,J,re)}function B(J,re){u.value[J]=gt(u.value[J]||{},re),T.datetimeFormats=u.value,i1(T,J,re)}function Z(J){return f.value[J]||{}}function q(J,re){f.value[J]=re,T.numberFormats=f.value,l1(T,J,re)}function te(J,re){f.value[J]=gt(f.value[J]||{},re),T.numberFormats=f.value,l1(T,J,re)}C1++,e&&Kn&&(l.watch(e.locale,J=>{s&&(c.value=J,T.locale=J,Mi(T,c.value,a.value))}),l.watch(e.fallbackLocale,J=>{s&&(a.value=J,T.fallbackLocale=J,Mi(T,c.value,a.value))}));const se={id:C1,locale:$,fallbackLocale:j,get inheritLocale(){return s},set inheritLocale(J){s=J,J&&e&&(c.value=e.locale.value,a.value=e.fallbackLocale.value,Mi(T,c.value,a.value))},get availableLocales(){return Object.keys(d.value).sort()},messages:W,get modifiers(){return S},get pluralRules(){return _||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(J){h=J,T.missingWarn=h},get fallbackWarn(){return p},set fallbackWarn(J){p=J,T.fallbackWarn=p},get fallbackRoot(){return m},set fallbackRoot(J){m=J},get fallbackFormat(){return g},set fallbackFormat(J){g=J,T.fallbackFormat=g},get warnHtmlMessage(){return E},set warnHtmlMessage(J){E=J,T.warnHtmlMessage=J},get escapeParameter(){return C},set escapeParameter(J){C=J,T.escapeParameter=J},t:ae,getLocaleMessage:R,setLocaleMessage:K,mergeLocaleMessage:Q,getPostTranslationHandler:U,setPostTranslationHandler:F,getMissingHandler:X,setMissingHandler:H,[l9]:O};return se.datetimeFormats=Y,se.numberFormats=z,se.rt=pe,se.te=k,se.tm=P,se.d=me,se.n=be,se.getDateTimeFormat=A,se.setDateTimeFormat=x,se.mergeDateTimeFormat=B,se.getNumberFormat=Z,se.setNumberFormat=q,se.mergeNumberFormat=te,se[p1]=n,se[dd]=N,se[ud]=I,se[fd]=M,process.env.NODE_ENV!=="production"&&(se[hd]=J=>{T.__v_emitter=J},se[pd]=()=>{T.__v_emitter=void 0}),se}function k1(t,e){}const vd={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function p9({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,o)=>[...r,...o.type===l.Fragment?o.children:[o]],[]):e.reduce((n,r)=>{const o=t[r];return o&&(n[r]=o()),n},We())}function w1(){return l.Fragment}gt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>mt(t)||!isNaN(t)}},vd);function m9(t){return it(t)&&!Ce(t[0])}function S1(t,e,n,r){const{slots:o,attrs:i}=e;return()=>{const s={part:!0};let c=We();t.locale&&(s.locale=t.locale),Ce(t.format)?s.key=t.format:Ue(t.format)&&(Ce(t.format.key)&&(s.key=t.format.key),c=Object.keys(t.format).reduce((h,p)=>n.includes(p)?gt(We(),h,{[p]:t.format[p]}):h,We()));const a=r(t.value,s,c);let d=[s.key];it(a)?d=a.map((h,p)=>{const m=o[h.type],g=m?m({[h.type]:h.value,index:p,parts:a}):[h.value];return m9(g)&&(g[0].key=`${h.type}-${p}`),g}):Ce(a)&&(d=[a]);const u=gt(We(),i),f=Ce(t.tag)||Ue(t.tag)?t.tag:w1();return l.h(f,u,d)}}gt({value:{type:Number,required:!0},format:{type:[String,Object]}},vd);const g9=Yn("global-vue-i18n");function Nt(t={}){const e=gd();if(e==null)throw Li(kt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw Li(kt.NOT_INSTALLED);const n=v9(e),r=b9(n),o=g1(e),i=y9(t,o);if(i==="global")return d9(r,t,o),r;if(i==="parent"){let a=C9(n,e,t.__useComponent);return a==null&&(process.env.NODE_ENV!=="production"&&In(ba(On.NOT_FOUND_PARENT_SCOPE)),a=r),a}const s=n;let c=s.__getInstance(e);if(c==null){const a=gt({},t);"__i18n"in o&&(a.__i18n=o.__i18n),r&&(a.__root=r),c=h9(a),s.__composerExtend&&(c[md]=s.__composerExtend(c)),k9(s,e,c),s.__setInstance(e,c)}else process.env.NODE_ENV!=="production"&&i==="local"&&In(ba(On.DUPLICATE_USE_I18N_CALLING));return c}function v9(t){const e=l.inject(t.isCE?g9:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw Li(t.isCE?kt.NOT_INSTALLED_WITH_PROVIDE:kt.UNEXPECTED_ERROR);return e}function y9(t,e){return da(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function b9(t){return t.mode==="composition"?t.global:t.global.__composer}function C9(t,e,n=!1){let r=null;const o=e.root;let i=E9(e,n);for(;i!=null;){const s=t;if(t.mode==="composition")r=s.__getInstance(i);else if(__VUE_I18N_LEGACY_API__){const c=s.__getInstance(i);c!=null&&(r=c.__composer,n&&r&&!r[p1]&&(r=null))}if(r!=null||o===i)break;i=i.parent}return r}function E9(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function k9(t,e,n){let r=null;l.onMounted(()=>{if(process.env.NODE_ENV!=="production"){e.__VUE_I18N__=n,r=I6();const o=n;o[hd]&&o[hd](r),r.on("*",k1)}},e),l.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",k1),o[pd]&&o[pd](),delete e.__VUE_I18N__),t.__deleteInstance(e);const i=o[md];i&&(i(),delete o[md])},e)}if(gt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},vd),s9(),$C(gC),FC(LC),zC(Hp),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=no();t.__INTLIFY__=!0,vC(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;function Cn(t){return t==null||t===""||Array.isArray(t)&&t.length===0||!(t instanceof Date)&&typeof t=="object"&&Object.keys(t).length===0}function yd(t){return typeof t=="function"&&"call"in t&&"apply"in t}function je(t){return!Cn(t)}function vr(t,e=!0){return t instanceof Object&&t.constructor===Object&&(e||Object.keys(t).length!==0)}function A1(t,e){let n=-1;if(je(t))try{n=t.findLastIndex(e)}catch{n=t.lastIndexOf([...t].reverse().find(e))}return n}function Dt(t,...e){return yd(t)?t(...e):t}function Ht(t,e=!0){return typeof t=="string"&&(e||t!=="")}function Mn(t){return Ht(t)?t.replace(/(-|_)/g,"").toLowerCase():t}function bd(t,e="",n={}){let r=Mn(e).split("."),o=r.shift();if(o){if(vr(t)){let i=Object.keys(t).find(s=>Mn(s)===o)||"";return bd(Dt(t[i],n),r.join("."),n)}return}return Dt(t,n)}function x1(t,e=!0){return Array.isArray(t)&&(e||t.length!==0)}function w9(t){return je(t)&&!isNaN(t)}function S9(t=""){return je(t)&&t.length===1&&!!t.match(/\S| /)}function oo(t,e){if(e){let n=e.test(t);return e.lastIndex=0,n}return!1}function Pi(t){return t&&t.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function A9(t){return Ht(t,!1)?t[0].toUpperCase()+t.slice(1):t}function T1(t){return Ht(t)?t.replace(/(_)/g,"-").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase():t}function Cd(){let t=new Map;return{on(e,n){let r=t.get(e);return r?r.push(n):r=[n],t.set(e,r),this},off(e,n){let r=t.get(e);return r&&r.splice(r.indexOf(n)>>>0,1),this},emit(e,n){let r=t.get(e);r&&r.forEach(o=>{o(n)})},clear(){t.clear()}}}function Bi(...t){if(t){let e=[];for(let n=0;n<t.length;n++){let r=t[n];if(!r)continue;let o=typeof r;if(o==="string"||o==="number")e.push(r);else if(o==="object"){let i=Array.isArray(r)?[Bi(...r)]:Object.entries(r).map(([s,c])=>c?s:void 0);e=i.length?e.concat(i.filter(s=>!!s)):e}}return e.join(" ").trim()}}function x9(t,e){return t?t.classList?t.classList.contains(e):new RegExp("(^| )"+e+"( |$)","gi").test(t.className):!1}function T9(t,e){if(t&&e){let n=r=>{x9(t,r)||(t.classList?t.classList.add(r):t.className+=" "+r)};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function Ed(t,e){if(t&&e){let n=r=>{t.classList?t.classList.remove(r):t.className=t.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")};[e].flat().filter(Boolean).forEach(r=>r.split(" ").forEach(n))}}function I1(t){for(let e of document?.styleSheets)try{for(let n of e?.cssRules)for(let r of n?.style)if(t.test(r))return{name:r,value:n.style.getPropertyValue(r).trim()}}catch{}return null}function I9(t){let e={width:0,height:0};if(t){let[n,r]=[t.style.visibility,t.style.display],o=t.getBoundingClientRect();t.style.visibility="hidden",t.style.display="block",e.width=o.width||t.offsetWidth,e.height=o.height||t.offsetHeight,t.style.display=r,t.style.visibility=n}return e}function _1(){let t=window,e=document,n=e.documentElement,r=e.getElementsByTagName("body")[0],o=t.innerWidth||n.clientWidth||r.clientWidth,i=t.innerHeight||n.clientHeight||r.clientHeight;return{width:o,height:i}}function kd(t){return t?Math.abs(t.scrollLeft):0}function _9(){let t=document.documentElement;return(window.pageXOffset||kd(t))-(t.clientLeft||0)}function N9(){let t=document.documentElement;return(window.pageYOffset||t.scrollTop)-(t.clientTop||0)}function O9(t){return t?getComputedStyle(t).direction==="rtl":!1}function M9(t,e,n=!0){var r,o,i,s;if(t){let c=t.offsetParent?{width:t.offsetWidth,height:t.offsetHeight}:I9(t),a=c.height,d=c.width,u=e.offsetHeight,f=e.offsetWidth,h=e.getBoundingClientRect(),p=N9(),m=_9(),g=_1(),v,y,b="top";h.top+u+a>g.height?(v=h.top+p-a,b="bottom",v<0&&(v=p)):v=u+h.top+p,h.left+d>g.width?y=Math.max(0,h.left+m+f-d):y=h.left+m,O9(t)?t.style.insetInlineEnd=y+"px":t.style.insetInlineStart=y+"px",t.style.top=v+"px",t.style.transformOrigin=b,n&&(t.style.marginTop=b==="bottom"?`calc(${(o=(r=I1(/-anchor-gutter$/))==null?void 0:r.value)!=null?o:"2px"} * -1)`:(s=(i=I1(/-anchor-gutter$/))==null?void 0:i.value)!=null?s:"")}}function N1(t,e){t&&(typeof e=="string"?t.style.cssText=e:Object.entries(e||{}).forEach(([n,r])=>t.style[n]=r))}function Ri(t,e){return t instanceof HTMLElement?t.offsetWidth:0}function O1(t){if(t){let e=t.parentNode;return e&&e instanceof ShadowRoot&&e.host&&(e=e.host),e}return null}function L9(t){return!!(t!==null&&typeof t<"u"&&t.nodeName&&O1(t))}function $i(t){return typeof Element<"u"?t instanceof Element:t!==null&&typeof t=="object"&&t.nodeType===1&&typeof t.nodeName=="string"}var wd;function M1(t){{if(wd!=null)return wd;let e=document.createElement("div");N1(e,{width:"100px",height:"100px",overflow:"scroll",position:"absolute",top:"-9999px"}),document.body.appendChild(e);let n=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),wd=n,n}}function Ca(t,e={}){if($i(t)){let n=(r,o)=>{var i,s;let c=(i=t?.$attrs)!=null&&i[r]?[(s=t?.$attrs)==null?void 0:s[r]]:[];return[o].flat().reduce((a,d)=>{if(d!=null){let u=typeof d;if(u==="string"||u==="number")a.push(d);else if(u==="object"){let f=Array.isArray(d)?n(r,d):Object.entries(d).map(([h,p])=>r==="style"&&(p||p===0)?`${h.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${p}`:p?h:void 0);a=f.length?a.concat(f.filter(h=>!!h)):a}}return a},c)};Object.entries(e).forEach(([r,o])=>{if(o!=null){let i=r.match(/^on(.+)/);i?t.addEventListener(i[1].toLowerCase(),o):r==="p-bind"||r==="pBind"?Ca(t,o):(o=r==="class"?[...new Set(n("class",o))].join(" ").trim():r==="style"?n("style",o).join(";").trim():o,(t.$attrs=t.$attrs||{})&&(t.$attrs[r]=o),t.setAttribute(r,o))}})}}function D9(t,e={},...n){{let r=document.createElement(t);return Ca(r,e),r.append(...n),r}}function Fi(t,e){return $i(t)?t.matches(e)?t:t.querySelector(e):null}function io(t,e){t&&document.activeElement!==t&&t.focus(e)}function P9(t,e){if($i(t)){let n=t.getAttribute(e);return isNaN(n)?n==="true"||n==="false"?n==="true":n:+n}}function L1(t){if(t){let e=t.offsetHeight,n=getComputedStyle(t);return e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth),e}return 0}function B9(t){if(t){let[e,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let r=t.offsetHeight;return t.style.display=n,t.style.visibility=e,r}return 0}function R9(t){if(t){let[e,n]=[t.style.visibility,t.style.display];t.style.visibility="hidden",t.style.display="block";let r=t.offsetWidth;return t.style.display=n,t.style.visibility=e,r}return 0}function D1(t){if(t){let e=t.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||kd(document.documentElement)||kd(document.body)||0)}}return{top:"auto",left:"auto"}}function P1(t,e){return t?t.offsetHeight:0}function B1(t,e=[]){let n=O1(t);return n===null?e:B1(n,e.concat([n]))}function $9(t){let e=[];if(t){let n=B1(t),r=/(auto|scroll)/,o=i=>{try{let s=window.getComputedStyle(i,null);return r.test(s.getPropertyValue("overflow"))||r.test(s.getPropertyValue("overflowX"))||r.test(s.getPropertyValue("overflowY"))}catch{return!1}};for(let i of n){let s=i.nodeType===1&&i.dataset.scrollselectors;if(s){let c=s.split(",");for(let a of c){let d=Fi(i,a);d&&o(d)&&e.push(d)}}i.nodeType!==9&&o(i)&&e.push(i)}}return e}function R1(t){if(t){let e=t.offsetWidth,n=getComputedStyle(t);return e-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth),e}return 0}function $1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function F9(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}function z9(t,e){var n,r;if(t){let o=t.parentElement,i=D1(o),s=_1(),c=t.offsetParent?t.offsetWidth:R9(t),a=t.offsetParent?t.offsetHeight:B9(t),d=Ri((n=o?.children)==null?void 0:n[0]),u=P1((r=o?.children)==null?void 0:r[0]),f="",h="";i.left+d+c>s.width-M1()?i.left<c?e%2===1?f=i.left?"-"+i.left+"px":"100%":e%2===0&&(f=s.width-c-M1()+"px"):f="-100%":f="100%",t.getBoundingClientRect().top+u+a>s.height?h=`-${a-u}px`:h="0px",t.style.top=h,t.style.insetInlineStart=f}}function U9(t,e="",n){$i(t)&&n!==null&&n!==void 0&&t.setAttribute(e,n)}var Ea={};function H9(t="pui_id_"){return Object.hasOwn(Ea,t)||(Ea[t]=0),Ea[t]++,`${t}${Ea[t]}`}function j9(){let t=[],e=(s,c,a=999)=>{let d=o(s,c,a),u=d.value+(d.key===s?0:a)+1;return t.push({key:s,value:u}),u},n=s=>{t=t.filter(c=>c.value!==s)},r=(s,c)=>o(s).value,o=(s,c,a=0)=>[...t].reverse().find(d=>!0)||{key:s,value:a},i=s=>s&&parseInt(s.style.zIndex,10)||0;return{get:i,set:(s,c,a)=>{c&&(c.style.zIndex=String(e(s,!0,a)))},clear:s=>{s&&(n(i(s)),s.style.zIndex="")},getCurrent:s=>r(s)}}var Sd=j9(),W9=Object.defineProperty,K9=Object.defineProperties,Y9=Object.getOwnPropertyDescriptors,ka=Object.getOwnPropertySymbols,F1=Object.prototype.hasOwnProperty,z1=Object.prototype.propertyIsEnumerable,U1=(t,e,n)=>e in t?W9(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,En=(t,e)=>{for(var n in e||(e={}))F1.call(e,n)&&U1(t,n,e[n]);if(ka)for(var n of ka(e))z1.call(e,n)&&U1(t,n,e[n]);return t},Ad=(t,e)=>K9(t,Y9(e)),Zn=(t,e)=>{var n={};for(var r in t)F1.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&ka)for(var r of ka(t))e.indexOf(r)<0&&z1.call(t,r)&&(n[r]=t[r]);return n},G9=Cd(),Pt=G9,zi=/{([^}]*)}/g,H1=/(\d+\s+[\+\-\*\/]\s+\d+)/g,j1=/var\([^)]+\)/g;function W1(t){return Ht(t)?t.replace(/[A-Z]/g,(e,n)=>n===0?e:"."+e.toLowerCase()).toLowerCase():t}function Q9(t){return vr(t)&&t.hasOwnProperty("$value")&&t.hasOwnProperty("$type")?t.$value:t}function Z9(t){return t.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function xd(t="",e=""){return Z9(`${Ht(t,!1)&&Ht(e,!1)?`${t}-`:t}${e}`)}function K1(t="",e=""){return`--${xd(t,e)}`}function J9(t=""){let e=(t.match(/{/g)||[]).length,n=(t.match(/}/g)||[]).length;return(e+n)%2!==0}function Y1(t,e="",n="",r=[],o){if(Ht(t)){let i=t.trim();if(J9(i))return;if(oo(i,zi)){let s=i.replaceAll(zi,c=>{let a=c.replace(/{|}/g,"").split(".").filter(d=>!r.some(u=>oo(d,u)));return`var(${K1(n,T1(a.join("-")))}${je(o)?`, ${o}`:""})`});return oo(s.replace(j1,"0"),H1)?`calc(${s})`:s}return i}else if(w9(t))return t}function X9(t,e,n){Ht(e,!1)&&t.push(`${e}:${n};`)}function jo(t,e){return t?`${t}{${e}}`:""}function G1(t,e){if(t.indexOf("dt(")===-1)return t;function n(s,c){let a=[],d=0,u="",f=null,h=0;for(;d<=s.length;){let p=s[d];if((p==='"'||p==="'"||p==="`")&&s[d-1]!=="\\"&&(f=f===p?null:p),!f&&(p==="("&&h++,p===")"&&h--,(p===","||d===s.length)&&h===0)){let m=u.trim();m.startsWith("dt(")?a.push(G1(m,c)):a.push(r(m)),u="",d++;continue}p!==void 0&&(u+=p),d++}return a}function r(s){let c=s[0];if((c==='"'||c==="'"||c==="`")&&s[s.length-1]===c)return s.slice(1,-1);let a=Number(s);return isNaN(a)?s:a}let o=[],i=[];for(let s=0;s<t.length;s++)if(t[s]==="d"&&t.slice(s,s+3)==="dt(")i.push(s),s+=2;else if(t[s]===")"&&i.length>0){let c=i.pop();i.length===0&&o.push([c,s])}if(!o.length)return t;for(let s=o.length-1;s>=0;s--){let[c,a]=o[s],d=t.slice(c+3,a),u=n(d,e),f=e(...u);t=t.slice(0,c)+f+t.slice(a+1)}return t}var so=(...t)=>q9(Qe.getTheme(),...t),q9=(t={},e,n,r)=>{if(e){let{variable:o,options:i}=Qe.defaults||{},{prefix:s,transform:c}=t?.options||i||{},a=oo(e,zi)?e:`{${e}}`;return r==="value"||Cn(r)&&c==="strict"?Qe.getTokenValue(e):Y1(a,void 0,s,[o.excludedKeyRegex],n)}return""};function wa(t,...e){if(t instanceof Array){let n=t.reduce((r,o,i)=>{var s;return r+o+((s=Dt(e[i],{dt:so}))!=null?s:"")},"");return G1(n,so)}return Dt(t,{dt:so})}function V9(t,e={}){let n=Qe.defaults.variable,{prefix:r=n.prefix,selector:o=n.selector,excludedKeyRegex:i=n.excludedKeyRegex}=e,s=[],c=[],a=[{node:t,path:r}];for(;a.length;){let{node:u,path:f}=a.pop();for(let h in u){let p=u[h],m=Q9(p),g=oo(h,i)?xd(f):xd(f,T1(h));if(vr(m))a.push({node:m,path:g});else{let v=K1(g),y=Y1(m,g,r,[i]);X9(c,v,y);let b=g;r&&b.startsWith(r+"-")&&(b=b.slice(r.length+1)),s.push(b.replace(/-/g,"."))}}}let d=c.join("");return{value:c,tokens:s,declarations:d,css:jo(o,d)}}var kn={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(t){return{type:"class",selector:t,matched:this.pattern.test(t.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(t){return{type:"attr",selector:`:root${t},:host${t}`,matched:this.pattern.test(t.trim())}}},media:{pattern:/^@media (.*)$/,resolve(t){return{type:"media",selector:t,matched:this.pattern.test(t.trim())}}},system:{pattern:/^system$/,resolve(t){return{type:"system",selector:"@media (prefers-color-scheme: dark)",matched:this.pattern.test(t.trim())}}},custom:{resolve(t){return{type:"custom",selector:t,matched:!0}}}},resolve(t){let e=Object.keys(this.rules).filter(n=>n!=="custom").map(n=>this.rules[n]);return[t].flat().map(n=>{var r;return(r=e.map(o=>o.resolve(n)).find(o=>o.matched))!=null?r:this.rules.custom.resolve(n)})}},_toVariables(t,e){return V9(t,{prefix:e?.prefix})},getCommon({name:t="",theme:e={},params:n,set:r,defaults:o}){var i,s,c,a,d,u,f;let{preset:h,options:p}=e,m,g,v,y,b,E,C;if(je(h)&&p.transform!=="strict"){let{primitive:S,semantic:_,extend:T}=h,D=_||{},{colorScheme:G}=D,$=Zn(D,["colorScheme"]),j=T||{},{colorScheme:W}=j,Y=Zn(j,["colorScheme"]),z=G||{},{dark:U}=z,F=Zn(z,["dark"]),X=W||{},{dark:H}=X,ee=Zn(X,["dark"]),ne=je(S)?this._toVariables({primitive:S},p):{},ae=je($)?this._toVariables({semantic:$},p):{},pe=je(F)?this._toVariables({light:F},p):{},me=je(U)?this._toVariables({dark:U},p):{},be=je(Y)?this._toVariables({semantic:Y},p):{},Ee=je(ee)?this._toVariables({light:ee},p):{},Te=je(H)?this._toVariables({dark:H},p):{},[ve,N]=[(i=ne.declarations)!=null?i:"",ne.tokens],[M,I]=[(s=ae.declarations)!=null?s:"",ae.tokens||[]],[O,k]=[(c=pe.declarations)!=null?c:"",pe.tokens||[]],[w,P]=[(a=me.declarations)!=null?a:"",me.tokens||[]],[R,K]=[(d=be.declarations)!=null?d:"",be.tokens||[]],[Q,A]=[(u=Ee.declarations)!=null?u:"",Ee.tokens||[]],[x,B]=[(f=Te.declarations)!=null?f:"",Te.tokens||[]];m=this.transformCSS(t,ve,"light","variable",p,r,o),g=N;let Z=this.transformCSS(t,`${M}${O}`,"light","variable",p,r,o),q=this.transformCSS(t,`${w}`,"dark","variable",p,r,o);v=`${Z}${q}`,y=[...new Set([...I,...k,...P])];let te=this.transformCSS(t,`${R}${Q}color-scheme:light`,"light","variable",p,r,o),se=this.transformCSS(t,`${x}color-scheme:dark`,"dark","variable",p,r,o);b=`${te}${se}`,E=[...new Set([...K,...A,...B])],C=Dt(h.css,{dt:so})}return{primitive:{css:m,tokens:g},semantic:{css:v,tokens:y},global:{css:b,tokens:E},style:C}},getPreset({name:t="",preset:e={},options:n,params:r,set:o,defaults:i,selector:s}){var c,a,d;let u,f,h;if(je(e)&&n.transform!=="strict"){let p=t.replace("-directive",""),m=e,{colorScheme:g,extend:v,css:y}=m,b=Zn(m,["colorScheme","extend","css"]),E=v||{},{colorScheme:C}=E,S=Zn(E,["colorScheme"]),_=g||{},{dark:T}=_,D=Zn(_,["dark"]),G=C||{},{dark:$}=G,j=Zn(G,["dark"]),W=je(b)?this._toVariables({[p]:En(En({},b),S)},n):{},Y=je(D)?this._toVariables({[p]:En(En({},D),j)},n):{},z=je(T)?this._toVariables({[p]:En(En({},T),$)},n):{},[U,F]=[(c=W.declarations)!=null?c:"",W.tokens||[]],[X,H]=[(a=Y.declarations)!=null?a:"",Y.tokens||[]],[ee,ne]=[(d=z.declarations)!=null?d:"",z.tokens||[]],ae=this.transformCSS(p,`${U}${X}`,"light","variable",n,o,i,s),pe=this.transformCSS(p,ee,"dark","variable",n,o,i,s);u=`${ae}${pe}`,f=[...new Set([...F,...H,...ne])],h=Dt(y,{dt:so})}return{css:u,tokens:f,style:h}},getPresetC({name:t="",theme:e={},params:n,set:r,defaults:o}){var i;let{preset:s,options:c}=e,a=(i=s?.components)==null?void 0:i[t];return this.getPreset({name:t,preset:a,options:c,params:n,set:r,defaults:o})},getPresetD({name:t="",theme:e={},params:n,set:r,defaults:o}){var i,s;let c=t.replace("-directive",""),{preset:a,options:d}=e,u=((i=a?.components)==null?void 0:i[c])||((s=a?.directives)==null?void 0:s[c]);return this.getPreset({name:c,preset:u,options:d,params:n,set:r,defaults:o})},applyDarkColorScheme(t){return!(t.darkModeSelector==="none"||t.darkModeSelector===!1)},getColorSchemeOption(t,e){var n;return this.applyDarkColorScheme(t)?this.regex.resolve(t.darkModeSelector===!0?e.options.darkModeSelector:(n=t.darkModeSelector)!=null?n:e.options.darkModeSelector):[]},getLayerOrder(t,e={},n,r){let{cssLayer:o}=e;return o?`@layer ${Dt(o.order||o.name||"primeui",n)}`:""},getCommonStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){let s=this.getCommon({name:t,theme:e,params:n,set:o,defaults:i}),c=Object.entries(r).reduce((a,[d,u])=>a.push(`${d}="${u}"`)&&a,[]).join(" ");return Object.entries(s||{}).reduce((a,[d,u])=>{if(vr(u)&&Object.hasOwn(u,"css")){let f=Pi(u.css),h=`${d}-variables`;a.push(`<style type="text/css" data-primevue-style-id="${h}" ${c}>${f}</style>`)}return a},[]).join("")},getStyleSheet({name:t="",theme:e={},params:n,props:r={},set:o,defaults:i}){var s;let c={name:t,theme:e,params:n,set:o,defaults:i},a=(s=t.includes("-directive")?this.getPresetD(c):this.getPresetC(c))==null?void 0:s.css,d=Object.entries(r).reduce((u,[f,h])=>u.push(`${f}="${h}"`)&&u,[]).join(" ");return a?`<style type="text/css" data-primevue-style-id="${t}-variables" ${d}>${Pi(a)}</style>`:""},createTokens(t={},e,n="",r="",o={}){let i=function(c,a={},d=[]){if(d.includes(this.path))return console.warn(`Circular reference detected at ${this.path}`),{colorScheme:c,path:this.path,paths:a,value:void 0};d.push(this.path),a.name=this.path,a.binding||(a.binding={});let u=this.value;if(typeof this.value=="string"&&zi.test(this.value)){let f=this.value.trim().replace(zi,h=>{var p;let m=h.slice(1,-1),g=this.tokens[m];if(!g)return console.warn(`Token not found for path: ${m}`),"__UNRESOLVED__";let v=g.computed(c,a,d);return Array.isArray(v)&&v.length===2?`light-dark(${v[0].value},${v[1].value})`:(p=v?.value)!=null?p:"__UNRESOLVED__"});u=H1.test(f.replace(j1,"0"))?`calc(${f})`:f}return Cn(a.binding)&&delete a.binding,d.pop(),{colorScheme:c,path:this.path,paths:a,value:u.includes("__UNRESOLVED__")?void 0:u}},s=(c,a,d)=>{Object.entries(c).forEach(([u,f])=>{let h=oo(u,e.variable.excludedKeyRegex)?a:a?`${a}.${W1(u)}`:W1(u),p=d?`${d}.${u}`:u;vr(f)?s(f,h,p):(o[h]||(o[h]={paths:[],computed:(m,g={},v=[])=>{if(o[h].paths.length===1)return o[h].paths[0].computed(o[h].paths[0].scheme,g.binding,v);if(m&&m!=="none")for(let y=0;y<o[h].paths.length;y++){let b=o[h].paths[y];if(b.scheme===m)return b.computed(m,g.binding,v)}return o[h].paths.map(y=>y.computed(y.scheme,g[y.scheme],v))}}),o[h].paths.push({path:p,value:f,scheme:p.includes("colorScheme.light")?"light":p.includes("colorScheme.dark")?"dark":"none",computed:i,tokens:o}))})};return s(t,n,r),o},getTokenValue(t,e,n){var r;let o=(c=>c.split(".").filter(a=>!oo(a.toLowerCase(),n.variable.excludedKeyRegex)).join("."))(e),i=e.includes("colorScheme.light")?"light":e.includes("colorScheme.dark")?"dark":void 0,s=[(r=t[o])==null?void 0:r.computed(i)].flat().filter(c=>c);return s.length===1?s[0].value:s.reduce((c={},a)=>{let d=a,{colorScheme:u}=d,f=Zn(d,["colorScheme"]);return c[u]=f,c},void 0)},getSelectorRule(t,e,n,r){return n==="class"||n==="attr"?jo(je(e)?`${t}${e},${t} ${e}`:t,r):jo(t,jo(e??":root,:host",r))},transformCSS(t,e,n,r,o={},i,s,c){if(je(e)){let{cssLayer:a}=o;if(r!=="style"){let d=this.getColorSchemeOption(o,s);e=n==="dark"?d.reduce((u,{type:f,selector:h})=>(je(h)&&(u+=h.includes("[CSS]")?h.replace("[CSS]",e):this.getSelectorRule(h,c,f,e)),u),""):jo(c??":root,:host",e)}if(a){let d={name:"primeui"};vr(a)&&(d.name=Dt(a.name,{name:t,type:r})),je(d.name)&&(e=jo(`@layer ${d.name}`,e),i?.layerNames(d.name))}return e}return""}},Qe={defaults:{variable:{prefix:"p",selector:":root,:host",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(t={}){let{theme:e}=t;e&&(this._theme=Ad(En({},e),{options:En(En({},this.defaults.options),e.options)}),this._tokens=kn.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var t;return((t=this.theme)==null?void 0:t.preset)||{}},get options(){var t;return((t=this.theme)==null?void 0:t.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(t){this.update({theme:t}),Pt.emit("theme:change",t)},getPreset(){return this.preset},setPreset(t){this._theme=Ad(En({},this.theme),{preset:t}),this._tokens=kn.createTokens(t,this.defaults),this.clearLoadedStyleNames(),Pt.emit("preset:change",t),Pt.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(t){this._theme=Ad(En({},this.theme),{options:t}),this.clearLoadedStyleNames(),Pt.emit("options:change",t),Pt.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(t){this._layerNames.add(t)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(t){return this._loadedStyleNames.has(t)},setLoadedStyleName(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(t){return kn.getTokenValue(this.tokens,t,this.defaults)},getCommon(t="",e){return kn.getCommon({name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(t="",e){let n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPresetC(n)},getDirective(t="",e){let n={name:t,theme:this.theme,params:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPresetD(n)},getCustomPreset(t="",e,n,r){let o={name:t,preset:e,options:this.options,selector:n,params:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return kn.getPreset(o)},getLayerOrderCSS(t=""){return kn.getLayerOrder(t,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(t="",e,n="style",r){return kn.transformCSS(t,e,r,n,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(t="",e,n={}){return kn.getCommonStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(t,e,n={}){return kn.getStyleSheet({name:t,theme:this.theme,params:e,props:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(t){this._loadingStyles.add(t)},onStyleUpdated(t){this._loadingStyles.add(t)},onStyleLoaded(t,{name:e}){this._loadingStyles.size&&(this._loadingStyles.delete(e),Pt.emit(`theme:${e}:load`,t),!this._loadingStyles.size&&Pt.emit("theme:load"))}},yr={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(e){return this._loadedStyleNames.has(e)},setLoadedStyleName:function(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName:function(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}},eE=`
62
62
  *,
63
63
  ::before,
64
64
  ::after {
@@ -1171,23 +1171,23 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1171
1171
  .p-splitbutton-raised {
1172
1172
  box-shadow: dt('splitbutton.raised.shadow');
1173
1173
  }
1174
- `,Xk={root:function(e){var n=e.instance,r=e.props;return["p-splitbutton p-component",{"p-splitbutton-raised":r.raised,"p-splitbutton-rounded":r.rounded,"p-splitbutton-fluid":n.hasFluid}]},pcButton:"p-splitbutton-button",pcDropdown:"p-splitbutton-dropdown"},qk=lt.extend({name:"splitbutton",style:Jk,classes:Xk}),Vk={name:"BaseSplitButton",extends:Wo,props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:null},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:qk,provide:function(){return{$pcSplitButton:this,$parentInstance:this}}},Sm={name:"SplitButton",extends:Vk,inheritAttrs:!1,emits:["click"],inject:{$pcFluid:{default:null}},data:function(){return{isExpanded:!1}},mounted:function(){var e=this;this.$watch("$refs.menu.visible",function(n){e.isExpanded=n})},methods:{onDropdownButtonClick:function(e){e&&e.preventDefault(),this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=this.$refs.menu.visible},onDropdownKeydown:function(e){(e.code==="ArrowDown"||e.code==="ArrowUp")&&(this.onDropdownButtonClick(),e.preventDefault())},onDefaultButtonClick:function(e){this.isExpanded&&this.$refs.menu.hide(e),this.$emit("click",e)}},computed:{containerClass:function(){return[this.cx("root"),this.class]},hasFluid:function(){return Cn(this.fluid)?!!this.$pcFluid:this.fluid}},components:{PVSButton:bm,PVSMenu:wm,ChevronDownIcon:dm}},ew=["data-p-severity"];function tw(t,e,n,r,o,i){var s=l.resolveComponent("PVSButton"),c=l.resolveComponent("PVSMenu");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:i.containerClass,style:t.style},t.ptmi("root"),{"data-p-severity":t.severity}),[l.createVNode(s,l.mergeProps({type:"button",class:t.cx("pcButton"),label:t.label,disabled:t.disabled,severity:t.severity,text:t.text,icon:t.icon,outlined:t.outlined,size:t.size,fluid:t.fluid,"aria-label":t.label,onClick:i.onDefaultButtonClick},t.buttonProps,{pt:t.ptm("pcButton"),unstyled:t.unstyled}),l.createSlots({default:l.withCtx(function(){return[l.renderSlot(t.$slots,"default")]}),_:2},[t.$slots.icon?{name:"icon",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"icon",{class:l.normalizeClass(a.class)},function(){return[l.createElementVNode("span",l.mergeProps({class:[t.icon,a.class]},t.ptm("pcButton").icon,{"data-pc-section":"buttonicon"}),null,16)]})]}),key:"0"}:void 0]),1040,["class","label","disabled","severity","text","icon","outlined","size","fluid","aria-label","onClick","pt","unstyled"]),l.createVNode(s,l.mergeProps({ref:"button",type:"button",class:t.cx("pcDropdown"),disabled:t.disabled,"aria-haspopup":"true","aria-expanded":o.isExpanded,"aria-controls":o.isExpanded?t.$id+"_overlay":void 0,onClick:i.onDropdownButtonClick,onKeydown:i.onDropdownKeydown,severity:t.severity,text:t.text,outlined:t.outlined,size:t.size,unstyled:t.unstyled},t.menuButtonProps,{pt:t.ptm("pcDropdown")}),{icon:l.withCtx(function(a){return[l.renderSlot(t.$slots,t.$slots.dropdownicon?"dropdownicon":"menubuttonicon",{class:l.normalizeClass(a.class)},function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.menuButtonIcon||t.dropdownIcon?"span":"ChevronDownIcon"),l.mergeProps({class:[t.dropdownIcon||t.menuButtonIcon,a.class]},t.ptm("pcDropdown").icon,{"data-pc-section":"menubuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","aria-expanded","aria-controls","onClick","onKeydown","severity","text","outlined","size","unstyled","pt"]),l.createVNode(c,{ref:"menu",id:t.$id+"_overlay",model:t.model,popup:!0,autoZIndex:t.autoZIndex,baseZIndex:t.baseZIndex,appendTo:t.appendTo,unstyled:t.unstyled,pt:t.ptm("pcMenu")},l.createSlots({_:2},[t.$slots.menuitemicon?{name:"itemicon",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"menuitemicon",{item:a.item,class:l.normalizeClass(a.class)})]}),key:"0"}:void 0,t.$slots.item?{name:"item",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"item",{item:a.item,hasSubmenu:a.hasSubmenu,label:a.label,props:a.props})]}),key:"1"}:void 0]),1032,["id","model","autoZIndex","baseZIndex","appendTo","unstyled","pt"])],16,ew)}Sm.render=tw;const nw=["src"],rw={class:"menu-item"},ow=["src"],Am={__name:"BDContentLibrarySplitButton",props:{contentLibraryProviders:{type:Array,default:()=>[]},isExternalOnly:{type:Boolean,default:!1}},emits:["content-library"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=l.computed(()=>r.contentLibraryProviders.map(f=>({label:f.label,image:f.img,value:f.value,command:()=>o("content-library",f.value)}))),s=l.computed(()=>{let f=i.value;return f.length!==0&&r.isExternalOnly&&(f=f.slice(1)),f}),c=l.computed(()=>{const f=i.value;return r.isExternalOnly&&f.length>0?f[0].label:n("contentLibrarySplitButton.messageTemplatesTitle")}),a=l.computed(()=>{const f=i.value;return r.isExternalOnly&&f.length>0}),d=l.computed(()=>{const f=i.value;return f.length>0?f[0].image:""}),u=()=>{const f=i.value;let h="message-template";r.isExternalOnly&&f.length>0&&(h=f[0].value),o("content-library",h)};return(f,h)=>(l.openBlock(),l.createBlock(l.unref(Sm),{class:"bd-content-library-split-button",model:s.value,outlined:"",severity:"secondary",onClick:u},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:d.value,alt:""},null,8,nw)):(l.openBlock(),l.createBlock(Mc,{key:1})),l.createElementVNode("span",null,l.toDisplayString(c.value),1)]),item:l.withCtx(({item:p})=>[l.createElementVNode("div",rw,[l.createElementVNode("img",{src:p.image,alt:"",class:"icon-image"},null,8,ow),l.createElementVNode("span",null,l.toDisplayString(p.label),1)])]),_:1},8,["model"]))}},iw={class:"invalid-feedback bd-invalid-feedback"},xa=l.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(t){const e=t;return(n,r)=>(l.openBlock(),l.createElementBlock("div",iw,[e.state?(l.openBlock(),l.createBlock(l.unref($o),{key:0})):(l.openBlock(),l.createBlock(l.unref(na),{key:1})),l.createTextVNode(" "+l.toDisplayString(e.text),1)]))}});var sw=Object.defineProperty,aw=(t,e,n)=>e in t?sw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vi=(t,e,n)=>aw(t,typeof e!="symbol"?e+"":e,n);const xm={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},Tm=(t,e,n)=>t.replaceAll(e,"").replace(n,".").replace("..",".").replace(/[^.\d]/g,""),Im=(t,e,n)=>{var r;return new Intl.NumberFormat(((r=n.number)==null?void 0:r.locale)??"en",{minimumFractionDigits:t,maximumFractionDigits:e,roundingMode:"trunc"})},lw=(t,e=!0,n)=>{var r,o,i,s;const c=((r=n.number)==null?void 0:r.unsigned)!==!0&&t.startsWith("-")?"-":"",a=((o=n.number)==null?void 0:o.fraction)??0;let d=Im(0,a,n);const u=d.formatToParts(1000.12),f=((i=u.find(v=>v.type==="group"))==null?void 0:i.value)??" ",h=((s=u.find(v=>v.type==="decimal"))==null?void 0:s.value)??".",p=Tm(t,f,h);if(Number.isNaN(parseFloat(p)))return c;const m=p.split(".");if(m[1]!=null&&m[1].length>=1){const v=m[1].length<=a?m[1].length:a;d=Im(v,a,n)}let g=d.format(parseFloat(p));return e?a>0&&p.endsWith(".")&&!p.slice(0,-1).includes(".")&&(g+=h):g=Tm(g,f,h),c+g},_m=t=>JSON.parse(t.replaceAll("'",'"')),cw=(t,e={})=>{const n={...e};t.dataset.maska!=null&&t.dataset.maska!==""&&(n.mask=dw(t.dataset.maska)),t.dataset.maskaEager!=null&&(n.eager=Ta(t.dataset.maskaEager)),t.dataset.maskaReversed!=null&&(n.reversed=Ta(t.dataset.maskaReversed)),t.dataset.maskaTokensReplace!=null&&(n.tokensReplace=Ta(t.dataset.maskaTokensReplace)),t.dataset.maskaTokens!=null&&(n.tokens=uw(t.dataset.maskaTokens));const r={};return t.dataset.maskaNumberLocale!=null&&(r.locale=t.dataset.maskaNumberLocale),t.dataset.maskaNumberFraction!=null&&(r.fraction=parseInt(t.dataset.maskaNumberFraction)),t.dataset.maskaNumberUnsigned!=null&&(r.unsigned=Ta(t.dataset.maskaNumberUnsigned)),(t.dataset.maskaNumber!=null||Object.values(r).length>0)&&(n.number=r),n},Ta=t=>t!==""?!!JSON.parse(t):!0,dw=t=>t.startsWith("[")&&t.endsWith("]")?_m(t):t,uw=t=>{if(t.startsWith("{")&&t.endsWith("}"))return _m(t);const e={};return t.split("|").forEach(n=>{const r=n.split(":");e[r[0]]={pattern:Nm()?new RegExp(r[1],"u"):new RegExp(r[1]),optional:r[2]==="optional",multiple:r[2]==="multiple",repeated:r[2]==="repeated"}}),e},Nm=()=>{try{return new RegExp("\\p{L}","u"),!0}catch{return!1}};class fw{constructor(e={}){Vi(this,"opts",{}),Vi(this,"memo",new Map);const n={...e};if(n.tokens!=null){n.tokens=n.tokensReplace?{...n.tokens}:{...xm,...n.tokens};for(const r of Object.values(n.tokens))typeof r.pattern=="string"&&(r.pattern=Nm()?new RegExp(r.pattern,"u"):new RegExp(r.pattern))}else n.tokens=xm;Array.isArray(n.mask)&&(n.mask.length>1?n.mask=[...n.mask].sort((r,o)=>r.length-o.length):n.mask=n.mask[0]??""),n.mask===""&&(n.mask=null),this.opts=n}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const n=this.findMask(String(e));if(this.opts.mask==null||n==null)return!1;const r=this.process(String(e),n).length;return typeof this.opts.mask=="string"?r>=this.opts.mask.length:r>=n.length}findMask(e){const n=this.opts.mask;if(n==null)return null;if(typeof n=="string")return n;if(typeof n=="function")return n(e);const r=this.process(e,n.slice(-1).pop()??"",!1);return n.find(o=>this.process(e,o,!1).length>=r.length)??""}escapeMask(e){const n=[],r=[];return e.split("").forEach((o,i)=>{o==="!"&&e[i-1]!=="!"?r.push(i-r.length):n.push(o)}),{mask:n.join(""),escaped:r}}process(e,n,r=!0){if(this.opts.number!=null)return lw(e,r,this.opts);if(n==null)return e;const o=`v=${e},mr=${n},m=${r?1:0}`;if(this.memo.has(o))return this.memo.get(o);const{mask:i,escaped:s}=this.escapeMask(n),c=[],a=this.opts.tokens!=null?this.opts.tokens:{},d=this.isReversed()?-1:1,u=this.isReversed()?"unshift":"push",f=this.isReversed()?0:i.length-1,h=this.isReversed()?()=>v>-1&&y>-1:()=>v<i.length&&y<e.length,p=E=>!this.isReversed()&&E<=f||this.isReversed()&&E>=f;let m,g=-1,v=this.isReversed()?i.length-1:0,y=this.isReversed()?e.length-1:0,b=!1;for(;h();){const E=i.charAt(v),C=a[E],S=C?.transform!=null?C.transform(e.charAt(y)):e.charAt(y);if(!s.includes(v)&&C!=null?(S.match(C.pattern)!=null?(c[u](S),C.repeated?(g===-1?g=v:v===f&&v!==g&&(v=g-d),f===g&&(v-=d)):C.multiple&&(b=!0,v-=d),v+=d):C.multiple?b&&(v+=d,y-=d,b=!1):S===m?m=void 0:C.optional&&(v+=d,y-=d),y+=d):(r&&!this.isEager()&&c[u](E),S===E&&!this.isEager()?y+=d:m=E,this.isEager()||(v+=d)),this.isEager())for(;p(v)&&(a[i.charAt(v)]==null||s.includes(v));){if(r){if(c[u](i.charAt(v)),e.charAt(y)===i.charAt(v)){v+=d,y+=d;continue}}else i.charAt(v)===e.charAt(y)&&(y+=d);v+=d}}return this.memo.set(o,c.join("")),this.memo.get(o)}}let hw=class{constructor(e,n={}){Vi(this,"items",new Map),Vi(this,"eventAbortController"),Vi(this,"onInput",r=>{if(r instanceof CustomEvent&&r.type==="input"&&!r.isTrusted&&!r.bubbles)return;const o=r.target,i=this.items.get(o);if(i===void 0)return;const s="inputType"in r&&r.inputType.startsWith("delete"),c=i.isEager(),a=s&&c&&i.unmasked(o.value)===""?"":o.value;this.fixCursor(o,s,()=>this.setValue(o,a))}),this.options=n,this.eventAbortController=new AbortController,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){var n;e.value!==""&&e.value!==((n=this.processInput(e))==null?void 0:n.masked)&&this.setValue(e,e.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(e){const n=this.getOptions(this.options);for(const r of e){if(!this.items.has(r)){const{signal:i}=this.eventAbortController;r.addEventListener("input",this.onInput,{capture:!0,signal:i})}const o=new fw(cw(r,n));this.items.set(r,o),queueMicrotask(()=>this.updateValue(r)),r.selectionStart===null&&o.isEager()&&console.warn("Maska: input of `%s` type is not supported",r.type)}}getInputs(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):"length"in e?Array.from(e):[e]}getOptions(e){const{onMaska:n,preProcess:r,postProcess:o,...i}=e;return i}fixCursor(e,n,r){var o,i;const s=e.selectionStart,c=e.value;if(r(),s===null||s===c.length&&!n)return;const a=e.value,d=c.slice(0,s),u=a.slice(0,s),f=(o=this.processInput(e,d))==null?void 0:o.unmasked,h=(i=this.processInput(e,u))==null?void 0:i.unmasked;if(f===void 0||h===void 0)return;let p=s;d!==u&&(p+=n?a.length-c.length:f.length-h.length),e.setSelectionRange(p,p)}setValue(e,n){const r=this.processInput(e,n);r!==void 0&&(e.value=r.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(o=>o(r)):this.options.onMaska(r)),e.dispatchEvent(new CustomEvent("maska",{detail:r})),e.dispatchEvent(new CustomEvent("input",{detail:r.masked})))}processInput(e,n){const r=this.items.get(e);if(r===void 0)return;let o=n??e.value;this.options.preProcess!=null&&(o=this.options.preProcess(o));let i=r.masked(o);return this.options.postProcess!=null&&(i=this.options.postProcess(i)),{masked:i,unmasked:r.unmasked(o),completed:r.completed(o)}}};const Pd=new WeakMap,pw=(t,e)=>{if(t.arg==null||t.instance==null)return;const n="setup"in t.instance.$.type;t.arg in t.instance?t.instance[t.arg]=e:n&&console.warn("Maska: please expose `%s` using defineExpose",t.arg)},mw=(t,e)=>{var n;const r=t instanceof HTMLInputElement?t:t.querySelector("input");if(r==null||r?.type==="file")return;let o={};if(e.value!=null&&(o=typeof e.value=="string"?{mask:e.value}:{...e.value}),e.arg!=null){const i=s=>{const c=e.modifiers.unmasked?s.unmasked:e.modifiers.completed?s.completed:s.masked;pw(e,c)};o.onMaska=o.onMaska==null?i:Array.isArray(o.onMaska)?[...o.onMaska,i]:[o.onMaska,i]}Pd.has(r)?(n=Pd.get(r))==null||n.update(o):Pd.set(r,new hw(r,o))},gw=["value","type"],br=l.defineComponent({__name:"BDFormInput",props:{modelValue:{default:""},formGroupClass:{default:void 0},type:{default:"text"},label:{default:void 0},labelClass:{default:void 0},formFieldClass:{default:void 0},inputClass:{default:void 0},placeholder:{default:void 0},state:{type:[Boolean,null],default:null},readonly:{type:[Boolean,null],default:null},disabled:{type:[Boolean,null],default:null},autofocus:{type:[Boolean,null],default:null},size:{default:at.MD},tabindex:{default:null},invalidFeedbackClass:{default:void 0},invalidFeedbackText:{default:void 0},delayTimeMs:{default:0},mask:{default:void 0}},emits:["update:modelValue","click","blur","enter"],setup(t,{emit:e}){const n=t,r=e,{uniqueIdentifier:o}=Fo(),i=Vr(n,"modelValue",r),s=`__BD__FORM__LABEL__${o.value}`,c=`__BD__FORM__GROUP__${o.value}`,a=`form-input-${n.label?n.label.replace(/ /g,"-").toLowerCase():o.value}`,d=`validationFeedback${n.label?n.label.replace(/ /g,""):o.value}`,u=l.computed(()=>({[`${n.inputClass}`]:n.inputClass,"is-invalid":n.state===!1,"is-valid":n.state===!0,[`form-control-${n.size}`]:n.size})),f=l.computed(()=>({[`${n.invalidFeedbackClass}`]:n.invalidFeedbackClass,"is-invalid":n.state===!1})),h=l.computed(()=>({placeholder:n.placeholder?n.placeholder:null,readonly:n.readonly===!0,disabled:n.disabled===!0,autofocus:n.autofocus===!0,tabindex:n.tabindex?n.tabindex:null,"aria-describedby":n.state===!1&&n.invalidFeedbackText?d:null,"data-maska":n.mask})),p=r6(m=>{i.value=m.target.value},n.delayTimeMs);return(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-form-input",t.formGroupClass]),id:c},[l.renderSlot(m.$slots,"label",{},()=>[t.label?(l.openBlock(),l.createElementBlock("label",{key:0,for:a,id:s,class:l.normalizeClass(["form-label",t.labelClass])},l.toDisplayString(t.label),3)):l.createCommentVNode("",!0)]),l.createElementVNode("div",{class:l.normalizeClass(t.formFieldClass)},[l.withDirectives(l.createElementVNode("input",l.mergeProps({value:t.modelValue,type:t.type,id:a,class:["form-control",u.value]},h.value,{onInput:g[0]||(g[0]=(...v)=>l.unref(p)&&l.unref(p)(...v)),onClick:g[1]||(g[1]=v=>m.$emit("click")),onBlur:g[2]||(g[2]=v=>m.$emit("blur")),onKeydown:g[3]||(g[3]=l.withKeys(v=>m.$emit("enter"),["enter"]))}),null,16,gw),[[l.unref(mw)]]),l.renderSlot(m.$slots,"default")],2),l.createVNode(xa,{text:t.invalidFeedbackText,class:l.normalizeClass(f.value),state:t.state,id:d},null,8,["text","class","state"])],2))}}),vw={class:"input-group bd-input-group"},yw=["for"],es=l.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(t){const e=l.useAttrs(),n=t;return(r,o)=>(l.openBlock(),l.createElementBlock("fieldset",vw,[n.label?(l.openBlock(),l.createElementBlock("label",{key:0,for:n.labelForId,class:"form-label"},l.toDisplayString(n.label),9,yw)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(l.unref(e).class)},[l.renderSlot(r.$slots,"default")],2)]))}}),bw={key:0},Cw={key:1},Om=l.defineComponent({__name:"BDBadge",props:{variant:{default:ia.PRIMARY}},setup(t){const e=t,n=l.computed(()=>["badge","bd-badge",`bd-badge-${e.variant}`]);return(r,o)=>(l.openBlock(),l.createElementBlock("span",{role:"status",class:l.normalizeClass(n.value)},[t.variant==="danger"?(l.openBlock(),l.createElementBlock("span",bw,[l.createVNode(l.unref(pr))])):l.createCommentVNode("",!0),t.variant==="success"?(l.openBlock(),l.createElementBlock("span",Cw,[l.createVNode(l.unref($o))])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")],2))}}),Mm=l.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(t,{emit:e}){const n=e;function r(){n("submit")}function o(){n("reset")}return(i,s)=>(l.openBlock(),l.createElementBlock("form",{onSubmit:l.withModifiers(r,["prevent"]),onReset:l.withModifiers(o,["prevent"])},[l.renderSlot(i.$slots,"default")],32))}}),Ew={"aria-label":"Page navigation",class:"bd-pagination"},kw={class:"page-item"},ww=["data-page"],Sw=["data-page"],Aw={class:"page-item"},xw=["data-page"],Bd=l.defineComponent({__name:"BDPagination",props:{modelValue:{default:1},totalRows:{default:1},rowsPerPage:{default:10},isPatient:{type:Boolean,default:!0}},emits:["click","update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=Vr(n,"modelValue",r),i=l.ref(Math.ceil(n.totalRows/n.rowsPerPage)),s=l.ref([]);l.watch([()=>n.totalRows,()=>n.rowsPerPage],()=>{i.value=Math.ceil(n.totalRows/n.rowsPerPage),s.value=f(o.value)}),l.onMounted(()=>{s.value=f(o.value)});const c=l.computed(()=>({[`${n.class}`]:n.class,colleague:!n.isPatient})),a=h=>{const p=h.currentTarget.getAttribute("data-page"),m=Number(p);isNaN(Number(m))||(o.value=m,s.value=f(m)),r("click",m)},d=(h,p,m)=>m<=p?m:h==1?6:h<=4?5:1,u=(h,p,m)=>m<=p?0:h==m?6:h>m-4?5:1,f=h=>{const p=[],g=d(h,7,i.value),v=i.value>7&&h>4,y=i.value>7&&h<i.value-3,b=v&&y,E=u(h,7,i.value);for(let C=1;C<=g;C++)p.push(C);if(v&&p.push("..."),b)for(let C=h-1;C<=h+1;C++)p.push(C);y&&p.push("...");for(let C=1;C<=E;C++)p.push(i.value-E+C);return p};return(h,p)=>(l.openBlock(),l.createElementBlock("div",Ew,[l.createElementVNode("ul",{class:l.normalizeClass(["pagination",c.value])},[l.withDirectives(l.createElementVNode("li",kw,[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:a,"data-page":l.unref(o)-1},[l.createVNode(l.unref(Nc))],8,ww)],512),[[l.vShow,l.unref(o)>1]]),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,m=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["page-item",{active:l.unref(o)===m,disabled:typeof m=="string"}]),key:m},[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:a,"data-page":m},l.toDisplayString(m),9,Sw)],2))),128)),l.withDirectives(l.createElementVNode("li",Aw,[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:a,"data-page":l.unref(o)+1},[l.createVNode(l.unref(Oc))],8,xw)],512),[[l.vShow,l.unref(o)<i.value]])],2)]))}}),Tw=["disabled"],Iw=["label"],_w=["value"],Nw=["value"],Lm=l.defineComponent({__name:"BDFormSelect",props:{size:{default:at.MD},disabled:{type:Boolean},autofocus:{type:Boolean,default:!1},options:{default:void 0},modelValue:{default:""},state:{type:[Boolean,null],default:null}},emits:["update:modelValue","change","input"],setup(t,{emit:e}){const n=t,r=e,o=Vr(n,"modelValue",r),i=l.ref(null),{focused:s}=a6(i,{initialValue:n.autofocus}),c=l.computed(()=>({"form-select":!0,"bd-form-select":!0,"is-invalid":n.state===!1,[`form-select-${n.size}`]:["xs","sm","lg"].includes(n.size)}));l.watch(()=>n.autofocus,f=>{f&&(s.value=!0)});const a=f=>{o.value=f.target.value;let h=u(f.target.value);r("input",h)},d=f=>{let h=u(f.target.value);r("change",h)},u=f=>{try{return JSON.parse(f)}catch{return f}};return(f,h)=>l.withDirectives((l.openBlock(),l.createElementBlock("select",{class:l.normalizeClass(c.value),"onUpdate:modelValue":h[0]||(h[0]=p=>l.isRef(o)?o.value=p:null),disabled:n.disabled,ref_key:"input",ref:i,onInput:a,onChange:d},[l.renderSlot(f.$slots,"first"),n.options&&n.options.length>0&&n.options[0].label&&n.options[0].options?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(n.options,p=>(l.openBlock(),l.createElementBlock("optgroup",{label:p.label},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(p.options,m=>(l.openBlock(),l.createElementBlock("option",{value:JSON.stringify(m.value),key:m.value},l.toDisplayString(m.text),9,_w))),128))],8,Iw))),256)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(n.options,p=>(l.openBlock(),l.createElementBlock("option",{value:p.value,key:p.value},l.toDisplayString(p.text),9,Nw))),128))],42,Tw)),[[l.vModelSelect,l.unref(o)]])}}),Ow=["value","true-value","false-value","data-checked"],Cr=l.defineComponent({__name:"BDFormCheckbox",props:{modelValue:{type:[Boolean,String,Array],default:void 0},value:{type:[Boolean,String],default:!0},uncheckedValue:{type:[Boolean,String],default:!1},state:{type:[Boolean,null],default:void 0}},emits:["update:modelValue","change","input"],setup(t,{emit:e}){const{uniqueIdentifier:n}=Fo(),r=t,o=e,i=Vr(r,"modelValue",o),s=`form-check-input-${n.value}`,c=l.computed(()=>["form-check","bd-form-checkbox"]),a=l.computed(()=>({"form-check-input":!0,"is-invalid":r.state===!1})),d=u=>o("change",u.target.value);return(u,f)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(c.value)},[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=h=>l.isRef(i)?i.value=h:null),id:s,class:l.normalizeClass(a.value),type:"checkbox",value:t.value,"true-value":t.value,"false-value":t.uncheckedValue,"data-checked":l.unref(i)===t.value,onChange:d},null,42,Ow),[[l.vModelCheckbox,l.unref(i)]]),l.createElementVNode("label",{class:"form-check-label",for:s},[l.renderSlot(u.$slots,"default")]),l.renderSlot(u.$slots,"last")],2))}}),Mw={key:0,class:"bd-article__body"},Lw={key:1},Dm=l.defineComponent({__name:"BDArticle",props:{title:{default:""},text:{default:""},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},identifier:{}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,o=i=>r("click",{event:i,identifier:n.identifier});return(i,s)=>(l.openBlock(),l.createElementBlock("article",{class:"bd-article",onClick:o},[l.createElementVNode("header",null,[l.renderSlot(i.$slots,"header",{},()=>[l.createElementVNode("h5",null,l.toDisplayString(n.title),1)])]),n.hideBody?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Mw,[l.renderSlot(i.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.text),1)])])),n.hideFooter?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("footer",Lw,[l.renderSlot(i.$slots,"footer")]))]))}}),Ko={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},Dw=["id"],Pw={class:"toast-header"},Bw={class:"toast-body"},Rd=l.defineComponent({__name:"BDToast",props:{id:{},variant:{default:Ko.INFO},title:{default:""},text:{default:""}},setup(t){const e=t,n=l.computed(()=>({[`bd-toast-${e.variant}`]:!0})),r=l.computed(()=>e.variant!==Ko.SUCCESS);return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["toast bd-toast",n.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",key:e.id,id:e.id},[l.createElementVNode("div",Pw,[r.value?(l.openBlock(),l.createBlock(l.unref(pr),{key:0})):(l.openBlock(),l.createBlock(l.unref($o),{key:1})),l.createElementVNode("h5",null,l.toDisplayString(e.title),1),i[0]||(i[0]=l.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1))]),l.createElementVNode("div",Bw,[l.createElementVNode("span",null,l.toDisplayString(e.text),1)])],10,Dw))}}),Ne="",Ia=t=>typeof t=="string"||t instanceof String,Rw={class:"bd-pill"},$w=["src"],Fw={class:"bd-pill__description"},zw=["href"],Uw=["id","textContent","title"],Hw=["id","textContent","title"],_a=l.defineComponent({__name:"BDPill",props:{imgSrc:{default:Ne},uri:{default:Ne},uriDisplayName:{default:Ne},title:{default:Ne},subtitle:{default:Ne},showClose:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const{uniqueIdentifier:n}=Fo(),r=t,o=l.computed(()=>r.uri),i=l.computed(()=>r.uriDisplayName!==Ne?r.uriDisplayName:r.uri),s=l.computed(()=>r.imgSrc),c=l.computed(()=>r.title),a=l.computed(()=>r.subtitle),d=l.computed(()=>`bd-pill-title-${n.value}`),u=l.computed(()=>`bd-pill-subtitle-${n.value}`);return(f,h)=>(l.openBlock(),l.createElementBlock("div",Rw,[l.createElementVNode("img",{src:s.value,class:"bd-pill__logo",alt:"logo-externe-partij"},null,8,$w),l.createElementVNode("div",Fw,[l.createElementVNode("a",{href:o.value,class:"bd-pill__link",target:"_blank",rel:"noopener noreferrer"},[l.createVNode(l.unref(ra),{class:"bd-pill__icon-hyperlink",style:{height:"12px"}}),l.createTextVNode(" "+l.toDisplayString(i.value),1)],8,zw),l.createElementVNode("span",{class:"bd-pill__title",id:d.value,textContent:l.toDisplayString(c.value),"data-bs-toggle":"tooltip",title:c.value},null,8,Uw),l.createElementVNode("span",{class:"bd-pill__subtitle",id:u.value,textContent:l.toDisplayString(a.value),"data-bs-toggle":"tooltip",title:a.value},null,8,Hw)])]))}});function jw(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Ww(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function c(u){try{d(r.next(u))}catch(f){s(f)}}function a(u){try{d(r.throw(u))}catch(f){s(f)}}function d(u){u.done?i(u.value):o(u.value).then(c,a)}d((r=r.apply(t,e||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const Kw=t=>Array.isArray(t)&&t.length>0,Yw=t=>Object.keys(t).map(e=>t[e]),$d=t=>Array.isArray(t)&&t.length>0,Pm=t=>!t||Array.isArray(t)&&!t.length,Fd={name:"BDUserInformation",props:{value:{type:Object},showProfilePicture:{type:Boolean}},render(){const t=this.value,{name:e,profilePictureUri:n,extra:r}=t,o=jw(t,["name","profilePictureUri","extra"]),i=n&&this.showProfilePicture?l.h("img",{class:"bd-user-information__profile-picture",src:n,alt:e}):null;let c=[l.h("h4",null,e)];this.$slots.default&&c.push(this.$slots.default());const a=l.h("div",{class:"bd-user-information__header"},c),d=l.h("small",null,Yw(o).filter(f=>f).join(" • ")),u=l.h("div",{class:"bd-user-information__detail"},[a,d]);return l.h("div",{class:"bd-user-information"},[i,u])}},Bm={displayTime:!0,format:"numeric"};function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Na={exports:{}},Gw=Na.exports,Rm;function $m(){return Rm||(Rm=1,(function(t,e){(function(n,r){t.exports=r()})(Gw,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",c="minute",a="hour",d="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var U=["th","st","nd","rd"],F=z%100;return"["+z+(U[(F-20)%10]||U[F]||U[0])+"]"}},E=function(z,U,F){var X=String(z);return!X||X.length>=U?z:""+Array(U+1-X.length).join(F)+z},C={s:E,z:function(z){var U=-z.utcOffset(),F=Math.abs(U),X=Math.floor(F/60),H=F%60;return(U<=0?"+":"-")+E(X,2,"0")+":"+E(H,2,"0")},m:function z(U,F){if(U.date()<F.date())return-z(F,U);var X=12*(F.year()-U.year())+(F.month()-U.month()),H=U.clone().add(X,f),ee=F-H<0,ne=U.clone().add(X+(ee?-1:1),f);return+(-(X+(F-H)/(ee?H-ne:ne-H))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:p,w:u,d,D:m,h:a,m:c,s,ms:i,Q:h}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",_={};_[S]=b;var T="$isDayjsObject",D=function(z){return z instanceof W||!(!z||!z[T])},G=function z(U,F,X){var H;if(!U)return S;if(typeof U=="string"){var ee=U.toLowerCase();_[ee]&&(H=ee),F&&(_[ee]=F,H=ee);var ne=U.split("-");if(!H&&ne.length>1)return z(ne[0])}else{var ae=U.name;_[ae]=U,H=ae}return!X&&H&&(S=H),H||!X&&S},$=function(z,U){if(D(z))return z.clone();var F=typeof U=="object"?U:{};return F.date=z,F.args=arguments,new W(F)},j=C;j.l=G,j.i=D,j.w=function(z,U){return $(z,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var W=(function(){function z(F){this.$L=G(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[T]=!0}var U=z.prototype;return U.parse=function(F){this.$d=(function(X){var H=X.date,ee=X.utc;if(H===null)return new Date(NaN);if(j.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var ne=H.match(v);if(ne){var ae=ne[2]-1||0,pe=(ne[7]||"0").substring(0,3);return ee?new Date(Date.UTC(ne[1],ae,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,pe)):new Date(ne[1],ae,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,pe)}}return new Date(H)})(F),this.init()},U.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},U.$utils=function(){return j},U.isValid=function(){return this.$d.toString()!==g},U.isSame=function(F,X){var H=$(F);return this.startOf(X)<=H&&H<=this.endOf(X)},U.isAfter=function(F,X){return $(F)<this.startOf(X)},U.isBefore=function(F,X){return this.endOf(X)<$(F)},U.$g=function(F,X,H){return j.u(F)?this[X]:this.set(H,F)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(F,X){var H=this,ee=!!j.u(X)||X,ne=j.p(F),ae=function(M,I){var O=j.w(H.$u?Date.UTC(H.$y,I,M):new Date(H.$y,I,M),H);return ee?O:O.endOf(d)},pe=function(M,I){return j.w(H.toDate()[M].apply(H.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(I)),H)},me=this.$W,be=this.$M,Ee=this.$D,Te="set"+(this.$u?"UTC":"");switch(ne){case p:return ee?ae(1,0):ae(31,11);case f:return ee?ae(1,be):ae(0,be+1);case u:var ve=this.$locale().weekStart||0,N=(me<ve?me+7:me)-ve;return ae(ee?Ee-N:Ee+(6-N),be);case d:case m:return pe(Te+"Hours",0);case a:return pe(Te+"Minutes",1);case c:return pe(Te+"Seconds",2);case s:return pe(Te+"Milliseconds",3);default:return this.clone()}},U.endOf=function(F){return this.startOf(F,!1)},U.$set=function(F,X){var H,ee=j.p(F),ne="set"+(this.$u?"UTC":""),ae=(H={},H[d]=ne+"Date",H[m]=ne+"Date",H[f]=ne+"Month",H[p]=ne+"FullYear",H[a]=ne+"Hours",H[c]=ne+"Minutes",H[s]=ne+"Seconds",H[i]=ne+"Milliseconds",H)[ee],pe=ee===d?this.$D+(X-this.$W):X;if(ee===f||ee===p){var me=this.clone().set(m,1);me.$d[ae](pe),me.init(),this.$d=me.set(m,Math.min(this.$D,me.daysInMonth())).$d}else ae&&this.$d[ae](pe);return this.init(),this},U.set=function(F,X){return this.clone().$set(F,X)},U.get=function(F){return this[j.p(F)]()},U.add=function(F,X){var H,ee=this;F=Number(F);var ne=j.p(X),ae=function(be){var Ee=$(ee);return j.w(Ee.date(Ee.date()+Math.round(be*F)),ee)};if(ne===f)return this.set(f,this.$M+F);if(ne===p)return this.set(p,this.$y+F);if(ne===d)return ae(1);if(ne===u)return ae(7);var pe=(H={},H[c]=r,H[a]=o,H[s]=n,H)[ne]||1,me=this.$d.getTime()+F*pe;return j.w(me,this)},U.subtract=function(F,X){return this.add(-1*F,X)},U.format=function(F){var X=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var ee=F||"YYYY-MM-DDTHH:mm:ssZ",ne=j.z(this),ae=this.$H,pe=this.$m,me=this.$M,be=H.weekdays,Ee=H.months,Te=H.meridiem,ve=function(I,O,k,w){return I&&(I[O]||I(X,ee))||k[O].slice(0,w)},N=function(I){return j.s(ae%12||12,I,"0")},M=Te||function(I,O,k){var w=I<12?"AM":"PM";return k?w.toLowerCase():w};return ee.replace(y,(function(I,O){return O||(function(k){switch(k){case"YY":return String(X.$y).slice(-2);case"YYYY":return j.s(X.$y,4,"0");case"M":return me+1;case"MM":return j.s(me+1,2,"0");case"MMM":return ve(H.monthsShort,me,Ee,3);case"MMMM":return ve(Ee,me);case"D":return X.$D;case"DD":return j.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ve(H.weekdaysMin,X.$W,be,2);case"ddd":return ve(H.weekdaysShort,X.$W,be,3);case"dddd":return be[X.$W];case"H":return String(ae);case"HH":return j.s(ae,2,"0");case"h":return N(1);case"hh":return N(2);case"a":return M(ae,pe,!0);case"A":return M(ae,pe,!1);case"m":return String(pe);case"mm":return j.s(pe,2,"0");case"s":return String(X.$s);case"ss":return j.s(X.$s,2,"0");case"SSS":return j.s(X.$ms,3,"0");case"Z":return ne}return null})(I)||ne.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(F,X,H){var ee,ne=this,ae=j.p(X),pe=$(F),me=(pe.utcOffset()-this.utcOffset())*r,be=this-pe,Ee=function(){return j.m(ne,pe)};switch(ae){case p:ee=Ee()/12;break;case f:ee=Ee();break;case h:ee=Ee()/3;break;case u:ee=(be-me)/6048e5;break;case d:ee=(be-me)/864e5;break;case a:ee=be/o;break;case c:ee=be/r;break;case s:ee=be/n;break;default:ee=be}return H?ee:j.a(ee)},U.daysInMonth=function(){return this.endOf(f).$D},U.$locale=function(){return _[this.$L]},U.locale=function(F,X){if(!F)return this.$L;var H=this.clone(),ee=G(F,X,!0);return ee&&(H.$L=ee),H},U.clone=function(){return j.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},z})(),Y=W.prototype;return $.prototype=Y,[["$ms",i],["$s",s],["$m",c],["$H",a],["$W",d],["$M",f],["$y",p],["$D",m]].forEach((function(z){Y[z[1]]=function(U){return this.$g(U,z[0],z[1])}})),$.extend=function(z,U){return z.$i||(z(U,W,$),z.$i=!0),$},$.locale=G,$.isDayjs=D,$.unix=function(z){return $(1e3*z)},$.en=_[S],$.Ls=_,$.p={},$}))})(Na)),Na.exports}var Qw=$m();const Wt=Yo(Qw);var Oa={exports:{}},Zw=Oa.exports,Fm;function Jw(){return Fm||(Fm=1,(function(t,e){(function(n,r){t.exports=r($m())})(Zw,(function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),i={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(s){return"["+s+(s===1||s===8||s>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return o.default.locale(i,null,!0),i}))})(Oa)),Oa.exports}Jw();var Ma={exports:{}},Xw=Ma.exports,zm;function qw(){return zm||(zm=1,(function(t,e){(function(n,r){t.exports=r()})(Xw,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,a={},d=function(v){return(v=+v)+(v>68?1900:2e3)},u=function(v){return function(y){this[v]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var b=y.match(/([+-]|\d\d)/g),E=60*b[1]+(+b[2]||0);return E===0?0:b[0]==="+"?-E:E})(v)}],h=function(v){var y=a[v];return y&&(y.indexOf?y:y.s.concat(y.f))},p=function(v,y){var b,E=a.meridiem;if(E){for(var C=1;C<=24;C+=1)if(v.indexOf(E(C,0,y))>-1){b=C>12;break}}else b=v===(y?"pm":"PM");return b},m={A:[c,function(v){this.afternoon=p(v,!1)}],a:[c,function(v){this.afternoon=p(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*+v}],SS:[i,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[i,u("day")],Do:[c,function(v){var y=a.ordinal,b=v.match(/\d+/);if(this.day=b[0],y)for(var E=1;E<=31;E+=1)y(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[s,u("week")],ww:[i,u("week")],M:[s,u("month")],MM:[i,u("month")],MMM:[c,function(v){var y=h("months"),b=(h("monthsShort")||y.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[c,function(v){var y=h("months").indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(v){this.year=d(v)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function g(v){var y,b;y=v,b=a&&a.formats;for(var E=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function($,j,W){var Y=W&&W.toUpperCase();return j||b[W]||n[W]||b[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(z,U,F){return U||F.slice(1)}))}))).match(r),C=E.length,S=0;S<C;S+=1){var _=E[S],T=m[_],D=T&&T[0],G=T&&T[1];E[S]=G?{regex:D,parser:G}:_.replace(/^\[|\]$/g,"")}return function($){for(var j={},W=0,Y=0;W<C;W+=1){var z=E[W];if(typeof z=="string")Y+=z.length;else{var U=z.regex,F=z.parser,X=$.slice(Y),H=U.exec(X)[0];F.call(j,H),$=$.replace(H,"")}}return(function(ee){var ne=ee.afternoon;if(ne!==void 0){var ae=ee.hours;ne?ae<12&&(ee.hours+=12):ae===12&&(ee.hours=0),delete ee.afternoon}})(j),j}}return function(v,y,b){b.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(d=v.parseTwoDigitYear);var E=y.prototype,C=E.parse;E.parse=function(S){var _=S.date,T=S.utc,D=S.args;this.$u=T;var G=D[1];if(typeof G=="string"){var $=D[2]===!0,j=D[3]===!0,W=$||j,Y=D[2];j&&(Y=D[2]),a=this.$locale(),!$&&Y&&(a=b.Ls[Y]),this.$d=(function(X,H,ee,ne){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*X);var ae=g(H)(X),pe=ae.year,me=ae.month,be=ae.day,Ee=ae.hours,Te=ae.minutes,ve=ae.seconds,N=ae.milliseconds,M=ae.zone,I=ae.week,O=new Date,k=be||(pe||me?1:O.getDate()),w=pe||O.getFullYear(),P=0;pe&&!me||(P=me>0?me-1:O.getMonth());var R,K=Ee||0,Q=Te||0,A=ve||0,x=N||0;return M?new Date(Date.UTC(w,P,k,K,Q,A,x+60*M.offset*1e3)):ee?new Date(Date.UTC(w,P,k,K,Q,A,x)):(R=new Date(w,P,k,K,Q,A,x),I&&(R=ne(R).week(I).toDate()),R)}catch{return new Date("")}})(_,G,T,b),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),W&&_!=this.format(G)&&(this.$d=new Date("")),a={}}else if(G instanceof Array)for(var z=G.length,U=1;U<=z;U+=1){D[1]=G[U-1];var F=b.apply(this,D);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}U===z&&(this.$d=new Date(""))}else C.call(this,S)}}}))})(Ma)),Ma.exports}var Vw=qw();const eS=Yo(Vw);var La={exports:{}},tS=La.exports,Um;function nS(){return Um||(Um=1,(function(t,e){(function(n,r){t.exports=r()})(tS,(function(){return function(n,r){r.prototype.isSameOrAfter=function(o,i){return this.isSame(o,i)||this.isAfter(o,i)}}}))})(La)),La.exports}var rS=nS();const oS=Yo(rS);var Da={exports:{}},iS=Da.exports,Hm;function sS(){return Hm||(Hm=1,(function(t,e){(function(n,r){t.exports=r()})(iS,(function(){return function(n,r){r.prototype.isSameOrBefore=function(o,i){return this.isSame(o,i)||this.isBefore(o,i)}}}))})(Da)),Da.exports}var aS=sS();const lS=Yo(aS);var Pa={exports:{}},cS=Pa.exports,jm;function dS(){return jm||(jm=1,(function(t,e){(function(n,r){t.exports=r()})(cS,(function(){var n="week",r="year";return function(o,i,s){var c=i.prototype;c.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(r).add(1,r).date(d),f=s(this).endOf(n);if(u.isBefore(f))return 1}var h=s(this).startOf(r).date(d).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?s(this).startOf("week").week():Math.ceil(p)},c.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Pa)),Pa.exports}var uS=dS();const fS=Yo(uS);Wt.extend(eS),Wt.locale("nl"),Wt.extend(oS),Wt.extend(lS),Wt.extend(fS);const zd=t=>t?t.charAt(0).toUpperCase()+t.slice(1):"";function Wm(t,e=Wt()){const n=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY"],!0);if(!n.isValid())return"";const r=e.startOf("day");if(n.isSame(r,"day"))return"Vandaag";const o=r.subtract(1,"day");if(n.isSame(o,"day"))return"Gisteren";const i=r.subtract(6,"day");if(n.isSameOrAfter(i)&&n.isBefore(r))return zd(n.format("dddd"));const s=r.subtract(7,"day");return n.isSame(s)||n.isSame(e,"year")?n.format("D MMMM"):n.format("DD-MM-YYYY")}function Km(t,e=Wt()){const n=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY"],!0),r=t.includes(" ")&&t.includes(":");if(!n.isValid())return"";const o=e.startOf("day");if(n.isSame(o,"day"))return r?n.format("H:mm"):"Vandaag";const i=o.subtract(1,"day");if(n.isSame(i,"day"))return r?`Gisteren ${n.format("H:mm")}`:"Gisteren";const s=o.subtract(6,"day");if(n.isSameOrAfter(s)&&n.isBefore(o))return zd(r?n.format("dddd H:mm"):n.format("dddd"));const c=o.subtract(7,"day");return n.isSame(c)||n.isSame(e,"year")?r?n.format("D MMM H:mm"):n.format("D MMMM"):n.format("DD-MM-YYYY")}function Ud(t){const e=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY","YYYY-MM-DDTHH:mm:ss"],!0),n=t.includes(" ")&&t.includes(":");return e.isValid()?n&&e.isSame(Wt(),"year")?e.format("DD-MM-YYYY H:mm"):e.format("DD-MM-YYYY"):""}function Hd(t){const e=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY","YYYY-MM-DDTHH:mm:ss"],!0);return e.isValid()?e.format("DD-MM-YYYY"):""}const hS={class:"bd-date"},Ym=l.defineComponent({__name:"BDDate",props:{date:{},displayTime:{type:Boolean,default:Bm.displayTime},format:{default:Bm.format}},setup(t){const e=t,n=l.computed(()=>e.date?e.format==="textual"?e.displayTime?Km(e.date):Wm(e.date):(e.format==="numeric",e.displayTime?Ud(e.date):Hd(e.date)):"");return(r,o)=>(l.openBlock(),l.createElementBlock("span",hS,l.toDisplayString(n.value),1))}}),Ba=l.defineComponent({__name:"BDDropdownItem",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,o=()=>{r("click")};return(i,s)=>(l.openBlock(),l.createElementBlock("li",l.mergeProps({class:"bd-dropdown-item"},i.$attrs),[l.createVNode(Xr,l.mergeProps({class:"dropdown-item",onClick:o},n),{default:l.withCtx(()=>[l.renderSlot(i.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.text),1)])]),_:3},16)],16))}});var jd={exports:{}},Gm;function pS(){return Gm||(Gm=1,(function(t,e){(function(r,o){t.exports=o()})(self,function(){return(function(){var n={3099:(function(s){s.exports=function(c){if(typeof c!="function")throw TypeError(String(c)+" is not a function");return c}}),6077:(function(s,c,a){var d=a(111);s.exports=function(u){if(!d(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype");return u}}),1223:(function(s,c,a){var d=a(5112),u=a(30),f=a(3070),h=d("unscopables"),p=Array.prototype;p[h]==null&&f.f(p,h,{configurable:!0,value:u(null)}),s.exports=function(m){p[h][m]=!0}}),1530:(function(s,c,a){var d=a(8710).charAt;s.exports=function(u,f,h){return f+(h?d(u,f).length:1)}}),5787:(function(s){s.exports=function(c,a,d){if(!(c instanceof a))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return c}}),9670:(function(s,c,a){var d=a(111);s.exports=function(u){if(!d(u))throw TypeError(String(u)+" is not an object");return u}}),4019:(function(s){s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"}),260:(function(s,c,a){var d=a(4019),u=a(9781),f=a(7854),h=a(111),p=a(6656),m=a(648),g=a(8880),v=a(1320),y=a(3070).f,b=a(9518),E=a(7674),C=a(5112),S=a(9711),_=f.Int8Array,T=_&&_.prototype,D=f.Uint8ClampedArray,G=D&&D.prototype,$=_&&b(_),j=T&&b(T),W=Object.prototype,Y=W.isPrototypeOf,z=C("toStringTag"),U=S("TYPED_ARRAY_TAG"),F=d&&!!E&&m(f.opera)!=="Opera",X=!1,H,ee={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ne={BigInt64Array:8,BigUint64Array:8},ae=function(N){if(!h(N))return!1;var M=m(N);return M==="DataView"||p(ee,M)||p(ne,M)},pe=function(ve){if(!h(ve))return!1;var N=m(ve);return p(ee,N)||p(ne,N)},me=function(ve){if(pe(ve))return ve;throw TypeError("Target is not a typed array")},be=function(ve){if(E){if(Y.call($,ve))return ve}else for(var N in ee)if(p(ee,H)){var M=f[N];if(M&&(ve===M||Y.call(M,ve)))return ve}throw TypeError("Target is not a typed array constructor")},Ee=function(ve,N,M){if(u){if(M)for(var I in ee){var O=f[I];O&&p(O.prototype,ve)&&delete O.prototype[ve]}(!j[ve]||M)&&v(j,ve,M?N:F&&T[ve]||N)}},Te=function(ve,N,M){var I,O;if(u){if(E){if(M)for(I in ee)O=f[I],O&&p(O,ve)&&delete O[ve];if(!$[ve]||M)try{return v($,ve,M?N:F&&_[ve]||N)}catch{}else return}for(I in ee)O=f[I],O&&(!O[ve]||M)&&v(O,ve,N)}};for(H in ee)f[H]||(F=!1);if((!F||typeof $!="function"||$===Function.prototype)&&($=function(){throw TypeError("Incorrect invocation")},F))for(H in ee)f[H]&&E(f[H],$);if((!F||!j||j===W)&&(j=$.prototype,F))for(H in ee)f[H]&&E(f[H].prototype,j);if(F&&b(G)!==j&&E(G,j),u&&!p(j,z)){X=!0,y(j,z,{get:function(){return h(this)?this[U]:void 0}});for(H in ee)f[H]&&g(f[H],U,H)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:X&&U,aTypedArray:me,aTypedArrayConstructor:be,exportTypedArrayMethod:Ee,exportTypedArrayStaticMethod:Te,isView:ae,isTypedArray:pe,TypedArray:$,TypedArrayPrototype:j}}),3331:(function(s,c,a){var d=a(7854),u=a(9781),f=a(4019),h=a(8880),p=a(2248),m=a(7293),g=a(5787),v=a(9958),y=a(7466),b=a(7067),E=a(1179),C=a(9518),S=a(7674),_=a(8006).f,T=a(3070).f,D=a(1285),G=a(8003),$=a(9909),j=$.get,W=$.set,Y="ArrayBuffer",z="DataView",U="prototype",F="Wrong length",X="Wrong index",H=d[Y],ee=H,ne=d[z],ae=ne&&ne[U],pe=Object.prototype,me=d.RangeError,be=E.pack,Ee=E.unpack,Te=function(Z){return[Z&255]},ve=function(Z){return[Z&255,Z>>8&255]},N=function(Z){return[Z&255,Z>>8&255,Z>>16&255,Z>>24&255]},M=function(Z){return Z[3]<<24|Z[2]<<16|Z[1]<<8|Z[0]},I=function(Z){return be(Z,23,4)},O=function(Z){return be(Z,52,8)},k=function(Z,q){T(Z[U],q,{get:function(){return j(this)[q]}})},w=function(Z,q,te,se){var J=b(te),re=j(Z);if(J+q>re.byteLength)throw me(X);var Se=j(re.buffer).bytes,_e=J+re.byteOffset,Oe=Se.slice(_e,_e+q);return se?Oe:Oe.reverse()},P=function(Z,q,te,se,J,re){var Se=b(te),_e=j(Z);if(Se+q>_e.byteLength)throw me(X);for(var Oe=j(_e.buffer).bytes,nt=Se+_e.byteOffset,pt=se(+J),rt=0;rt<q;rt++)Oe[nt+rt]=pt[re?rt:q-rt-1]};if(!f)ee=function(q){g(this,ee,Y);var te=b(q);W(this,{bytes:D.call(new Array(te),0),byteLength:te}),u||(this.byteLength=te)},ne=function(q,te,se){g(this,ne,z),g(q,ee,z);var J=j(q).byteLength,re=v(te);if(re<0||re>J)throw me("Wrong offset");if(se=se===void 0?J-re:y(se),re+se>J)throw me(F);W(this,{buffer:q,byteLength:se,byteOffset:re}),u||(this.buffer=q,this.byteLength=se,this.byteOffset=re)},u&&(k(ee,"byteLength"),k(ne,"buffer"),k(ne,"byteLength"),k(ne,"byteOffset")),p(ne[U],{getInt8:function(q){return w(this,1,q)[0]<<24>>24},getUint8:function(q){return w(this,1,q)[0]},getInt16:function(q){var te=w(this,2,q,arguments.length>1?arguments[1]:void 0);return(te[1]<<8|te[0])<<16>>16},getUint16:function(q){var te=w(this,2,q,arguments.length>1?arguments[1]:void 0);return te[1]<<8|te[0]},getInt32:function(q){return M(w(this,4,q,arguments.length>1?arguments[1]:void 0))},getUint32:function(q){return M(w(this,4,q,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(q){return Ee(w(this,4,q,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(q){return Ee(w(this,8,q,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(q,te){P(this,1,q,Te,te)},setUint8:function(q,te){P(this,1,q,Te,te)},setInt16:function(q,te){P(this,2,q,ve,te,arguments.length>2?arguments[2]:void 0)},setUint16:function(q,te){P(this,2,q,ve,te,arguments.length>2?arguments[2]:void 0)},setInt32:function(q,te){P(this,4,q,N,te,arguments.length>2?arguments[2]:void 0)},setUint32:function(q,te){P(this,4,q,N,te,arguments.length>2?arguments[2]:void 0)},setFloat32:function(q,te){P(this,4,q,I,te,arguments.length>2?arguments[2]:void 0)},setFloat64:function(q,te){P(this,8,q,O,te,arguments.length>2?arguments[2]:void 0)}});else{if(!m(function(){H(1)})||!m(function(){new H(-1)})||m(function(){return new H,new H(1.5),new H(NaN),H.name!=Y})){ee=function(q){return g(this,ee),new H(b(q))};for(var R=ee[U]=H[U],K=_(H),Q=0,A;K.length>Q;)(A=K[Q++])in ee||h(ee,A,H[A]);R.constructor=ee}S&&C(ae)!==pe&&S(ae,pe);var x=new ne(new ee(2)),B=ae.setInt8;x.setInt8(0,2147483648),x.setInt8(1,2147483649),(x.getInt8(0)||!x.getInt8(1))&&p(ae,{setInt8:function(q,te){B.call(this,q,te<<24>>24)},setUint8:function(q,te){B.call(this,q,te<<24>>24)}},{unsafe:!0})}G(ee,Y),G(ne,z),s.exports={ArrayBuffer:ee,DataView:ne}}),1048:(function(s,c,a){var d=a(7908),u=a(1400),f=a(7466),h=Math.min;s.exports=[].copyWithin||function(m,g){var v=d(this),y=f(v.length),b=u(m,y),E=u(g,y),C=arguments.length>2?arguments[2]:void 0,S=h((C===void 0?y:u(C,y))-E,y-b),_=1;for(E<b&&b<E+S&&(_=-1,E+=S-1,b+=S-1);S-- >0;)E in v?v[b]=v[E]:delete v[b],b+=_,E+=_;return v}}),1285:(function(s,c,a){var d=a(7908),u=a(1400),f=a(7466);s.exports=function(p){for(var m=d(this),g=f(m.length),v=arguments.length,y=u(v>1?arguments[1]:void 0,g),b=v>2?arguments[2]:void 0,E=b===void 0?g:u(b,g);E>y;)m[y++]=p;return m}}),8533:(function(s,c,a){var d=a(2092).forEach,u=a(9341),f=u("forEach");s.exports=f?[].forEach:function(p){return d(this,p,arguments.length>1?arguments[1]:void 0)}}),8457:(function(s,c,a){var d=a(9974),u=a(7908),f=a(3411),h=a(7659),p=a(7466),m=a(6135),g=a(1246);s.exports=function(y){var b=u(y),E=typeof this=="function"?this:Array,C=arguments.length,S=C>1?arguments[1]:void 0,_=S!==void 0,T=g(b),D=0,G,$,j,W,Y,z;if(_&&(S=d(S,C>2?arguments[2]:void 0,2)),T!=null&&!(E==Array&&h(T)))for(W=T.call(b),Y=W.next,$=new E;!(j=Y.call(W)).done;D++)z=_?f(W,S,[j.value,D],!0):j.value,m($,D,z);else for(G=p(b.length),$=new E(G);G>D;D++)z=_?S(b[D],D):b[D],m($,D,z);return $.length=D,$}}),1318:(function(s,c,a){var d=a(5656),u=a(7466),f=a(1400),h=function(p){return function(m,g,v){var y=d(m),b=u(y.length),E=f(v,b),C;if(p&&g!=g){for(;b>E;)if(C=y[E++],C!=C)return!0}else for(;b>E;E++)if((p||E in y)&&y[E]===g)return p||E||0;return!p&&-1}};s.exports={includes:h(!0),indexOf:h(!1)}}),2092:(function(s,c,a){var d=a(9974),u=a(8361),f=a(7908),h=a(7466),p=a(5417),m=[].push,g=function(v){var y=v==1,b=v==2,E=v==3,C=v==4,S=v==6,_=v==7,T=v==5||S;return function(D,G,$,j){for(var W=f(D),Y=u(W),z=d(G,$,3),U=h(Y.length),F=0,X=j||p,H=y?X(D,U):b||_?X(D,0):void 0,ee,ne;U>F;F++)if((T||F in Y)&&(ee=Y[F],ne=z(ee,F,W),v))if(y)H[F]=ne;else if(ne)switch(v){case 3:return!0;case 5:return ee;case 6:return F;case 2:m.call(H,ee)}else switch(v){case 4:return!1;case 7:m.call(H,ee)}return S?-1:E||C?C:H}};s.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterOut:g(7)}}),6583:(function(s,c,a){var d=a(5656),u=a(9958),f=a(7466),h=a(9341),p=Math.min,m=[].lastIndexOf,g=!!m&&1/[1].lastIndexOf(1,-0)<0,v=h("lastIndexOf"),y=g||!v;s.exports=y?function(E){if(g)return m.apply(this,arguments)||0;var C=d(this),S=f(C.length),_=S-1;for(arguments.length>1&&(_=p(_,u(arguments[1]))),_<0&&(_=S+_);_>=0;_--)if(_ in C&&C[_]===E)return _||0;return-1}:m}),1194:(function(s,c,a){var d=a(7293),u=a(5112),f=a(7392),h=u("species");s.exports=function(p){return f>=51||!d(function(){var m=[],g=m.constructor={};return g[h]=function(){return{foo:1}},m[p](Boolean).foo!==1})}}),9341:(function(s,c,a){var d=a(7293);s.exports=function(u,f){var h=[][u];return!!h&&d(function(){h.call(null,f||function(){throw 1},1)})}}),3671:(function(s,c,a){var d=a(3099),u=a(7908),f=a(8361),h=a(7466),p=function(m){return function(g,v,y,b){d(v);var E=u(g),C=f(E),S=h(E.length),_=m?S-1:0,T=m?-1:1;if(y<2)for(;;){if(_ in C){b=C[_],_+=T;break}if(_+=T,m?_<0:S<=_)throw TypeError("Reduce of empty array with no initial value")}for(;m?_>=0:S>_;_+=T)_ in C&&(b=v(b,C[_],_,E));return b}};s.exports={left:p(!1),right:p(!0)}}),5417:(function(s,c,a){var d=a(111),u=a(3157),f=a(5112),h=f("species");s.exports=function(p,m){var g;return u(p)&&(g=p.constructor,typeof g=="function"&&(g===Array||u(g.prototype))?g=void 0:d(g)&&(g=g[h],g===null&&(g=void 0))),new(g===void 0?Array:g)(m===0?0:m)}}),3411:(function(s,c,a){var d=a(9670),u=a(9212);s.exports=function(f,h,p,m){try{return m?h(d(p)[0],p[1]):h(p)}catch(g){throw u(f),g}}}),7072:(function(s,c,a){var d=a(5112),u=d("iterator"),f=!1;try{var h=0,p={next:function(){return{done:!!h++}},return:function(){f=!0}};p[u]=function(){return this},Array.from(p,function(){throw 2})}catch{}s.exports=function(m,g){if(!g&&!f)return!1;var v=!1;try{var y={};y[u]=function(){return{next:function(){return{done:v=!0}}}},m(y)}catch{}return v}}),4326:(function(s){var c={}.toString;s.exports=function(a){return c.call(a).slice(8,-1)}}),648:(function(s,c,a){var d=a(1694),u=a(4326),f=a(5112),h=f("toStringTag"),p=u((function(){return arguments})())=="Arguments",m=function(g,v){try{return g[v]}catch{}};s.exports=d?u:function(g){var v,y,b;return g===void 0?"Undefined":g===null?"Null":typeof(y=m(v=Object(g),h))=="string"?y:p?u(v):(b=u(v))=="Object"&&typeof v.callee=="function"?"Arguments":b}}),9920:(function(s,c,a){var d=a(6656),u=a(3887),f=a(1236),h=a(3070);s.exports=function(p,m){for(var g=u(m),v=h.f,y=f.f,b=0;b<g.length;b++){var E=g[b];d(p,E)||v(p,E,y(m,E))}}}),8544:(function(s,c,a){var d=a(7293);s.exports=!d(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})}),4994:(function(s,c,a){var d=a(3383).IteratorPrototype,u=a(30),f=a(9114),h=a(8003),p=a(7497),m=function(){return this};s.exports=function(g,v,y){var b=v+" Iterator";return g.prototype=u(d,{next:f(1,y)}),h(g,b,!1,!0),p[b]=m,g}}),8880:(function(s,c,a){var d=a(9781),u=a(3070),f=a(9114);s.exports=d?function(h,p,m){return u.f(h,p,f(1,m))}:function(h,p,m){return h[p]=m,h}}),9114:(function(s){s.exports=function(c,a){return{enumerable:!(c&1),configurable:!(c&2),writable:!(c&4),value:a}}}),6135:(function(s,c,a){var d=a(7593),u=a(3070),f=a(9114);s.exports=function(h,p,m){var g=d(p);g in h?u.f(h,g,f(0,m)):h[g]=m}}),654:(function(s,c,a){var d=a(2109),u=a(4994),f=a(9518),h=a(7674),p=a(8003),m=a(8880),g=a(1320),v=a(5112),y=a(1913),b=a(7497),E=a(3383),C=E.IteratorPrototype,S=E.BUGGY_SAFARI_ITERATORS,_=v("iterator"),T="keys",D="values",G="entries",$=function(){return this};s.exports=function(j,W,Y,z,U,F,X){u(Y,W,z);var H=function(N){if(N===U&&me)return me;if(!S&&N in ae)return ae[N];switch(N){case T:return function(){return new Y(this,N)};case D:return function(){return new Y(this,N)};case G:return function(){return new Y(this,N)}}return function(){return new Y(this)}},ee=W+" Iterator",ne=!1,ae=j.prototype,pe=ae[_]||ae["@@iterator"]||U&&ae[U],me=!S&&pe||H(U),be=W=="Array"&&ae.entries||pe,Ee,Te,ve;if(be&&(Ee=f(be.call(new j)),C!==Object.prototype&&Ee.next&&(!y&&f(Ee)!==C&&(h?h(Ee,C):typeof Ee[_]!="function"&&m(Ee,_,$)),p(Ee,ee,!0,!0),y&&(b[ee]=$))),U==D&&pe&&pe.name!==D&&(ne=!0,me=function(){return pe.call(this)}),(!y||X)&&ae[_]!==me&&m(ae,_,me),b[W]=me,U)if(Te={values:H(D),keys:F?me:H(T),entries:H(G)},X)for(ve in Te)(S||ne||!(ve in ae))&&g(ae,ve,Te[ve]);else d({target:W,proto:!0,forced:S||ne},Te);return Te}}),9781:(function(s,c,a){var d=a(7293);s.exports=!d(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),317:(function(s,c,a){var d=a(7854),u=a(111),f=d.document,h=u(f)&&u(f.createElement);s.exports=function(p){return h?f.createElement(p):{}}}),8324:(function(s){s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),8113:(function(s,c,a){var d=a(5005);s.exports=d("navigator","userAgent")||""}),7392:(function(s,c,a){var d=a(7854),u=a(8113),f=d.process,h=f&&f.versions,p=h&&h.v8,m,g;p?(m=p.split("."),g=m[0]+m[1]):u&&(m=u.match(/Edge\/(\d+)/),(!m||m[1]>=74)&&(m=u.match(/Chrome\/(\d+)/),m&&(g=m[1]))),s.exports=g&&+g}),748:(function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),2109:(function(s,c,a){var d=a(7854),u=a(1236).f,f=a(8880),h=a(1320),p=a(3505),m=a(9920),g=a(4705);s.exports=function(v,y){var b=v.target,E=v.global,C=v.stat,S,_,T,D,G,$;if(E?_=d:C?_=d[b]||p(b,{}):_=(d[b]||{}).prototype,_)for(T in y){if(G=y[T],v.noTargetGet?($=u(_,T),D=$&&$.value):D=_[T],S=g(E?T:b+(C?".":"#")+T,v.forced),!S&&D!==void 0){if(typeof G==typeof D)continue;m(G,D)}(v.sham||D&&D.sham)&&f(G,"sham",!0),h(_,T,G,v)}}}),7293:(function(s){s.exports=function(c){try{return!!c()}catch{return!0}}}),7007:(function(s,c,a){a(4916);var d=a(1320),u=a(7293),f=a(5112),h=a(2261),p=a(8880),m=f("species"),g=!u(function(){var C=/./;return C.exec=function(){var S=[];return S.groups={a:"7"},S},"".replace(C,"$<a>")!=="7"}),v=(function(){return"a".replace(/./,"$0")==="$0"})(),y=f("replace"),b=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),E=!u(function(){var C=/(?:)/,S=C.exec;C.exec=function(){return S.apply(this,arguments)};var _="ab".split(C);return _.length!==2||_[0]!=="a"||_[1]!=="b"});s.exports=function(C,S,_,T){var D=f(C),G=!u(function(){var U={};return U[D]=function(){return 7},""[C](U)!=7}),$=G&&!u(function(){var U=!1,F=/a/;return C==="split"&&(F={},F.constructor={},F.constructor[m]=function(){return F},F.flags="",F[D]=/./[D]),F.exec=function(){return U=!0,null},F[D](""),!U});if(!G||!$||C==="replace"&&!(g&&v&&!b)||C==="split"&&!E){var j=/./[D],W=_(D,""[C],function(U,F,X,H,ee){return F.exec===h?G&&!ee?{done:!0,value:j.call(F,X,H)}:{done:!0,value:U.call(X,F,H)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:b}),Y=W[0],z=W[1];d(String.prototype,C,Y),d(RegExp.prototype,D,S==2?function(U,F){return z.call(U,this,F)}:function(U){return z.call(U,this)})}T&&p(RegExp.prototype[D],"sham",!0)}}),9974:(function(s,c,a){var d=a(3099);s.exports=function(u,f,h){if(d(u),f===void 0)return u;switch(h){case 0:return function(){return u.call(f)};case 1:return function(p){return u.call(f,p)};case 2:return function(p,m){return u.call(f,p,m)};case 3:return function(p,m,g){return u.call(f,p,m,g)}}return function(){return u.apply(f,arguments)}}}),5005:(function(s,c,a){var d=a(857),u=a(7854),f=function(h){return typeof h=="function"?h:void 0};s.exports=function(h,p){return arguments.length<2?f(d[h])||f(u[h]):d[h]&&d[h][p]||u[h]&&u[h][p]}}),1246:(function(s,c,a){var d=a(648),u=a(7497),f=a(5112),h=f("iterator");s.exports=function(p){if(p!=null)return p[h]||p["@@iterator"]||u[d(p)]}}),8554:(function(s,c,a){var d=a(9670),u=a(1246);s.exports=function(f){var h=u(f);if(typeof h!="function")throw TypeError(String(f)+" is not iterable");return d(h.call(f))}}),647:(function(s,c,a){var d=a(7908),u=Math.floor,f="".replace,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,p=/\$([$&'`]|\d\d?)/g;s.exports=function(m,g,v,y,b,E){var C=v+m.length,S=y.length,_=p;return b!==void 0&&(b=d(b),_=h),f.call(E,_,function(T,D){var G;switch(D.charAt(0)){case"$":return"$";case"&":return m;case"`":return g.slice(0,v);case"'":return g.slice(C);case"<":G=b[D.slice(1,-1)];break;default:var $=+D;if($===0)return T;if($>S){var j=u($/10);return j===0?T:j<=S?y[j-1]===void 0?D.charAt(1):y[j-1]+D.charAt(1):T}G=y[$-1]}return G===void 0?"":G})}}),7854:(function(s,c,a){var d=function(u){return u&&u.Math==Math&&u};s.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof a.g=="object"&&a.g)||(function(){return this})()||Function("return this")()}),6656:(function(s){var c={}.hasOwnProperty;s.exports=function(a,d){return c.call(a,d)}}),3501:(function(s){s.exports={}}),490:(function(s,c,a){var d=a(5005);s.exports=d("document","documentElement")}),4664:(function(s,c,a){var d=a(9781),u=a(7293),f=a(317);s.exports=!d&&!u(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!=7})}),1179:(function(s){var c=Math.abs,a=Math.pow,d=Math.floor,u=Math.log,f=Math.LN2,h=function(m,g,v){var y=new Array(v),b=v*8-g-1,E=(1<<b)-1,C=E>>1,S=g===23?a(2,-24)-a(2,-77):0,_=m<0||m===0&&1/m<0?1:0,T=0,D,G,$;for(m=c(m),m!=m||m===1/0?(G=m!=m?1:0,D=E):(D=d(u(m)/f),m*($=a(2,-D))<1&&(D--,$*=2),D+C>=1?m+=S/$:m+=S*a(2,1-C),m*$>=2&&(D++,$/=2),D+C>=E?(G=0,D=E):D+C>=1?(G=(m*$-1)*a(2,g),D=D+C):(G=m*a(2,C-1)*a(2,g),D=0));g>=8;y[T++]=G&255,G/=256,g-=8);for(D=D<<g|G,b+=g;b>0;y[T++]=D&255,D/=256,b-=8);return y[--T]|=_*128,y},p=function(m,g){var v=m.length,y=v*8-g-1,b=(1<<y)-1,E=b>>1,C=y-7,S=v-1,_=m[S--],T=_&127,D;for(_>>=7;C>0;T=T*256+m[S],S--,C-=8);for(D=T&(1<<-C)-1,T>>=-C,C+=g;C>0;D=D*256+m[S],S--,C-=8);if(T===0)T=1-E;else{if(T===b)return D?NaN:_?-1/0:1/0;D=D+a(2,g),T=T-E}return(_?-1:1)*D*a(2,T-g)};s.exports={pack:h,unpack:p}}),8361:(function(s,c,a){var d=a(7293),u=a(4326),f="".split;s.exports=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(h){return u(h)=="String"?f.call(h,""):Object(h)}:Object}),9587:(function(s,c,a){var d=a(111),u=a(7674);s.exports=function(f,h,p){var m,g;return u&&typeof(m=h.constructor)=="function"&&m!==p&&d(g=m.prototype)&&g!==p.prototype&&u(f,g),f}}),2788:(function(s,c,a){var d=a(5465),u=Function.toString;typeof d.inspectSource!="function"&&(d.inspectSource=function(f){return u.call(f)}),s.exports=d.inspectSource}),9909:(function(s,c,a){var d=a(8536),u=a(7854),f=a(111),h=a(8880),p=a(6656),m=a(5465),g=a(6200),v=a(3501),y=u.WeakMap,b,E,C,S=function(W){return C(W)?E(W):b(W,{})},_=function(W){return function(Y){var z;if(!f(Y)||(z=E(Y)).type!==W)throw TypeError("Incompatible receiver, "+W+" required");return z}};if(d){var T=m.state||(m.state=new y),D=T.get,G=T.has,$=T.set;b=function(W,Y){return Y.facade=W,$.call(T,W,Y),Y},E=function(W){return D.call(T,W)||{}},C=function(W){return G.call(T,W)}}else{var j=g("state");v[j]=!0,b=function(W,Y){return Y.facade=W,h(W,j,Y),Y},E=function(W){return p(W,j)?W[j]:{}},C=function(W){return p(W,j)}}s.exports={set:b,get:E,has:C,enforce:S,getterFor:_}}),7659:(function(s,c,a){var d=a(5112),u=a(7497),f=d("iterator"),h=Array.prototype;s.exports=function(p){return p!==void 0&&(u.Array===p||h[f]===p)}}),3157:(function(s,c,a){var d=a(4326);s.exports=Array.isArray||function(f){return d(f)=="Array"}}),4705:(function(s,c,a){var d=a(7293),u=/#|\.prototype\./,f=function(v,y){var b=p[h(v)];return b==g?!0:b==m?!1:typeof y=="function"?d(y):!!y},h=f.normalize=function(v){return String(v).replace(u,".").toLowerCase()},p=f.data={},m=f.NATIVE="N",g=f.POLYFILL="P";s.exports=f}),111:(function(s){s.exports=function(c){return typeof c=="object"?c!==null:typeof c=="function"}}),1913:(function(s){s.exports=!1}),7850:(function(s,c,a){var d=a(111),u=a(4326),f=a(5112),h=f("match");s.exports=function(p){var m;return d(p)&&((m=p[h])!==void 0?!!m:u(p)=="RegExp")}}),9212:(function(s,c,a){var d=a(9670);s.exports=function(u){var f=u.return;if(f!==void 0)return d(f.call(u)).value}}),3383:(function(s,c,a){var d=a(7293),u=a(9518),f=a(8880),h=a(6656),p=a(5112),m=a(1913),g=p("iterator"),v=!1,y=function(){return this},b,E,C;[].keys&&(C=[].keys(),"next"in C?(E=u(u(C)),E!==Object.prototype&&(b=E)):v=!0);var S=b==null||d(function(){var _={};return b[g].call(_)!==_});S&&(b={}),(!m||S)&&!h(b,g)&&f(b,g,y),s.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:v}}),7497:(function(s){s.exports={}}),133:(function(s,c,a){var d=a(7293);s.exports=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())})}),590:(function(s,c,a){var d=a(7293),u=a(5112),f=a(1913),h=u("iterator");s.exports=!d(function(){var p=new URL("b?a=1&b=2&c=3","http://a"),m=p.searchParams,g="";return p.pathname="c%20d",m.forEach(function(v,y){m.delete("b"),g+=y+v}),f&&!p.toJSON||!m.sort||p.href!=="http://a/c%20d?a=1&c=3"||m.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!m[h]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||g!=="a1c3"||new URL("http://x",void 0).host!=="x"})}),8536:(function(s,c,a){var d=a(7854),u=a(2788),f=d.WeakMap;s.exports=typeof f=="function"&&/native code/.test(u(f))}),1574:(function(s,c,a){var d=a(9781),u=a(7293),f=a(1956),h=a(5181),p=a(5296),m=a(7908),g=a(8361),v=Object.assign,y=Object.defineProperty;s.exports=!v||u(function(){if(d&&v({b:1},v(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var b={},E={},C=Symbol(),S="abcdefghijklmnopqrst";return b[C]=7,S.split("").forEach(function(_){E[_]=_}),v({},b)[C]!=7||f(v({},E)).join("")!=S})?function(E,C){for(var S=m(E),_=arguments.length,T=1,D=h.f,G=p.f;_>T;)for(var $=g(arguments[T++]),j=D?f($).concat(D($)):f($),W=j.length,Y=0,z;W>Y;)z=j[Y++],(!d||G.call($,z))&&(S[z]=$[z]);return S}:v}),30:(function(s,c,a){var d=a(9670),u=a(6048),f=a(748),h=a(3501),p=a(490),m=a(317),g=a(6200),v=">",y="<",b="prototype",E="script",C=g("IE_PROTO"),S=function(){},_=function(j){return y+E+v+j+y+"/"+E+v},T=function(j){j.write(_("")),j.close();var W=j.parentWindow.Object;return j=null,W},D=function(){var j=m("iframe"),W="java"+E+":",Y;return j.style.display="none",p.appendChild(j),j.src=String(W),Y=j.contentWindow.document,Y.open(),Y.write(_("document.F=Object")),Y.close(),Y.F},G,$=function(){try{G=document.domain&&new ActiveXObject("htmlfile")}catch{}$=G?T(G):D();for(var j=f.length;j--;)delete $[b][f[j]];return $()};h[C]=!0,s.exports=Object.create||function(W,Y){var z;return W!==null?(S[b]=d(W),z=new S,S[b]=null,z[C]=W):z=$(),Y===void 0?z:u(z,Y)}}),6048:(function(s,c,a){var d=a(9781),u=a(3070),f=a(9670),h=a(1956);s.exports=d?Object.defineProperties:function(m,g){f(m);for(var v=h(g),y=v.length,b=0,E;y>b;)u.f(m,E=v[b++],g[E]);return m}}),3070:(function(s,c,a){var d=a(9781),u=a(4664),f=a(9670),h=a(7593),p=Object.defineProperty;c.f=d?p:function(g,v,y){if(f(g),v=h(v,!0),f(y),u)try{return p(g,v,y)}catch{}if("get"in y||"set"in y)throw TypeError("Accessors not supported");return"value"in y&&(g[v]=y.value),g}}),1236:(function(s,c,a){var d=a(9781),u=a(5296),f=a(9114),h=a(5656),p=a(7593),m=a(6656),g=a(4664),v=Object.getOwnPropertyDescriptor;c.f=d?v:function(b,E){if(b=h(b),E=p(E,!0),g)try{return v(b,E)}catch{}if(m(b,E))return f(!u.f.call(b,E),b[E])}}),8006:(function(s,c,a){var d=a(6324),u=a(748),f=u.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(p){return d(p,f)}}),5181:(function(s,c){c.f=Object.getOwnPropertySymbols}),9518:(function(s,c,a){var d=a(6656),u=a(7908),f=a(6200),h=a(8544),p=f("IE_PROTO"),m=Object.prototype;s.exports=h?Object.getPrototypeOf:function(g){return g=u(g),d(g,p)?g[p]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?m:null}}),6324:(function(s,c,a){var d=a(6656),u=a(5656),f=a(1318).indexOf,h=a(3501);s.exports=function(p,m){var g=u(p),v=0,y=[],b;for(b in g)!d(h,b)&&d(g,b)&&y.push(b);for(;m.length>v;)d(g,b=m[v++])&&(~f(y,b)||y.push(b));return y}}),1956:(function(s,c,a){var d=a(6324),u=a(748);s.exports=Object.keys||function(h){return d(h,u)}}),5296:(function(s,c){var a={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,u=d&&!a.call({1:2},1);c.f=u?function(h){var p=d(this,h);return!!p&&p.enumerable}:a}),7674:(function(s,c,a){var d=a(9670),u=a(6077);s.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var f=!1,h={},p;try{p=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,p.call(h,[]),f=h instanceof Array}catch{}return function(g,v){return d(g),u(v),f?p.call(g,v):g.__proto__=v,g}})():void 0)}),288:(function(s,c,a){var d=a(1694),u=a(648);s.exports=d?{}.toString:function(){return"[object "+u(this)+"]"}}),3887:(function(s,c,a){var d=a(5005),u=a(8006),f=a(5181),h=a(9670);s.exports=d("Reflect","ownKeys")||function(m){var g=u.f(h(m)),v=f.f;return v?g.concat(v(m)):g}}),857:(function(s,c,a){var d=a(7854);s.exports=d}),2248:(function(s,c,a){var d=a(1320);s.exports=function(u,f,h){for(var p in f)d(u,p,f[p],h);return u}}),1320:(function(s,c,a){var d=a(7854),u=a(8880),f=a(6656),h=a(3505),p=a(2788),m=a(9909),g=m.get,v=m.enforce,y=String(String).split("String");(s.exports=function(b,E,C,S){var _=S?!!S.unsafe:!1,T=S?!!S.enumerable:!1,D=S?!!S.noTargetGet:!1,G;if(typeof C=="function"&&(typeof E=="string"&&!f(C,"name")&&u(C,"name",E),G=v(C),G.source||(G.source=y.join(typeof E=="string"?E:""))),b===d){T?b[E]=C:h(E,C);return}else _?!D&&b[E]&&(T=!0):delete b[E];T?b[E]=C:u(b,E,C)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||p(this)})}),7651:(function(s,c,a){var d=a(4326),u=a(2261);s.exports=function(f,h){var p=f.exec;if(typeof p=="function"){var m=p.call(f,h);if(typeof m!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return m}if(d(f)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(f,h)}}),2261:(function(s,c,a){var d=a(7066),u=a(2999),f=RegExp.prototype.exec,h=String.prototype.replace,p=f,m=(function(){var b=/a/,E=/b*/g;return f.call(b,"a"),f.call(E,"a"),b.lastIndex!==0||E.lastIndex!==0})(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,y=m||v||g;y&&(p=function(E){var C=this,S,_,T,D,G=g&&C.sticky,$=d.call(C),j=C.source,W=0,Y=E;return G&&($=$.replace("y",""),$.indexOf("g")===-1&&($+="g"),Y=String(E).slice(C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&E[C.lastIndex-1]!==`
1175
- `)&&(j="(?: "+j+")",Y=" "+Y,W++),_=new RegExp("^(?:"+j+")",$)),v&&(_=new RegExp("^"+j+"$(?!\\s)",$)),m&&(S=C.lastIndex),T=f.call(G?_:C,Y),G?T?(T.input=T.input.slice(W),T[0]=T[0].slice(W),T.index=C.lastIndex,C.lastIndex+=T[0].length):C.lastIndex=0:m&&T&&(C.lastIndex=C.global?T.index+T[0].length:S),v&&T&&T.length>1&&h.call(T[0],_,function(){for(D=1;D<arguments.length-2;D++)arguments[D]===void 0&&(T[D]=void 0)}),T}),s.exports=p}),7066:(function(s,c,a){var d=a(9670);s.exports=function(){var u=d(this),f="";return u.global&&(f+="g"),u.ignoreCase&&(f+="i"),u.multiline&&(f+="m"),u.dotAll&&(f+="s"),u.unicode&&(f+="u"),u.sticky&&(f+="y"),f}}),2999:(function(s,c,a){var d=a(7293);function u(f,h){return RegExp(f,h)}c.UNSUPPORTED_Y=d(function(){var f=u("a","y");return f.lastIndex=2,f.exec("abcd")!=null}),c.BROKEN_CARET=d(function(){var f=u("^r","gy");return f.lastIndex=2,f.exec("str")!=null})}),4488:(function(s){s.exports=function(c){if(c==null)throw TypeError("Can't call method on "+c);return c}}),3505:(function(s,c,a){var d=a(7854),u=a(8880);s.exports=function(f,h){try{u(d,f,h)}catch{d[f]=h}return h}}),6340:(function(s,c,a){var d=a(5005),u=a(3070),f=a(5112),h=a(9781),p=f("species");s.exports=function(m){var g=d(m),v=u.f;h&&g&&!g[p]&&v(g,p,{configurable:!0,get:function(){return this}})}}),8003:(function(s,c,a){var d=a(3070).f,u=a(6656),f=a(5112),h=f("toStringTag");s.exports=function(p,m,g){p&&!u(p=g?p:p.prototype,h)&&d(p,h,{configurable:!0,value:m})}}),6200:(function(s,c,a){var d=a(2309),u=a(9711),f=d("keys");s.exports=function(h){return f[h]||(f[h]=u(h))}}),5465:(function(s,c,a){var d=a(7854),u=a(3505),f="__core-js_shared__",h=d[f]||u(f,{});s.exports=h}),2309:(function(s,c,a){var d=a(1913),u=a(5465);(s.exports=function(f,h){return u[f]||(u[f]=h!==void 0?h:{})})("versions",[]).push({version:"3.9.0",mode:d?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),6707:(function(s,c,a){var d=a(9670),u=a(3099),f=a(5112),h=f("species");s.exports=function(p,m){var g=d(p).constructor,v;return g===void 0||(v=d(g)[h])==null?m:u(v)}}),8710:(function(s,c,a){var d=a(9958),u=a(4488),f=function(h){return function(p,m){var g=String(u(p)),v=d(m),y=g.length,b,E;return v<0||v>=y?h?"":void 0:(b=g.charCodeAt(v),b<55296||b>56319||v+1===y||(E=g.charCodeAt(v+1))<56320||E>57343?h?g.charAt(v):b:h?g.slice(v,v+2):(b-55296<<10)+(E-56320)+65536)}};s.exports={codeAt:f(!1),charAt:f(!0)}}),3197:(function(s){var c=2147483647,a=36,d=1,u=26,f=38,h=700,p=72,m=128,g="-",v=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,b="Overflow: input needs wider integers to process",E=a-d,C=Math.floor,S=String.fromCharCode,_=function($){for(var j=[],W=0,Y=$.length;W<Y;){var z=$.charCodeAt(W++);if(z>=55296&&z<=56319&&W<Y){var U=$.charCodeAt(W++);(U&64512)==56320?j.push(((z&1023)<<10)+(U&1023)+65536):(j.push(z),W--)}else j.push(z)}return j},T=function($){return $+22+75*($<26)},D=function($,j,W){var Y=0;for($=W?C($/h):$>>1,$+=C($/j);$>E*u>>1;Y+=a)$=C($/E);return C(Y+(E+1)*$/($+f))},G=function($){var j=[];$=_($);var W=$.length,Y=m,z=0,U=p,F,X;for(F=0;F<$.length;F++)X=$[F],X<128&&j.push(S(X));var H=j.length,ee=H;for(H&&j.push(g);ee<W;){var ne=c;for(F=0;F<$.length;F++)X=$[F],X>=Y&&X<ne&&(ne=X);var ae=ee+1;if(ne-Y>C((c-z)/ae))throw RangeError(b);for(z+=(ne-Y)*ae,Y=ne,F=0;F<$.length;F++){if(X=$[F],X<Y&&++z>c)throw RangeError(b);if(X==Y){for(var pe=z,me=a;;me+=a){var be=me<=U?d:me>=U+u?u:me-U;if(pe<be)break;var Ee=pe-be,Te=a-be;j.push(S(T(be+Ee%Te))),pe=C(Ee/Te)}j.push(S(T(pe))),U=D(z,ae,ee==H),z=0,++ee}}++z,++Y}return j.join("")};s.exports=function($){var j=[],W=$.toLowerCase().replace(y,".").split("."),Y,z;for(Y=0;Y<W.length;Y++)z=W[Y],j.push(v.test(z)?"xn--"+G(z):z);return j.join(".")}}),6091:(function(s,c,a){var d=a(7293),u=a(1361),f="​…᠎";s.exports=function(h){return d(function(){return!!u[h]()||f[h]()!=f||u[h].name!==h})}}),3111:(function(s,c,a){var d=a(4488),u=a(1361),f="["+u+"]",h=RegExp("^"+f+f+"*"),p=RegExp(f+f+"*$"),m=function(g){return function(v){var y=String(d(v));return g&1&&(y=y.replace(h,"")),g&2&&(y=y.replace(p,"")),y}};s.exports={start:m(1),end:m(2),trim:m(3)}}),1400:(function(s,c,a){var d=a(9958),u=Math.max,f=Math.min;s.exports=function(h,p){var m=d(h);return m<0?u(m+p,0):f(m,p)}}),7067:(function(s,c,a){var d=a(9958),u=a(7466);s.exports=function(f){if(f===void 0)return 0;var h=d(f),p=u(h);if(h!==p)throw RangeError("Wrong length or index");return p}}),5656:(function(s,c,a){var d=a(8361),u=a(4488);s.exports=function(f){return d(u(f))}}),9958:(function(s){var c=Math.ceil,a=Math.floor;s.exports=function(d){return isNaN(d=+d)?0:(d>0?a:c)(d)}}),7466:(function(s,c,a){var d=a(9958),u=Math.min;s.exports=function(f){return f>0?u(d(f),9007199254740991):0}}),7908:(function(s,c,a){var d=a(4488);s.exports=function(u){return Object(d(u))}}),4590:(function(s,c,a){var d=a(3002);s.exports=function(u,f){var h=d(u);if(h%f)throw RangeError("Wrong offset");return h}}),3002:(function(s,c,a){var d=a(9958);s.exports=function(u){var f=d(u);if(f<0)throw RangeError("The argument can't be less than 0");return f}}),7593:(function(s,c,a){var d=a(111);s.exports=function(u,f){if(!d(u))return u;var h,p;if(f&&typeof(h=u.toString)=="function"&&!d(p=h.call(u))||typeof(h=u.valueOf)=="function"&&!d(p=h.call(u))||!f&&typeof(h=u.toString)=="function"&&!d(p=h.call(u)))return p;throw TypeError("Can't convert object to primitive value")}}),1694:(function(s,c,a){var d=a(5112),u=d("toStringTag"),f={};f[u]="z",s.exports=String(f)==="[object z]"}),9843:(function(s,c,a){var d=a(2109),u=a(7854),f=a(9781),h=a(3832),p=a(260),m=a(3331),g=a(5787),v=a(9114),y=a(8880),b=a(7466),E=a(7067),C=a(4590),S=a(7593),_=a(6656),T=a(648),D=a(111),G=a(30),$=a(7674),j=a(8006).f,W=a(7321),Y=a(2092).forEach,z=a(6340),U=a(3070),F=a(1236),X=a(9909),H=a(9587),ee=X.get,ne=X.set,ae=U.f,pe=F.f,me=Math.round,be=u.RangeError,Ee=m.ArrayBuffer,Te=m.DataView,ve=p.NATIVE_ARRAY_BUFFER_VIEWS,N=p.TYPED_ARRAY_TAG,M=p.TypedArray,I=p.TypedArrayPrototype,O=p.aTypedArrayConstructor,k=p.isTypedArray,w="BYTES_PER_ELEMENT",P="Wrong length",R=function(Z,q){for(var te=0,se=q.length,J=new(O(Z))(se);se>te;)J[te]=q[te++];return J},K=function(Z,q){ae(Z,q,{get:function(){return ee(this)[q]}})},Q=function(Z){var q;return Z instanceof Ee||(q=T(Z))=="ArrayBuffer"||q=="SharedArrayBuffer"},A=function(Z,q){return k(Z)&&typeof q!="symbol"&&q in Z&&String(+q)==String(q)},x=function(q,te){return A(q,te=S(te,!0))?v(2,q[te]):pe(q,te)},B=function(q,te,se){return A(q,te=S(te,!0))&&D(se)&&_(se,"value")&&!_(se,"get")&&!_(se,"set")&&!se.configurable&&(!_(se,"writable")||se.writable)&&(!_(se,"enumerable")||se.enumerable)?(q[te]=se.value,q):ae(q,te,se)};f?(ve||(F.f=x,U.f=B,K(I,"buffer"),K(I,"byteOffset"),K(I,"byteLength"),K(I,"length")),d({target:"Object",stat:!0,forced:!ve},{getOwnPropertyDescriptor:x,defineProperty:B}),s.exports=function(Z,q,te){var se=Z.match(/\d+$/)[0]/8,J=Z+(te?"Clamped":"")+"Array",re="get"+Z,Se="set"+Z,_e=u[J],Oe=_e,nt=Oe&&Oe.prototype,pt={},rt=function(Xe,$e){var ft=ee(Xe);return ft.view[re]($e*se+ft.byteOffset,!0)},Qr=function(Xe,$e,ft){var tn=ee(Xe);te&&(ft=(ft=me(ft))<0?0:ft>255?255:ft&255),tn.view[Se]($e*se+tn.byteOffset,ft,!0)},Tn=function(Xe,$e){ae(Xe,$e,{get:function(){return rt(this,$e)},set:function(ft){return Qr(this,$e,ft)},enumerable:!0})};ve?h&&(Oe=q(function(Xe,$e,ft,tn){return g(Xe,Oe,J),H((function(){return D($e)?Q($e)?tn!==void 0?new _e($e,C(ft,se),tn):ft!==void 0?new _e($e,C(ft,se)):new _e($e):k($e)?R(Oe,$e):W.call(Oe,$e):new _e(E($e))})(),Xe,Oe)}),$&&$(Oe,M),Y(j(_e),function(Xe){Xe in Oe||y(Oe,Xe,_e[Xe])}),Oe.prototype=nt):(Oe=q(function(Xe,$e,ft,tn){g(Xe,Oe,J);var Po=0,Zr=0,Jr,pn,dr;if(!D($e))dr=E($e),pn=dr*se,Jr=new Ee(pn);else if(Q($e)){Jr=$e,Zr=C(ft,se);var Ai=$e.byteLength;if(tn===void 0){if(Ai%se||(pn=Ai-Zr,pn<0))throw be(P)}else if(pn=b(tn)*se,pn+Zr>Ai)throw be(P);dr=pn/se}else return k($e)?R(Oe,$e):W.call(Oe,$e);for(ne(Xe,{buffer:Jr,byteOffset:Zr,byteLength:pn,length:dr,view:new Te(Jr)});Po<dr;)Tn(Xe,Po++)}),$&&$(Oe,M),nt=Oe.prototype=G(I)),nt.constructor!==Oe&&y(nt,"constructor",Oe),N&&y(nt,N,J),pt[J]=Oe,d({global:!0,forced:Oe!=_e,sham:!ve},pt),w in Oe||y(Oe,w,se),w in nt||y(nt,w,se),z(J)}):s.exports=function(){}}),3832:(function(s,c,a){var d=a(7854),u=a(7293),f=a(7072),h=a(260).NATIVE_ARRAY_BUFFER_VIEWS,p=d.ArrayBuffer,m=d.Int8Array;s.exports=!h||!u(function(){m(1)})||!u(function(){new m(-1)})||!f(function(g){new m,new m(null),new m(1.5),new m(g)},!0)||u(function(){return new m(new p(2),1,void 0).length!==1})}),3074:(function(s,c,a){var d=a(260).aTypedArrayConstructor,u=a(6707);s.exports=function(f,h){for(var p=u(f,f.constructor),m=0,g=h.length,v=new(d(p))(g);g>m;)v[m]=h[m++];return v}}),7321:(function(s,c,a){var d=a(7908),u=a(7466),f=a(1246),h=a(7659),p=a(9974),m=a(260).aTypedArrayConstructor;s.exports=function(v){var y=d(v),b=arguments.length,E=b>1?arguments[1]:void 0,C=E!==void 0,S=f(y),_,T,D,G,$,j;if(S!=null&&!h(S))for($=S.call(y),j=$.next,y=[];!(G=j.call($)).done;)y.push(G.value);for(C&&b>2&&(E=p(E,arguments[2],2)),T=u(y.length),D=new(m(this))(T),_=0;T>_;_++)D[_]=C?E(y[_],_):y[_];return D}}),9711:(function(s){var c=0,a=Math.random();s.exports=function(d){return"Symbol("+String(d===void 0?"":d)+")_"+(++c+a).toString(36)}}),3307:(function(s,c,a){var d=a(133);s.exports=d&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),5112:(function(s,c,a){var d=a(7854),u=a(2309),f=a(6656),h=a(9711),p=a(133),m=a(3307),g=u("wks"),v=d.Symbol,y=m?v:v&&v.withoutSetter||h;s.exports=function(b){return f(g,b)||(p&&f(v,b)?g[b]=v[b]:g[b]=y("Symbol."+b)),g[b]}}),1361:(function(s){s.exports=`
1176
- \v\f\r                 \u2028\u2029\uFEFF`}),8264:(function(s,c,a){var d=a(2109),u=a(7854),f=a(3331),h=a(6340),p="ArrayBuffer",m=f[p],g=u[p];d({global:!0,forced:g!==m},{ArrayBuffer:m}),h(p)}),2222:(function(s,c,a){var d=a(2109),u=a(7293),f=a(3157),h=a(111),p=a(7908),m=a(7466),g=a(6135),v=a(5417),y=a(1194),b=a(5112),E=a(7392),C=b("isConcatSpreadable"),S=9007199254740991,_="Maximum allowed index exceeded",T=E>=51||!u(function(){var j=[];return j[C]=!1,j.concat()[0]!==j}),D=y("concat"),G=function(j){if(!h(j))return!1;var W=j[C];return W!==void 0?!!W:f(j)},$=!T||!D;d({target:"Array",proto:!0,forced:$},{concat:function(W){var Y=p(this),z=v(Y,0),U=0,F,X,H,ee,ne;for(F=-1,H=arguments.length;F<H;F++)if(ne=F===-1?Y:arguments[F],G(ne)){if(ee=m(ne.length),U+ee>S)throw TypeError(_);for(X=0;X<ee;X++,U++)X in ne&&g(z,U,ne[X])}else{if(U>=S)throw TypeError(_);g(z,U++,ne)}return z.length=U,z}})}),7327:(function(s,c,a){var d=a(2109),u=a(2092).filter,f=a(1194),h=f("filter");d({target:"Array",proto:!0,forced:!h},{filter:function(m){return u(this,m,arguments.length>1?arguments[1]:void 0)}})}),2772:(function(s,c,a){var d=a(2109),u=a(1318).indexOf,f=a(9341),h=[].indexOf,p=!!h&&1/[1].indexOf(1,-0)<0,m=f("indexOf");d({target:"Array",proto:!0,forced:p||!m},{indexOf:function(v){return p?h.apply(this,arguments)||0:u(this,v,arguments.length>1?arguments[1]:void 0)}})}),6992:(function(s,c,a){var d=a(5656),u=a(1223),f=a(7497),h=a(9909),p=a(654),m="Array Iterator",g=h.set,v=h.getterFor(m);s.exports=p(Array,"Array",function(y,b){g(this,{type:m,target:d(y),index:0,kind:b})},function(){var y=v(this),b=y.target,E=y.kind,C=y.index++;return!b||C>=b.length?(y.target=void 0,{value:void 0,done:!0}):E=="keys"?{value:C,done:!1}:E=="values"?{value:b[C],done:!1}:{value:[C,b[C]],done:!1}},"values"),f.Arguments=f.Array,u("keys"),u("values"),u("entries")}),1249:(function(s,c,a){var d=a(2109),u=a(2092).map,f=a(1194),h=f("map");d({target:"Array",proto:!0,forced:!h},{map:function(m){return u(this,m,arguments.length>1?arguments[1]:void 0)}})}),7042:(function(s,c,a){var d=a(2109),u=a(111),f=a(3157),h=a(1400),p=a(7466),m=a(5656),g=a(6135),v=a(5112),y=a(1194),b=y("slice"),E=v("species"),C=[].slice,S=Math.max;d({target:"Array",proto:!0,forced:!b},{slice:function(T,D){var G=m(this),$=p(G.length),j=h(T,$),W=h(D===void 0?$:D,$),Y,z,U;if(f(G)&&(Y=G.constructor,typeof Y=="function"&&(Y===Array||f(Y.prototype))?Y=void 0:u(Y)&&(Y=Y[E],Y===null&&(Y=void 0)),Y===Array||Y===void 0))return C.call(G,j,W);for(z=new(Y===void 0?Array:Y)(S(W-j,0)),U=0;j<W;j++,U++)j in G&&g(z,U,G[j]);return z.length=U,z}})}),561:(function(s,c,a){var d=a(2109),u=a(1400),f=a(9958),h=a(7466),p=a(7908),m=a(5417),g=a(6135),v=a(1194),y=v("splice"),b=Math.max,E=Math.min,C=9007199254740991,S="Maximum allowed length exceeded";d({target:"Array",proto:!0,forced:!y},{splice:function(T,D){var G=p(this),$=h(G.length),j=u(T,$),W=arguments.length,Y,z,U,F,X,H;if(W===0?Y=z=0:W===1?(Y=0,z=$-j):(Y=W-2,z=E(b(f(D),0),$-j)),$+Y-z>C)throw TypeError(S);for(U=m(G,z),F=0;F<z;F++)X=j+F,X in G&&g(U,F,G[X]);if(U.length=z,Y<z){for(F=j;F<$-z;F++)X=F+z,H=F+Y,X in G?G[H]=G[X]:delete G[H];for(F=$;F>$-z+Y;F--)delete G[F-1]}else if(Y>z)for(F=$-z;F>j;F--)X=F+z-1,H=F+Y-1,X in G?G[H]=G[X]:delete G[H];for(F=0;F<Y;F++)G[F+j]=arguments[F+2];return G.length=$-z+Y,U}})}),8309:(function(s,c,a){var d=a(9781),u=a(3070).f,f=Function.prototype,h=f.toString,p=/^\s*function ([^ (]*)/,m="name";d&&!(m in f)&&u(f,m,{configurable:!0,get:function(){try{return h.call(this).match(p)[1]}catch{return""}}})}),489:(function(s,c,a){var d=a(2109),u=a(7293),f=a(7908),h=a(9518),p=a(8544),m=u(function(){h(1)});d({target:"Object",stat:!0,forced:m,sham:!p},{getPrototypeOf:function(v){return h(f(v))}})}),1539:(function(s,c,a){var d=a(1694),u=a(1320),f=a(288);d||u(Object.prototype,"toString",f,{unsafe:!0})}),4916:(function(s,c,a){var d=a(2109),u=a(2261);d({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})}),9714:(function(s,c,a){var d=a(1320),u=a(9670),f=a(7293),h=a(7066),p="toString",m=RegExp.prototype,g=m[p],v=f(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),y=g.name!=p;(v||y)&&d(RegExp.prototype,p,function(){var E=u(this),C=String(E.source),S=E.flags,_=String(S===void 0&&E instanceof RegExp&&!("flags"in m)?h.call(E):S);return"/"+C+"/"+_},{unsafe:!0})}),8783:(function(s,c,a){var d=a(8710).charAt,u=a(9909),f=a(654),h="String Iterator",p=u.set,m=u.getterFor(h);f(String,"String",function(g){p(this,{type:h,string:String(g),index:0})},function(){var v=m(this),y=v.string,b=v.index,E;return b>=y.length?{value:void 0,done:!0}:(E=d(y,b),v.index+=E.length,{value:E,done:!1})})}),4723:(function(s,c,a){var d=a(7007),u=a(9670),f=a(7466),h=a(4488),p=a(1530),m=a(7651);d("match",1,function(g,v,y){return[function(E){var C=h(this),S=E?.[g];return S!==void 0?S.call(E,C):new RegExp(E)[g](String(C))},function(b){var E=y(v,b,this);if(E.done)return E.value;var C=u(b),S=String(this);if(!C.global)return m(C,S);var _=C.unicode;C.lastIndex=0;for(var T=[],D=0,G;(G=m(C,S))!==null;){var $=String(G[0]);T[D]=$,$===""&&(C.lastIndex=p(S,f(C.lastIndex),_)),D++}return D===0?null:T}]})}),5306:(function(s,c,a){var d=a(7007),u=a(9670),f=a(7466),h=a(9958),p=a(4488),m=a(1530),g=a(647),v=a(7651),y=Math.max,b=Math.min,E=function(C){return C===void 0?C:String(C)};d("replace",2,function(C,S,_,T){var D=T.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,G=T.REPLACE_KEEPS_$0,$=D?"$":"$0";return[function(W,Y){var z=p(this),U=W?.[C];return U!==void 0?U.call(W,z,Y):S.call(String(z),W,Y)},function(j,W){if(!D&&G||typeof W=="string"&&W.indexOf($)===-1){var Y=_(S,j,this,W);if(Y.done)return Y.value}var z=u(j),U=String(this),F=typeof W=="function";F||(W=String(W));var X=z.global;if(X){var H=z.unicode;z.lastIndex=0}for(var ee=[];;){var ne=v(z,U);if(ne===null||(ee.push(ne),!X))break;var ae=String(ne[0]);ae===""&&(z.lastIndex=m(U,f(z.lastIndex),H))}for(var pe="",me=0,be=0;be<ee.length;be++){ne=ee[be];for(var Ee=String(ne[0]),Te=y(b(h(ne.index),U.length),0),ve=[],N=1;N<ne.length;N++)ve.push(E(ne[N]));var M=ne.groups;if(F){var I=[Ee].concat(ve,Te,U);M!==void 0&&I.push(M);var O=String(W.apply(void 0,I))}else O=g(Ee,U,Te,ve,M,W);Te>=me&&(pe+=U.slice(me,Te)+O,me=Te+Ee.length)}return pe+U.slice(me)}]})}),3123:(function(s,c,a){var d=a(7007),u=a(7850),f=a(9670),h=a(4488),p=a(6707),m=a(1530),g=a(7466),v=a(7651),y=a(2261),b=a(7293),E=[].push,C=Math.min,S=4294967295,_=!b(function(){return!RegExp(S,"y")});d("split",2,function(T,D,G){var $;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?$=function(j,W){var Y=String(h(this)),z=W===void 0?S:W>>>0;if(z===0)return[];if(j===void 0)return[Y];if(!u(j))return D.call(Y,j,z);for(var U=[],F=(j.ignoreCase?"i":"")+(j.multiline?"m":"")+(j.unicode?"u":"")+(j.sticky?"y":""),X=0,H=new RegExp(j.source,F+"g"),ee,ne,ae;(ee=y.call(H,Y))&&(ne=H.lastIndex,!(ne>X&&(U.push(Y.slice(X,ee.index)),ee.length>1&&ee.index<Y.length&&E.apply(U,ee.slice(1)),ae=ee[0].length,X=ne,U.length>=z)));)H.lastIndex===ee.index&&H.lastIndex++;return X===Y.length?(ae||!H.test(""))&&U.push(""):U.push(Y.slice(X)),U.length>z?U.slice(0,z):U}:"0".split(void 0,0).length?$=function(j,W){return j===void 0&&W===0?[]:D.call(this,j,W)}:$=D,[function(W,Y){var z=h(this),U=W?.[T];return U!==void 0?U.call(W,z,Y):$.call(String(z),W,Y)},function(j,W){var Y=G($,j,this,W,$!==D);if(Y.done)return Y.value;var z=f(j),U=String(this),F=p(z,RegExp),X=z.unicode,H=(z.ignoreCase?"i":"")+(z.multiline?"m":"")+(z.unicode?"u":"")+(_?"y":"g"),ee=new F(_?z:"^(?:"+z.source+")",H),ne=W===void 0?S:W>>>0;if(ne===0)return[];if(U.length===0)return v(ee,U)===null?[U]:[];for(var ae=0,pe=0,me=[];pe<U.length;){ee.lastIndex=_?pe:0;var be=v(ee,_?U:U.slice(pe)),Ee;if(be===null||(Ee=C(g(ee.lastIndex+(_?0:pe)),U.length))===ae)pe=m(U,pe,X);else{if(me.push(U.slice(ae,pe)),me.length===ne)return me;for(var Te=1;Te<=be.length-1;Te++)if(me.push(be[Te]),me.length===ne)return me;pe=ae=Ee}}return me.push(U.slice(ae)),me}]},!_)}),3210:(function(s,c,a){var d=a(2109),u=a(3111).trim,f=a(6091);d({target:"String",proto:!0,forced:f("trim")},{trim:function(){return u(this)}})}),2990:(function(s,c,a){var d=a(260),u=a(1048),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("copyWithin",function(m,g){return u.call(f(this),m,g,arguments.length>2?arguments[2]:void 0)})}),8927:(function(s,c,a){var d=a(260),u=a(2092).every,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("every",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),3105:(function(s,c,a){var d=a(260),u=a(1285),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("fill",function(m){return u.apply(f(this),arguments)})}),5035:(function(s,c,a){var d=a(260),u=a(2092).filter,f=a(3074),h=d.aTypedArray,p=d.exportTypedArrayMethod;p("filter",function(g){var v=u(h(this),g,arguments.length>1?arguments[1]:void 0);return f(this,v)})}),7174:(function(s,c,a){var d=a(260),u=a(2092).findIndex,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("findIndex",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),4345:(function(s,c,a){var d=a(260),u=a(2092).find,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("find",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),2846:(function(s,c,a){var d=a(260),u=a(2092).forEach,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("forEach",function(m){u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),4731:(function(s,c,a){var d=a(260),u=a(1318).includes,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("includes",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),7209:(function(s,c,a){var d=a(260),u=a(1318).indexOf,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("indexOf",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),6319:(function(s,c,a){var d=a(7854),u=a(260),f=a(6992),h=a(5112),p=h("iterator"),m=d.Uint8Array,g=f.values,v=f.keys,y=f.entries,b=u.aTypedArray,E=u.exportTypedArrayMethod,C=m&&m.prototype[p],S=!!C&&(C.name=="values"||C.name==null),_=function(){return g.call(b(this))};E("entries",function(){return y.call(b(this))}),E("keys",function(){return v.call(b(this))}),E("values",_,!S),E(p,_,!S)}),8867:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=[].join;f("join",function(m){return h.apply(u(this),arguments)})}),7789:(function(s,c,a){var d=a(260),u=a(6583),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("lastIndexOf",function(m){return u.apply(f(this),arguments)})}),3739:(function(s,c,a){var d=a(260),u=a(2092).map,f=a(6707),h=d.aTypedArray,p=d.aTypedArrayConstructor,m=d.exportTypedArrayMethod;m("map",function(v){return u(h(this),v,arguments.length>1?arguments[1]:void 0,function(y,b){return new(p(f(y,y.constructor)))(b)})})}),4483:(function(s,c,a){var d=a(260),u=a(3671).right,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("reduceRight",function(m){return u(f(this),m,arguments.length,arguments.length>1?arguments[1]:void 0)})}),9368:(function(s,c,a){var d=a(260),u=a(3671).left,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("reduce",function(m){return u(f(this),m,arguments.length,arguments.length>1?arguments[1]:void 0)})}),2056:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=Math.floor;f("reverse",function(){for(var m=this,g=u(m).length,v=h(g/2),y=0,b;y<v;)b=m[y],m[y++]=m[--g],m[g]=b;return m})}),3462:(function(s,c,a){var d=a(260),u=a(7466),f=a(4590),h=a(7908),p=a(7293),m=d.aTypedArray,g=d.exportTypedArrayMethod,v=p(function(){new Int8Array(1).set({})});g("set",function(b){m(this);var E=f(arguments.length>1?arguments[1]:void 0,1),C=this.length,S=h(b),_=u(S.length),T=0;if(_+E>C)throw RangeError("Wrong length");for(;T<_;)this[E+T]=S[T++]},v)}),678:(function(s,c,a){var d=a(260),u=a(6707),f=a(7293),h=d.aTypedArray,p=d.aTypedArrayConstructor,m=d.exportTypedArrayMethod,g=[].slice,v=f(function(){new Int8Array(1).slice()});m("slice",function(b,E){for(var C=g.call(h(this),b,E),S=u(this,this.constructor),_=0,T=C.length,D=new(p(S))(T);T>_;)D[_]=C[_++];return D},v)}),7462:(function(s,c,a){var d=a(260),u=a(2092).some,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("some",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),3824:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=[].sort;f("sort",function(m){return h.call(u(this),m)})}),5021:(function(s,c,a){var d=a(260),u=a(7466),f=a(1400),h=a(6707),p=d.aTypedArray,m=d.exportTypedArrayMethod;m("subarray",function(v,y){var b=p(this),E=b.length,C=f(v,E);return new(h(b,b.constructor))(b.buffer,b.byteOffset+C*b.BYTES_PER_ELEMENT,u((y===void 0?E:f(y,E))-C))})}),2974:(function(s,c,a){var d=a(7854),u=a(260),f=a(7293),h=d.Int8Array,p=u.aTypedArray,m=u.exportTypedArrayMethod,g=[].toLocaleString,v=[].slice,y=!!h&&f(function(){g.call(new h(1))}),b=f(function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()})||!f(function(){h.prototype.toLocaleString.call([1,2])});m("toLocaleString",function(){return g.apply(y?v.call(p(this)):p(this),arguments)},b)}),5016:(function(s,c,a){var d=a(260).exportTypedArrayMethod,u=a(7293),f=a(7854),h=f.Uint8Array,p=h&&h.prototype||{},m=[].toString,g=[].join;u(function(){m.call({})})&&(m=function(){return g.call(this)});var v=p.toString!=m;d("toString",m,v)}),2472:(function(s,c,a){var d=a(9843);d("Uint8",function(u){return function(h,p,m){return u(this,h,p,m)}})}),4747:(function(s,c,a){var d=a(7854),u=a(8324),f=a(8533),h=a(8880);for(var p in u){var m=d[p],g=m&&m.prototype;if(g&&g.forEach!==f)try{h(g,"forEach",f)}catch{g.forEach=f}}}),3948:(function(s,c,a){var d=a(7854),u=a(8324),f=a(6992),h=a(8880),p=a(5112),m=p("iterator"),g=p("toStringTag"),v=f.values;for(var y in u){var b=d[y],E=b&&b.prototype;if(E){if(E[m]!==v)try{h(E,m,v)}catch{E[m]=v}if(E[g]||h(E,g,y),u[y]){for(var C in f)if(E[C]!==f[C])try{h(E,C,f[C])}catch{E[C]=f[C]}}}}}),1637:(function(s,c,a){a(6992);var d=a(2109),u=a(5005),f=a(590),h=a(1320),p=a(2248),m=a(8003),g=a(4994),v=a(9909),y=a(5787),b=a(6656),E=a(9974),C=a(648),S=a(9670),_=a(111),T=a(30),D=a(9114),G=a(8554),$=a(1246),j=a(5112),W=u("fetch"),Y=u("Headers"),z=j("iterator"),U="URLSearchParams",F=U+"Iterator",X=v.set,H=v.getterFor(U),ee=v.getterFor(F),ne=/\+/g,ae=Array(4),pe=function(R){return ae[R-1]||(ae[R-1]=RegExp("((?:%[\\da-f]{2}){"+R+"})","gi"))},me=function(R){try{return decodeURIComponent(R)}catch{return R}},be=function(R){var K=R.replace(ne," "),Q=4;try{return decodeURIComponent(K)}catch{for(;Q;)K=K.replace(pe(Q--),me);return K}},Ee=/[!'()~]|%20/g,Te={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ve=function(R){return Te[R]},N=function(R){return encodeURIComponent(R).replace(Ee,ve)},M=function(R,K){if(K)for(var Q=K.split("&"),A=0,x,B;A<Q.length;)x=Q[A++],x.length&&(B=x.split("="),R.push({key:be(B.shift()),value:be(B.join("="))}))},I=function(R){this.entries.length=0,M(this.entries,R)},O=function(R,K){if(R<K)throw TypeError("Not enough arguments")},k=g(function(K,Q){X(this,{type:F,iterator:G(H(K).entries),kind:Q})},"Iterator",function(){var K=ee(this),Q=K.kind,A=K.iterator.next(),x=A.value;return A.done||(A.value=Q==="keys"?x.key:Q==="values"?x.value:[x.key,x.value]),A}),w=function(){y(this,w,U);var K=arguments.length>0?arguments[0]:void 0,Q=this,A=[],x,B,Z,q,te,se,J,re,Se;if(X(Q,{type:U,entries:A,updateURL:function(){},updateSearchParams:I}),K!==void 0)if(_(K))if(x=$(K),typeof x=="function")for(B=x.call(K),Z=B.next;!(q=Z.call(B)).done;){if(te=G(S(q.value)),se=te.next,(J=se.call(te)).done||(re=se.call(te)).done||!se.call(te).done)throw TypeError("Expected sequence with length 2");A.push({key:J.value+"",value:re.value+""})}else for(Se in K)b(K,Se)&&A.push({key:Se,value:K[Se]+""});else M(A,typeof K=="string"?K.charAt(0)==="?"?K.slice(1):K:K+"")},P=w.prototype;p(P,{append:function(K,Q){O(arguments.length,2);var A=H(this);A.entries.push({key:K+"",value:Q+""}),A.updateURL()},delete:function(R){O(arguments.length,1);for(var K=H(this),Q=K.entries,A=R+"",x=0;x<Q.length;)Q[x].key===A?Q.splice(x,1):x++;K.updateURL()},get:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=0;x<Q.length;x++)if(Q[x].key===A)return Q[x].value;return null},getAll:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=[],B=0;B<Q.length;B++)Q[B].key===A&&x.push(Q[B].value);return x},has:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=0;x<Q.length;)if(Q[x++].key===A)return!0;return!1},set:function(K,Q){O(arguments.length,1);for(var A=H(this),x=A.entries,B=!1,Z=K+"",q=Q+"",te=0,se;te<x.length;te++)se=x[te],se.key===Z&&(B?x.splice(te--,1):(B=!0,se.value=q));B||x.push({key:Z,value:q}),A.updateURL()},sort:function(){var K=H(this),Q=K.entries,A=Q.slice(),x,B,Z;for(Q.length=0,Z=0;Z<A.length;Z++){for(x=A[Z],B=0;B<Z;B++)if(Q[B].key>x.key){Q.splice(B,0,x);break}B===Z&&Q.push(x)}K.updateURL()},forEach:function(K){for(var Q=H(this).entries,A=E(K,arguments.length>1?arguments[1]:void 0,3),x=0,B;x<Q.length;)B=Q[x++],A(B.value,B.key,this)},keys:function(){return new k(this,"keys")},values:function(){return new k(this,"values")},entries:function(){return new k(this,"entries")}},{enumerable:!0}),h(P,z,P.entries),h(P,"toString",function(){for(var K=H(this).entries,Q=[],A=0,x;A<K.length;)x=K[A++],Q.push(N(x.key)+"="+N(x.value));return Q.join("&")},{enumerable:!0}),m(w,U),d({global:!0,forced:!f},{URLSearchParams:w}),!f&&typeof W=="function"&&typeof Y=="function"&&d({global:!0,enumerable:!0,forced:!0},{fetch:function(K){var Q=[K],A,x,B;return arguments.length>1&&(A=arguments[1],_(A)&&(x=A.body,C(x)===U&&(B=A.headers?new Y(A.headers):new Y,B.has("content-type")||B.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),A=T(A,{body:D(0,String(x)),headers:D(0,B)}))),Q.push(A)),W.apply(this,Q)}}),s.exports={URLSearchParams:w,getState:H}}),285:(function(s,c,a){a(8783);var d=a(2109),u=a(9781),f=a(590),h=a(7854),p=a(6048),m=a(1320),g=a(5787),v=a(6656),y=a(1574),b=a(8457),E=a(8710).codeAt,C=a(3197),S=a(8003),_=a(1637),T=a(9909),D=h.URL,G=_.URLSearchParams,$=_.getState,j=T.set,W=T.getterFor("URL"),Y=Math.floor,z=Math.pow,U="Invalid authority",F="Invalid scheme",X="Invalid host",H="Invalid port",ee=/[A-Za-z]/,ne=/[\d+-.A-Za-z]/,ae=/\d/,pe=/^(0x|0X)/,me=/^[0-7]+$/,be=/^\d+$/,Ee=/^[\dA-Fa-f]+$/,Te=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ve=/[\u0000\t\u000A\u000D #/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,I,O=function(L,ie){var oe,le,fe;if(ie.charAt(0)=="["){if(ie.charAt(ie.length-1)!="]"||(oe=w(ie.slice(1,-1)),!oe))return X;L.host=oe}else if(q(L)){if(ie=C(ie),Te.test(ie)||(oe=k(ie),oe===null))return X;L.host=oe}else{if(ve.test(ie))return X;for(oe="",le=b(ie),fe=0;fe<le.length;fe++)oe+=B(le[fe],K);L.host=oe}},k=function(L){var ie=L.split("."),oe,le,fe,Me,ke,Ke,ot;if(ie.length&&ie[ie.length-1]==""&&ie.pop(),oe=ie.length,oe>4)return L;for(le=[],fe=0;fe<oe;fe++){if(Me=ie[fe],Me=="")return L;if(ke=10,Me.length>1&&Me.charAt(0)=="0"&&(ke=pe.test(Me)?16:8,Me=Me.slice(ke==8?1:2)),Me==="")Ke=0;else{if(!(ke==10?be:ke==8?me:Ee).test(Me))return L;Ke=parseInt(Me,ke)}le.push(Ke)}for(fe=0;fe<oe;fe++)if(Ke=le[fe],fe==oe-1){if(Ke>=z(256,5-oe))return null}else if(Ke>255)return null;for(ot=le.pop(),fe=0;fe<le.length;fe++)ot+=le[fe]*z(256,3-fe);return ot},w=function(L){var ie=[0,0,0,0,0,0,0,0],oe=0,le=null,fe=0,Me,ke,Ke,ot,ht,gn,ue,Et=function(){return L.charAt(fe)};if(Et()==":"){if(L.charAt(1)!=":")return;fe+=2,oe++,le=oe}for(;Et();){if(oe==8)return;if(Et()==":"){if(le!==null)return;fe++,oe++,le=oe;continue}for(Me=ke=0;ke<4&&Ee.test(Et());)Me=Me*16+parseInt(Et(),16),fe++,ke++;if(Et()=="."){if(ke==0||(fe-=ke,oe>6))return;for(Ke=0;Et();){if(ot=null,Ke>0)if(Et()=="."&&Ke<4)fe++;else return;if(!ae.test(Et()))return;for(;ae.test(Et());){if(ht=parseInt(Et(),10),ot===null)ot=ht;else{if(ot==0)return;ot=ot*10+ht}if(ot>255)return;fe++}ie[oe]=ie[oe]*256+ot,Ke++,(Ke==2||Ke==4)&&oe++}if(Ke!=4)return;break}else if(Et()==":"){if(fe++,!Et())return}else if(Et())return;ie[oe++]=Me}if(le!==null)for(gn=oe-le,oe=7;oe!=0&&gn>0;)ue=ie[oe],ie[oe--]=ie[le+gn-1],ie[le+--gn]=ue;else if(oe!=8)return;return ie},P=function(L){for(var ie=null,oe=1,le=null,fe=0,Me=0;Me<8;Me++)L[Me]!==0?(fe>oe&&(ie=le,oe=fe),le=null,fe=0):(le===null&&(le=Me),++fe);return fe>oe&&(ie=le,oe=fe),ie},R=function(L){var ie,oe,le,fe;if(typeof L=="number"){for(ie=[],oe=0;oe<4;oe++)ie.unshift(L%256),L=Y(L/256);return ie.join(".")}else if(typeof L=="object"){for(ie="",le=P(L),oe=0;oe<8;oe++)fe&&L[oe]===0||(fe&&(fe=!1),le===oe?(ie+=oe?":":"::",fe=!0):(ie+=L[oe].toString(16),oe<7&&(ie+=":")));return"["+ie+"]"}return L},K={},Q=y({},K,{" ":1,'"':1,"<":1,">":1,"`":1}),A=y({},Q,{"#":1,"?":1,"{":1,"}":1}),x=y({},A,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),B=function(L,ie){var oe=E(L,0);return oe>32&&oe<127&&!v(ie,L)?L:encodeURIComponent(L)},Z={ftp:21,file:null,http:80,https:443,ws:80,wss:443},q=function(L){return v(Z,L.scheme)},te=function(L){return L.username!=""||L.password!=""},se=function(L){return!L.host||L.cannotBeABaseURL||L.scheme=="file"},J=function(L,ie){var oe;return L.length==2&&ee.test(L.charAt(0))&&((oe=L.charAt(1))==":"||!ie&&oe=="|")},re=function(L){var ie;return L.length>1&&J(L.slice(0,2))&&(L.length==2||(ie=L.charAt(2))==="/"||ie==="\\"||ie==="?"||ie==="#")},Se=function(L){var ie=L.path,oe=ie.length;oe&&(L.scheme!="file"||oe!=1||!J(ie[0],!0))&&ie.pop()},_e=function(L){return L==="."||L.toLowerCase()==="%2e"},Oe=function(L){return L=L.toLowerCase(),L===".."||L==="%2e."||L===".%2e"||L==="%2e%2e"},nt={},pt={},rt={},Qr={},Tn={},Xe={},$e={},ft={},tn={},Po={},Zr={},Jr={},pn={},dr={},Ai={},Ch={},xi={},jn={},p3={},Bo={},ur={},Wn=function(L,ie,oe,le){var fe=oe||nt,Me=0,ke="",Ke=!1,ot=!1,ht=!1,gn,ue,Et,fr;for(oe||(L.scheme="",L.username="",L.password="",L.host=null,L.port=null,L.path=[],L.query=null,L.fragment=null,L.cannotBeABaseURL=!1,ie=ie.replace(N,"")),ie=ie.replace(M,""),gn=b(ie);Me<=gn.length;){switch(ue=gn[Me],fe){case nt:if(ue&&ee.test(ue))ke+=ue.toLowerCase(),fe=pt;else{if(oe)return F;fe=rt;continue}break;case pt:if(ue&&(ne.test(ue)||ue=="+"||ue=="-"||ue=="."))ke+=ue.toLowerCase();else if(ue==":"){if(oe&&(q(L)!=v(Z,ke)||ke=="file"&&(te(L)||L.port!==null)||L.scheme=="file"&&!L.host))return;if(L.scheme=ke,oe){q(L)&&Z[L.scheme]==L.port&&(L.port=null);return}ke="",L.scheme=="file"?fe=dr:q(L)&&le&&le.scheme==L.scheme?fe=Qr:q(L)?fe=ft:gn[Me+1]=="/"?(fe=Tn,Me++):(L.cannotBeABaseURL=!0,L.path.push(""),fe=p3)}else{if(oe)return F;ke="",fe=rt,Me=0;continue}break;case rt:if(!le||le.cannotBeABaseURL&&ue!="#")return F;if(le.cannotBeABaseURL&&ue=="#"){L.scheme=le.scheme,L.path=le.path.slice(),L.query=le.query,L.fragment="",L.cannotBeABaseURL=!0,fe=ur;break}fe=le.scheme=="file"?dr:Xe;continue;case Qr:if(ue=="/"&&gn[Me+1]=="/")fe=tn,Me++;else{fe=Xe;continue}break;case Tn:if(ue=="/"){fe=Po;break}else{fe=jn;continue}case Xe:if(L.scheme=le.scheme,ue==I)L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query=le.query;else if(ue=="/"||ue=="\\"&&q(L))fe=$e;else if(ue=="?")L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query="",fe=Bo;else if(ue=="#")L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query=le.query,L.fragment="",fe=ur;else{L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.path.pop(),fe=jn;continue}break;case $e:if(q(L)&&(ue=="/"||ue=="\\"))fe=tn;else if(ue=="/")fe=Po;else{L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,fe=jn;continue}break;case ft:if(fe=tn,ue!="/"||ke.charAt(Me+1)!="/")continue;Me++;break;case tn:if(ue!="/"&&ue!="\\"){fe=Po;continue}break;case Po:if(ue=="@"){Ke&&(ke="%40"+ke),Ke=!0,Et=b(ke);for(var kh=0;kh<Et.length;kh++){var I3=Et[kh];if(I3==":"&&!ht){ht=!0;continue}var _3=B(I3,x);ht?L.password+=_3:L.username+=_3}ke=""}else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)){if(Ke&&ke=="")return U;Me-=b(ke).length+1,ke="",fe=Zr}else ke+=ue;break;case Zr:case Jr:if(oe&&L.scheme=="file"){fe=Ch;continue}else if(ue==":"&&!ot){if(ke=="")return X;if(fr=O(L,ke),fr)return fr;if(ke="",fe=pn,oe==Jr)return}else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)){if(q(L)&&ke=="")return X;if(oe&&ke==""&&(te(L)||L.port!==null))return;if(fr=O(L,ke),fr)return fr;if(ke="",fe=xi,oe)return;continue}else ue=="["?ot=!0:ue=="]"&&(ot=!1),ke+=ue;break;case pn:if(ae.test(ue))ke+=ue;else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)||oe){if(ke!=""){var wh=parseInt(ke,10);if(wh>65535)return H;L.port=q(L)&&wh===Z[L.scheme]?null:wh,ke=""}if(oe)return;fe=xi;continue}else return H;break;case dr:if(L.scheme="file",ue=="/"||ue=="\\")fe=Ai;else if(le&&le.scheme=="file")if(ue==I)L.host=le.host,L.path=le.path.slice(),L.query=le.query;else if(ue=="?")L.host=le.host,L.path=le.path.slice(),L.query="",fe=Bo;else if(ue=="#")L.host=le.host,L.path=le.path.slice(),L.query=le.query,L.fragment="",fe=ur;else{re(gn.slice(Me).join(""))||(L.host=le.host,L.path=le.path.slice(),Se(L)),fe=jn;continue}else{fe=jn;continue}break;case Ai:if(ue=="/"||ue=="\\"){fe=Ch;break}le&&le.scheme=="file"&&!re(gn.slice(Me).join(""))&&(J(le.path[0],!0)?L.path.push(le.path[0]):L.host=le.host),fe=jn;continue;case Ch:if(ue==I||ue=="/"||ue=="\\"||ue=="?"||ue=="#"){if(!oe&&J(ke))fe=jn;else if(ke==""){if(L.host="",oe)return;fe=xi}else{if(fr=O(L,ke),fr)return fr;if(L.host=="localhost"&&(L.host=""),oe)return;ke="",fe=xi}continue}else ke+=ue;break;case xi:if(q(L)){if(fe=jn,ue!="/"&&ue!="\\")continue}else if(!oe&&ue=="?")L.query="",fe=Bo;else if(!oe&&ue=="#")L.fragment="",fe=ur;else if(ue!=I&&(fe=jn,ue!="/"))continue;break;case jn:if(ue==I||ue=="/"||ue=="\\"&&q(L)||!oe&&(ue=="?"||ue=="#")){if(Oe(ke)?(Se(L),ue!="/"&&!(ue=="\\"&&q(L))&&L.path.push("")):_e(ke)?ue!="/"&&!(ue=="\\"&&q(L))&&L.path.push(""):(L.scheme=="file"&&!L.path.length&&J(ke)&&(L.host&&(L.host=""),ke=ke.charAt(0)+":"),L.path.push(ke)),ke="",L.scheme=="file"&&(ue==I||ue=="?"||ue=="#"))for(;L.path.length>1&&L.path[0]==="";)L.path.shift();ue=="?"?(L.query="",fe=Bo):ue=="#"&&(L.fragment="",fe=ur)}else ke+=B(ue,A);break;case p3:ue=="?"?(L.query="",fe=Bo):ue=="#"?(L.fragment="",fe=ur):ue!=I&&(L.path[0]+=B(ue,K));break;case Bo:!oe&&ue=="#"?(L.fragment="",fe=ur):ue!=I&&(ue=="'"&&q(L)?L.query+="%27":ue=="#"?L.query+="%23":L.query+=B(ue,K));break;case ur:ue!=I&&(L.fragment+=B(ue,Q));break}Me++}},Ro=function(ie){var oe=g(this,Ro,"URL"),le=arguments.length>1?arguments[1]:void 0,fe=String(ie),Me=j(oe,{type:"URL"}),ke,Ke;if(le!==void 0){if(le instanceof Ro)ke=W(le);else if(Ke=Wn(ke={},String(le)),Ke)throw TypeError(Ke)}if(Ke=Wn(Me,fe,null,ke),Ke)throw TypeError(Ke);var ot=Me.searchParams=new G,ht=$(ot);ht.updateSearchParams(Me.query),ht.updateURL=function(){Me.query=String(ot)||null},u||(oe.href=kc.call(oe),oe.origin=m3.call(oe),oe.protocol=g3.call(oe),oe.username=v3.call(oe),oe.password=y3.call(oe),oe.host=b3.call(oe),oe.hostname=C3.call(oe),oe.port=E3.call(oe),oe.pathname=k3.call(oe),oe.search=w3.call(oe),oe.searchParams=S3.call(oe),oe.hash=A3.call(oe))},Eh=Ro.prototype,kc=function(){var L=W(this),ie=L.scheme,oe=L.username,le=L.password,fe=L.host,Me=L.port,ke=L.path,Ke=L.query,ot=L.fragment,ht=ie+":";return fe!==null?(ht+="//",te(L)&&(ht+=oe+(le?":"+le:"")+"@"),ht+=R(fe),Me!==null&&(ht+=":"+Me)):ie=="file"&&(ht+="//"),ht+=L.cannotBeABaseURL?ke[0]:ke.length?"/"+ke.join("/"):"",Ke!==null&&(ht+="?"+Ke),ot!==null&&(ht+="#"+ot),ht},m3=function(){var L=W(this),ie=L.scheme,oe=L.port;if(ie=="blob")try{return new URL(ie.path[0]).origin}catch{return"null"}return ie=="file"||!q(L)?"null":ie+"://"+R(L.host)+(oe!==null?":"+oe:"")},g3=function(){return W(this).scheme+":"},v3=function(){return W(this).username},y3=function(){return W(this).password},b3=function(){var L=W(this),ie=L.host,oe=L.port;return ie===null?"":oe===null?R(ie):R(ie)+":"+oe},C3=function(){var L=W(this).host;return L===null?"":R(L)},E3=function(){var L=W(this).port;return L===null?"":String(L)},k3=function(){var L=W(this),ie=L.path;return L.cannotBeABaseURL?ie[0]:ie.length?"/"+ie.join("/"):""},w3=function(){var L=W(this).query;return L?"?"+L:""},S3=function(){return W(this).searchParams},A3=function(){var L=W(this).fragment;return L?"#"+L:""},mn=function(L,ie){return{get:L,set:ie,configurable:!0,enumerable:!0}};if(u&&p(Eh,{href:mn(kc,function(L){var ie=W(this),oe=String(L),le=Wn(ie,oe);if(le)throw TypeError(le);$(ie.searchParams).updateSearchParams(ie.query)}),origin:mn(m3),protocol:mn(g3,function(L){var ie=W(this);Wn(ie,String(L)+":",nt)}),username:mn(v3,function(L){var ie=W(this),oe=b(String(L));if(!se(ie)){ie.username="";for(var le=0;le<oe.length;le++)ie.username+=B(oe[le],x)}}),password:mn(y3,function(L){var ie=W(this),oe=b(String(L));if(!se(ie)){ie.password="";for(var le=0;le<oe.length;le++)ie.password+=B(oe[le],x)}}),host:mn(b3,function(L){var ie=W(this);ie.cannotBeABaseURL||Wn(ie,String(L),Zr)}),hostname:mn(C3,function(L){var ie=W(this);ie.cannotBeABaseURL||Wn(ie,String(L),Jr)}),port:mn(E3,function(L){var ie=W(this);se(ie)||(L=String(L),L==""?ie.port=null:Wn(ie,L,pn))}),pathname:mn(k3,function(L){var ie=W(this);ie.cannotBeABaseURL||(ie.path=[],Wn(ie,L+"",xi))}),search:mn(w3,function(L){var ie=W(this);L=String(L),L==""?ie.query=null:(L.charAt(0)=="?"&&(L=L.slice(1)),ie.query="",Wn(ie,L,Bo)),$(ie.searchParams).updateSearchParams(ie.query)}),searchParams:mn(S3),hash:mn(A3,function(L){var ie=W(this);if(L=String(L),L==""){ie.fragment=null;return}L.charAt(0)=="#"&&(L=L.slice(1)),ie.fragment="",Wn(ie,L,ur)})}),m(Eh,"toJSON",function(){return kc.call(this)},{enumerable:!0}),m(Eh,"toString",function(){return kc.call(this)},{enumerable:!0}),D){var x3=D.createObjectURL,T3=D.revokeObjectURL;x3&&m(Ro,"createObjectURL",function(ie){return x3.apply(D,arguments)}),T3&&m(Ro,"revokeObjectURL",function(ie){return T3.apply(D,arguments)})}S(Ro,"URL"),d({global:!0,forced:!f,sham:!u},{URL:Ro})})},r={};function o(s){if(r[s])return r[s].exports;var c=r[s]={exports:{}};return n[s](c,c.exports,o),c.exports}(function(){o.d=function(s,c){for(var a in c)o.o(c,a)&&!o.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:c[a]})}})(),(function(){o.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){o.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)}})(),(function(){o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}})();var i={};return(function(){o.r(i),o.d(i,{Dropzone:function(){return H},default:function(){return ve}}),o(2222),o(7327),o(2772),o(6992),o(1249),o(7042),o(561),o(8264),o(8309),o(489),o(1539),o(4916),o(9714),o(8783),o(4723),o(5306),o(3123),o(3210),o(2472),o(2990),o(8927),o(3105),o(5035),o(4345),o(7174),o(2846),o(4731),o(7209),o(6319),o(8867),o(7789),o(3739),o(9368),o(4483),o(2056),o(3462),o(678),o(7462),o(3824),o(5021),o(2974),o(5016),o(4747),o(3948),o(285);function s(N,M){var I;if(typeof Symbol>"u"||N[Symbol.iterator]==null){if(Array.isArray(N)||(I=c(N))||N&&typeof N.length=="number"){I&&(N=I);var O=0,k=function(){};return{s:k,n:function(){return O>=N.length?{done:!0}:{done:!1,value:N[O++]}},e:function(Q){throw Q},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1174
+ `,Xk={root:function(e){var n=e.instance,r=e.props;return["p-splitbutton p-component",{"p-splitbutton-raised":r.raised,"p-splitbutton-rounded":r.rounded,"p-splitbutton-fluid":n.hasFluid}]},pcButton:"p-splitbutton-button",pcDropdown:"p-splitbutton-dropdown"},qk=lt.extend({name:"splitbutton",style:Jk,classes:Xk}),Vk={name:"BaseSplitButton",extends:Wo,props:{label:{type:String,default:null},icon:{type:String,default:null},model:{type:Array,default:null},autoZIndex:{type:Boolean,default:!0},baseZIndex:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},disabled:{type:Boolean,default:!1},fluid:{type:Boolean,default:null},class:{type:null,default:null},style:{type:null,default:null},buttonProps:{type:null,default:null},menuButtonProps:{type:null,default:null},menuButtonIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},severity:{type:String,default:null},raised:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},text:{type:Boolean,default:!1},outlined:{type:Boolean,default:!1},size:{type:String,default:null},plain:{type:Boolean,default:!1}},style:qk,provide:function(){return{$pcSplitButton:this,$parentInstance:this}}},Sm={name:"SplitButton",extends:Vk,inheritAttrs:!1,emits:["click"],inject:{$pcFluid:{default:null}},data:function(){return{isExpanded:!1}},mounted:function(){var e=this;this.$watch("$refs.menu.visible",function(n){e.isExpanded=n})},methods:{onDropdownButtonClick:function(e){e&&e.preventDefault(),this.$refs.menu.toggle({currentTarget:this.$el,relatedTarget:this.$refs.button.$el}),this.isExpanded=this.$refs.menu.visible},onDropdownKeydown:function(e){(e.code==="ArrowDown"||e.code==="ArrowUp")&&(this.onDropdownButtonClick(),e.preventDefault())},onDefaultButtonClick:function(e){this.isExpanded&&this.$refs.menu.hide(e),this.$emit("click",e)}},computed:{containerClass:function(){return[this.cx("root"),this.class]},hasFluid:function(){return Cn(this.fluid)?!!this.$pcFluid:this.fluid}},components:{PVSButton:bm,PVSMenu:wm,ChevronDownIcon:dm}},ew=["data-p-severity"];function tw(t,e,n,r,o,i){var s=l.resolveComponent("PVSButton"),c=l.resolveComponent("PVSMenu");return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:i.containerClass,style:t.style},t.ptmi("root"),{"data-p-severity":t.severity}),[l.createVNode(s,l.mergeProps({type:"button",class:t.cx("pcButton"),label:t.label,disabled:t.disabled,severity:t.severity,text:t.text,icon:t.icon,outlined:t.outlined,size:t.size,fluid:t.fluid,"aria-label":t.label,onClick:i.onDefaultButtonClick},t.buttonProps,{pt:t.ptm("pcButton"),unstyled:t.unstyled}),l.createSlots({default:l.withCtx(function(){return[l.renderSlot(t.$slots,"default")]}),_:2},[t.$slots.icon?{name:"icon",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"icon",{class:l.normalizeClass(a.class)},function(){return[l.createElementVNode("span",l.mergeProps({class:[t.icon,a.class]},t.ptm("pcButton").icon,{"data-pc-section":"buttonicon"}),null,16)]})]}),key:"0"}:void 0]),1040,["class","label","disabled","severity","text","icon","outlined","size","fluid","aria-label","onClick","pt","unstyled"]),l.createVNode(s,l.mergeProps({ref:"button",type:"button",class:t.cx("pcDropdown"),disabled:t.disabled,"aria-haspopup":"true","aria-expanded":o.isExpanded,"aria-controls":o.isExpanded?t.$id+"_overlay":void 0,onClick:i.onDropdownButtonClick,onKeydown:i.onDropdownKeydown,severity:t.severity,text:t.text,outlined:t.outlined,size:t.size,unstyled:t.unstyled},t.menuButtonProps,{pt:t.ptm("pcDropdown")}),{icon:l.withCtx(function(a){return[l.renderSlot(t.$slots,t.$slots.dropdownicon?"dropdownicon":"menubuttonicon",{class:l.normalizeClass(a.class)},function(){return[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(t.menuButtonIcon||t.dropdownIcon?"span":"ChevronDownIcon"),l.mergeProps({class:[t.dropdownIcon||t.menuButtonIcon,a.class]},t.ptm("pcDropdown").icon,{"data-pc-section":"menubuttonicon"}),null,16,["class"]))]})]}),_:3},16,["class","disabled","aria-expanded","aria-controls","onClick","onKeydown","severity","text","outlined","size","unstyled","pt"]),l.createVNode(c,{ref:"menu",id:t.$id+"_overlay",model:t.model,popup:!0,autoZIndex:t.autoZIndex,baseZIndex:t.baseZIndex,appendTo:t.appendTo,unstyled:t.unstyled,pt:t.ptm("pcMenu")},l.createSlots({_:2},[t.$slots.menuitemicon?{name:"itemicon",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"menuitemicon",{item:a.item,class:l.normalizeClass(a.class)})]}),key:"0"}:void 0,t.$slots.item?{name:"item",fn:l.withCtx(function(a){return[l.renderSlot(t.$slots,"item",{item:a.item,hasSubmenu:a.hasSubmenu,label:a.label,props:a.props})]}),key:"1"}:void 0]),1032,["id","model","autoZIndex","baseZIndex","appendTo","unstyled","pt"])],16,ew)}Sm.render=tw;const nw=["src"],rw={class:"menu-item"},ow=["src"],Am={__name:"BDContentLibrarySplitButton",props:{contentLibraryProviders:{type:Array,default:()=>[]},isExternalOnly:{type:Boolean,default:!1}},emits:["content-library"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=l.computed(()=>r.contentLibraryProviders.map(f=>({label:f.label,image:f.img,value:f.value,command:()=>o("content-library",f.value)}))),s=l.computed(()=>{let f=i.value;return f.length!==0&&r.isExternalOnly&&(f=f.slice(1)),f}),c=l.computed(()=>{const f=i.value;return r.isExternalOnly&&f.length>0?f[0].label:n("contentLibrarySplitButton.messageTemplatesTitle")}),a=l.computed(()=>{const f=i.value;return r.isExternalOnly&&f.length>0}),d=l.computed(()=>{const f=i.value;return f.length>0?f[0].image:""}),u=()=>{const f=i.value;let h="message-template";r.isExternalOnly&&f.length>0&&(h=f[0].value),o("content-library",h)};return(f,h)=>(l.openBlock(),l.createBlock(l.unref(Sm),{class:"bd-content-library-split-button",model:s.value,outlined:"",severity:"secondary",onClick:u},{default:l.withCtx(()=>[a.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:d.value,alt:""},null,8,nw)):(l.openBlock(),l.createBlock(Mc,{key:1})),l.createElementVNode("span",null,l.toDisplayString(c.value),1)]),item:l.withCtx(({item:p})=>[l.createElementVNode("div",rw,[l.createElementVNode("img",{src:p.image,alt:"",class:"icon-image"},null,8,ow),l.createElementVNode("span",null,l.toDisplayString(p.label),1)])]),_:1},8,["model"]))}},iw={class:"invalid-feedback bd-invalid-feedback"},xa=l.defineComponent({__name:"BDFormInvalidFeedback",props:{state:{type:[Boolean,null],default:null},text:{default:""}},setup(t){const e=t;return(n,r)=>(l.openBlock(),l.createElementBlock("div",iw,[e.state?(l.openBlock(),l.createBlock(l.unref($o),{key:0})):(l.openBlock(),l.createBlock(l.unref(na),{key:1})),l.createTextVNode(" "+l.toDisplayString(e.text),1)]))}});var sw=Object.defineProperty,aw=(t,e,n)=>e in t?sw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vi=(t,e,n)=>aw(t,typeof e!="symbol"?e+"":e,n);const xm={"#":{pattern:/[0-9]/},"@":{pattern:/[a-zA-Z]/},"*":{pattern:/[a-zA-Z0-9]/}},Tm=(t,e,n)=>t.replaceAll(e,"").replace(n,".").replace("..",".").replace(/[^.\d]/g,""),Im=(t,e,n)=>{var r;return new Intl.NumberFormat(((r=n.number)==null?void 0:r.locale)??"en",{minimumFractionDigits:t,maximumFractionDigits:e,roundingMode:"trunc"})},lw=(t,e=!0,n)=>{var r,o,i,s;const c=((r=n.number)==null?void 0:r.unsigned)!==!0&&t.startsWith("-")?"-":"",a=((o=n.number)==null?void 0:o.fraction)??0;let d=Im(0,a,n);const u=d.formatToParts(1000.12),f=((i=u.find(v=>v.type==="group"))==null?void 0:i.value)??" ",h=((s=u.find(v=>v.type==="decimal"))==null?void 0:s.value)??".",p=Tm(t,f,h);if(Number.isNaN(parseFloat(p)))return c;const m=p.split(".");if(m[1]!=null&&m[1].length>=1){const v=m[1].length<=a?m[1].length:a;d=Im(v,a,n)}let g=d.format(parseFloat(p));return e?a>0&&p.endsWith(".")&&!p.slice(0,-1).includes(".")&&(g+=h):g=Tm(g,f,h),c+g},_m=t=>JSON.parse(t.replaceAll("'",'"')),cw=(t,e={})=>{const n={...e};t.dataset.maska!=null&&t.dataset.maska!==""&&(n.mask=dw(t.dataset.maska)),t.dataset.maskaEager!=null&&(n.eager=Ta(t.dataset.maskaEager)),t.dataset.maskaReversed!=null&&(n.reversed=Ta(t.dataset.maskaReversed)),t.dataset.maskaTokensReplace!=null&&(n.tokensReplace=Ta(t.dataset.maskaTokensReplace)),t.dataset.maskaTokens!=null&&(n.tokens=uw(t.dataset.maskaTokens));const r={};return t.dataset.maskaNumberLocale!=null&&(r.locale=t.dataset.maskaNumberLocale),t.dataset.maskaNumberFraction!=null&&(r.fraction=parseInt(t.dataset.maskaNumberFraction)),t.dataset.maskaNumberUnsigned!=null&&(r.unsigned=Ta(t.dataset.maskaNumberUnsigned)),(t.dataset.maskaNumber!=null||Object.values(r).length>0)&&(n.number=r),n},Ta=t=>t!==""?!!JSON.parse(t):!0,dw=t=>t.startsWith("[")&&t.endsWith("]")?_m(t):t,uw=t=>{if(t.startsWith("{")&&t.endsWith("}"))return _m(t);const e={};return t.split("|").forEach(n=>{const r=n.split(":");e[r[0]]={pattern:Nm()?new RegExp(r[1],"u"):new RegExp(r[1]),optional:r[2]==="optional",multiple:r[2]==="multiple",repeated:r[2]==="repeated"}}),e},Nm=()=>{try{return new RegExp("\\p{L}","u"),!0}catch{return!1}};class fw{constructor(e={}){Vi(this,"opts",{}),Vi(this,"memo",new Map);const n={...e};if(n.tokens!=null){n.tokens=n.tokensReplace?{...n.tokens}:{...xm,...n.tokens};for(const r of Object.values(n.tokens))typeof r.pattern=="string"&&(r.pattern=Nm()?new RegExp(r.pattern,"u"):new RegExp(r.pattern))}else n.tokens=xm;Array.isArray(n.mask)&&(n.mask.length>1?n.mask=[...n.mask].sort((r,o)=>r.length-o.length):n.mask=n.mask[0]??""),n.mask===""&&(n.mask=null),this.opts=n}masked(e){return this.process(String(e),this.findMask(String(e)))}unmasked(e){return this.process(String(e),this.findMask(String(e)),!1)}isEager(){return this.opts.eager===!0}isReversed(){return this.opts.reversed===!0}completed(e){const n=this.findMask(String(e));if(this.opts.mask==null||n==null)return!1;const r=this.process(String(e),n).length;return typeof this.opts.mask=="string"?r>=this.opts.mask.length:r>=n.length}findMask(e){const n=this.opts.mask;if(n==null)return null;if(typeof n=="string")return n;if(typeof n=="function")return n(e);const r=this.process(e,n.slice(-1).pop()??"",!1);return n.find(o=>this.process(e,o,!1).length>=r.length)??""}escapeMask(e){const n=[],r=[];return e.split("").forEach((o,i)=>{o==="!"&&e[i-1]!=="!"?r.push(i-r.length):n.push(o)}),{mask:n.join(""),escaped:r}}process(e,n,r=!0){if(this.opts.number!=null)return lw(e,r,this.opts);if(n==null)return e;const o=`v=${e},mr=${n},m=${r?1:0}`;if(this.memo.has(o))return this.memo.get(o);const{mask:i,escaped:s}=this.escapeMask(n),c=[],a=this.opts.tokens!=null?this.opts.tokens:{},d=this.isReversed()?-1:1,u=this.isReversed()?"unshift":"push",f=this.isReversed()?0:i.length-1,h=this.isReversed()?()=>v>-1&&y>-1:()=>v<i.length&&y<e.length,p=E=>!this.isReversed()&&E<=f||this.isReversed()&&E>=f;let m,g=-1,v=this.isReversed()?i.length-1:0,y=this.isReversed()?e.length-1:0,b=!1;for(;h();){const E=i.charAt(v),C=a[E],S=C?.transform!=null?C.transform(e.charAt(y)):e.charAt(y);if(!s.includes(v)&&C!=null?(S.match(C.pattern)!=null?(c[u](S),C.repeated?(g===-1?g=v:v===f&&v!==g&&(v=g-d),f===g&&(v-=d)):C.multiple&&(b=!0,v-=d),v+=d):C.multiple?b&&(v+=d,y-=d,b=!1):S===m?m=void 0:C.optional&&(v+=d,y-=d),y+=d):(r&&!this.isEager()&&c[u](E),S===E&&!this.isEager()?y+=d:m=E,this.isEager()||(v+=d)),this.isEager())for(;p(v)&&(a[i.charAt(v)]==null||s.includes(v));){if(r){if(c[u](i.charAt(v)),e.charAt(y)===i.charAt(v)){v+=d,y+=d;continue}}else i.charAt(v)===e.charAt(y)&&(y+=d);v+=d}}return this.memo.set(o,c.join("")),this.memo.get(o)}}let hw=class{constructor(e,n={}){Vi(this,"items",new Map),Vi(this,"eventAbortController"),Vi(this,"onInput",r=>{if(r instanceof CustomEvent&&r.type==="input"&&!r.isTrusted&&!r.bubbles)return;const o=r.target,i=this.items.get(o);if(i===void 0)return;const s="inputType"in r&&r.inputType.startsWith("delete"),c=i.isEager(),a=s&&c&&i.unmasked(o.value)===""?"":o.value;this.fixCursor(o,s,()=>this.setValue(o,a))}),this.options=n,this.eventAbortController=new AbortController,this.init(this.getInputs(e))}update(e={}){this.options={...e},this.init(Array.from(this.items.keys()))}updateValue(e){var n;e.value!==""&&e.value!==((n=this.processInput(e))==null?void 0:n.masked)&&this.setValue(e,e.value)}destroy(){this.eventAbortController.abort(),this.items.clear()}init(e){const n=this.getOptions(this.options);for(const r of e){if(!this.items.has(r)){const{signal:i}=this.eventAbortController;r.addEventListener("input",this.onInput,{capture:!0,signal:i})}const o=new fw(cw(r,n));this.items.set(r,o),queueMicrotask(()=>this.updateValue(r)),r.selectionStart===null&&o.isEager()&&console.warn("Maska: input of `%s` type is not supported",r.type)}}getInputs(e){return typeof e=="string"?Array.from(document.querySelectorAll(e)):"length"in e?Array.from(e):[e]}getOptions(e){const{onMaska:n,preProcess:r,postProcess:o,...i}=e;return i}fixCursor(e,n,r){var o,i;const s=e.selectionStart,c=e.value;if(r(),s===null||s===c.length&&!n)return;const a=e.value,d=c.slice(0,s),u=a.slice(0,s),f=(o=this.processInput(e,d))==null?void 0:o.unmasked,h=(i=this.processInput(e,u))==null?void 0:i.unmasked;if(f===void 0||h===void 0)return;let p=s;d!==u&&(p+=n?a.length-c.length:f.length-h.length),e.setSelectionRange(p,p)}setValue(e,n){const r=this.processInput(e,n);r!==void 0&&(e.value=r.masked,this.options.onMaska!=null&&(Array.isArray(this.options.onMaska)?this.options.onMaska.forEach(o=>o(r)):this.options.onMaska(r)),e.dispatchEvent(new CustomEvent("maska",{detail:r})),e.dispatchEvent(new CustomEvent("input",{detail:r.masked})))}processInput(e,n){const r=this.items.get(e);if(r===void 0)return;let o=n??e.value;this.options.preProcess!=null&&(o=this.options.preProcess(o));let i=r.masked(o);return this.options.postProcess!=null&&(i=this.options.postProcess(i)),{masked:i,unmasked:r.unmasked(o),completed:r.completed(o)}}};const Pd=new WeakMap,pw=(t,e)=>{if(t.arg==null||t.instance==null)return;const n="setup"in t.instance.$.type;t.arg in t.instance?t.instance[t.arg]=e:n&&console.warn("Maska: please expose `%s` using defineExpose",t.arg)},mw=(t,e)=>{var n;const r=t instanceof HTMLInputElement?t:t.querySelector("input");if(r==null||r?.type==="file")return;let o={};if(e.value!=null&&(o=typeof e.value=="string"?{mask:e.value}:{...e.value}),e.arg!=null){const i=s=>{const c=e.modifiers.unmasked?s.unmasked:e.modifiers.completed?s.completed:s.masked;pw(e,c)};o.onMaska=o.onMaska==null?i:Array.isArray(o.onMaska)?[...o.onMaska,i]:[o.onMaska,i]}Pd.has(r)?(n=Pd.get(r))==null||n.update(o):Pd.set(r,new hw(r,o))},gw=["value","type"],br=l.defineComponent({__name:"BDFormInput",props:{modelValue:{default:""},formGroupClass:{default:void 0},type:{default:"text"},label:{default:void 0},labelClass:{default:void 0},formFieldClass:{default:void 0},inputClass:{default:void 0},placeholder:{default:void 0},state:{type:[Boolean,null],default:null},readonly:{type:[Boolean,null],default:null},disabled:{type:[Boolean,null],default:null},autofocus:{type:[Boolean,null],default:null},size:{default:at.MD},tabindex:{default:null},invalidFeedbackClass:{default:void 0},invalidFeedbackText:{default:void 0},delayTimeMs:{default:0},mask:{default:void 0}},emits:["update:modelValue","click","blur","enter"],setup(t,{emit:e}){const n=t,r=e,{uniqueIdentifier:o}=Fo(),i=Vr(n,"modelValue",r),s=`__BD__FORM__LABEL__${o.value}`,c=`__BD__FORM__GROUP__${o.value}`,a=`form-input-${n.label?n.label.replace(/ /g,"-").toLowerCase():o.value}`,d=`validationFeedback${n.label?n.label.replace(/ /g,""):o.value}`,u=l.computed(()=>({[`${n.inputClass}`]:n.inputClass,"is-invalid":n.state===!1,"is-valid":n.state===!0,[`form-control-${n.size}`]:n.size})),f=l.computed(()=>({[`${n.invalidFeedbackClass}`]:n.invalidFeedbackClass,"is-invalid":n.state===!1})),h=l.computed(()=>({placeholder:n.placeholder?n.placeholder:null,readonly:n.readonly===!0,disabled:n.disabled===!0,autofocus:n.autofocus===!0,tabindex:n.tabindex?n.tabindex:null,"aria-describedby":n.state===!1&&n.invalidFeedbackText?d:null,"data-maska":n.mask})),p=r6(m=>{i.value=m.target.value},n.delayTimeMs);return(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-form-input",t.formGroupClass]),id:c},[l.renderSlot(m.$slots,"label",{},()=>[t.label?(l.openBlock(),l.createElementBlock("label",{key:0,for:a,id:s,class:l.normalizeClass(["form-label",t.labelClass])},l.toDisplayString(t.label),3)):l.createCommentVNode("",!0)]),l.createElementVNode("div",{class:l.normalizeClass(t.formFieldClass)},[l.withDirectives(l.createElementVNode("input",l.mergeProps({value:t.modelValue,type:t.type,id:a,class:["form-control",u.value]},h.value,{onInput:g[0]||(g[0]=(...v)=>l.unref(p)&&l.unref(p)(...v)),onClick:g[1]||(g[1]=v=>m.$emit("click")),onBlur:g[2]||(g[2]=v=>m.$emit("blur")),onKeydown:g[3]||(g[3]=l.withKeys(v=>m.$emit("enter"),["enter"]))}),null,16,gw),[[l.unref(mw)]]),l.renderSlot(m.$slots,"default")],2),l.createVNode(xa,{text:t.invalidFeedbackText,class:l.normalizeClass(f.value),state:t.state,id:d},null,8,["text","class","state"])],2))}}),vw={class:"input-group bd-input-group"},yw=["for"],es=l.defineComponent({__name:"BDInputGroup",props:{label:{default:void 0},labelForId:{default:void 0}},setup(t){const e=l.useAttrs(),n=t;return(r,o)=>(l.openBlock(),l.createElementBlock("fieldset",vw,[n.label?(l.openBlock(),l.createElementBlock("label",{key:0,for:n.labelForId,class:"form-label"},l.toDisplayString(n.label),9,yw)):l.createCommentVNode("",!0),l.createElementVNode("div",{class:l.normalizeClass(l.unref(e).class)},[l.renderSlot(r.$slots,"default")],2)]))}}),bw={key:0},Cw={key:1},Om=l.defineComponent({__name:"BDBadge",props:{variant:{default:ia.PRIMARY}},setup(t){const e=t,n=l.computed(()=>["badge","bd-badge",`bd-badge-${e.variant}`]);return(r,o)=>(l.openBlock(),l.createElementBlock("span",{role:"status",class:l.normalizeClass(n.value)},[t.variant==="danger"?(l.openBlock(),l.createElementBlock("span",bw,[l.createVNode(l.unref(pr))])):l.createCommentVNode("",!0),t.variant==="success"?(l.openBlock(),l.createElementBlock("span",Cw,[l.createVNode(l.unref($o))])):l.createCommentVNode("",!0),l.renderSlot(r.$slots,"default")],2))}}),Mm=l.defineComponent({__name:"BDForm",emits:["submit","reset"],setup(t,{emit:e}){const n=e;function r(){n("submit")}function o(){n("reset")}return(i,s)=>(l.openBlock(),l.createElementBlock("form",{onSubmit:l.withModifiers(r,["prevent"]),onReset:l.withModifiers(o,["prevent"])},[l.renderSlot(i.$slots,"default")],32))}}),Ew={"aria-label":"Page navigation",class:"bd-pagination"},kw={class:"page-item"},ww=["data-page"],Sw=["data-page"],Aw={class:"page-item"},xw=["data-page"],Bd=l.defineComponent({__name:"BDPagination",props:{modelValue:{default:1},totalRows:{default:1},rowsPerPage:{default:10},isPatient:{type:Boolean,default:!0}},emits:["click","update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=Vr(n,"modelValue",r),i=l.ref(Math.ceil(n.totalRows/n.rowsPerPage)),s=l.ref([]);l.watch([()=>n.totalRows,()=>n.rowsPerPage],()=>{i.value=Math.ceil(n.totalRows/n.rowsPerPage),s.value=f(o.value)}),l.onMounted(()=>{s.value=f(o.value)});const c=l.computed(()=>({[`${n.class}`]:n.class,colleague:!n.isPatient})),a=h=>{const p=h.currentTarget.getAttribute("data-page"),m=Number(p);isNaN(Number(m))||(o.value=m,s.value=f(m)),r("click",m)},d=(h,p,m)=>m<=p?m:h==1?6:h<=4?5:1,u=(h,p,m)=>m<=p?0:h==m?6:h>m-4?5:1,f=h=>{const p=[],g=d(h,7,i.value),v=i.value>7&&h>4,y=i.value>7&&h<i.value-3,b=v&&y,E=u(h,7,i.value);for(let C=1;C<=g;C++)p.push(C);if(v&&p.push("..."),b)for(let C=h-1;C<=h+1;C++)p.push(C);y&&p.push("...");for(let C=1;C<=E;C++)p.push(i.value-E+C);return p};return(h,p)=>(l.openBlock(),l.createElementBlock("div",Ew,[l.createElementVNode("ul",{class:l.normalizeClass(["pagination",c.value])},[l.withDirectives(l.createElementVNode("li",kw,[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Previous",onClick:a,"data-page":l.unref(o)-1},[l.createVNode(l.unref(Nc))],8,ww)],512),[[l.vShow,l.unref(o)>1]]),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,m=>(l.openBlock(),l.createElementBlock("li",{class:l.normalizeClass(["page-item",{active:l.unref(o)===m,disabled:typeof m=="string"}]),key:m},[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center",onClick:a,"data-page":m},l.toDisplayString(m),9,Sw)],2))),128)),l.withDirectives(l.createElementVNode("li",Aw,[l.createElementVNode("a",{class:"page-link d-flex justify-content-center align-items-center","aria-label":"Next",onClick:a,"data-page":l.unref(o)+1},[l.createVNode(l.unref(Oc))],8,xw)],512),[[l.vShow,l.unref(o)<i.value]])],2)]))}}),Tw=["disabled"],Iw=["label"],_w=["value"],Nw=["value"],Lm=l.defineComponent({__name:"BDFormSelect",props:{size:{default:at.MD},disabled:{type:Boolean},autofocus:{type:Boolean,default:!1},options:{default:void 0},modelValue:{default:""},state:{type:[Boolean,null],default:null}},emits:["update:modelValue","change","input"],setup(t,{emit:e}){const n=t,r=e,o=Vr(n,"modelValue",r),i=l.ref(null),{focused:s}=a6(i,{initialValue:n.autofocus}),c=l.computed(()=>({"form-select":!0,"bd-form-select":!0,"is-invalid":n.state===!1,[`form-select-${n.size}`]:["xs","sm","lg"].includes(n.size)}));l.watch(()=>n.autofocus,f=>{f&&(s.value=!0)});const a=f=>{o.value=f.target.value;let h=u(f.target.value);r("input",h)},d=f=>{let h=u(f.target.value);r("change",h)},u=f=>{try{return JSON.parse(f)}catch{return f}};return(f,h)=>l.withDirectives((l.openBlock(),l.createElementBlock("select",{class:l.normalizeClass(c.value),"onUpdate:modelValue":h[0]||(h[0]=p=>l.isRef(o)?o.value=p:null),disabled:n.disabled,ref_key:"input",ref:i,onInput:a,onChange:d},[l.renderSlot(f.$slots,"first"),n.options&&n.options.length>0&&n.options[0].label&&n.options[0].options?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(n.options,p=>(l.openBlock(),l.createElementBlock("optgroup",{label:p.label},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(p.options,m=>(l.openBlock(),l.createElementBlock("option",{value:JSON.stringify(m.value),key:m.value},l.toDisplayString(m.text),9,_w))),128))],8,Iw))),256)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:1},l.renderList(n.options,p=>(l.openBlock(),l.createElementBlock("option",{value:p.value,key:p.value},l.toDisplayString(p.text),9,Nw))),128))],42,Tw)),[[l.vModelSelect,l.unref(o)]])}}),Ow=["value","true-value","false-value","data-checked"],Cr=l.defineComponent({__name:"BDFormCheckbox",props:{modelValue:{type:[Boolean,String,Array],default:void 0},value:{type:[Boolean,String],default:!0},uncheckedValue:{type:[Boolean,String],default:!1},state:{type:[Boolean,null],default:void 0}},emits:["update:modelValue","change","input"],setup(t,{emit:e}){const{uniqueIdentifier:n}=Fo(),r=t,o=e,i=Vr(r,"modelValue",o),s=`form-check-input-${n.value}`,c=l.computed(()=>["form-check","bd-form-checkbox"]),a=l.computed(()=>({"form-check-input":!0,"is-invalid":r.state===!1})),d=u=>o("change",u.target.value);return(u,f)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(c.value)},[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":f[0]||(f[0]=h=>l.isRef(i)?i.value=h:null),id:s,class:l.normalizeClass(a.value),type:"checkbox",value:t.value,"true-value":t.value,"false-value":t.uncheckedValue,"data-checked":l.unref(i)===t.value,onChange:d},null,42,Ow),[[l.vModelCheckbox,l.unref(i)]]),l.createElementVNode("label",{class:"form-check-label",for:s},[l.renderSlot(u.$slots,"default")]),l.renderSlot(u.$slots,"last")],2))}}),Mw={key:0,class:"bd-article__body"},Lw={key:1},Dm=l.defineComponent({__name:"BDArticle",props:{title:{default:""},text:{default:""},hideBody:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},identifier:{}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,o=i=>r("click",{event:i,identifier:n.identifier});return(i,s)=>(l.openBlock(),l.createElementBlock("article",{class:"bd-article",onClick:o},[l.createElementVNode("header",null,[l.renderSlot(i.$slots,"header",{},()=>[l.createElementVNode("h5",null,l.toDisplayString(n.title),1)])]),n.hideBody?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Mw,[l.renderSlot(i.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.text),1)])])),n.hideFooter?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("footer",Lw,[l.renderSlot(i.$slots,"footer")]))]))}}),Ko={DANGER:"danger",WARNING:"warning",INFO:"info",SUCCESS:"success"},Dw=["id"],Pw={class:"toast-header"},Bw={class:"toast-body"},Rd=l.defineComponent({__name:"BDToast",props:{id:{},variant:{default:Ko.INFO},title:{default:""},text:{default:""}},setup(t){const e=t,n=l.computed(()=>({[`bd-toast-${e.variant}`]:!0})),r=l.computed(()=>e.variant!==Ko.SUCCESS);return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["toast bd-toast",n.value]),role:"alert","aria-live":"assertive","aria-atomic":"true",key:e.id,id:e.id},[l.createElementVNode("div",Pw,[r.value?(l.openBlock(),l.createBlock(l.unref(pr),{key:0})):(l.openBlock(),l.createBlock(l.unref($o),{key:1})),l.createElementVNode("h5",null,l.toDisplayString(e.title),1),i[0]||(i[0]=l.createElementVNode("button",{type:"button",class:"btn-close","data-bs-dismiss":"toast","aria-label":"Close"},null,-1))]),l.createElementVNode("div",Bw,[l.createElementVNode("span",null,l.toDisplayString(e.text),1)])],10,Dw))}}),_e="",Ia=t=>typeof t=="string"||t instanceof String,Rw={class:"bd-pill"},$w=["src"],Fw={class:"bd-pill__description"},zw=["href"],Uw=["id","textContent","title"],Hw=["id","textContent","title"],_a=l.defineComponent({__name:"BDPill",props:{imgSrc:{default:_e},uri:{default:_e},uriDisplayName:{default:_e},title:{default:_e},subtitle:{default:_e},showClose:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:e}){const{uniqueIdentifier:n}=Fo(),r=t,o=l.computed(()=>r.uri),i=l.computed(()=>r.uriDisplayName!==_e?r.uriDisplayName:r.uri),s=l.computed(()=>r.imgSrc),c=l.computed(()=>r.title),a=l.computed(()=>r.subtitle),d=l.computed(()=>`bd-pill-title-${n.value}`),u=l.computed(()=>`bd-pill-subtitle-${n.value}`);return(f,h)=>(l.openBlock(),l.createElementBlock("div",Rw,[l.createElementVNode("img",{src:s.value,class:"bd-pill__logo",alt:"logo-externe-partij"},null,8,$w),l.createElementVNode("div",Fw,[l.createElementVNode("a",{href:o.value,class:"bd-pill__link",target:"_blank",rel:"noopener noreferrer"},[l.createVNode(l.unref(ra),{class:"bd-pill__icon-hyperlink",style:{height:"12px"}}),l.createTextVNode(" "+l.toDisplayString(i.value),1)],8,zw),l.createElementVNode("span",{class:"bd-pill__title",id:d.value,textContent:l.toDisplayString(c.value),"data-bs-toggle":"tooltip",title:c.value},null,8,Uw),l.createElementVNode("span",{class:"bd-pill__subtitle",id:u.value,textContent:l.toDisplayString(a.value),"data-bs-toggle":"tooltip",title:a.value},null,8,Hw)])]))}});function jw(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]]);return n}function Ww(t,e,n,r){function o(i){return i instanceof n?i:new n(function(s){s(i)})}return new(n||(n=Promise))(function(i,s){function c(u){try{d(r.next(u))}catch(f){s(f)}}function a(u){try{d(r.throw(u))}catch(f){s(f)}}function d(u){u.done?i(u.value):o(u.value).then(c,a)}d((r=r.apply(t,e||[])).next())})}typeof SuppressedError=="function"&&SuppressedError;const Kw=t=>Array.isArray(t)&&t.length>0,Yw=t=>Object.keys(t).map(e=>t[e]),$d=t=>Array.isArray(t)&&t.length>0,Pm=t=>!t||Array.isArray(t)&&!t.length,Fd={name:"BDUserInformation",props:{value:{type:Object},showProfilePicture:{type:Boolean}},render(){const t=this.value,{name:e,profilePictureUri:n,extra:r}=t,o=jw(t,["name","profilePictureUri","extra"]),i=n&&this.showProfilePicture?l.h("img",{class:"bd-user-information__profile-picture",src:n,alt:e}):null;let c=[l.h("h4",null,e)];this.$slots.default&&c.push(this.$slots.default());const a=l.h("div",{class:"bd-user-information__header"},c),d=l.h("small",null,Yw(o).filter(f=>f).join(" • ")),u=l.h("div",{class:"bd-user-information__detail"},[a,d]);return l.h("div",{class:"bd-user-information"},[i,u])}},Bm={displayTime:!0,format:"numeric"};function Yo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Na={exports:{}},Gw=Na.exports,Rm;function $m(){return Rm||(Rm=1,(function(t,e){(function(n,r){t.exports=r()})(Gw,(function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",c="minute",a="hour",d="day",u="week",f="month",h="quarter",p="year",m="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(z){var U=["th","st","nd","rd"],F=z%100;return"["+z+(U[(F-20)%10]||U[F]||U[0])+"]"}},E=function(z,U,F){var X=String(z);return!X||X.length>=U?z:""+Array(U+1-X.length).join(F)+z},C={s:E,z:function(z){var U=-z.utcOffset(),F=Math.abs(U),X=Math.floor(F/60),H=F%60;return(U<=0?"+":"-")+E(X,2,"0")+":"+E(H,2,"0")},m:function z(U,F){if(U.date()<F.date())return-z(F,U);var X=12*(F.year()-U.year())+(F.month()-U.month()),H=U.clone().add(X,f),ee=F-H<0,ne=U.clone().add(X+(ee?-1:1),f);return+(-(X+(F-H)/(ee?H-ne:ne-H))||0)},a:function(z){return z<0?Math.ceil(z)||0:Math.floor(z)},p:function(z){return{M:f,y:p,w:u,d,D:m,h:a,m:c,s,ms:i,Q:h}[z]||String(z||"").toLowerCase().replace(/s$/,"")},u:function(z){return z===void 0}},S="en",_={};_[S]=b;var T="$isDayjsObject",D=function(z){return z instanceof W||!(!z||!z[T])},G=function z(U,F,X){var H;if(!U)return S;if(typeof U=="string"){var ee=U.toLowerCase();_[ee]&&(H=ee),F&&(_[ee]=F,H=ee);var ne=U.split("-");if(!H&&ne.length>1)return z(ne[0])}else{var ae=U.name;_[ae]=U,H=ae}return!X&&H&&(S=H),H||!X&&S},$=function(z,U){if(D(z))return z.clone();var F=typeof U=="object"?U:{};return F.date=z,F.args=arguments,new W(F)},j=C;j.l=G,j.i=D,j.w=function(z,U){return $(z,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var W=(function(){function z(F){this.$L=G(F.locale,null,!0),this.parse(F),this.$x=this.$x||F.x||{},this[T]=!0}var U=z.prototype;return U.parse=function(F){this.$d=(function(X){var H=X.date,ee=X.utc;if(H===null)return new Date(NaN);if(j.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var ne=H.match(v);if(ne){var ae=ne[2]-1||0,pe=(ne[7]||"0").substring(0,3);return ee?new Date(Date.UTC(ne[1],ae,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,pe)):new Date(ne[1],ae,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,pe)}}return new Date(H)})(F),this.init()},U.init=function(){var F=this.$d;this.$y=F.getFullYear(),this.$M=F.getMonth(),this.$D=F.getDate(),this.$W=F.getDay(),this.$H=F.getHours(),this.$m=F.getMinutes(),this.$s=F.getSeconds(),this.$ms=F.getMilliseconds()},U.$utils=function(){return j},U.isValid=function(){return this.$d.toString()!==g},U.isSame=function(F,X){var H=$(F);return this.startOf(X)<=H&&H<=this.endOf(X)},U.isAfter=function(F,X){return $(F)<this.startOf(X)},U.isBefore=function(F,X){return this.endOf(X)<$(F)},U.$g=function(F,X,H){return j.u(F)?this[X]:this.set(H,F)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(F,X){var H=this,ee=!!j.u(X)||X,ne=j.p(F),ae=function(M,I){var O=j.w(H.$u?Date.UTC(H.$y,I,M):new Date(H.$y,I,M),H);return ee?O:O.endOf(d)},pe=function(M,I){return j.w(H.toDate()[M].apply(H.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(I)),H)},me=this.$W,be=this.$M,Ee=this.$D,Te="set"+(this.$u?"UTC":"");switch(ne){case p:return ee?ae(1,0):ae(31,11);case f:return ee?ae(1,be):ae(0,be+1);case u:var ve=this.$locale().weekStart||0,N=(me<ve?me+7:me)-ve;return ae(ee?Ee-N:Ee+(6-N),be);case d:case m:return pe(Te+"Hours",0);case a:return pe(Te+"Minutes",1);case c:return pe(Te+"Seconds",2);case s:return pe(Te+"Milliseconds",3);default:return this.clone()}},U.endOf=function(F){return this.startOf(F,!1)},U.$set=function(F,X){var H,ee=j.p(F),ne="set"+(this.$u?"UTC":""),ae=(H={},H[d]=ne+"Date",H[m]=ne+"Date",H[f]=ne+"Month",H[p]=ne+"FullYear",H[a]=ne+"Hours",H[c]=ne+"Minutes",H[s]=ne+"Seconds",H[i]=ne+"Milliseconds",H)[ee],pe=ee===d?this.$D+(X-this.$W):X;if(ee===f||ee===p){var me=this.clone().set(m,1);me.$d[ae](pe),me.init(),this.$d=me.set(m,Math.min(this.$D,me.daysInMonth())).$d}else ae&&this.$d[ae](pe);return this.init(),this},U.set=function(F,X){return this.clone().$set(F,X)},U.get=function(F){return this[j.p(F)]()},U.add=function(F,X){var H,ee=this;F=Number(F);var ne=j.p(X),ae=function(be){var Ee=$(ee);return j.w(Ee.date(Ee.date()+Math.round(be*F)),ee)};if(ne===f)return this.set(f,this.$M+F);if(ne===p)return this.set(p,this.$y+F);if(ne===d)return ae(1);if(ne===u)return ae(7);var pe=(H={},H[c]=r,H[a]=o,H[s]=n,H)[ne]||1,me=this.$d.getTime()+F*pe;return j.w(me,this)},U.subtract=function(F,X){return this.add(-1*F,X)},U.format=function(F){var X=this,H=this.$locale();if(!this.isValid())return H.invalidDate||g;var ee=F||"YYYY-MM-DDTHH:mm:ssZ",ne=j.z(this),ae=this.$H,pe=this.$m,me=this.$M,be=H.weekdays,Ee=H.months,Te=H.meridiem,ve=function(I,O,k,w){return I&&(I[O]||I(X,ee))||k[O].slice(0,w)},N=function(I){return j.s(ae%12||12,I,"0")},M=Te||function(I,O,k){var w=I<12?"AM":"PM";return k?w.toLowerCase():w};return ee.replace(y,(function(I,O){return O||(function(k){switch(k){case"YY":return String(X.$y).slice(-2);case"YYYY":return j.s(X.$y,4,"0");case"M":return me+1;case"MM":return j.s(me+1,2,"0");case"MMM":return ve(H.monthsShort,me,Ee,3);case"MMMM":return ve(Ee,me);case"D":return X.$D;case"DD":return j.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return ve(H.weekdaysMin,X.$W,be,2);case"ddd":return ve(H.weekdaysShort,X.$W,be,3);case"dddd":return be[X.$W];case"H":return String(ae);case"HH":return j.s(ae,2,"0");case"h":return N(1);case"hh":return N(2);case"a":return M(ae,pe,!0);case"A":return M(ae,pe,!1);case"m":return String(pe);case"mm":return j.s(pe,2,"0");case"s":return String(X.$s);case"ss":return j.s(X.$s,2,"0");case"SSS":return j.s(X.$ms,3,"0");case"Z":return ne}return null})(I)||ne.replace(":","")}))},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(F,X,H){var ee,ne=this,ae=j.p(X),pe=$(F),me=(pe.utcOffset()-this.utcOffset())*r,be=this-pe,Ee=function(){return j.m(ne,pe)};switch(ae){case p:ee=Ee()/12;break;case f:ee=Ee();break;case h:ee=Ee()/3;break;case u:ee=(be-me)/6048e5;break;case d:ee=(be-me)/864e5;break;case a:ee=be/o;break;case c:ee=be/r;break;case s:ee=be/n;break;default:ee=be}return H?ee:j.a(ee)},U.daysInMonth=function(){return this.endOf(f).$D},U.$locale=function(){return _[this.$L]},U.locale=function(F,X){if(!F)return this.$L;var H=this.clone(),ee=G(F,X,!0);return ee&&(H.$L=ee),H},U.clone=function(){return j.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},z})(),Y=W.prototype;return $.prototype=Y,[["$ms",i],["$s",s],["$m",c],["$H",a],["$W",d],["$M",f],["$y",p],["$D",m]].forEach((function(z){Y[z[1]]=function(U){return this.$g(U,z[0],z[1])}})),$.extend=function(z,U){return z.$i||(z(U,W,$),z.$i=!0),$},$.locale=G,$.isDayjs=D,$.unix=function(z){return $(1e3*z)},$.en=_[S],$.Ls=_,$.p={},$}))})(Na)),Na.exports}var Qw=$m();const Wt=Yo(Qw);var Oa={exports:{}},Zw=Oa.exports,Fm;function Jw(){return Fm||(Fm=1,(function(t,e){(function(n,r){t.exports=r($m())})(Zw,(function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),i={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(s){return"["+s+(s===1||s===8||s>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return o.default.locale(i,null,!0),i}))})(Oa)),Oa.exports}Jw();var Ma={exports:{}},Xw=Ma.exports,zm;function qw(){return zm||(zm=1,(function(t,e){(function(n,r){t.exports=r()})(Xw,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,i=/\d\d/,s=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,a={},d=function(v){return(v=+v)+(v>68?1900:2e3)},u=function(v){return function(y){this[v]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var b=y.match(/([+-]|\d\d)/g),E=60*b[1]+(+b[2]||0);return E===0?0:b[0]==="+"?-E:E})(v)}],h=function(v){var y=a[v];return y&&(y.indexOf?y:y.s.concat(y.f))},p=function(v,y){var b,E=a.meridiem;if(E){for(var C=1;C<=24;C+=1)if(v.indexOf(E(C,0,y))>-1){b=C>12;break}}else b=v===(y?"pm":"PM");return b},m={A:[c,function(v){this.afternoon=p(v,!1)}],a:[c,function(v){this.afternoon=p(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*+v}],SS:[i,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[s,u("seconds")],ss:[s,u("seconds")],m:[s,u("minutes")],mm:[s,u("minutes")],H:[s,u("hours")],h:[s,u("hours")],HH:[s,u("hours")],hh:[s,u("hours")],D:[s,u("day")],DD:[i,u("day")],Do:[c,function(v){var y=a.ordinal,b=v.match(/\d+/);if(this.day=b[0],y)for(var E=1;E<=31;E+=1)y(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[s,u("week")],ww:[i,u("week")],M:[s,u("month")],MM:[i,u("month")],MMM:[c,function(v){var y=h("months"),b=(h("monthsShort")||y.map((function(E){return E.slice(0,3)}))).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[c,function(v){var y=h("months").indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[i,function(v){this.year=d(v)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function g(v){var y,b;y=v,b=a&&a.formats;for(var E=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function($,j,W){var Y=W&&W.toUpperCase();return j||b[W]||n[W]||b[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(z,U,F){return U||F.slice(1)}))}))).match(r),C=E.length,S=0;S<C;S+=1){var _=E[S],T=m[_],D=T&&T[0],G=T&&T[1];E[S]=G?{regex:D,parser:G}:_.replace(/^\[|\]$/g,"")}return function($){for(var j={},W=0,Y=0;W<C;W+=1){var z=E[W];if(typeof z=="string")Y+=z.length;else{var U=z.regex,F=z.parser,X=$.slice(Y),H=U.exec(X)[0];F.call(j,H),$=$.replace(H,"")}}return(function(ee){var ne=ee.afternoon;if(ne!==void 0){var ae=ee.hours;ne?ae<12&&(ee.hours+=12):ae===12&&(ee.hours=0),delete ee.afternoon}})(j),j}}return function(v,y,b){b.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(d=v.parseTwoDigitYear);var E=y.prototype,C=E.parse;E.parse=function(S){var _=S.date,T=S.utc,D=S.args;this.$u=T;var G=D[1];if(typeof G=="string"){var $=D[2]===!0,j=D[3]===!0,W=$||j,Y=D[2];j&&(Y=D[2]),a=this.$locale(),!$&&Y&&(a=b.Ls[Y]),this.$d=(function(X,H,ee,ne){try{if(["x","X"].indexOf(H)>-1)return new Date((H==="X"?1e3:1)*X);var ae=g(H)(X),pe=ae.year,me=ae.month,be=ae.day,Ee=ae.hours,Te=ae.minutes,ve=ae.seconds,N=ae.milliseconds,M=ae.zone,I=ae.week,O=new Date,k=be||(pe||me?1:O.getDate()),w=pe||O.getFullYear(),P=0;pe&&!me||(P=me>0?me-1:O.getMonth());var R,K=Ee||0,Q=Te||0,A=ve||0,x=N||0;return M?new Date(Date.UTC(w,P,k,K,Q,A,x+60*M.offset*1e3)):ee?new Date(Date.UTC(w,P,k,K,Q,A,x)):(R=new Date(w,P,k,K,Q,A,x),I&&(R=ne(R).week(I).toDate()),R)}catch{return new Date("")}})(_,G,T,b),this.init(),Y&&Y!==!0&&(this.$L=this.locale(Y).$L),W&&_!=this.format(G)&&(this.$d=new Date("")),a={}}else if(G instanceof Array)for(var z=G.length,U=1;U<=z;U+=1){D[1]=G[U-1];var F=b.apply(this,D);if(F.isValid()){this.$d=F.$d,this.$L=F.$L,this.init();break}U===z&&(this.$d=new Date(""))}else C.call(this,S)}}}))})(Ma)),Ma.exports}var Vw=qw();const eS=Yo(Vw);var La={exports:{}},tS=La.exports,Um;function nS(){return Um||(Um=1,(function(t,e){(function(n,r){t.exports=r()})(tS,(function(){return function(n,r){r.prototype.isSameOrAfter=function(o,i){return this.isSame(o,i)||this.isAfter(o,i)}}}))})(La)),La.exports}var rS=nS();const oS=Yo(rS);var Da={exports:{}},iS=Da.exports,Hm;function sS(){return Hm||(Hm=1,(function(t,e){(function(n,r){t.exports=r()})(iS,(function(){return function(n,r){r.prototype.isSameOrBefore=function(o,i){return this.isSame(o,i)||this.isBefore(o,i)}}}))})(Da)),Da.exports}var aS=sS();const lS=Yo(aS);var Pa={exports:{}},cS=Pa.exports,jm;function dS(){return jm||(jm=1,(function(t,e){(function(n,r){t.exports=r()})(cS,(function(){var n="week",r="year";return function(o,i,s){var c=i.prototype;c.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var d=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=s(this).startOf(r).add(1,r).date(d),f=s(this).endOf(n);if(u.isBefore(f))return 1}var h=s(this).startOf(r).date(d).startOf(n).subtract(1,"millisecond"),p=this.diff(h,n,!0);return p<0?s(this).startOf("week").week():Math.ceil(p)},c.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Pa)),Pa.exports}var uS=dS();const fS=Yo(uS);Wt.extend(eS),Wt.locale("nl"),Wt.extend(oS),Wt.extend(lS),Wt.extend(fS);const zd=t=>t?t.charAt(0).toUpperCase()+t.slice(1):"";function Wm(t,e=Wt()){const n=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY"],!0);if(!n.isValid())return"";const r=e.startOf("day");if(n.isSame(r,"day"))return"Vandaag";const o=r.subtract(1,"day");if(n.isSame(o,"day"))return"Gisteren";const i=r.subtract(6,"day");if(n.isSameOrAfter(i)&&n.isBefore(r))return zd(n.format("dddd"));const s=r.subtract(7,"day");return n.isSame(s)||n.isSame(e,"year")?n.format("D MMMM"):n.format("DD-MM-YYYY")}function Km(t,e=Wt()){const n=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY"],!0),r=t.includes(" ")&&t.includes(":");if(!n.isValid())return"";const o=e.startOf("day");if(n.isSame(o,"day"))return r?n.format("H:mm"):"Vandaag";const i=o.subtract(1,"day");if(n.isSame(i,"day"))return r?`Gisteren ${n.format("H:mm")}`:"Gisteren";const s=o.subtract(6,"day");if(n.isSameOrAfter(s)&&n.isBefore(o))return zd(r?n.format("dddd H:mm"):n.format("dddd"));const c=o.subtract(7,"day");return n.isSame(c)||n.isSame(e,"year")?r?n.format("D MMM H:mm"):n.format("D MMMM"):n.format("DD-MM-YYYY")}function Ud(t){const e=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY","YYYY-MM-DDTHH:mm:ss"],!0),n=t.includes(" ")&&t.includes(":");return e.isValid()?n&&e.isSame(Wt(),"year")?e.format("DD-MM-YYYY H:mm"):e.format("DD-MM-YYYY"):""}function Hd(t){const e=Wt(t,["DD-MM-YYYY HH:mm","YYYY-MM-DD","DD-MM-YYYY","YYYY-MM-DDTHH:mm:ss"],!0);return e.isValid()?e.format("DD-MM-YYYY"):""}const hS={class:"bd-date"},Ym=l.defineComponent({__name:"BDDate",props:{date:{},displayTime:{type:Boolean,default:Bm.displayTime},format:{default:Bm.format}},setup(t){const e=t,n=l.computed(()=>e.date?e.format==="textual"?e.displayTime?Km(e.date):Wm(e.date):(e.format==="numeric",e.displayTime?Ud(e.date):Hd(e.date)):"");return(r,o)=>(l.openBlock(),l.createElementBlock("span",hS,l.toDisplayString(n.value),1))}}),Ba=l.defineComponent({__name:"BDDropdownItem",props:{to:{default:""},target:{default:"_blank"},text:{default:void 0},rel:{default:"noopener noreferrer"}},emits:["click"],setup(t,{emit:e}){const n=t,r=e,o=()=>{r("click")};return(i,s)=>(l.openBlock(),l.createElementBlock("li",l.mergeProps({class:"bd-dropdown-item"},i.$attrs),[l.createVNode(Xr,l.mergeProps({class:"dropdown-item",onClick:o},n),{default:l.withCtx(()=>[l.renderSlot(i.$slots,"default",{},()=>[l.createTextVNode(l.toDisplayString(n.text),1)])]),_:3},16)],16))}});var jd={exports:{}},Gm;function pS(){return Gm||(Gm=1,(function(t,e){(function(r,o){t.exports=o()})(self,function(){return(function(){var n={3099:(function(s){s.exports=function(c){if(typeof c!="function")throw TypeError(String(c)+" is not a function");return c}}),6077:(function(s,c,a){var d=a(111);s.exports=function(u){if(!d(u)&&u!==null)throw TypeError("Can't set "+String(u)+" as a prototype");return u}}),1223:(function(s,c,a){var d=a(5112),u=a(30),f=a(3070),h=d("unscopables"),p=Array.prototype;p[h]==null&&f.f(p,h,{configurable:!0,value:u(null)}),s.exports=function(m){p[h][m]=!0}}),1530:(function(s,c,a){var d=a(8710).charAt;s.exports=function(u,f,h){return f+(h?d(u,f).length:1)}}),5787:(function(s){s.exports=function(c,a,d){if(!(c instanceof a))throw TypeError("Incorrect "+(d?d+" ":"")+"invocation");return c}}),9670:(function(s,c,a){var d=a(111);s.exports=function(u){if(!d(u))throw TypeError(String(u)+" is not an object");return u}}),4019:(function(s){s.exports=typeof ArrayBuffer<"u"&&typeof DataView<"u"}),260:(function(s,c,a){var d=a(4019),u=a(9781),f=a(7854),h=a(111),p=a(6656),m=a(648),g=a(8880),v=a(1320),y=a(3070).f,b=a(9518),E=a(7674),C=a(5112),S=a(9711),_=f.Int8Array,T=_&&_.prototype,D=f.Uint8ClampedArray,G=D&&D.prototype,$=_&&b(_),j=T&&b(T),W=Object.prototype,Y=W.isPrototypeOf,z=C("toStringTag"),U=S("TYPED_ARRAY_TAG"),F=d&&!!E&&m(f.opera)!=="Opera",X=!1,H,ee={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ne={BigInt64Array:8,BigUint64Array:8},ae=function(N){if(!h(N))return!1;var M=m(N);return M==="DataView"||p(ee,M)||p(ne,M)},pe=function(ve){if(!h(ve))return!1;var N=m(ve);return p(ee,N)||p(ne,N)},me=function(ve){if(pe(ve))return ve;throw TypeError("Target is not a typed array")},be=function(ve){if(E){if(Y.call($,ve))return ve}else for(var N in ee)if(p(ee,H)){var M=f[N];if(M&&(ve===M||Y.call(M,ve)))return ve}throw TypeError("Target is not a typed array constructor")},Ee=function(ve,N,M){if(u){if(M)for(var I in ee){var O=f[I];O&&p(O.prototype,ve)&&delete O.prototype[ve]}(!j[ve]||M)&&v(j,ve,M?N:F&&T[ve]||N)}},Te=function(ve,N,M){var I,O;if(u){if(E){if(M)for(I in ee)O=f[I],O&&p(O,ve)&&delete O[ve];if(!$[ve]||M)try{return v($,ve,M?N:F&&_[ve]||N)}catch{}else return}for(I in ee)O=f[I],O&&(!O[ve]||M)&&v(O,ve,N)}};for(H in ee)f[H]||(F=!1);if((!F||typeof $!="function"||$===Function.prototype)&&($=function(){throw TypeError("Incorrect invocation")},F))for(H in ee)f[H]&&E(f[H],$);if((!F||!j||j===W)&&(j=$.prototype,F))for(H in ee)f[H]&&E(f[H].prototype,j);if(F&&b(G)!==j&&E(G,j),u&&!p(j,z)){X=!0,y(j,z,{get:function(){return h(this)?this[U]:void 0}});for(H in ee)f[H]&&g(f[H],U,H)}s.exports={NATIVE_ARRAY_BUFFER_VIEWS:F,TYPED_ARRAY_TAG:X&&U,aTypedArray:me,aTypedArrayConstructor:be,exportTypedArrayMethod:Ee,exportTypedArrayStaticMethod:Te,isView:ae,isTypedArray:pe,TypedArray:$,TypedArrayPrototype:j}}),3331:(function(s,c,a){var d=a(7854),u=a(9781),f=a(4019),h=a(8880),p=a(2248),m=a(7293),g=a(5787),v=a(9958),y=a(7466),b=a(7067),E=a(1179),C=a(9518),S=a(7674),_=a(8006).f,T=a(3070).f,D=a(1285),G=a(8003),$=a(9909),j=$.get,W=$.set,Y="ArrayBuffer",z="DataView",U="prototype",F="Wrong length",X="Wrong index",H=d[Y],ee=H,ne=d[z],ae=ne&&ne[U],pe=Object.prototype,me=d.RangeError,be=E.pack,Ee=E.unpack,Te=function(Z){return[Z&255]},ve=function(Z){return[Z&255,Z>>8&255]},N=function(Z){return[Z&255,Z>>8&255,Z>>16&255,Z>>24&255]},M=function(Z){return Z[3]<<24|Z[2]<<16|Z[1]<<8|Z[0]},I=function(Z){return be(Z,23,4)},O=function(Z){return be(Z,52,8)},k=function(Z,q){T(Z[U],q,{get:function(){return j(this)[q]}})},w=function(Z,q,te,se){var J=b(te),re=j(Z);if(J+q>re.byteLength)throw me(X);var Se=j(re.buffer).bytes,Ne=J+re.byteOffset,Oe=Se.slice(Ne,Ne+q);return se?Oe:Oe.reverse()},P=function(Z,q,te,se,J,re){var Se=b(te),Ne=j(Z);if(Se+q>Ne.byteLength)throw me(X);for(var Oe=j(Ne.buffer).bytes,nt=Se+Ne.byteOffset,pt=se(+J),rt=0;rt<q;rt++)Oe[nt+rt]=pt[re?rt:q-rt-1]};if(!f)ee=function(q){g(this,ee,Y);var te=b(q);W(this,{bytes:D.call(new Array(te),0),byteLength:te}),u||(this.byteLength=te)},ne=function(q,te,se){g(this,ne,z),g(q,ee,z);var J=j(q).byteLength,re=v(te);if(re<0||re>J)throw me("Wrong offset");if(se=se===void 0?J-re:y(se),re+se>J)throw me(F);W(this,{buffer:q,byteLength:se,byteOffset:re}),u||(this.buffer=q,this.byteLength=se,this.byteOffset=re)},u&&(k(ee,"byteLength"),k(ne,"buffer"),k(ne,"byteLength"),k(ne,"byteOffset")),p(ne[U],{getInt8:function(q){return w(this,1,q)[0]<<24>>24},getUint8:function(q){return w(this,1,q)[0]},getInt16:function(q){var te=w(this,2,q,arguments.length>1?arguments[1]:void 0);return(te[1]<<8|te[0])<<16>>16},getUint16:function(q){var te=w(this,2,q,arguments.length>1?arguments[1]:void 0);return te[1]<<8|te[0]},getInt32:function(q){return M(w(this,4,q,arguments.length>1?arguments[1]:void 0))},getUint32:function(q){return M(w(this,4,q,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(q){return Ee(w(this,4,q,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(q){return Ee(w(this,8,q,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(q,te){P(this,1,q,Te,te)},setUint8:function(q,te){P(this,1,q,Te,te)},setInt16:function(q,te){P(this,2,q,ve,te,arguments.length>2?arguments[2]:void 0)},setUint16:function(q,te){P(this,2,q,ve,te,arguments.length>2?arguments[2]:void 0)},setInt32:function(q,te){P(this,4,q,N,te,arguments.length>2?arguments[2]:void 0)},setUint32:function(q,te){P(this,4,q,N,te,arguments.length>2?arguments[2]:void 0)},setFloat32:function(q,te){P(this,4,q,I,te,arguments.length>2?arguments[2]:void 0)},setFloat64:function(q,te){P(this,8,q,O,te,arguments.length>2?arguments[2]:void 0)}});else{if(!m(function(){H(1)})||!m(function(){new H(-1)})||m(function(){return new H,new H(1.5),new H(NaN),H.name!=Y})){ee=function(q){return g(this,ee),new H(b(q))};for(var R=ee[U]=H[U],K=_(H),Q=0,A;K.length>Q;)(A=K[Q++])in ee||h(ee,A,H[A]);R.constructor=ee}S&&C(ae)!==pe&&S(ae,pe);var x=new ne(new ee(2)),B=ae.setInt8;x.setInt8(0,2147483648),x.setInt8(1,2147483649),(x.getInt8(0)||!x.getInt8(1))&&p(ae,{setInt8:function(q,te){B.call(this,q,te<<24>>24)},setUint8:function(q,te){B.call(this,q,te<<24>>24)}},{unsafe:!0})}G(ee,Y),G(ne,z),s.exports={ArrayBuffer:ee,DataView:ne}}),1048:(function(s,c,a){var d=a(7908),u=a(1400),f=a(7466),h=Math.min;s.exports=[].copyWithin||function(m,g){var v=d(this),y=f(v.length),b=u(m,y),E=u(g,y),C=arguments.length>2?arguments[2]:void 0,S=h((C===void 0?y:u(C,y))-E,y-b),_=1;for(E<b&&b<E+S&&(_=-1,E+=S-1,b+=S-1);S-- >0;)E in v?v[b]=v[E]:delete v[b],b+=_,E+=_;return v}}),1285:(function(s,c,a){var d=a(7908),u=a(1400),f=a(7466);s.exports=function(p){for(var m=d(this),g=f(m.length),v=arguments.length,y=u(v>1?arguments[1]:void 0,g),b=v>2?arguments[2]:void 0,E=b===void 0?g:u(b,g);E>y;)m[y++]=p;return m}}),8533:(function(s,c,a){var d=a(2092).forEach,u=a(9341),f=u("forEach");s.exports=f?[].forEach:function(p){return d(this,p,arguments.length>1?arguments[1]:void 0)}}),8457:(function(s,c,a){var d=a(9974),u=a(7908),f=a(3411),h=a(7659),p=a(7466),m=a(6135),g=a(1246);s.exports=function(y){var b=u(y),E=typeof this=="function"?this:Array,C=arguments.length,S=C>1?arguments[1]:void 0,_=S!==void 0,T=g(b),D=0,G,$,j,W,Y,z;if(_&&(S=d(S,C>2?arguments[2]:void 0,2)),T!=null&&!(E==Array&&h(T)))for(W=T.call(b),Y=W.next,$=new E;!(j=Y.call(W)).done;D++)z=_?f(W,S,[j.value,D],!0):j.value,m($,D,z);else for(G=p(b.length),$=new E(G);G>D;D++)z=_?S(b[D],D):b[D],m($,D,z);return $.length=D,$}}),1318:(function(s,c,a){var d=a(5656),u=a(7466),f=a(1400),h=function(p){return function(m,g,v){var y=d(m),b=u(y.length),E=f(v,b),C;if(p&&g!=g){for(;b>E;)if(C=y[E++],C!=C)return!0}else for(;b>E;E++)if((p||E in y)&&y[E]===g)return p||E||0;return!p&&-1}};s.exports={includes:h(!0),indexOf:h(!1)}}),2092:(function(s,c,a){var d=a(9974),u=a(8361),f=a(7908),h=a(7466),p=a(5417),m=[].push,g=function(v){var y=v==1,b=v==2,E=v==3,C=v==4,S=v==6,_=v==7,T=v==5||S;return function(D,G,$,j){for(var W=f(D),Y=u(W),z=d(G,$,3),U=h(Y.length),F=0,X=j||p,H=y?X(D,U):b||_?X(D,0):void 0,ee,ne;U>F;F++)if((T||F in Y)&&(ee=Y[F],ne=z(ee,F,W),v))if(y)H[F]=ne;else if(ne)switch(v){case 3:return!0;case 5:return ee;case 6:return F;case 2:m.call(H,ee)}else switch(v){case 4:return!1;case 7:m.call(H,ee)}return S?-1:E||C?C:H}};s.exports={forEach:g(0),map:g(1),filter:g(2),some:g(3),every:g(4),find:g(5),findIndex:g(6),filterOut:g(7)}}),6583:(function(s,c,a){var d=a(5656),u=a(9958),f=a(7466),h=a(9341),p=Math.min,m=[].lastIndexOf,g=!!m&&1/[1].lastIndexOf(1,-0)<0,v=h("lastIndexOf"),y=g||!v;s.exports=y?function(E){if(g)return m.apply(this,arguments)||0;var C=d(this),S=f(C.length),_=S-1;for(arguments.length>1&&(_=p(_,u(arguments[1]))),_<0&&(_=S+_);_>=0;_--)if(_ in C&&C[_]===E)return _||0;return-1}:m}),1194:(function(s,c,a){var d=a(7293),u=a(5112),f=a(7392),h=u("species");s.exports=function(p){return f>=51||!d(function(){var m=[],g=m.constructor={};return g[h]=function(){return{foo:1}},m[p](Boolean).foo!==1})}}),9341:(function(s,c,a){var d=a(7293);s.exports=function(u,f){var h=[][u];return!!h&&d(function(){h.call(null,f||function(){throw 1},1)})}}),3671:(function(s,c,a){var d=a(3099),u=a(7908),f=a(8361),h=a(7466),p=function(m){return function(g,v,y,b){d(v);var E=u(g),C=f(E),S=h(E.length),_=m?S-1:0,T=m?-1:1;if(y<2)for(;;){if(_ in C){b=C[_],_+=T;break}if(_+=T,m?_<0:S<=_)throw TypeError("Reduce of empty array with no initial value")}for(;m?_>=0:S>_;_+=T)_ in C&&(b=v(b,C[_],_,E));return b}};s.exports={left:p(!1),right:p(!0)}}),5417:(function(s,c,a){var d=a(111),u=a(3157),f=a(5112),h=f("species");s.exports=function(p,m){var g;return u(p)&&(g=p.constructor,typeof g=="function"&&(g===Array||u(g.prototype))?g=void 0:d(g)&&(g=g[h],g===null&&(g=void 0))),new(g===void 0?Array:g)(m===0?0:m)}}),3411:(function(s,c,a){var d=a(9670),u=a(9212);s.exports=function(f,h,p,m){try{return m?h(d(p)[0],p[1]):h(p)}catch(g){throw u(f),g}}}),7072:(function(s,c,a){var d=a(5112),u=d("iterator"),f=!1;try{var h=0,p={next:function(){return{done:!!h++}},return:function(){f=!0}};p[u]=function(){return this},Array.from(p,function(){throw 2})}catch{}s.exports=function(m,g){if(!g&&!f)return!1;var v=!1;try{var y={};y[u]=function(){return{next:function(){return{done:v=!0}}}},m(y)}catch{}return v}}),4326:(function(s){var c={}.toString;s.exports=function(a){return c.call(a).slice(8,-1)}}),648:(function(s,c,a){var d=a(1694),u=a(4326),f=a(5112),h=f("toStringTag"),p=u((function(){return arguments})())=="Arguments",m=function(g,v){try{return g[v]}catch{}};s.exports=d?u:function(g){var v,y,b;return g===void 0?"Undefined":g===null?"Null":typeof(y=m(v=Object(g),h))=="string"?y:p?u(v):(b=u(v))=="Object"&&typeof v.callee=="function"?"Arguments":b}}),9920:(function(s,c,a){var d=a(6656),u=a(3887),f=a(1236),h=a(3070);s.exports=function(p,m){for(var g=u(m),v=h.f,y=f.f,b=0;b<g.length;b++){var E=g[b];d(p,E)||v(p,E,y(m,E))}}}),8544:(function(s,c,a){var d=a(7293);s.exports=!d(function(){function u(){}return u.prototype.constructor=null,Object.getPrototypeOf(new u)!==u.prototype})}),4994:(function(s,c,a){var d=a(3383).IteratorPrototype,u=a(30),f=a(9114),h=a(8003),p=a(7497),m=function(){return this};s.exports=function(g,v,y){var b=v+" Iterator";return g.prototype=u(d,{next:f(1,y)}),h(g,b,!1,!0),p[b]=m,g}}),8880:(function(s,c,a){var d=a(9781),u=a(3070),f=a(9114);s.exports=d?function(h,p,m){return u.f(h,p,f(1,m))}:function(h,p,m){return h[p]=m,h}}),9114:(function(s){s.exports=function(c,a){return{enumerable:!(c&1),configurable:!(c&2),writable:!(c&4),value:a}}}),6135:(function(s,c,a){var d=a(7593),u=a(3070),f=a(9114);s.exports=function(h,p,m){var g=d(p);g in h?u.f(h,g,f(0,m)):h[g]=m}}),654:(function(s,c,a){var d=a(2109),u=a(4994),f=a(9518),h=a(7674),p=a(8003),m=a(8880),g=a(1320),v=a(5112),y=a(1913),b=a(7497),E=a(3383),C=E.IteratorPrototype,S=E.BUGGY_SAFARI_ITERATORS,_=v("iterator"),T="keys",D="values",G="entries",$=function(){return this};s.exports=function(j,W,Y,z,U,F,X){u(Y,W,z);var H=function(N){if(N===U&&me)return me;if(!S&&N in ae)return ae[N];switch(N){case T:return function(){return new Y(this,N)};case D:return function(){return new Y(this,N)};case G:return function(){return new Y(this,N)}}return function(){return new Y(this)}},ee=W+" Iterator",ne=!1,ae=j.prototype,pe=ae[_]||ae["@@iterator"]||U&&ae[U],me=!S&&pe||H(U),be=W=="Array"&&ae.entries||pe,Ee,Te,ve;if(be&&(Ee=f(be.call(new j)),C!==Object.prototype&&Ee.next&&(!y&&f(Ee)!==C&&(h?h(Ee,C):typeof Ee[_]!="function"&&m(Ee,_,$)),p(Ee,ee,!0,!0),y&&(b[ee]=$))),U==D&&pe&&pe.name!==D&&(ne=!0,me=function(){return pe.call(this)}),(!y||X)&&ae[_]!==me&&m(ae,_,me),b[W]=me,U)if(Te={values:H(D),keys:F?me:H(T),entries:H(G)},X)for(ve in Te)(S||ne||!(ve in ae))&&g(ae,ve,Te[ve]);else d({target:W,proto:!0,forced:S||ne},Te);return Te}}),9781:(function(s,c,a){var d=a(7293);s.exports=!d(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})}),317:(function(s,c,a){var d=a(7854),u=a(111),f=d.document,h=u(f)&&u(f.createElement);s.exports=function(p){return h?f.createElement(p):{}}}),8324:(function(s){s.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),8113:(function(s,c,a){var d=a(5005);s.exports=d("navigator","userAgent")||""}),7392:(function(s,c,a){var d=a(7854),u=a(8113),f=d.process,h=f&&f.versions,p=h&&h.v8,m,g;p?(m=p.split("."),g=m[0]+m[1]):u&&(m=u.match(/Edge\/(\d+)/),(!m||m[1]>=74)&&(m=u.match(/Chrome\/(\d+)/),m&&(g=m[1]))),s.exports=g&&+g}),748:(function(s){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),2109:(function(s,c,a){var d=a(7854),u=a(1236).f,f=a(8880),h=a(1320),p=a(3505),m=a(9920),g=a(4705);s.exports=function(v,y){var b=v.target,E=v.global,C=v.stat,S,_,T,D,G,$;if(E?_=d:C?_=d[b]||p(b,{}):_=(d[b]||{}).prototype,_)for(T in y){if(G=y[T],v.noTargetGet?($=u(_,T),D=$&&$.value):D=_[T],S=g(E?T:b+(C?".":"#")+T,v.forced),!S&&D!==void 0){if(typeof G==typeof D)continue;m(G,D)}(v.sham||D&&D.sham)&&f(G,"sham",!0),h(_,T,G,v)}}}),7293:(function(s){s.exports=function(c){try{return!!c()}catch{return!0}}}),7007:(function(s,c,a){a(4916);var d=a(1320),u=a(7293),f=a(5112),h=a(2261),p=a(8880),m=f("species"),g=!u(function(){var C=/./;return C.exec=function(){var S=[];return S.groups={a:"7"},S},"".replace(C,"$<a>")!=="7"}),v=(function(){return"a".replace(/./,"$0")==="$0"})(),y=f("replace"),b=(function(){return/./[y]?/./[y]("a","$0")==="":!1})(),E=!u(function(){var C=/(?:)/,S=C.exec;C.exec=function(){return S.apply(this,arguments)};var _="ab".split(C);return _.length!==2||_[0]!=="a"||_[1]!=="b"});s.exports=function(C,S,_,T){var D=f(C),G=!u(function(){var U={};return U[D]=function(){return 7},""[C](U)!=7}),$=G&&!u(function(){var U=!1,F=/a/;return C==="split"&&(F={},F.constructor={},F.constructor[m]=function(){return F},F.flags="",F[D]=/./[D]),F.exec=function(){return U=!0,null},F[D](""),!U});if(!G||!$||C==="replace"&&!(g&&v&&!b)||C==="split"&&!E){var j=/./[D],W=_(D,""[C],function(U,F,X,H,ee){return F.exec===h?G&&!ee?{done:!0,value:j.call(F,X,H)}:{done:!0,value:U.call(X,F,H)}:{done:!1}},{REPLACE_KEEPS_$0:v,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:b}),Y=W[0],z=W[1];d(String.prototype,C,Y),d(RegExp.prototype,D,S==2?function(U,F){return z.call(U,this,F)}:function(U){return z.call(U,this)})}T&&p(RegExp.prototype[D],"sham",!0)}}),9974:(function(s,c,a){var d=a(3099);s.exports=function(u,f,h){if(d(u),f===void 0)return u;switch(h){case 0:return function(){return u.call(f)};case 1:return function(p){return u.call(f,p)};case 2:return function(p,m){return u.call(f,p,m)};case 3:return function(p,m,g){return u.call(f,p,m,g)}}return function(){return u.apply(f,arguments)}}}),5005:(function(s,c,a){var d=a(857),u=a(7854),f=function(h){return typeof h=="function"?h:void 0};s.exports=function(h,p){return arguments.length<2?f(d[h])||f(u[h]):d[h]&&d[h][p]||u[h]&&u[h][p]}}),1246:(function(s,c,a){var d=a(648),u=a(7497),f=a(5112),h=f("iterator");s.exports=function(p){if(p!=null)return p[h]||p["@@iterator"]||u[d(p)]}}),8554:(function(s,c,a){var d=a(9670),u=a(1246);s.exports=function(f){var h=u(f);if(typeof h!="function")throw TypeError(String(f)+" is not iterable");return d(h.call(f))}}),647:(function(s,c,a){var d=a(7908),u=Math.floor,f="".replace,h=/\$([$&'`]|\d\d?|<[^>]*>)/g,p=/\$([$&'`]|\d\d?)/g;s.exports=function(m,g,v,y,b,E){var C=v+m.length,S=y.length,_=p;return b!==void 0&&(b=d(b),_=h),f.call(E,_,function(T,D){var G;switch(D.charAt(0)){case"$":return"$";case"&":return m;case"`":return g.slice(0,v);case"'":return g.slice(C);case"<":G=b[D.slice(1,-1)];break;default:var $=+D;if($===0)return T;if($>S){var j=u($/10);return j===0?T:j<=S?y[j-1]===void 0?D.charAt(1):y[j-1]+D.charAt(1):T}G=y[$-1]}return G===void 0?"":G})}}),7854:(function(s,c,a){var d=function(u){return u&&u.Math==Math&&u};s.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof a.g=="object"&&a.g)||(function(){return this})()||Function("return this")()}),6656:(function(s){var c={}.hasOwnProperty;s.exports=function(a,d){return c.call(a,d)}}),3501:(function(s){s.exports={}}),490:(function(s,c,a){var d=a(5005);s.exports=d("document","documentElement")}),4664:(function(s,c,a){var d=a(9781),u=a(7293),f=a(317);s.exports=!d&&!u(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!=7})}),1179:(function(s){var c=Math.abs,a=Math.pow,d=Math.floor,u=Math.log,f=Math.LN2,h=function(m,g,v){var y=new Array(v),b=v*8-g-1,E=(1<<b)-1,C=E>>1,S=g===23?a(2,-24)-a(2,-77):0,_=m<0||m===0&&1/m<0?1:0,T=0,D,G,$;for(m=c(m),m!=m||m===1/0?(G=m!=m?1:0,D=E):(D=d(u(m)/f),m*($=a(2,-D))<1&&(D--,$*=2),D+C>=1?m+=S/$:m+=S*a(2,1-C),m*$>=2&&(D++,$/=2),D+C>=E?(G=0,D=E):D+C>=1?(G=(m*$-1)*a(2,g),D=D+C):(G=m*a(2,C-1)*a(2,g),D=0));g>=8;y[T++]=G&255,G/=256,g-=8);for(D=D<<g|G,b+=g;b>0;y[T++]=D&255,D/=256,b-=8);return y[--T]|=_*128,y},p=function(m,g){var v=m.length,y=v*8-g-1,b=(1<<y)-1,E=b>>1,C=y-7,S=v-1,_=m[S--],T=_&127,D;for(_>>=7;C>0;T=T*256+m[S],S--,C-=8);for(D=T&(1<<-C)-1,T>>=-C,C+=g;C>0;D=D*256+m[S],S--,C-=8);if(T===0)T=1-E;else{if(T===b)return D?NaN:_?-1/0:1/0;D=D+a(2,g),T=T-E}return(_?-1:1)*D*a(2,T-g)};s.exports={pack:h,unpack:p}}),8361:(function(s,c,a){var d=a(7293),u=a(4326),f="".split;s.exports=d(function(){return!Object("z").propertyIsEnumerable(0)})?function(h){return u(h)=="String"?f.call(h,""):Object(h)}:Object}),9587:(function(s,c,a){var d=a(111),u=a(7674);s.exports=function(f,h,p){var m,g;return u&&typeof(m=h.constructor)=="function"&&m!==p&&d(g=m.prototype)&&g!==p.prototype&&u(f,g),f}}),2788:(function(s,c,a){var d=a(5465),u=Function.toString;typeof d.inspectSource!="function"&&(d.inspectSource=function(f){return u.call(f)}),s.exports=d.inspectSource}),9909:(function(s,c,a){var d=a(8536),u=a(7854),f=a(111),h=a(8880),p=a(6656),m=a(5465),g=a(6200),v=a(3501),y=u.WeakMap,b,E,C,S=function(W){return C(W)?E(W):b(W,{})},_=function(W){return function(Y){var z;if(!f(Y)||(z=E(Y)).type!==W)throw TypeError("Incompatible receiver, "+W+" required");return z}};if(d){var T=m.state||(m.state=new y),D=T.get,G=T.has,$=T.set;b=function(W,Y){return Y.facade=W,$.call(T,W,Y),Y},E=function(W){return D.call(T,W)||{}},C=function(W){return G.call(T,W)}}else{var j=g("state");v[j]=!0,b=function(W,Y){return Y.facade=W,h(W,j,Y),Y},E=function(W){return p(W,j)?W[j]:{}},C=function(W){return p(W,j)}}s.exports={set:b,get:E,has:C,enforce:S,getterFor:_}}),7659:(function(s,c,a){var d=a(5112),u=a(7497),f=d("iterator"),h=Array.prototype;s.exports=function(p){return p!==void 0&&(u.Array===p||h[f]===p)}}),3157:(function(s,c,a){var d=a(4326);s.exports=Array.isArray||function(f){return d(f)=="Array"}}),4705:(function(s,c,a){var d=a(7293),u=/#|\.prototype\./,f=function(v,y){var b=p[h(v)];return b==g?!0:b==m?!1:typeof y=="function"?d(y):!!y},h=f.normalize=function(v){return String(v).replace(u,".").toLowerCase()},p=f.data={},m=f.NATIVE="N",g=f.POLYFILL="P";s.exports=f}),111:(function(s){s.exports=function(c){return typeof c=="object"?c!==null:typeof c=="function"}}),1913:(function(s){s.exports=!1}),7850:(function(s,c,a){var d=a(111),u=a(4326),f=a(5112),h=f("match");s.exports=function(p){var m;return d(p)&&((m=p[h])!==void 0?!!m:u(p)=="RegExp")}}),9212:(function(s,c,a){var d=a(9670);s.exports=function(u){var f=u.return;if(f!==void 0)return d(f.call(u)).value}}),3383:(function(s,c,a){var d=a(7293),u=a(9518),f=a(8880),h=a(6656),p=a(5112),m=a(1913),g=p("iterator"),v=!1,y=function(){return this},b,E,C;[].keys&&(C=[].keys(),"next"in C?(E=u(u(C)),E!==Object.prototype&&(b=E)):v=!0);var S=b==null||d(function(){var _={};return b[g].call(_)!==_});S&&(b={}),(!m||S)&&!h(b,g)&&f(b,g,y),s.exports={IteratorPrototype:b,BUGGY_SAFARI_ITERATORS:v}}),7497:(function(s){s.exports={}}),133:(function(s,c,a){var d=a(7293);s.exports=!!Object.getOwnPropertySymbols&&!d(function(){return!String(Symbol())})}),590:(function(s,c,a){var d=a(7293),u=a(5112),f=a(1913),h=u("iterator");s.exports=!d(function(){var p=new URL("b?a=1&b=2&c=3","http://a"),m=p.searchParams,g="";return p.pathname="c%20d",m.forEach(function(v,y){m.delete("b"),g+=y+v}),f&&!p.toJSON||!m.sort||p.href!=="http://a/c%20d?a=1&c=3"||m.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!m[h]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("http://тест").host!=="xn--e1aybc"||new URL("http://a#б").hash!=="#%D0%B1"||g!=="a1c3"||new URL("http://x",void 0).host!=="x"})}),8536:(function(s,c,a){var d=a(7854),u=a(2788),f=d.WeakMap;s.exports=typeof f=="function"&&/native code/.test(u(f))}),1574:(function(s,c,a){var d=a(9781),u=a(7293),f=a(1956),h=a(5181),p=a(5296),m=a(7908),g=a(8361),v=Object.assign,y=Object.defineProperty;s.exports=!v||u(function(){if(d&&v({b:1},v(y({},"a",{enumerable:!0,get:function(){y(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var b={},E={},C=Symbol(),S="abcdefghijklmnopqrst";return b[C]=7,S.split("").forEach(function(_){E[_]=_}),v({},b)[C]!=7||f(v({},E)).join("")!=S})?function(E,C){for(var S=m(E),_=arguments.length,T=1,D=h.f,G=p.f;_>T;)for(var $=g(arguments[T++]),j=D?f($).concat(D($)):f($),W=j.length,Y=0,z;W>Y;)z=j[Y++],(!d||G.call($,z))&&(S[z]=$[z]);return S}:v}),30:(function(s,c,a){var d=a(9670),u=a(6048),f=a(748),h=a(3501),p=a(490),m=a(317),g=a(6200),v=">",y="<",b="prototype",E="script",C=g("IE_PROTO"),S=function(){},_=function(j){return y+E+v+j+y+"/"+E+v},T=function(j){j.write(_("")),j.close();var W=j.parentWindow.Object;return j=null,W},D=function(){var j=m("iframe"),W="java"+E+":",Y;return j.style.display="none",p.appendChild(j),j.src=String(W),Y=j.contentWindow.document,Y.open(),Y.write(_("document.F=Object")),Y.close(),Y.F},G,$=function(){try{G=document.domain&&new ActiveXObject("htmlfile")}catch{}$=G?T(G):D();for(var j=f.length;j--;)delete $[b][f[j]];return $()};h[C]=!0,s.exports=Object.create||function(W,Y){var z;return W!==null?(S[b]=d(W),z=new S,S[b]=null,z[C]=W):z=$(),Y===void 0?z:u(z,Y)}}),6048:(function(s,c,a){var d=a(9781),u=a(3070),f=a(9670),h=a(1956);s.exports=d?Object.defineProperties:function(m,g){f(m);for(var v=h(g),y=v.length,b=0,E;y>b;)u.f(m,E=v[b++],g[E]);return m}}),3070:(function(s,c,a){var d=a(9781),u=a(4664),f=a(9670),h=a(7593),p=Object.defineProperty;c.f=d?p:function(g,v,y){if(f(g),v=h(v,!0),f(y),u)try{return p(g,v,y)}catch{}if("get"in y||"set"in y)throw TypeError("Accessors not supported");return"value"in y&&(g[v]=y.value),g}}),1236:(function(s,c,a){var d=a(9781),u=a(5296),f=a(9114),h=a(5656),p=a(7593),m=a(6656),g=a(4664),v=Object.getOwnPropertyDescriptor;c.f=d?v:function(b,E){if(b=h(b),E=p(E,!0),g)try{return v(b,E)}catch{}if(m(b,E))return f(!u.f.call(b,E),b[E])}}),8006:(function(s,c,a){var d=a(6324),u=a(748),f=u.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(p){return d(p,f)}}),5181:(function(s,c){c.f=Object.getOwnPropertySymbols}),9518:(function(s,c,a){var d=a(6656),u=a(7908),f=a(6200),h=a(8544),p=f("IE_PROTO"),m=Object.prototype;s.exports=h?Object.getPrototypeOf:function(g){return g=u(g),d(g,p)?g[p]:typeof g.constructor=="function"&&g instanceof g.constructor?g.constructor.prototype:g instanceof Object?m:null}}),6324:(function(s,c,a){var d=a(6656),u=a(5656),f=a(1318).indexOf,h=a(3501);s.exports=function(p,m){var g=u(p),v=0,y=[],b;for(b in g)!d(h,b)&&d(g,b)&&y.push(b);for(;m.length>v;)d(g,b=m[v++])&&(~f(y,b)||y.push(b));return y}}),1956:(function(s,c,a){var d=a(6324),u=a(748);s.exports=Object.keys||function(h){return d(h,u)}}),5296:(function(s,c){var a={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,u=d&&!a.call({1:2},1);c.f=u?function(h){var p=d(this,h);return!!p&&p.enumerable}:a}),7674:(function(s,c,a){var d=a(9670),u=a(6077);s.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var f=!1,h={},p;try{p=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,p.call(h,[]),f=h instanceof Array}catch{}return function(g,v){return d(g),u(v),f?p.call(g,v):g.__proto__=v,g}})():void 0)}),288:(function(s,c,a){var d=a(1694),u=a(648);s.exports=d?{}.toString:function(){return"[object "+u(this)+"]"}}),3887:(function(s,c,a){var d=a(5005),u=a(8006),f=a(5181),h=a(9670);s.exports=d("Reflect","ownKeys")||function(m){var g=u.f(h(m)),v=f.f;return v?g.concat(v(m)):g}}),857:(function(s,c,a){var d=a(7854);s.exports=d}),2248:(function(s,c,a){var d=a(1320);s.exports=function(u,f,h){for(var p in f)d(u,p,f[p],h);return u}}),1320:(function(s,c,a){var d=a(7854),u=a(8880),f=a(6656),h=a(3505),p=a(2788),m=a(9909),g=m.get,v=m.enforce,y=String(String).split("String");(s.exports=function(b,E,C,S){var _=S?!!S.unsafe:!1,T=S?!!S.enumerable:!1,D=S?!!S.noTargetGet:!1,G;if(typeof C=="function"&&(typeof E=="string"&&!f(C,"name")&&u(C,"name",E),G=v(C),G.source||(G.source=y.join(typeof E=="string"?E:""))),b===d){T?b[E]=C:h(E,C);return}else _?!D&&b[E]&&(T=!0):delete b[E];T?b[E]=C:u(b,E,C)})(Function.prototype,"toString",function(){return typeof this=="function"&&g(this).source||p(this)})}),7651:(function(s,c,a){var d=a(4326),u=a(2261);s.exports=function(f,h){var p=f.exec;if(typeof p=="function"){var m=p.call(f,h);if(typeof m!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return m}if(d(f)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return u.call(f,h)}}),2261:(function(s,c,a){var d=a(7066),u=a(2999),f=RegExp.prototype.exec,h=String.prototype.replace,p=f,m=(function(){var b=/a/,E=/b*/g;return f.call(b,"a"),f.call(E,"a"),b.lastIndex!==0||E.lastIndex!==0})(),g=u.UNSUPPORTED_Y||u.BROKEN_CARET,v=/()??/.exec("")[1]!==void 0,y=m||v||g;y&&(p=function(E){var C=this,S,_,T,D,G=g&&C.sticky,$=d.call(C),j=C.source,W=0,Y=E;return G&&($=$.replace("y",""),$.indexOf("g")===-1&&($+="g"),Y=String(E).slice(C.lastIndex),C.lastIndex>0&&(!C.multiline||C.multiline&&E[C.lastIndex-1]!==`
1175
+ `)&&(j="(?: "+j+")",Y=" "+Y,W++),_=new RegExp("^(?:"+j+")",$)),v&&(_=new RegExp("^"+j+"$(?!\\s)",$)),m&&(S=C.lastIndex),T=f.call(G?_:C,Y),G?T?(T.input=T.input.slice(W),T[0]=T[0].slice(W),T.index=C.lastIndex,C.lastIndex+=T[0].length):C.lastIndex=0:m&&T&&(C.lastIndex=C.global?T.index+T[0].length:S),v&&T&&T.length>1&&h.call(T[0],_,function(){for(D=1;D<arguments.length-2;D++)arguments[D]===void 0&&(T[D]=void 0)}),T}),s.exports=p}),7066:(function(s,c,a){var d=a(9670);s.exports=function(){var u=d(this),f="";return u.global&&(f+="g"),u.ignoreCase&&(f+="i"),u.multiline&&(f+="m"),u.dotAll&&(f+="s"),u.unicode&&(f+="u"),u.sticky&&(f+="y"),f}}),2999:(function(s,c,a){var d=a(7293);function u(f,h){return RegExp(f,h)}c.UNSUPPORTED_Y=d(function(){var f=u("a","y");return f.lastIndex=2,f.exec("abcd")!=null}),c.BROKEN_CARET=d(function(){var f=u("^r","gy");return f.lastIndex=2,f.exec("str")!=null})}),4488:(function(s){s.exports=function(c){if(c==null)throw TypeError("Can't call method on "+c);return c}}),3505:(function(s,c,a){var d=a(7854),u=a(8880);s.exports=function(f,h){try{u(d,f,h)}catch{d[f]=h}return h}}),6340:(function(s,c,a){var d=a(5005),u=a(3070),f=a(5112),h=a(9781),p=f("species");s.exports=function(m){var g=d(m),v=u.f;h&&g&&!g[p]&&v(g,p,{configurable:!0,get:function(){return this}})}}),8003:(function(s,c,a){var d=a(3070).f,u=a(6656),f=a(5112),h=f("toStringTag");s.exports=function(p,m,g){p&&!u(p=g?p:p.prototype,h)&&d(p,h,{configurable:!0,value:m})}}),6200:(function(s,c,a){var d=a(2309),u=a(9711),f=d("keys");s.exports=function(h){return f[h]||(f[h]=u(h))}}),5465:(function(s,c,a){var d=a(7854),u=a(3505),f="__core-js_shared__",h=d[f]||u(f,{});s.exports=h}),2309:(function(s,c,a){var d=a(1913),u=a(5465);(s.exports=function(f,h){return u[f]||(u[f]=h!==void 0?h:{})})("versions",[]).push({version:"3.9.0",mode:d?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})}),6707:(function(s,c,a){var d=a(9670),u=a(3099),f=a(5112),h=f("species");s.exports=function(p,m){var g=d(p).constructor,v;return g===void 0||(v=d(g)[h])==null?m:u(v)}}),8710:(function(s,c,a){var d=a(9958),u=a(4488),f=function(h){return function(p,m){var g=String(u(p)),v=d(m),y=g.length,b,E;return v<0||v>=y?h?"":void 0:(b=g.charCodeAt(v),b<55296||b>56319||v+1===y||(E=g.charCodeAt(v+1))<56320||E>57343?h?g.charAt(v):b:h?g.slice(v,v+2):(b-55296<<10)+(E-56320)+65536)}};s.exports={codeAt:f(!1),charAt:f(!0)}}),3197:(function(s){var c=2147483647,a=36,d=1,u=26,f=38,h=700,p=72,m=128,g="-",v=/[^\0-\u007E]/,y=/[.\u3002\uFF0E\uFF61]/g,b="Overflow: input needs wider integers to process",E=a-d,C=Math.floor,S=String.fromCharCode,_=function($){for(var j=[],W=0,Y=$.length;W<Y;){var z=$.charCodeAt(W++);if(z>=55296&&z<=56319&&W<Y){var U=$.charCodeAt(W++);(U&64512)==56320?j.push(((z&1023)<<10)+(U&1023)+65536):(j.push(z),W--)}else j.push(z)}return j},T=function($){return $+22+75*($<26)},D=function($,j,W){var Y=0;for($=W?C($/h):$>>1,$+=C($/j);$>E*u>>1;Y+=a)$=C($/E);return C(Y+(E+1)*$/($+f))},G=function($){var j=[];$=_($);var W=$.length,Y=m,z=0,U=p,F,X;for(F=0;F<$.length;F++)X=$[F],X<128&&j.push(S(X));var H=j.length,ee=H;for(H&&j.push(g);ee<W;){var ne=c;for(F=0;F<$.length;F++)X=$[F],X>=Y&&X<ne&&(ne=X);var ae=ee+1;if(ne-Y>C((c-z)/ae))throw RangeError(b);for(z+=(ne-Y)*ae,Y=ne,F=0;F<$.length;F++){if(X=$[F],X<Y&&++z>c)throw RangeError(b);if(X==Y){for(var pe=z,me=a;;me+=a){var be=me<=U?d:me>=U+u?u:me-U;if(pe<be)break;var Ee=pe-be,Te=a-be;j.push(S(T(be+Ee%Te))),pe=C(Ee/Te)}j.push(S(T(pe))),U=D(z,ae,ee==H),z=0,++ee}}++z,++Y}return j.join("")};s.exports=function($){var j=[],W=$.toLowerCase().replace(y,".").split("."),Y,z;for(Y=0;Y<W.length;Y++)z=W[Y],j.push(v.test(z)?"xn--"+G(z):z);return j.join(".")}}),6091:(function(s,c,a){var d=a(7293),u=a(1361),f="​…᠎";s.exports=function(h){return d(function(){return!!u[h]()||f[h]()!=f||u[h].name!==h})}}),3111:(function(s,c,a){var d=a(4488),u=a(1361),f="["+u+"]",h=RegExp("^"+f+f+"*"),p=RegExp(f+f+"*$"),m=function(g){return function(v){var y=String(d(v));return g&1&&(y=y.replace(h,"")),g&2&&(y=y.replace(p,"")),y}};s.exports={start:m(1),end:m(2),trim:m(3)}}),1400:(function(s,c,a){var d=a(9958),u=Math.max,f=Math.min;s.exports=function(h,p){var m=d(h);return m<0?u(m+p,0):f(m,p)}}),7067:(function(s,c,a){var d=a(9958),u=a(7466);s.exports=function(f){if(f===void 0)return 0;var h=d(f),p=u(h);if(h!==p)throw RangeError("Wrong length or index");return p}}),5656:(function(s,c,a){var d=a(8361),u=a(4488);s.exports=function(f){return d(u(f))}}),9958:(function(s){var c=Math.ceil,a=Math.floor;s.exports=function(d){return isNaN(d=+d)?0:(d>0?a:c)(d)}}),7466:(function(s,c,a){var d=a(9958),u=Math.min;s.exports=function(f){return f>0?u(d(f),9007199254740991):0}}),7908:(function(s,c,a){var d=a(4488);s.exports=function(u){return Object(d(u))}}),4590:(function(s,c,a){var d=a(3002);s.exports=function(u,f){var h=d(u);if(h%f)throw RangeError("Wrong offset");return h}}),3002:(function(s,c,a){var d=a(9958);s.exports=function(u){var f=d(u);if(f<0)throw RangeError("The argument can't be less than 0");return f}}),7593:(function(s,c,a){var d=a(111);s.exports=function(u,f){if(!d(u))return u;var h,p;if(f&&typeof(h=u.toString)=="function"&&!d(p=h.call(u))||typeof(h=u.valueOf)=="function"&&!d(p=h.call(u))||!f&&typeof(h=u.toString)=="function"&&!d(p=h.call(u)))return p;throw TypeError("Can't convert object to primitive value")}}),1694:(function(s,c,a){var d=a(5112),u=d("toStringTag"),f={};f[u]="z",s.exports=String(f)==="[object z]"}),9843:(function(s,c,a){var d=a(2109),u=a(7854),f=a(9781),h=a(3832),p=a(260),m=a(3331),g=a(5787),v=a(9114),y=a(8880),b=a(7466),E=a(7067),C=a(4590),S=a(7593),_=a(6656),T=a(648),D=a(111),G=a(30),$=a(7674),j=a(8006).f,W=a(7321),Y=a(2092).forEach,z=a(6340),U=a(3070),F=a(1236),X=a(9909),H=a(9587),ee=X.get,ne=X.set,ae=U.f,pe=F.f,me=Math.round,be=u.RangeError,Ee=m.ArrayBuffer,Te=m.DataView,ve=p.NATIVE_ARRAY_BUFFER_VIEWS,N=p.TYPED_ARRAY_TAG,M=p.TypedArray,I=p.TypedArrayPrototype,O=p.aTypedArrayConstructor,k=p.isTypedArray,w="BYTES_PER_ELEMENT",P="Wrong length",R=function(Z,q){for(var te=0,se=q.length,J=new(O(Z))(se);se>te;)J[te]=q[te++];return J},K=function(Z,q){ae(Z,q,{get:function(){return ee(this)[q]}})},Q=function(Z){var q;return Z instanceof Ee||(q=T(Z))=="ArrayBuffer"||q=="SharedArrayBuffer"},A=function(Z,q){return k(Z)&&typeof q!="symbol"&&q in Z&&String(+q)==String(q)},x=function(q,te){return A(q,te=S(te,!0))?v(2,q[te]):pe(q,te)},B=function(q,te,se){return A(q,te=S(te,!0))&&D(se)&&_(se,"value")&&!_(se,"get")&&!_(se,"set")&&!se.configurable&&(!_(se,"writable")||se.writable)&&(!_(se,"enumerable")||se.enumerable)?(q[te]=se.value,q):ae(q,te,se)};f?(ve||(F.f=x,U.f=B,K(I,"buffer"),K(I,"byteOffset"),K(I,"byteLength"),K(I,"length")),d({target:"Object",stat:!0,forced:!ve},{getOwnPropertyDescriptor:x,defineProperty:B}),s.exports=function(Z,q,te){var se=Z.match(/\d+$/)[0]/8,J=Z+(te?"Clamped":"")+"Array",re="get"+Z,Se="set"+Z,Ne=u[J],Oe=Ne,nt=Oe&&Oe.prototype,pt={},rt=function(Xe,$e){var ft=ee(Xe);return ft.view[re]($e*se+ft.byteOffset,!0)},Qr=function(Xe,$e,ft){var tn=ee(Xe);te&&(ft=(ft=me(ft))<0?0:ft>255?255:ft&255),tn.view[Se]($e*se+tn.byteOffset,ft,!0)},Tn=function(Xe,$e){ae(Xe,$e,{get:function(){return rt(this,$e)},set:function(ft){return Qr(this,$e,ft)},enumerable:!0})};ve?h&&(Oe=q(function(Xe,$e,ft,tn){return g(Xe,Oe,J),H((function(){return D($e)?Q($e)?tn!==void 0?new Ne($e,C(ft,se),tn):ft!==void 0?new Ne($e,C(ft,se)):new Ne($e):k($e)?R(Oe,$e):W.call(Oe,$e):new Ne(E($e))})(),Xe,Oe)}),$&&$(Oe,M),Y(j(Ne),function(Xe){Xe in Oe||y(Oe,Xe,Ne[Xe])}),Oe.prototype=nt):(Oe=q(function(Xe,$e,ft,tn){g(Xe,Oe,J);var Po=0,Zr=0,Jr,pn,dr;if(!D($e))dr=E($e),pn=dr*se,Jr=new Ee(pn);else if(Q($e)){Jr=$e,Zr=C(ft,se);var Ai=$e.byteLength;if(tn===void 0){if(Ai%se||(pn=Ai-Zr,pn<0))throw be(P)}else if(pn=b(tn)*se,pn+Zr>Ai)throw be(P);dr=pn/se}else return k($e)?R(Oe,$e):W.call(Oe,$e);for(ne(Xe,{buffer:Jr,byteOffset:Zr,byteLength:pn,length:dr,view:new Te(Jr)});Po<dr;)Tn(Xe,Po++)}),$&&$(Oe,M),nt=Oe.prototype=G(I)),nt.constructor!==Oe&&y(nt,"constructor",Oe),N&&y(nt,N,J),pt[J]=Oe,d({global:!0,forced:Oe!=Ne,sham:!ve},pt),w in Oe||y(Oe,w,se),w in nt||y(nt,w,se),z(J)}):s.exports=function(){}}),3832:(function(s,c,a){var d=a(7854),u=a(7293),f=a(7072),h=a(260).NATIVE_ARRAY_BUFFER_VIEWS,p=d.ArrayBuffer,m=d.Int8Array;s.exports=!h||!u(function(){m(1)})||!u(function(){new m(-1)})||!f(function(g){new m,new m(null),new m(1.5),new m(g)},!0)||u(function(){return new m(new p(2),1,void 0).length!==1})}),3074:(function(s,c,a){var d=a(260).aTypedArrayConstructor,u=a(6707);s.exports=function(f,h){for(var p=u(f,f.constructor),m=0,g=h.length,v=new(d(p))(g);g>m;)v[m]=h[m++];return v}}),7321:(function(s,c,a){var d=a(7908),u=a(7466),f=a(1246),h=a(7659),p=a(9974),m=a(260).aTypedArrayConstructor;s.exports=function(v){var y=d(v),b=arguments.length,E=b>1?arguments[1]:void 0,C=E!==void 0,S=f(y),_,T,D,G,$,j;if(S!=null&&!h(S))for($=S.call(y),j=$.next,y=[];!(G=j.call($)).done;)y.push(G.value);for(C&&b>2&&(E=p(E,arguments[2],2)),T=u(y.length),D=new(m(this))(T),_=0;T>_;_++)D[_]=C?E(y[_],_):y[_];return D}}),9711:(function(s){var c=0,a=Math.random();s.exports=function(d){return"Symbol("+String(d===void 0?"":d)+")_"+(++c+a).toString(36)}}),3307:(function(s,c,a){var d=a(133);s.exports=d&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),5112:(function(s,c,a){var d=a(7854),u=a(2309),f=a(6656),h=a(9711),p=a(133),m=a(3307),g=u("wks"),v=d.Symbol,y=m?v:v&&v.withoutSetter||h;s.exports=function(b){return f(g,b)||(p&&f(v,b)?g[b]=v[b]:g[b]=y("Symbol."+b)),g[b]}}),1361:(function(s){s.exports=`
1176
+ \v\f\r                 \u2028\u2029\uFEFF`}),8264:(function(s,c,a){var d=a(2109),u=a(7854),f=a(3331),h=a(6340),p="ArrayBuffer",m=f[p],g=u[p];d({global:!0,forced:g!==m},{ArrayBuffer:m}),h(p)}),2222:(function(s,c,a){var d=a(2109),u=a(7293),f=a(3157),h=a(111),p=a(7908),m=a(7466),g=a(6135),v=a(5417),y=a(1194),b=a(5112),E=a(7392),C=b("isConcatSpreadable"),S=9007199254740991,_="Maximum allowed index exceeded",T=E>=51||!u(function(){var j=[];return j[C]=!1,j.concat()[0]!==j}),D=y("concat"),G=function(j){if(!h(j))return!1;var W=j[C];return W!==void 0?!!W:f(j)},$=!T||!D;d({target:"Array",proto:!0,forced:$},{concat:function(W){var Y=p(this),z=v(Y,0),U=0,F,X,H,ee,ne;for(F=-1,H=arguments.length;F<H;F++)if(ne=F===-1?Y:arguments[F],G(ne)){if(ee=m(ne.length),U+ee>S)throw TypeError(_);for(X=0;X<ee;X++,U++)X in ne&&g(z,U,ne[X])}else{if(U>=S)throw TypeError(_);g(z,U++,ne)}return z.length=U,z}})}),7327:(function(s,c,a){var d=a(2109),u=a(2092).filter,f=a(1194),h=f("filter");d({target:"Array",proto:!0,forced:!h},{filter:function(m){return u(this,m,arguments.length>1?arguments[1]:void 0)}})}),2772:(function(s,c,a){var d=a(2109),u=a(1318).indexOf,f=a(9341),h=[].indexOf,p=!!h&&1/[1].indexOf(1,-0)<0,m=f("indexOf");d({target:"Array",proto:!0,forced:p||!m},{indexOf:function(v){return p?h.apply(this,arguments)||0:u(this,v,arguments.length>1?arguments[1]:void 0)}})}),6992:(function(s,c,a){var d=a(5656),u=a(1223),f=a(7497),h=a(9909),p=a(654),m="Array Iterator",g=h.set,v=h.getterFor(m);s.exports=p(Array,"Array",function(y,b){g(this,{type:m,target:d(y),index:0,kind:b})},function(){var y=v(this),b=y.target,E=y.kind,C=y.index++;return!b||C>=b.length?(y.target=void 0,{value:void 0,done:!0}):E=="keys"?{value:C,done:!1}:E=="values"?{value:b[C],done:!1}:{value:[C,b[C]],done:!1}},"values"),f.Arguments=f.Array,u("keys"),u("values"),u("entries")}),1249:(function(s,c,a){var d=a(2109),u=a(2092).map,f=a(1194),h=f("map");d({target:"Array",proto:!0,forced:!h},{map:function(m){return u(this,m,arguments.length>1?arguments[1]:void 0)}})}),7042:(function(s,c,a){var d=a(2109),u=a(111),f=a(3157),h=a(1400),p=a(7466),m=a(5656),g=a(6135),v=a(5112),y=a(1194),b=y("slice"),E=v("species"),C=[].slice,S=Math.max;d({target:"Array",proto:!0,forced:!b},{slice:function(T,D){var G=m(this),$=p(G.length),j=h(T,$),W=h(D===void 0?$:D,$),Y,z,U;if(f(G)&&(Y=G.constructor,typeof Y=="function"&&(Y===Array||f(Y.prototype))?Y=void 0:u(Y)&&(Y=Y[E],Y===null&&(Y=void 0)),Y===Array||Y===void 0))return C.call(G,j,W);for(z=new(Y===void 0?Array:Y)(S(W-j,0)),U=0;j<W;j++,U++)j in G&&g(z,U,G[j]);return z.length=U,z}})}),561:(function(s,c,a){var d=a(2109),u=a(1400),f=a(9958),h=a(7466),p=a(7908),m=a(5417),g=a(6135),v=a(1194),y=v("splice"),b=Math.max,E=Math.min,C=9007199254740991,S="Maximum allowed length exceeded";d({target:"Array",proto:!0,forced:!y},{splice:function(T,D){var G=p(this),$=h(G.length),j=u(T,$),W=arguments.length,Y,z,U,F,X,H;if(W===0?Y=z=0:W===1?(Y=0,z=$-j):(Y=W-2,z=E(b(f(D),0),$-j)),$+Y-z>C)throw TypeError(S);for(U=m(G,z),F=0;F<z;F++)X=j+F,X in G&&g(U,F,G[X]);if(U.length=z,Y<z){for(F=j;F<$-z;F++)X=F+z,H=F+Y,X in G?G[H]=G[X]:delete G[H];for(F=$;F>$-z+Y;F--)delete G[F-1]}else if(Y>z)for(F=$-z;F>j;F--)X=F+z-1,H=F+Y-1,X in G?G[H]=G[X]:delete G[H];for(F=0;F<Y;F++)G[F+j]=arguments[F+2];return G.length=$-z+Y,U}})}),8309:(function(s,c,a){var d=a(9781),u=a(3070).f,f=Function.prototype,h=f.toString,p=/^\s*function ([^ (]*)/,m="name";d&&!(m in f)&&u(f,m,{configurable:!0,get:function(){try{return h.call(this).match(p)[1]}catch{return""}}})}),489:(function(s,c,a){var d=a(2109),u=a(7293),f=a(7908),h=a(9518),p=a(8544),m=u(function(){h(1)});d({target:"Object",stat:!0,forced:m,sham:!p},{getPrototypeOf:function(v){return h(f(v))}})}),1539:(function(s,c,a){var d=a(1694),u=a(1320),f=a(288);d||u(Object.prototype,"toString",f,{unsafe:!0})}),4916:(function(s,c,a){var d=a(2109),u=a(2261);d({target:"RegExp",proto:!0,forced:/./.exec!==u},{exec:u})}),9714:(function(s,c,a){var d=a(1320),u=a(9670),f=a(7293),h=a(7066),p="toString",m=RegExp.prototype,g=m[p],v=f(function(){return g.call({source:"a",flags:"b"})!="/a/b"}),y=g.name!=p;(v||y)&&d(RegExp.prototype,p,function(){var E=u(this),C=String(E.source),S=E.flags,_=String(S===void 0&&E instanceof RegExp&&!("flags"in m)?h.call(E):S);return"/"+C+"/"+_},{unsafe:!0})}),8783:(function(s,c,a){var d=a(8710).charAt,u=a(9909),f=a(654),h="String Iterator",p=u.set,m=u.getterFor(h);f(String,"String",function(g){p(this,{type:h,string:String(g),index:0})},function(){var v=m(this),y=v.string,b=v.index,E;return b>=y.length?{value:void 0,done:!0}:(E=d(y,b),v.index+=E.length,{value:E,done:!1})})}),4723:(function(s,c,a){var d=a(7007),u=a(9670),f=a(7466),h=a(4488),p=a(1530),m=a(7651);d("match",1,function(g,v,y){return[function(E){var C=h(this),S=E?.[g];return S!==void 0?S.call(E,C):new RegExp(E)[g](String(C))},function(b){var E=y(v,b,this);if(E.done)return E.value;var C=u(b),S=String(this);if(!C.global)return m(C,S);var _=C.unicode;C.lastIndex=0;for(var T=[],D=0,G;(G=m(C,S))!==null;){var $=String(G[0]);T[D]=$,$===""&&(C.lastIndex=p(S,f(C.lastIndex),_)),D++}return D===0?null:T}]})}),5306:(function(s,c,a){var d=a(7007),u=a(9670),f=a(7466),h=a(9958),p=a(4488),m=a(1530),g=a(647),v=a(7651),y=Math.max,b=Math.min,E=function(C){return C===void 0?C:String(C)};d("replace",2,function(C,S,_,T){var D=T.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,G=T.REPLACE_KEEPS_$0,$=D?"$":"$0";return[function(W,Y){var z=p(this),U=W?.[C];return U!==void 0?U.call(W,z,Y):S.call(String(z),W,Y)},function(j,W){if(!D&&G||typeof W=="string"&&W.indexOf($)===-1){var Y=_(S,j,this,W);if(Y.done)return Y.value}var z=u(j),U=String(this),F=typeof W=="function";F||(W=String(W));var X=z.global;if(X){var H=z.unicode;z.lastIndex=0}for(var ee=[];;){var ne=v(z,U);if(ne===null||(ee.push(ne),!X))break;var ae=String(ne[0]);ae===""&&(z.lastIndex=m(U,f(z.lastIndex),H))}for(var pe="",me=0,be=0;be<ee.length;be++){ne=ee[be];for(var Ee=String(ne[0]),Te=y(b(h(ne.index),U.length),0),ve=[],N=1;N<ne.length;N++)ve.push(E(ne[N]));var M=ne.groups;if(F){var I=[Ee].concat(ve,Te,U);M!==void 0&&I.push(M);var O=String(W.apply(void 0,I))}else O=g(Ee,U,Te,ve,M,W);Te>=me&&(pe+=U.slice(me,Te)+O,me=Te+Ee.length)}return pe+U.slice(me)}]})}),3123:(function(s,c,a){var d=a(7007),u=a(7850),f=a(9670),h=a(4488),p=a(6707),m=a(1530),g=a(7466),v=a(7651),y=a(2261),b=a(7293),E=[].push,C=Math.min,S=4294967295,_=!b(function(){return!RegExp(S,"y")});d("split",2,function(T,D,G){var $;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?$=function(j,W){var Y=String(h(this)),z=W===void 0?S:W>>>0;if(z===0)return[];if(j===void 0)return[Y];if(!u(j))return D.call(Y,j,z);for(var U=[],F=(j.ignoreCase?"i":"")+(j.multiline?"m":"")+(j.unicode?"u":"")+(j.sticky?"y":""),X=0,H=new RegExp(j.source,F+"g"),ee,ne,ae;(ee=y.call(H,Y))&&(ne=H.lastIndex,!(ne>X&&(U.push(Y.slice(X,ee.index)),ee.length>1&&ee.index<Y.length&&E.apply(U,ee.slice(1)),ae=ee[0].length,X=ne,U.length>=z)));)H.lastIndex===ee.index&&H.lastIndex++;return X===Y.length?(ae||!H.test(""))&&U.push(""):U.push(Y.slice(X)),U.length>z?U.slice(0,z):U}:"0".split(void 0,0).length?$=function(j,W){return j===void 0&&W===0?[]:D.call(this,j,W)}:$=D,[function(W,Y){var z=h(this),U=W?.[T];return U!==void 0?U.call(W,z,Y):$.call(String(z),W,Y)},function(j,W){var Y=G($,j,this,W,$!==D);if(Y.done)return Y.value;var z=f(j),U=String(this),F=p(z,RegExp),X=z.unicode,H=(z.ignoreCase?"i":"")+(z.multiline?"m":"")+(z.unicode?"u":"")+(_?"y":"g"),ee=new F(_?z:"^(?:"+z.source+")",H),ne=W===void 0?S:W>>>0;if(ne===0)return[];if(U.length===0)return v(ee,U)===null?[U]:[];for(var ae=0,pe=0,me=[];pe<U.length;){ee.lastIndex=_?pe:0;var be=v(ee,_?U:U.slice(pe)),Ee;if(be===null||(Ee=C(g(ee.lastIndex+(_?0:pe)),U.length))===ae)pe=m(U,pe,X);else{if(me.push(U.slice(ae,pe)),me.length===ne)return me;for(var Te=1;Te<=be.length-1;Te++)if(me.push(be[Te]),me.length===ne)return me;pe=ae=Ee}}return me.push(U.slice(ae)),me}]},!_)}),3210:(function(s,c,a){var d=a(2109),u=a(3111).trim,f=a(6091);d({target:"String",proto:!0,forced:f("trim")},{trim:function(){return u(this)}})}),2990:(function(s,c,a){var d=a(260),u=a(1048),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("copyWithin",function(m,g){return u.call(f(this),m,g,arguments.length>2?arguments[2]:void 0)})}),8927:(function(s,c,a){var d=a(260),u=a(2092).every,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("every",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),3105:(function(s,c,a){var d=a(260),u=a(1285),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("fill",function(m){return u.apply(f(this),arguments)})}),5035:(function(s,c,a){var d=a(260),u=a(2092).filter,f=a(3074),h=d.aTypedArray,p=d.exportTypedArrayMethod;p("filter",function(g){var v=u(h(this),g,arguments.length>1?arguments[1]:void 0);return f(this,v)})}),7174:(function(s,c,a){var d=a(260),u=a(2092).findIndex,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("findIndex",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),4345:(function(s,c,a){var d=a(260),u=a(2092).find,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("find",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),2846:(function(s,c,a){var d=a(260),u=a(2092).forEach,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("forEach",function(m){u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),4731:(function(s,c,a){var d=a(260),u=a(1318).includes,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("includes",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),7209:(function(s,c,a){var d=a(260),u=a(1318).indexOf,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("indexOf",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),6319:(function(s,c,a){var d=a(7854),u=a(260),f=a(6992),h=a(5112),p=h("iterator"),m=d.Uint8Array,g=f.values,v=f.keys,y=f.entries,b=u.aTypedArray,E=u.exportTypedArrayMethod,C=m&&m.prototype[p],S=!!C&&(C.name=="values"||C.name==null),_=function(){return g.call(b(this))};E("entries",function(){return y.call(b(this))}),E("keys",function(){return v.call(b(this))}),E("values",_,!S),E(p,_,!S)}),8867:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=[].join;f("join",function(m){return h.apply(u(this),arguments)})}),7789:(function(s,c,a){var d=a(260),u=a(6583),f=d.aTypedArray,h=d.exportTypedArrayMethod;h("lastIndexOf",function(m){return u.apply(f(this),arguments)})}),3739:(function(s,c,a){var d=a(260),u=a(2092).map,f=a(6707),h=d.aTypedArray,p=d.aTypedArrayConstructor,m=d.exportTypedArrayMethod;m("map",function(v){return u(h(this),v,arguments.length>1?arguments[1]:void 0,function(y,b){return new(p(f(y,y.constructor)))(b)})})}),4483:(function(s,c,a){var d=a(260),u=a(3671).right,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("reduceRight",function(m){return u(f(this),m,arguments.length,arguments.length>1?arguments[1]:void 0)})}),9368:(function(s,c,a){var d=a(260),u=a(3671).left,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("reduce",function(m){return u(f(this),m,arguments.length,arguments.length>1?arguments[1]:void 0)})}),2056:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=Math.floor;f("reverse",function(){for(var m=this,g=u(m).length,v=h(g/2),y=0,b;y<v;)b=m[y],m[y++]=m[--g],m[g]=b;return m})}),3462:(function(s,c,a){var d=a(260),u=a(7466),f=a(4590),h=a(7908),p=a(7293),m=d.aTypedArray,g=d.exportTypedArrayMethod,v=p(function(){new Int8Array(1).set({})});g("set",function(b){m(this);var E=f(arguments.length>1?arguments[1]:void 0,1),C=this.length,S=h(b),_=u(S.length),T=0;if(_+E>C)throw RangeError("Wrong length");for(;T<_;)this[E+T]=S[T++]},v)}),678:(function(s,c,a){var d=a(260),u=a(6707),f=a(7293),h=d.aTypedArray,p=d.aTypedArrayConstructor,m=d.exportTypedArrayMethod,g=[].slice,v=f(function(){new Int8Array(1).slice()});m("slice",function(b,E){for(var C=g.call(h(this),b,E),S=u(this,this.constructor),_=0,T=C.length,D=new(p(S))(T);T>_;)D[_]=C[_++];return D},v)}),7462:(function(s,c,a){var d=a(260),u=a(2092).some,f=d.aTypedArray,h=d.exportTypedArrayMethod;h("some",function(m){return u(f(this),m,arguments.length>1?arguments[1]:void 0)})}),3824:(function(s,c,a){var d=a(260),u=d.aTypedArray,f=d.exportTypedArrayMethod,h=[].sort;f("sort",function(m){return h.call(u(this),m)})}),5021:(function(s,c,a){var d=a(260),u=a(7466),f=a(1400),h=a(6707),p=d.aTypedArray,m=d.exportTypedArrayMethod;m("subarray",function(v,y){var b=p(this),E=b.length,C=f(v,E);return new(h(b,b.constructor))(b.buffer,b.byteOffset+C*b.BYTES_PER_ELEMENT,u((y===void 0?E:f(y,E))-C))})}),2974:(function(s,c,a){var d=a(7854),u=a(260),f=a(7293),h=d.Int8Array,p=u.aTypedArray,m=u.exportTypedArrayMethod,g=[].toLocaleString,v=[].slice,y=!!h&&f(function(){g.call(new h(1))}),b=f(function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()})||!f(function(){h.prototype.toLocaleString.call([1,2])});m("toLocaleString",function(){return g.apply(y?v.call(p(this)):p(this),arguments)},b)}),5016:(function(s,c,a){var d=a(260).exportTypedArrayMethod,u=a(7293),f=a(7854),h=f.Uint8Array,p=h&&h.prototype||{},m=[].toString,g=[].join;u(function(){m.call({})})&&(m=function(){return g.call(this)});var v=p.toString!=m;d("toString",m,v)}),2472:(function(s,c,a){var d=a(9843);d("Uint8",function(u){return function(h,p,m){return u(this,h,p,m)}})}),4747:(function(s,c,a){var d=a(7854),u=a(8324),f=a(8533),h=a(8880);for(var p in u){var m=d[p],g=m&&m.prototype;if(g&&g.forEach!==f)try{h(g,"forEach",f)}catch{g.forEach=f}}}),3948:(function(s,c,a){var d=a(7854),u=a(8324),f=a(6992),h=a(8880),p=a(5112),m=p("iterator"),g=p("toStringTag"),v=f.values;for(var y in u){var b=d[y],E=b&&b.prototype;if(E){if(E[m]!==v)try{h(E,m,v)}catch{E[m]=v}if(E[g]||h(E,g,y),u[y]){for(var C in f)if(E[C]!==f[C])try{h(E,C,f[C])}catch{E[C]=f[C]}}}}}),1637:(function(s,c,a){a(6992);var d=a(2109),u=a(5005),f=a(590),h=a(1320),p=a(2248),m=a(8003),g=a(4994),v=a(9909),y=a(5787),b=a(6656),E=a(9974),C=a(648),S=a(9670),_=a(111),T=a(30),D=a(9114),G=a(8554),$=a(1246),j=a(5112),W=u("fetch"),Y=u("Headers"),z=j("iterator"),U="URLSearchParams",F=U+"Iterator",X=v.set,H=v.getterFor(U),ee=v.getterFor(F),ne=/\+/g,ae=Array(4),pe=function(R){return ae[R-1]||(ae[R-1]=RegExp("((?:%[\\da-f]{2}){"+R+"})","gi"))},me=function(R){try{return decodeURIComponent(R)}catch{return R}},be=function(R){var K=R.replace(ne," "),Q=4;try{return decodeURIComponent(K)}catch{for(;Q;)K=K.replace(pe(Q--),me);return K}},Ee=/[!'()~]|%20/g,Te={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ve=function(R){return Te[R]},N=function(R){return encodeURIComponent(R).replace(Ee,ve)},M=function(R,K){if(K)for(var Q=K.split("&"),A=0,x,B;A<Q.length;)x=Q[A++],x.length&&(B=x.split("="),R.push({key:be(B.shift()),value:be(B.join("="))}))},I=function(R){this.entries.length=0,M(this.entries,R)},O=function(R,K){if(R<K)throw TypeError("Not enough arguments")},k=g(function(K,Q){X(this,{type:F,iterator:G(H(K).entries),kind:Q})},"Iterator",function(){var K=ee(this),Q=K.kind,A=K.iterator.next(),x=A.value;return A.done||(A.value=Q==="keys"?x.key:Q==="values"?x.value:[x.key,x.value]),A}),w=function(){y(this,w,U);var K=arguments.length>0?arguments[0]:void 0,Q=this,A=[],x,B,Z,q,te,se,J,re,Se;if(X(Q,{type:U,entries:A,updateURL:function(){},updateSearchParams:I}),K!==void 0)if(_(K))if(x=$(K),typeof x=="function")for(B=x.call(K),Z=B.next;!(q=Z.call(B)).done;){if(te=G(S(q.value)),se=te.next,(J=se.call(te)).done||(re=se.call(te)).done||!se.call(te).done)throw TypeError("Expected sequence with length 2");A.push({key:J.value+"",value:re.value+""})}else for(Se in K)b(K,Se)&&A.push({key:Se,value:K[Se]+""});else M(A,typeof K=="string"?K.charAt(0)==="?"?K.slice(1):K:K+"")},P=w.prototype;p(P,{append:function(K,Q){O(arguments.length,2);var A=H(this);A.entries.push({key:K+"",value:Q+""}),A.updateURL()},delete:function(R){O(arguments.length,1);for(var K=H(this),Q=K.entries,A=R+"",x=0;x<Q.length;)Q[x].key===A?Q.splice(x,1):x++;K.updateURL()},get:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=0;x<Q.length;x++)if(Q[x].key===A)return Q[x].value;return null},getAll:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=[],B=0;B<Q.length;B++)Q[B].key===A&&x.push(Q[B].value);return x},has:function(K){O(arguments.length,1);for(var Q=H(this).entries,A=K+"",x=0;x<Q.length;)if(Q[x++].key===A)return!0;return!1},set:function(K,Q){O(arguments.length,1);for(var A=H(this),x=A.entries,B=!1,Z=K+"",q=Q+"",te=0,se;te<x.length;te++)se=x[te],se.key===Z&&(B?x.splice(te--,1):(B=!0,se.value=q));B||x.push({key:Z,value:q}),A.updateURL()},sort:function(){var K=H(this),Q=K.entries,A=Q.slice(),x,B,Z;for(Q.length=0,Z=0;Z<A.length;Z++){for(x=A[Z],B=0;B<Z;B++)if(Q[B].key>x.key){Q.splice(B,0,x);break}B===Z&&Q.push(x)}K.updateURL()},forEach:function(K){for(var Q=H(this).entries,A=E(K,arguments.length>1?arguments[1]:void 0,3),x=0,B;x<Q.length;)B=Q[x++],A(B.value,B.key,this)},keys:function(){return new k(this,"keys")},values:function(){return new k(this,"values")},entries:function(){return new k(this,"entries")}},{enumerable:!0}),h(P,z,P.entries),h(P,"toString",function(){for(var K=H(this).entries,Q=[],A=0,x;A<K.length;)x=K[A++],Q.push(N(x.key)+"="+N(x.value));return Q.join("&")},{enumerable:!0}),m(w,U),d({global:!0,forced:!f},{URLSearchParams:w}),!f&&typeof W=="function"&&typeof Y=="function"&&d({global:!0,enumerable:!0,forced:!0},{fetch:function(K){var Q=[K],A,x,B;return arguments.length>1&&(A=arguments[1],_(A)&&(x=A.body,C(x)===U&&(B=A.headers?new Y(A.headers):new Y,B.has("content-type")||B.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),A=T(A,{body:D(0,String(x)),headers:D(0,B)}))),Q.push(A)),W.apply(this,Q)}}),s.exports={URLSearchParams:w,getState:H}}),285:(function(s,c,a){a(8783);var d=a(2109),u=a(9781),f=a(590),h=a(7854),p=a(6048),m=a(1320),g=a(5787),v=a(6656),y=a(1574),b=a(8457),E=a(8710).codeAt,C=a(3197),S=a(8003),_=a(1637),T=a(9909),D=h.URL,G=_.URLSearchParams,$=_.getState,j=T.set,W=T.getterFor("URL"),Y=Math.floor,z=Math.pow,U="Invalid authority",F="Invalid scheme",X="Invalid host",H="Invalid port",ee=/[A-Za-z]/,ne=/[\d+-.A-Za-z]/,ae=/\d/,pe=/^(0x|0X)/,me=/^[0-7]+$/,be=/^\d+$/,Ee=/^[\dA-Fa-f]+$/,Te=/[\u0000\t\u000A\u000D #%/:?@[\\]]/,ve=/[\u0000\t\u000A\u000D #/:?@[\\]]/,N=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,M=/[\t\u000A\u000D]/g,I,O=function(L,ie){var oe,le,fe;if(ie.charAt(0)=="["){if(ie.charAt(ie.length-1)!="]"||(oe=w(ie.slice(1,-1)),!oe))return X;L.host=oe}else if(q(L)){if(ie=C(ie),Te.test(ie)||(oe=k(ie),oe===null))return X;L.host=oe}else{if(ve.test(ie))return X;for(oe="",le=b(ie),fe=0;fe<le.length;fe++)oe+=B(le[fe],K);L.host=oe}},k=function(L){var ie=L.split("."),oe,le,fe,Me,ke,Ke,ot;if(ie.length&&ie[ie.length-1]==""&&ie.pop(),oe=ie.length,oe>4)return L;for(le=[],fe=0;fe<oe;fe++){if(Me=ie[fe],Me=="")return L;if(ke=10,Me.length>1&&Me.charAt(0)=="0"&&(ke=pe.test(Me)?16:8,Me=Me.slice(ke==8?1:2)),Me==="")Ke=0;else{if(!(ke==10?be:ke==8?me:Ee).test(Me))return L;Ke=parseInt(Me,ke)}le.push(Ke)}for(fe=0;fe<oe;fe++)if(Ke=le[fe],fe==oe-1){if(Ke>=z(256,5-oe))return null}else if(Ke>255)return null;for(ot=le.pop(),fe=0;fe<le.length;fe++)ot+=le[fe]*z(256,3-fe);return ot},w=function(L){var ie=[0,0,0,0,0,0,0,0],oe=0,le=null,fe=0,Me,ke,Ke,ot,ht,gn,ue,Et=function(){return L.charAt(fe)};if(Et()==":"){if(L.charAt(1)!=":")return;fe+=2,oe++,le=oe}for(;Et();){if(oe==8)return;if(Et()==":"){if(le!==null)return;fe++,oe++,le=oe;continue}for(Me=ke=0;ke<4&&Ee.test(Et());)Me=Me*16+parseInt(Et(),16),fe++,ke++;if(Et()=="."){if(ke==0||(fe-=ke,oe>6))return;for(Ke=0;Et();){if(ot=null,Ke>0)if(Et()=="."&&Ke<4)fe++;else return;if(!ae.test(Et()))return;for(;ae.test(Et());){if(ht=parseInt(Et(),10),ot===null)ot=ht;else{if(ot==0)return;ot=ot*10+ht}if(ot>255)return;fe++}ie[oe]=ie[oe]*256+ot,Ke++,(Ke==2||Ke==4)&&oe++}if(Ke!=4)return;break}else if(Et()==":"){if(fe++,!Et())return}else if(Et())return;ie[oe++]=Me}if(le!==null)for(gn=oe-le,oe=7;oe!=0&&gn>0;)ue=ie[oe],ie[oe--]=ie[le+gn-1],ie[le+--gn]=ue;else if(oe!=8)return;return ie},P=function(L){for(var ie=null,oe=1,le=null,fe=0,Me=0;Me<8;Me++)L[Me]!==0?(fe>oe&&(ie=le,oe=fe),le=null,fe=0):(le===null&&(le=Me),++fe);return fe>oe&&(ie=le,oe=fe),ie},R=function(L){var ie,oe,le,fe;if(typeof L=="number"){for(ie=[],oe=0;oe<4;oe++)ie.unshift(L%256),L=Y(L/256);return ie.join(".")}else if(typeof L=="object"){for(ie="",le=P(L),oe=0;oe<8;oe++)fe&&L[oe]===0||(fe&&(fe=!1),le===oe?(ie+=oe?":":"::",fe=!0):(ie+=L[oe].toString(16),oe<7&&(ie+=":")));return"["+ie+"]"}return L},K={},Q=y({},K,{" ":1,'"':1,"<":1,">":1,"`":1}),A=y({},Q,{"#":1,"?":1,"{":1,"}":1}),x=y({},A,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),B=function(L,ie){var oe=E(L,0);return oe>32&&oe<127&&!v(ie,L)?L:encodeURIComponent(L)},Z={ftp:21,file:null,http:80,https:443,ws:80,wss:443},q=function(L){return v(Z,L.scheme)},te=function(L){return L.username!=""||L.password!=""},se=function(L){return!L.host||L.cannotBeABaseURL||L.scheme=="file"},J=function(L,ie){var oe;return L.length==2&&ee.test(L.charAt(0))&&((oe=L.charAt(1))==":"||!ie&&oe=="|")},re=function(L){var ie;return L.length>1&&J(L.slice(0,2))&&(L.length==2||(ie=L.charAt(2))==="/"||ie==="\\"||ie==="?"||ie==="#")},Se=function(L){var ie=L.path,oe=ie.length;oe&&(L.scheme!="file"||oe!=1||!J(ie[0],!0))&&ie.pop()},Ne=function(L){return L==="."||L.toLowerCase()==="%2e"},Oe=function(L){return L=L.toLowerCase(),L===".."||L==="%2e."||L===".%2e"||L==="%2e%2e"},nt={},pt={},rt={},Qr={},Tn={},Xe={},$e={},ft={},tn={},Po={},Zr={},Jr={},pn={},dr={},Ai={},Ch={},xi={},jn={},p3={},Bo={},ur={},Wn=function(L,ie,oe,le){var fe=oe||nt,Me=0,ke="",Ke=!1,ot=!1,ht=!1,gn,ue,Et,fr;for(oe||(L.scheme="",L.username="",L.password="",L.host=null,L.port=null,L.path=[],L.query=null,L.fragment=null,L.cannotBeABaseURL=!1,ie=ie.replace(N,"")),ie=ie.replace(M,""),gn=b(ie);Me<=gn.length;){switch(ue=gn[Me],fe){case nt:if(ue&&ee.test(ue))ke+=ue.toLowerCase(),fe=pt;else{if(oe)return F;fe=rt;continue}break;case pt:if(ue&&(ne.test(ue)||ue=="+"||ue=="-"||ue=="."))ke+=ue.toLowerCase();else if(ue==":"){if(oe&&(q(L)!=v(Z,ke)||ke=="file"&&(te(L)||L.port!==null)||L.scheme=="file"&&!L.host))return;if(L.scheme=ke,oe){q(L)&&Z[L.scheme]==L.port&&(L.port=null);return}ke="",L.scheme=="file"?fe=dr:q(L)&&le&&le.scheme==L.scheme?fe=Qr:q(L)?fe=ft:gn[Me+1]=="/"?(fe=Tn,Me++):(L.cannotBeABaseURL=!0,L.path.push(""),fe=p3)}else{if(oe)return F;ke="",fe=rt,Me=0;continue}break;case rt:if(!le||le.cannotBeABaseURL&&ue!="#")return F;if(le.cannotBeABaseURL&&ue=="#"){L.scheme=le.scheme,L.path=le.path.slice(),L.query=le.query,L.fragment="",L.cannotBeABaseURL=!0,fe=ur;break}fe=le.scheme=="file"?dr:Xe;continue;case Qr:if(ue=="/"&&gn[Me+1]=="/")fe=tn,Me++;else{fe=Xe;continue}break;case Tn:if(ue=="/"){fe=Po;break}else{fe=jn;continue}case Xe:if(L.scheme=le.scheme,ue==I)L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query=le.query;else if(ue=="/"||ue=="\\"&&q(L))fe=$e;else if(ue=="?")L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query="",fe=Bo;else if(ue=="#")L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.query=le.query,L.fragment="",fe=ur;else{L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,L.path=le.path.slice(),L.path.pop(),fe=jn;continue}break;case $e:if(q(L)&&(ue=="/"||ue=="\\"))fe=tn;else if(ue=="/")fe=Po;else{L.username=le.username,L.password=le.password,L.host=le.host,L.port=le.port,fe=jn;continue}break;case ft:if(fe=tn,ue!="/"||ke.charAt(Me+1)!="/")continue;Me++;break;case tn:if(ue!="/"&&ue!="\\"){fe=Po;continue}break;case Po:if(ue=="@"){Ke&&(ke="%40"+ke),Ke=!0,Et=b(ke);for(var kh=0;kh<Et.length;kh++){var I3=Et[kh];if(I3==":"&&!ht){ht=!0;continue}var _3=B(I3,x);ht?L.password+=_3:L.username+=_3}ke=""}else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)){if(Ke&&ke=="")return U;Me-=b(ke).length+1,ke="",fe=Zr}else ke+=ue;break;case Zr:case Jr:if(oe&&L.scheme=="file"){fe=Ch;continue}else if(ue==":"&&!ot){if(ke=="")return X;if(fr=O(L,ke),fr)return fr;if(ke="",fe=pn,oe==Jr)return}else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)){if(q(L)&&ke=="")return X;if(oe&&ke==""&&(te(L)||L.port!==null))return;if(fr=O(L,ke),fr)return fr;if(ke="",fe=xi,oe)return;continue}else ue=="["?ot=!0:ue=="]"&&(ot=!1),ke+=ue;break;case pn:if(ae.test(ue))ke+=ue;else if(ue==I||ue=="/"||ue=="?"||ue=="#"||ue=="\\"&&q(L)||oe){if(ke!=""){var wh=parseInt(ke,10);if(wh>65535)return H;L.port=q(L)&&wh===Z[L.scheme]?null:wh,ke=""}if(oe)return;fe=xi;continue}else return H;break;case dr:if(L.scheme="file",ue=="/"||ue=="\\")fe=Ai;else if(le&&le.scheme=="file")if(ue==I)L.host=le.host,L.path=le.path.slice(),L.query=le.query;else if(ue=="?")L.host=le.host,L.path=le.path.slice(),L.query="",fe=Bo;else if(ue=="#")L.host=le.host,L.path=le.path.slice(),L.query=le.query,L.fragment="",fe=ur;else{re(gn.slice(Me).join(""))||(L.host=le.host,L.path=le.path.slice(),Se(L)),fe=jn;continue}else{fe=jn;continue}break;case Ai:if(ue=="/"||ue=="\\"){fe=Ch;break}le&&le.scheme=="file"&&!re(gn.slice(Me).join(""))&&(J(le.path[0],!0)?L.path.push(le.path[0]):L.host=le.host),fe=jn;continue;case Ch:if(ue==I||ue=="/"||ue=="\\"||ue=="?"||ue=="#"){if(!oe&&J(ke))fe=jn;else if(ke==""){if(L.host="",oe)return;fe=xi}else{if(fr=O(L,ke),fr)return fr;if(L.host=="localhost"&&(L.host=""),oe)return;ke="",fe=xi}continue}else ke+=ue;break;case xi:if(q(L)){if(fe=jn,ue!="/"&&ue!="\\")continue}else if(!oe&&ue=="?")L.query="",fe=Bo;else if(!oe&&ue=="#")L.fragment="",fe=ur;else if(ue!=I&&(fe=jn,ue!="/"))continue;break;case jn:if(ue==I||ue=="/"||ue=="\\"&&q(L)||!oe&&(ue=="?"||ue=="#")){if(Oe(ke)?(Se(L),ue!="/"&&!(ue=="\\"&&q(L))&&L.path.push("")):Ne(ke)?ue!="/"&&!(ue=="\\"&&q(L))&&L.path.push(""):(L.scheme=="file"&&!L.path.length&&J(ke)&&(L.host&&(L.host=""),ke=ke.charAt(0)+":"),L.path.push(ke)),ke="",L.scheme=="file"&&(ue==I||ue=="?"||ue=="#"))for(;L.path.length>1&&L.path[0]==="";)L.path.shift();ue=="?"?(L.query="",fe=Bo):ue=="#"&&(L.fragment="",fe=ur)}else ke+=B(ue,A);break;case p3:ue=="?"?(L.query="",fe=Bo):ue=="#"?(L.fragment="",fe=ur):ue!=I&&(L.path[0]+=B(ue,K));break;case Bo:!oe&&ue=="#"?(L.fragment="",fe=ur):ue!=I&&(ue=="'"&&q(L)?L.query+="%27":ue=="#"?L.query+="%23":L.query+=B(ue,K));break;case ur:ue!=I&&(L.fragment+=B(ue,Q));break}Me++}},Ro=function(ie){var oe=g(this,Ro,"URL"),le=arguments.length>1?arguments[1]:void 0,fe=String(ie),Me=j(oe,{type:"URL"}),ke,Ke;if(le!==void 0){if(le instanceof Ro)ke=W(le);else if(Ke=Wn(ke={},String(le)),Ke)throw TypeError(Ke)}if(Ke=Wn(Me,fe,null,ke),Ke)throw TypeError(Ke);var ot=Me.searchParams=new G,ht=$(ot);ht.updateSearchParams(Me.query),ht.updateURL=function(){Me.query=String(ot)||null},u||(oe.href=kc.call(oe),oe.origin=m3.call(oe),oe.protocol=g3.call(oe),oe.username=v3.call(oe),oe.password=y3.call(oe),oe.host=b3.call(oe),oe.hostname=C3.call(oe),oe.port=E3.call(oe),oe.pathname=k3.call(oe),oe.search=w3.call(oe),oe.searchParams=S3.call(oe),oe.hash=A3.call(oe))},Eh=Ro.prototype,kc=function(){var L=W(this),ie=L.scheme,oe=L.username,le=L.password,fe=L.host,Me=L.port,ke=L.path,Ke=L.query,ot=L.fragment,ht=ie+":";return fe!==null?(ht+="//",te(L)&&(ht+=oe+(le?":"+le:"")+"@"),ht+=R(fe),Me!==null&&(ht+=":"+Me)):ie=="file"&&(ht+="//"),ht+=L.cannotBeABaseURL?ke[0]:ke.length?"/"+ke.join("/"):"",Ke!==null&&(ht+="?"+Ke),ot!==null&&(ht+="#"+ot),ht},m3=function(){var L=W(this),ie=L.scheme,oe=L.port;if(ie=="blob")try{return new URL(ie.path[0]).origin}catch{return"null"}return ie=="file"||!q(L)?"null":ie+"://"+R(L.host)+(oe!==null?":"+oe:"")},g3=function(){return W(this).scheme+":"},v3=function(){return W(this).username},y3=function(){return W(this).password},b3=function(){var L=W(this),ie=L.host,oe=L.port;return ie===null?"":oe===null?R(ie):R(ie)+":"+oe},C3=function(){var L=W(this).host;return L===null?"":R(L)},E3=function(){var L=W(this).port;return L===null?"":String(L)},k3=function(){var L=W(this),ie=L.path;return L.cannotBeABaseURL?ie[0]:ie.length?"/"+ie.join("/"):""},w3=function(){var L=W(this).query;return L?"?"+L:""},S3=function(){return W(this).searchParams},A3=function(){var L=W(this).fragment;return L?"#"+L:""},mn=function(L,ie){return{get:L,set:ie,configurable:!0,enumerable:!0}};if(u&&p(Eh,{href:mn(kc,function(L){var ie=W(this),oe=String(L),le=Wn(ie,oe);if(le)throw TypeError(le);$(ie.searchParams).updateSearchParams(ie.query)}),origin:mn(m3),protocol:mn(g3,function(L){var ie=W(this);Wn(ie,String(L)+":",nt)}),username:mn(v3,function(L){var ie=W(this),oe=b(String(L));if(!se(ie)){ie.username="";for(var le=0;le<oe.length;le++)ie.username+=B(oe[le],x)}}),password:mn(y3,function(L){var ie=W(this),oe=b(String(L));if(!se(ie)){ie.password="";for(var le=0;le<oe.length;le++)ie.password+=B(oe[le],x)}}),host:mn(b3,function(L){var ie=W(this);ie.cannotBeABaseURL||Wn(ie,String(L),Zr)}),hostname:mn(C3,function(L){var ie=W(this);ie.cannotBeABaseURL||Wn(ie,String(L),Jr)}),port:mn(E3,function(L){var ie=W(this);se(ie)||(L=String(L),L==""?ie.port=null:Wn(ie,L,pn))}),pathname:mn(k3,function(L){var ie=W(this);ie.cannotBeABaseURL||(ie.path=[],Wn(ie,L+"",xi))}),search:mn(w3,function(L){var ie=W(this);L=String(L),L==""?ie.query=null:(L.charAt(0)=="?"&&(L=L.slice(1)),ie.query="",Wn(ie,L,Bo)),$(ie.searchParams).updateSearchParams(ie.query)}),searchParams:mn(S3),hash:mn(A3,function(L){var ie=W(this);if(L=String(L),L==""){ie.fragment=null;return}L.charAt(0)=="#"&&(L=L.slice(1)),ie.fragment="",Wn(ie,L,ur)})}),m(Eh,"toJSON",function(){return kc.call(this)},{enumerable:!0}),m(Eh,"toString",function(){return kc.call(this)},{enumerable:!0}),D){var x3=D.createObjectURL,T3=D.revokeObjectURL;x3&&m(Ro,"createObjectURL",function(ie){return x3.apply(D,arguments)}),T3&&m(Ro,"revokeObjectURL",function(ie){return T3.apply(D,arguments)})}S(Ro,"URL"),d({global:!0,forced:!f,sham:!u},{URL:Ro})})},r={};function o(s){if(r[s])return r[s].exports;var c=r[s]={exports:{}};return n[s](c,c.exports,o),c.exports}(function(){o.d=function(s,c){for(var a in c)o.o(c,a)&&!o.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:c[a]})}})(),(function(){o.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){o.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)}})(),(function(){o.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})}})();var i={};return(function(){o.r(i),o.d(i,{Dropzone:function(){return H},default:function(){return ve}}),o(2222),o(7327),o(2772),o(6992),o(1249),o(7042),o(561),o(8264),o(8309),o(489),o(1539),o(4916),o(9714),o(8783),o(4723),o(5306),o(3123),o(3210),o(2472),o(2990),o(8927),o(3105),o(5035),o(4345),o(7174),o(2846),o(4731),o(7209),o(6319),o(8867),o(7789),o(3739),o(9368),o(4483),o(2056),o(3462),o(678),o(7462),o(3824),o(5021),o(2974),o(5016),o(4747),o(3948),o(285);function s(N,M){var I;if(typeof Symbol>"u"||N[Symbol.iterator]==null){if(Array.isArray(N)||(I=c(N))||N&&typeof N.length=="number"){I&&(N=I);var O=0,k=function(){};return{s:k,n:function(){return O>=N.length?{done:!0}:{done:!1,value:N[O++]}},e:function(Q){throw Q},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1177
1177
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,P=!1,R;return{s:function(){I=N[Symbol.iterator]()},n:function(){var Q=I.next();return w=Q.done,Q},e:function(Q){P=!0,R=Q},f:function(){try{!w&&I.return!=null&&I.return()}finally{if(P)throw R}}}}function c(N,M){if(N){if(typeof N=="string")return a(N,M);var I=Object.prototype.toString.call(N).slice(8,-1);if(I==="Object"&&N.constructor&&(I=N.constructor.name),I==="Map"||I==="Set")return Array.from(N);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return a(N,M)}}function a(N,M){(M==null||M>N.length)&&(M=N.length);for(var I=0,O=new Array(M);I<M;I++)O[I]=N[I];return O}function d(N,M){if(!(N instanceof M))throw new TypeError("Cannot call a class as a function")}function u(N,M){for(var I=0;I<M.length;I++){var O=M[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(N,O.key,O)}}function f(N,M,I){return M&&u(N.prototype,M),N}var h=(function(){function N(){d(this,N)}return f(N,[{key:"on",value:function(I,O){return this._callbacks=this._callbacks||{},this._callbacks[I]||(this._callbacks[I]=[]),this._callbacks[I].push(O),this}},{key:"emit",value:function(I){this._callbacks=this._callbacks||{};for(var O=this._callbacks[I],k=arguments.length,w=new Array(k>1?k-1:0),P=1;P<k;P++)w[P-1]=arguments[P];if(O){var R=s(O),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.apply(this,w)}}catch(A){R.e(A)}finally{R.f()}}return this.element&&this.element.dispatchEvent(this.makeEvent("dropzone:"+I,{args:w})),this}},{key:"makeEvent",value:function(I,O){var k={bubbles:!0,cancelable:!0,detail:O};if(typeof window.CustomEvent=="function")return new CustomEvent(I,k);var w=document.createEvent("CustomEvent");return w.initCustomEvent(I,k.bubbles,k.cancelable,k.detail),w}},{key:"off",value:function(I,O){if(!this._callbacks||arguments.length===0)return this._callbacks={},this;var k=this._callbacks[I];if(!k)return this;if(arguments.length===1)return delete this._callbacks[I],this;for(var w=0;w<k.length;w++){var P=k[w];if(P===O){k.splice(w,1);break}}return this}}]),N})(),p='<div class="dz-preview dz-file-preview"> <div class="dz-image"><img data-dz-thumbnail/></div> <div class="dz-details"> <div class="dz-size"><span data-dz-size></span></div> <div class="dz-filename"><span data-dz-name></span></div> </div> <div class="dz-progress"> <span class="dz-upload" data-dz-uploadprogress></span> </div> <div class="dz-error-message"><span data-dz-errormessage></span></div> <div class="dz-success-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Check</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <path d="M23.5,31.8431458 L17.5852419,25.9283877 C16.0248253,24.3679711 13.4910294,24.366835 11.9289322,25.9289322 C10.3700136,27.4878508 10.3665912,30.0234455 11.9283877,31.5852419 L20.4147581,40.0716123 C20.5133999,40.1702541 20.6159315,40.2626649 20.7218615,40.3488435 C22.2835669,41.8725651 24.794234,41.8626202 26.3461564,40.3106978 L43.3106978,23.3461564 C44.8771021,21.7797521 44.8758057,19.2483887 43.3137085,17.6862915 C41.7547899,16.1273729 39.2176035,16.1255422 37.6538436,17.6893022 L23.5,31.8431458 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z" stroke-opacity="0.198794158" stroke="#747474" fill-opacity="0.816519475" fill="#FFFFFF"></path> </g> </svg> </div> <div class="dz-error-mark"> <svg width="54px" height="54px" viewBox="0 0 54 54" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Error</title> <g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> <g stroke="#747474" stroke-opacity="0.198794158" fill="#FFFFFF" fill-opacity="0.816519475"> <path d="M32.6568542,29 L38.3106978,23.3461564 C39.8771021,21.7797521 39.8758057,19.2483887 38.3137085,17.6862915 C36.7547899,16.1273729 34.2176035,16.1255422 32.6538436,17.6893022 L27,23.3431458 L21.3461564,17.6893022 C19.7823965,16.1255422 17.2452101,16.1273729 15.6862915,17.6862915 C14.1241943,19.2483887 14.1228979,21.7797521 15.6893022,23.3461564 L21.3431458,29 L15.6893022,34.6538436 C14.1228979,36.2202479 14.1241943,38.7516113 15.6862915,40.3137085 C17.2452101,41.8726271 19.7823965,41.8744578 21.3461564,40.3106978 L27,34.6568542 L32.6538436,40.3106978 C34.2176035,41.8744578 36.7547899,41.8726271 38.3137085,40.3137085 C39.8758057,38.7516113 39.8771021,36.2202479 38.3106978,34.6538436 L32.6568542,29 Z M27,53 C41.3594035,53 53,41.3594035 53,27 C53,12.6405965 41.3594035,1 27,1 C12.6405965,1 1,12.6405965 1,27 C1,41.3594035 12.6405965,53 27,53 Z"></path> </g> </g> </svg> </div> </div> ',m=p;function g(N,M){var I;if(typeof Symbol>"u"||N[Symbol.iterator]==null){if(Array.isArray(N)||(I=v(N))||N&&typeof N.length=="number"){I&&(N=I);var O=0,k=function(){};return{s:k,n:function(){return O>=N.length?{done:!0}:{done:!1,value:N[O++]}},e:function(Q){throw Q},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1178
1178
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,P=!1,R;return{s:function(){I=N[Symbol.iterator]()},n:function(){var Q=I.next();return w=Q.done,Q},e:function(Q){P=!0,R=Q},f:function(){try{!w&&I.return!=null&&I.return()}finally{if(P)throw R}}}}function v(N,M){if(N){if(typeof N=="string")return y(N,M);var I=Object.prototype.toString.call(N).slice(8,-1);if(I==="Object"&&N.constructor&&(I=N.constructor.name),I==="Map"||I==="Set")return Array.from(N);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return y(N,M)}}function y(N,M){(M==null||M>N.length)&&(M=N.length);for(var I=0,O=new Array(M);I<M;I++)O[I]=N[I];return O}var b={url:null,method:"post",withCredentials:!1,timeout:null,parallelUploads:2,uploadMultiple:!1,chunking:!1,forceChunking:!1,chunkSize:2e6,parallelChunkUploads:!1,retryChunks:!1,retryChunksLimit:3,maxFilesize:256,paramName:"file",createImageThumbnails:!0,maxThumbnailFilesize:10,thumbnailWidth:120,thumbnailHeight:120,thumbnailMethod:"crop",resizeWidth:null,resizeHeight:null,resizeMimeType:null,resizeQuality:.8,resizeMethod:"contain",filesizeBase:1e3,maxFiles:null,headers:null,clickable:!0,ignoreHiddenFiles:!0,acceptedFiles:null,acceptedMimeTypes:null,autoProcessQueue:!0,autoQueue:!0,addRemoveLinks:!1,previewsContainer:null,disablePreviews:!1,hiddenInputContainer:"body",capture:null,renameFilename:null,renameFile:null,forceFallback:!1,dictDefaultMessage:"Drop files here to upload",dictFallbackMessage:"Your browser does not support drag'n'drop file uploads.",dictFallbackText:"Please use the fallback form below to upload your files like in the olden days.",dictFileTooBig:"File is too big ({{filesize}}MiB). Max filesize: {{maxFilesize}}MiB.",dictInvalidFileType:"You can't upload files of this type.",dictResponseError:"Server responded with {{statusCode}} code.",dictCancelUpload:"Cancel upload",dictUploadCanceled:"Upload canceled.",dictCancelUploadConfirmation:"Are you sure you want to cancel this upload?",dictRemoveFile:"Remove file",dictRemoveFileConfirmation:null,dictMaxFilesExceeded:"You can not upload any more files.",dictFileSizeUnits:{tb:"TB",gb:"GB",mb:"MB",kb:"KB",b:"b"},init:function(){},params:function(M,I,O){if(O)return{dzuuid:O.file.upload.uuid,dzchunkindex:O.index,dztotalfilesize:O.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:O.file.upload.totalChunkCount,dzchunkbyteoffset:O.index*this.options.chunkSize}},accept:function(M,I){return I()},chunksUploaded:function(M,I){I()},fallback:function(){var M;this.element.className="".concat(this.element.className," dz-browser-not-supported");var I=g(this.element.getElementsByTagName("div")),O;try{for(I.s();!(O=I.n()).done;){var k=O.value;if(/(^| )dz-message($| )/.test(k.className)){M=k,k.className="dz-message";break}}}catch(P){I.e(P)}finally{I.f()}M||(M=H.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(M));var w=M.getElementsByTagName("span")[0];return w&&(w.textContent!=null?w.textContent=this.options.dictFallbackMessage:w.innerText!=null&&(w.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(M,I,O,k){var w={srcX:0,srcY:0,srcWidth:M.width,srcHeight:M.height},P=M.width/M.height;I==null&&O==null?(I=w.srcWidth,O=w.srcHeight):I==null?I=O*P:O==null&&(O=I/P),I=Math.min(I,w.srcWidth),O=Math.min(O,w.srcHeight);var R=I/O;if(w.srcWidth>I||w.srcHeight>O)if(k==="crop")P>R?(w.srcHeight=M.height,w.srcWidth=w.srcHeight*R):(w.srcWidth=M.width,w.srcHeight=w.srcWidth/R);else if(k==="contain")P>R?O=I/P:I=O*P;else throw new Error("Unknown resizeMethod '".concat(k,"'"));return w.srcX=(M.width-w.srcWidth)/2,w.srcY=(M.height-w.srcHeight)/2,w.trgWidth=I,w.trgHeight=O,w},transformFile:function(M,I){return(this.options.resizeWidth||this.options.resizeHeight)&&M.type.match(/image.*/)?this.resizeImage(M,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,I):I(M)},previewTemplate:m,drop:function(M){return this.element.classList.remove("dz-drag-hover")},dragstart:function(M){},dragend:function(M){return this.element.classList.remove("dz-drag-hover")},dragenter:function(M){return this.element.classList.add("dz-drag-hover")},dragover:function(M){return this.element.classList.add("dz-drag-hover")},dragleave:function(M){return this.element.classList.remove("dz-drag-hover")},paste:function(M){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(M){var I=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){M.previewElement=H.createElement(this.options.previewTemplate.trim()),M.previewTemplate=M.previewElement,this.previewsContainer.appendChild(M.previewElement);var O=g(M.previewElement.querySelectorAll("[data-dz-name]")),k;try{for(O.s();!(k=O.n()).done;){var w=k.value;w.textContent=M.name}}catch(B){O.e(B)}finally{O.f()}var P=g(M.previewElement.querySelectorAll("[data-dz-size]")),R;try{for(P.s();!(R=P.n()).done;)w=R.value,w.innerHTML=this.filesize(M.size)}catch(B){P.e(B)}finally{P.f()}this.options.addRemoveLinks&&(M._removeLink=H.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),M.previewElement.appendChild(M._removeLink));var K=function(Z){return Z.preventDefault(),Z.stopPropagation(),M.status===H.UPLOADING?H.confirm(I.options.dictCancelUploadConfirmation,function(){return I.removeFile(M)}):I.options.dictRemoveFileConfirmation?H.confirm(I.options.dictRemoveFileConfirmation,function(){return I.removeFile(M)}):I.removeFile(M)},Q=g(M.previewElement.querySelectorAll("[data-dz-remove]")),A;try{for(Q.s();!(A=Q.n()).done;){var x=A.value;x.addEventListener("click",K)}}catch(B){Q.e(B)}finally{Q.f()}}},removedfile:function(M){return M.previewElement!=null&&M.previewElement.parentNode!=null&&M.previewElement.parentNode.removeChild(M.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(M,I){if(M.previewElement){M.previewElement.classList.remove("dz-file-preview");var O=g(M.previewElement.querySelectorAll("[data-dz-thumbnail]")),k;try{for(O.s();!(k=O.n()).done;){var w=k.value;w.alt=M.name,w.src=I}}catch(P){O.e(P)}finally{O.f()}return setTimeout(function(){return M.previewElement.classList.add("dz-image-preview")},1)}},error:function(M,I){if(M.previewElement){M.previewElement.classList.add("dz-error"),typeof I!="string"&&I.error&&(I=I.error);var O=g(M.previewElement.querySelectorAll("[data-dz-errormessage]")),k;try{for(O.s();!(k=O.n()).done;){var w=k.value;w.textContent=I}}catch(P){O.e(P)}finally{O.f()}}},errormultiple:function(){},processing:function(M){if(M.previewElement&&(M.previewElement.classList.add("dz-processing"),M._removeLink))return M._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(M,I,O){if(M.previewElement){var k=g(M.previewElement.querySelectorAll("[data-dz-uploadprogress]")),w;try{for(k.s();!(w=k.n()).done;){var P=w.value;P.nodeName==="PROGRESS"?P.value=I:P.style.width="".concat(I,"%")}}catch(R){k.e(R)}finally{k.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(M){if(M.previewElement)return M.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(M){return this.emit("error",M,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(M){if(M._removeLink&&(M._removeLink.innerHTML=this.options.dictRemoveFile),M.previewElement)return M.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},E=b;function C(N){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?C=function(I){return typeof I}:C=function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},C(N)}function S(N,M){var I;if(typeof Symbol>"u"||N[Symbol.iterator]==null){if(Array.isArray(N)||(I=_(N))||N&&typeof N.length=="number"){I&&(N=I);var O=0,k=function(){};return{s:k,n:function(){return O>=N.length?{done:!0}:{done:!1,value:N[O++]}},e:function(Q){throw Q},f:k}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
1179
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,P=!1,R;return{s:function(){I=N[Symbol.iterator]()},n:function(){var Q=I.next();return w=Q.done,Q},e:function(Q){P=!0,R=Q},f:function(){try{!w&&I.return!=null&&I.return()}finally{if(P)throw R}}}}function _(N,M){if(N){if(typeof N=="string")return T(N,M);var I=Object.prototype.toString.call(N).slice(8,-1);if(I==="Object"&&N.constructor&&(I=N.constructor.name),I==="Map"||I==="Set")return Array.from(N);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return T(N,M)}}function T(N,M){(M==null||M>N.length)&&(M=N.length);for(var I=0,O=new Array(M);I<M;I++)O[I]=N[I];return O}function D(N,M){if(!(N instanceof M))throw new TypeError("Cannot call a class as a function")}function G(N,M){for(var I=0;I<M.length;I++){var O=M[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(N,O.key,O)}}function $(N,M,I){return M&&G(N.prototype,M),I&&G(N,I),N}function j(N,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(M&&M.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),M&&W(N,M)}function W(N,M){return W=Object.setPrototypeOf||function(O,k){return O.__proto__=k,O},W(N,M)}function Y(N){var M=F();return function(){var O=X(N),k;if(M){var w=X(this).constructor;k=Reflect.construct(O,arguments,w)}else k=O.apply(this,arguments);return z(this,k)}}function z(N,M){return M&&(C(M)==="object"||typeof M=="function")?M:U(N)}function U(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function F(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function X(N){return X=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},X(N)}var H=(function(N){j(I,N);var M=Y(I);function I(O,k){var w;D(this,I),w=M.call(this);var P,R;if(w.element=O,w.version=I.version,w.clickableElements=[],w.listeners=[],w.files=[],typeof w.element=="string"&&(w.element=document.querySelector(w.element)),!w.element||w.element.nodeType==null)throw new Error("Invalid dropzone element.");if(w.element.dropzone)throw new Error("Dropzone already attached.");I.instances.push(U(w)),w.element.dropzone=U(w);var K=(R=I.optionsForElement(w.element))!=null?R:{};if(w.options=I.extend({},E,K,k??{}),w.options.previewTemplate=w.options.previewTemplate.replace(/\n*/g,""),w.options.forceFallback||!I.isBrowserSupported())return z(w,w.options.fallback.call(U(w)));if(w.options.url==null&&(w.options.url=w.element.getAttribute("action")),!w.options.url)throw new Error("No URL provided.");if(w.options.acceptedFiles&&w.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(w.options.uploadMultiple&&w.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return w.options.acceptedMimeTypes&&(w.options.acceptedFiles=w.options.acceptedMimeTypes,delete w.options.acceptedMimeTypes),w.options.renameFilename!=null&&(w.options.renameFile=function(Q){return w.options.renameFilename.call(U(w),Q.name,Q)}),typeof w.options.method=="string"&&(w.options.method=w.options.method.toUpperCase()),(P=w.getExistingFallback())&&P.parentNode&&P.parentNode.removeChild(P),w.options.previewsContainer!==!1&&(w.options.previewsContainer?w.previewsContainer=I.getElement(w.options.previewsContainer,"previewsContainer"):w.previewsContainer=w.element),w.options.clickable&&(w.options.clickable===!0?w.clickableElements=[w.element]:w.clickableElements=I.getElements(w.options.clickable,"clickable")),w.init(),w}return $(I,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(k){return k.accepted}).map(function(k){return k})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(k){return!k.accepted}).map(function(k){return k})}},{key:"getFilesWithStatus",value:function(k){return this.files.filter(function(w){return w.status===k}).map(function(w){return w})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(I.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(I.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(I.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(k){return k.status===I.UPLOADING||k.status===I.QUEUED}).map(function(k){return k})}},{key:"init",value:function(){var k=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(I.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var w=function x(){k.hiddenFileInput&&k.hiddenFileInput.parentNode.removeChild(k.hiddenFileInput),k.hiddenFileInput=document.createElement("input"),k.hiddenFileInput.setAttribute("type","file"),(k.options.maxFiles===null||k.options.maxFiles>1)&&k.hiddenFileInput.setAttribute("multiple","multiple"),k.hiddenFileInput.className="dz-hidden-input",k.options.acceptedFiles!==null&&k.hiddenFileInput.setAttribute("accept",k.options.acceptedFiles),k.options.capture!==null&&k.hiddenFileInput.setAttribute("capture",k.options.capture),k.hiddenFileInput.setAttribute("tabindex","-1"),k.hiddenFileInput.style.visibility="hidden",k.hiddenFileInput.style.position="absolute",k.hiddenFileInput.style.top="0",k.hiddenFileInput.style.left="0",k.hiddenFileInput.style.height="0",k.hiddenFileInput.style.width="0",I.getElement(k.options.hiddenInputContainer,"hiddenInputContainer").appendChild(k.hiddenFileInput),k.hiddenFileInput.addEventListener("change",function(){var B=k.hiddenFileInput.files;if(B.length){var Z=S(B),q;try{for(Z.s();!(q=Z.n()).done;){var te=q.value;k.addFile(te)}}catch(se){Z.e(se)}finally{Z.f()}}k.emit("addedfiles",B),x()})};w()}this.URL=window.URL!==null?window.URL:window.webkitURL;var P=S(this.events),R;try{for(P.s();!(R=P.n()).done;){var K=R.value;this.on(K,this.options[K])}}catch(x){P.e(x)}finally{P.f()}this.on("uploadprogress",function(){return k.updateTotalUploadProgress()}),this.on("removedfile",function(){return k.updateTotalUploadProgress()}),this.on("canceled",function(x){return k.emit("complete",x)}),this.on("complete",function(x){if(k.getAddedFiles().length===0&&k.getUploadingFiles().length===0&&k.getQueuedFiles().length===0)return setTimeout(function(){return k.emit("queuecomplete")},0)});var Q=function(B){if(B.dataTransfer.types){for(var Z=0;Z<B.dataTransfer.types.length;Z++)if(B.dataTransfer.types[Z]==="Files")return!0}return!1},A=function(B){if(Q(B))return B.stopPropagation(),B.preventDefault?B.preventDefault():B.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(B){return k.emit("dragstart",B)},dragenter:function(B){return A(B),k.emit("dragenter",B)},dragover:function(B){var Z;try{Z=B.dataTransfer.effectAllowed}catch{}return B.dataTransfer.dropEffect=Z==="move"||Z==="linkMove"?"move":"copy",A(B),k.emit("dragover",B)},dragleave:function(B){return k.emit("dragleave",B)},drop:function(B){return A(B),k.drop(B)},dragend:function(B){return k.emit("dragend",B)}}}],this.clickableElements.forEach(function(x){return k.listeners.push({element:x,events:{click:function(Z){return(x!==k.element||Z.target===k.element||I.elementInside(Z.target,k.element.querySelector(".dz-message")))&&k.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,I.instances.splice(I.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var k,w=0,P=0,R=this.getActiveFiles();if(R.length){var K=S(this.getActiveFiles()),Q;try{for(K.s();!(Q=K.n()).done;){var A=Q.value;w+=A.upload.bytesSent,P+=A.upload.total}}catch(x){K.e(x)}finally{K.f()}k=100*w/P}else k=100;return this.emit("totaluploadprogress",k,P,w)}},{key:"_getParamName",value:function(k){return typeof this.options.paramName=="function"?this.options.paramName(k):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(k,"]"):"")}},{key:"_renameFile",value:function(k){return typeof this.options.renameFile!="function"?k.name:this.options.renameFile(k)}},{key:"getFallbackForm",value:function(){var k,w;if(k=this.getExistingFallback())return k;var P='<div class="dz-fallback">';this.options.dictFallbackText&&(P+="<p>".concat(this.options.dictFallbackText,"</p>")),P+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var R=I.createElement(P);return this.element.tagName!=="FORM"?(w=I.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),w.appendChild(R)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),w??R}},{key:"getExistingFallback",value:function(){for(var k=function(A){var x=S(A),B;try{for(x.s();!(B=x.n()).done;){var Z=B.value;if(/(^| )fallback($| )/.test(Z.className))return Z}}catch(q){x.e(q)}finally{x.f()}},w=0,P=["div","form"];w<P.length;w++){var R=P[w],K;if(K=k(this.element.getElementsByTagName(R)))return K}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(k){return(function(){var w=[];for(var P in k.events){var R=k.events[P];w.push(k.element.addEventListener(P,R,!1))}return w})()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(k){return(function(){var w=[];for(var P in k.events){var R=k.events[P];w.push(k.element.removeEventListener(P,R,!1))}return w})()})}},{key:"disable",value:function(){var k=this;return this.clickableElements.forEach(function(w){return w.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(w){return k.cancelUpload(w)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(k){return k.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(k){var w=0,P="b";if(k>0){for(var R=["tb","gb","mb","kb","b"],K=0;K<R.length;K++){var Q=R[K],A=Math.pow(this.options.filesizeBase,4-K)/10;if(k>=A){w=k/Math.pow(this.options.filesizeBase,4-K),P=Q;break}}w=Math.round(10*w)/10}return"<strong>".concat(w,"</strong> ").concat(this.options.dictFileSizeUnits[P])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(k){if(k.dataTransfer){this.emit("drop",k);for(var w=[],P=0;P<k.dataTransfer.files.length;P++)w[P]=k.dataTransfer.files[P];if(w.length){var R=k.dataTransfer.items;R&&R.length&&R[0].webkitGetAsEntry!=null?this._addFilesFromItems(R):this.handleFiles(w)}this.emit("addedfiles",w)}}},{key:"paste",value:function(k){if(Ee(k?.clipboardData,function(P){return P.items})!=null){this.emit("paste",k);var w=k.clipboardData.items;if(w.length)return this._addFilesFromItems(w)}}},{key:"handleFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;this.addFile(R)}}catch(K){w.e(K)}finally{w.f()}}},{key:"_addFilesFromItems",value:function(k){var w=this;return(function(){var P=[],R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value,A;Q.webkitGetAsEntry!=null&&(A=Q.webkitGetAsEntry())?A.isFile?P.push(w.addFile(Q.getAsFile())):A.isDirectory?P.push(w._addFilesFromDirectory(A,A.name)):P.push(void 0):Q.getAsFile!=null&&(Q.kind==null||Q.kind==="file")?P.push(w.addFile(Q.getAsFile())):P.push(void 0)}}catch(x){R.e(x)}finally{R.f()}return P})()}},{key:"_addFilesFromDirectory",value:function(k,w){var P=this,R=k.createReader(),K=function(x){return Te(console,"log",function(B){return B.log(x)})},Q=function A(){return R.readEntries(function(x){if(x.length>0){var B=S(x),Z;try{for(B.s();!(Z=B.n()).done;){var q=Z.value;q.isFile?q.file(function(te){if(!(P.options.ignoreHiddenFiles&&te.name.substring(0,1)==="."))return te.fullPath="".concat(w,"/").concat(te.name),P.addFile(te)}):q.isDirectory&&P._addFilesFromDirectory(q,"".concat(w,"/").concat(q.name))}}catch(te){B.e(te)}finally{B.f()}A()}return null},K)};return Q()}},{key:"accept",value:function(k,w){this.options.maxFilesize&&k.size>this.options.maxFilesize*1024*1024?w(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(k.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):I.isValidFile(k,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(w(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",k)):this.options.accept.call(this,k,w):w(this.options.dictInvalidFileType)}},{key:"addFile",value:function(k){var w=this;k.upload={uuid:I.uuidv4(),progress:0,total:k.size,bytesSent:0,filename:this._renameFile(k)},this.files.push(k),k.status=I.ADDED,this.emit("addedfile",k),this._enqueueThumbnail(k),this.accept(k,function(P){P?(k.accepted=!1,w._errorProcessing([k],P)):(k.accepted=!0,w.options.autoQueue&&w.enqueueFile(k)),w._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;this.enqueueFile(R)}}catch(K){w.e(K)}finally{w.f()}return null}},{key:"enqueueFile",value:function(k){var w=this;if(k.status===I.ADDED&&k.accepted===!0){if(k.status=I.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return w.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(k){var w=this;if(this.options.createImageThumbnails&&k.type.match(/image.*/)&&k.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(k),setTimeout(function(){return w._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var k=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var w=this._thumbnailQueue.shift();return this.createThumbnail(w,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(P){return k.emit("thumbnail",w,P),k._processingThumbnail=!1,k._processThumbnailQueue()})}}},{key:"removeFile",value:function(k){if(k.status===I.UPLOADING&&this.cancelUpload(k),this.files=ee(this.files,k),this.emit("removedfile",k),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(k){k==null&&(k=!1);var w=S(this.files.slice()),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;(R.status!==I.UPLOADING||k)&&this.removeFile(R)}}catch(K){w.e(K)}finally{w.f()}return null}},{key:"resizeImage",value:function(k,w,P,R,K){var Q=this;return this.createThumbnail(k,w,P,R,!0,function(A,x){if(x==null)return K(k);var B=Q.options.resizeMimeType;B==null&&(B=k.type);var Z=x.toDataURL(B,Q.options.resizeQuality);return(B==="image/jpeg"||B==="image/jpg")&&(Z=me.restore(k.dataURL,Z)),K(I.dataURItoBlob(Z))})}},{key:"createThumbnail",value:function(k,w,P,R,K,Q){var A=this,x=new FileReader;x.onload=function(){if(k.dataURL=x.result,k.type==="image/svg+xml"){Q?.(x.result);return}A.createThumbnailFromUrl(k,w,P,R,K,Q)},x.readAsDataURL(k)}},{key:"displayExistingFile",value:function(k,w,P,R){var K=this,Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",k),this.emit("complete",k),!Q)this.emit("thumbnail",k,w),P&&P();else{var A=function(B){K.emit("thumbnail",k,B),P&&P()};k.dataURL=w,this.createThumbnailFromUrl(k,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,A,R)}}},{key:"createThumbnailFromUrl",value:function(k,w,P,R,K,Q,A){var x=this,B=document.createElement("img");return A&&(B.crossOrigin=A),K=getComputedStyle(document.body).imageOrientation=="from-image"?!1:K,B.onload=function(){var Z=function(te){return te(1)};return typeof EXIF<"u"&&EXIF!==null&&K&&(Z=function(te){return EXIF.getData(B,function(){return te(EXIF.getTag(this,"Orientation"))})}),Z(function(q){k.width=B.width,k.height=B.height;var te=x.options.resize.call(x,k,w,P,R),se=document.createElement("canvas"),J=se.getContext("2d");switch(se.width=te.trgWidth,se.height=te.trgHeight,q>4&&(se.width=te.trgHeight,se.height=te.trgWidth),q){case 2:J.translate(se.width,0),J.scale(-1,1);break;case 3:J.translate(se.width,se.height),J.rotate(Math.PI);break;case 4:J.translate(0,se.height),J.scale(1,-1);break;case 5:J.rotate(.5*Math.PI),J.scale(1,-1);break;case 6:J.rotate(.5*Math.PI),J.translate(0,-se.width);break;case 7:J.rotate(.5*Math.PI),J.translate(se.height,-se.width),J.scale(-1,1);break;case 8:J.rotate(-.5*Math.PI),J.translate(-se.height,0);break}pe(J,B,te.srcX!=null?te.srcX:0,te.srcY!=null?te.srcY:0,te.srcWidth,te.srcHeight,te.trgX!=null?te.trgX:0,te.trgY!=null?te.trgY:0,te.trgWidth,te.trgHeight);var re=se.toDataURL("image/png");if(Q!=null)return Q(re,se)})},Q!=null&&(B.onerror=Q),B.src=k.dataURL}},{key:"processQueue",value:function(){var k=this.options.parallelUploads,w=this.getUploadingFiles().length,P=w;if(!(w>=k)){var R=this.getQueuedFiles();if(R.length>0){if(this.options.uploadMultiple)return this.processFiles(R.slice(0,k-w));for(;P<k;){if(!R.length)return;this.processFile(R.shift()),P++}}}}},{key:"processFile",value:function(k){return this.processFiles([k])}},{key:"processFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;R.processing=!0,R.status=I.UPLOADING,this.emit("processing",R)}}catch(K){w.e(K)}finally{w.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",k),this.uploadFiles(k)}},{key:"_getFilesWithXhr",value:function(k){return this.files.filter(function(w){return w.xhr===k}).map(function(w){return w})}},{key:"cancelUpload",value:function(k){if(k.status===I.UPLOADING){var w=this._getFilesWithXhr(k.xhr),P=S(w),R;try{for(P.s();!(R=P.n()).done;){var K=R.value;K.status=I.CANCELED}}catch(B){P.e(B)}finally{P.f()}typeof k.xhr<"u"&&k.xhr.abort();var Q=S(w),A;try{for(Q.s();!(A=Q.n()).done;){var x=A.value;this.emit("canceled",x)}}catch(B){Q.e(B)}finally{Q.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",w)}else(k.status===I.ADDED||k.status===I.QUEUED)&&(k.status=I.CANCELED,this.emit("canceled",k),this.options.uploadMultiple&&this.emit("canceledmultiple",[k]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(k){if(typeof k=="function"){for(var w=arguments.length,P=new Array(w>1?w-1:0),R=1;R<w;R++)P[R-1]=arguments[R];return k.apply(this,P)}return k}},{key:"uploadFile",value:function(k){return this.uploadFiles([k])}},{key:"uploadFiles",value:function(k){var w=this;this._transformFiles(k,function(P){if(w.options.chunking){var R=P[0];k[0].upload.chunked=w.options.chunking&&(w.options.forceChunking||R.size>w.options.chunkSize),k[0].upload.totalChunkCount=Math.ceil(R.size/w.options.chunkSize)}if(k[0].upload.chunked){var K=k[0],Q=P[0];K.upload.chunks=[];var A=function(){for(var te=0;K.upload.chunks[te]!==void 0;)te++;if(!(te>=K.upload.totalChunkCount)){var se=te*w.options.chunkSize,J=Math.min(se+w.options.chunkSize,Q.size),re={name:w._getParamName(0),data:Q.webkitSlice?Q.webkitSlice(se,J):Q.slice(se,J),filename:K.upload.filename,chunkIndex:te};K.upload.chunks[te]={file:K,index:te,dataBlock:re,status:I.UPLOADING,progress:0,retries:0},w._uploadData(k,[re])}};if(K.upload.finishedChunkUpload=function(q,te){var se=!0;q.status=I.SUCCESS,q.dataBlock=null,q.xhr=null;for(var J=0;J<K.upload.totalChunkCount;J++){if(K.upload.chunks[J]===void 0)return A();K.upload.chunks[J].status!==I.SUCCESS&&(se=!1)}se&&w.options.chunksUploaded(K,function(){w._finished(k,te,null)})},w.options.parallelChunkUploads)for(var x=0;x<K.upload.totalChunkCount;x++)A();else A()}else{for(var B=[],Z=0;Z<k.length;Z++)B[Z]={name:w._getParamName(Z),data:P[Z],filename:k[Z].upload.filename};w._uploadData(k,B)}})}},{key:"_getChunk",value:function(k,w){for(var P=0;P<k.upload.totalChunkCount;P++)if(k.upload.chunks[P]!==void 0&&k.upload.chunks[P].xhr===w)return k.upload.chunks[P]}},{key:"_uploadData",value:function(k,w){var P=this,R=new XMLHttpRequest,K=S(k),Q;try{for(K.s();!(Q=K.n()).done;){var A=Q.value;A.xhr=R}}catch($e){K.e($e)}finally{K.f()}k[0].upload.chunked&&(k[0].upload.chunks[w[0].chunkIndex].xhr=R);var x=this.resolveOption(this.options.method,k),B=this.resolveOption(this.options.url,k);R.open(x,B,!0);var Z=this.resolveOption(this.options.timeout,k);Z&&(R.timeout=this.resolveOption(this.options.timeout,k)),R.withCredentials=!!this.options.withCredentials,R.onload=function($e){P._finishedUploading(k,R,$e)},R.ontimeout=function(){P._handleUploadError(k,R,"Request timedout after ".concat(P.options.timeout/1e3," seconds"))},R.onerror=function(){P._handleUploadError(k,R)};var q=R.upload!=null?R.upload:R;q.onprogress=function($e){return P._updateFilesUploadProgress(k,R,$e)};var te={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&I.extend(te,this.options.headers);for(var se in te){var J=te[se];J&&R.setRequestHeader(se,J)}var re=new FormData;if(this.options.params){var Se=this.options.params;typeof Se=="function"&&(Se=Se.call(this,k,R,k[0].upload.chunked?this._getChunk(k[0],R):null));for(var _e in Se){var Oe=Se[_e];if(Array.isArray(Oe))for(var nt=0;nt<Oe.length;nt++)re.append(_e,Oe[nt]);else re.append(_e,Oe)}}var pt=S(k),rt;try{for(pt.s();!(rt=pt.n()).done;){var Qr=rt.value;this.emit("sending",Qr,R,re)}}catch($e){pt.e($e)}finally{pt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",k,R,re),this._addFormElementData(re);for(var Tn=0;Tn<w.length;Tn++){var Xe=w[Tn];re.append(Xe.name,Xe.data,Xe.filename)}this.submitRequest(R,re,k)}},{key:"_transformFiles",value:function(k,w){for(var P=this,R=[],K=0,Q=function(B){P.options.transformFile.call(P,k[B],function(Z){R[B]=Z,++K===k.length&&w(R)})},A=0;A<k.length;A++)Q(A)}},{key:"_addFormElementData",value:function(k){if(this.element.tagName==="FORM"){var w=S(this.element.querySelectorAll("input, textarea, select, button")),P;try{for(w.s();!(P=w.n()).done;){var R=P.value,K=R.getAttribute("name"),Q=R.getAttribute("type");if(Q&&(Q=Q.toLowerCase()),!(typeof K>"u"||K===null))if(R.tagName==="SELECT"&&R.hasAttribute("multiple")){var A=S(R.options,!0),x;try{for(A.s();!(x=A.n()).done;){var B=x.value;B.selected&&k.append(K,B.value)}}catch(Z){A.e(Z)}finally{A.f()}}else(!Q||Q!=="checkbox"&&Q!=="radio"||R.checked)&&k.append(K,R.value)}}catch(Z){w.e(Z)}finally{w.f()}}}},{key:"_updateFilesUploadProgress",value:function(k,w,P){if(k[0].upload.chunked){var A=k[0],x=this._getChunk(A,w);P?(x.progress=100*P.loaded/P.total,x.total=P.total,x.bytesSent=P.loaded):(x.progress=100,x.bytesSent=x.total),A.upload.progress=0,A.upload.total=0,A.upload.bytesSent=0;for(var B=0;B<A.upload.totalChunkCount;B++)A.upload.chunks[B]&&typeof A.upload.chunks[B].progress<"u"&&(A.upload.progress+=A.upload.chunks[B].progress,A.upload.total+=A.upload.chunks[B].total,A.upload.bytesSent+=A.upload.chunks[B].bytesSent);A.upload.progress=A.upload.progress/A.upload.totalChunkCount,this.emit("uploadprogress",A,A.upload.progress,A.upload.bytesSent)}else{var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.upload.total&&Q.upload.bytesSent&&Q.upload.bytesSent==Q.upload.total||(P?(Q.upload.progress=100*P.loaded/P.total,Q.upload.total=P.total,Q.upload.bytesSent=P.loaded):(Q.upload.progress=100,Q.upload.bytesSent=Q.upload.total),this.emit("uploadprogress",Q,Q.upload.progress,Q.upload.bytesSent))}}catch(Z){R.e(Z)}finally{R.f()}}}},{key:"_finishedUploading",value:function(k,w,P){var R;if(k[0].status!==I.CANCELED&&w.readyState===4){if(w.responseType!=="arraybuffer"&&w.responseType!=="blob"&&(R=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json")))try{R=JSON.parse(R)}catch(K){P=K,R="Invalid JSON response from server."}this._updateFilesUploadProgress(k,w),200<=w.status&&w.status<300?k[0].upload.chunked?k[0].upload.finishedChunkUpload(this._getChunk(k[0],w),R):this._finished(k,R,P):this._handleUploadError(k,w,R)}}},{key:"_handleUploadError",value:function(k,w,P){if(k[0].status!==I.CANCELED){if(k[0].upload.chunked&&this.options.retryChunks){var R=this._getChunk(k[0],w);if(R.retries++<this.options.retryChunksLimit){this._uploadData(k,[R.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(k,P||this.options.dictResponseError.replace("{{statusCode}}",w.status),w)}}},{key:"submitRequest",value:function(k,w,P){if(k.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}k.send(w)}},{key:"_finished",value:function(k,w,P){var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.status=I.SUCCESS,this.emit("success",Q,w,P),this.emit("complete",Q)}}catch(A){R.e(A)}finally{R.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",k,w,P),this.emit("completemultiple",k)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(k,w,P){var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.status=I.ERROR,this.emit("error",Q,w,P),this.emit("complete",Q)}}catch(A){R.e(A)}finally{R.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",k,w,P),this.emit("completemultiple",k)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=h,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(k){for(var w=arguments.length,P=new Array(w>1?w-1:0),R=1;R<w;R++)P[R-1]=arguments[R];for(var K=0,Q=P;K<Q.length;K++){var A=Q[K];for(var x in A){var B=A[x];k[x]=B}}return k}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(k){var w=Math.random()*16|0,P=k==="x"?w:w&3|8;return P.toString(16)})}}]),I})(h);H.initClass(),H.version="5.9.3",H.options={},H.optionsForElement=function(N){if(N.getAttribute("id"))return H.options[ne(N.getAttribute("id"))]},H.instances=[],H.forElement=function(N){if(typeof N=="string"&&(N=document.querySelector(N)),N?.dropzone==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return N.dropzone},H.autoDiscover=!0,H.discover=function(){var N;if(document.querySelectorAll)N=document.querySelectorAll(".dropzone");else{N=[];var M=function(O){return(function(){var k=[],w=S(O),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;/(^| )dropzone($| )/.test(R.className)?k.push(N.push(R)):k.push(void 0)}}catch(K){w.e(K)}finally{w.f()}return k})()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return(function(){var I=[],O=S(N),k;try{for(O.s();!(k=O.n()).done;){var w=k.value;H.optionsForElement(w)!==!1?I.push(new H(w)):I.push(void 0)}}catch(P){O.e(P)}finally{O.f()}return I})()},H.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],H.isBrowserSupported=function(){var N=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))N=!1;else{H.blacklistedBrowsers!==void 0&&(H.blockedBrowsers=H.blacklistedBrowsers);var M=S(H.blockedBrowsers),I;try{for(M.s();!(I=M.n()).done;){var O=I.value;if(O.test(navigator.userAgent)){N=!1;continue}}}catch(k){M.e(k)}finally{M.f()}}else N=!1;return N},H.dataURItoBlob=function(N){for(var M=atob(N.split(",")[1]),I=N.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),k=new Uint8Array(O),w=0,P=M.length,R=0<=P;R?w<=P:w>=P;R?w++:w--)k[w]=M.charCodeAt(w);return new Blob([O],{type:I})};var ee=function(M,I){return M.filter(function(O){return O!==I}).map(function(O){return O})},ne=function(M){return M.replace(/[\-_](\w)/g,function(I){return I.charAt(1).toUpperCase()})};H.createElement=function(N){var M=document.createElement("div");return M.innerHTML=N,M.childNodes[0]},H.elementInside=function(N,M){if(N===M)return!0;for(;N=N.parentNode;)if(N===M)return!0;return!1},H.getElement=function(N,M){var I;if(typeof N=="string"?I=document.querySelector(N):N.nodeType!=null&&(I=N),I==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return I},H.getElements=function(N,M){var I,O;if(N instanceof Array){O=[];try{var k=S(N,!0),w;try{for(k.s();!(w=k.n()).done;)I=w.value,O.push(this.getElement(I,M))}catch(K){k.e(K)}finally{k.f()}}catch{O=null}}else if(typeof N=="string"){O=[];var P=S(document.querySelectorAll(N)),R;try{for(P.s();!(R=P.n()).done;)I=R.value,O.push(I)}catch(K){P.e(K)}finally{P.f()}}else N.nodeType!=null&&(O=[N]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},H.confirm=function(N,M,I){if(window.confirm(N))return M();if(I!=null)return I()},H.isValidFile=function(N,M){if(!M)return!0;M=M.split(",");var I=N.type,O=I.replace(/\/.*$/,""),k=S(M),w;try{for(k.s();!(w=k.n()).done;){var P=w.value;if(P=P.trim(),P.charAt(0)==="."){if(N.name.toLowerCase().indexOf(P.toLowerCase(),N.name.length-P.length)!==-1)return!0}else if(/\/\*$/.test(P)){if(O===P.replace(/\/.*$/,""))return!0}else if(I===P)return!0}}catch(R){k.e(R)}finally{k.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(N){return this.each(function(){return new H(this,N)})}),H.ADDED="added",H.QUEUED="queued",H.ACCEPTED=H.QUEUED,H.UPLOADING="uploading",H.PROCESSING=H.UPLOADING,H.CANCELED="canceled",H.ERROR="error",H.SUCCESS="success";var ae=function(M){M.naturalWidth;var I=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=I;var k=O.getContext("2d");k.drawImage(M,0,0);for(var w=k.getImageData(1,0,1,I),P=w.data,R=0,K=I,Q=I;Q>R;){var A=P[(Q-1)*4+3];A===0?K=Q:R=Q,Q=K+R>>1}var x=Q/I;return x===0?1:x},pe=function(M,I,O,k,w,P,R,K,Q,A){var x=ae(I);return M.drawImage(I,O,k,w,P,R,K,Q,A/x)},me=(function(){function N(){D(this,N)}return $(N,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(I){for(var O="",k=void 0,w=void 0,P="",R=void 0,K=void 0,Q=void 0,A="",x=0;k=I[x++],w=I[x++],P=I[x++],R=k>>2,K=(k&3)<<4|w>>4,Q=(w&15)<<2|P>>6,A=P&63,isNaN(w)?Q=A=64:isNaN(P)&&(A=64),O=O+this.KEY_STR.charAt(R)+this.KEY_STR.charAt(K)+this.KEY_STR.charAt(Q)+this.KEY_STR.charAt(A),k=w=P="",R=K=Q=A="",x<I.length;);return O}},{key:"restore",value:function(I,O){if(!I.match("data:image/jpeg;base64,"))return O;var k=this.decode64(I.replace("data:image/jpeg;base64,","")),w=this.slice2Segments(k),P=this.exifManipulation(O,w);return"data:image/jpeg;base64,".concat(this.encode64(P))}},{key:"exifManipulation",value:function(I,O){var k=this.getExifArray(O),w=this.insertExif(I,k),P=new Uint8Array(w);return P}},{key:"getExifArray",value:function(I){for(var O=void 0,k=0;k<I.length;){if(O=I[k],O[0]===255&O[1]===225)return O;k++}return[]}},{key:"insertExif",value:function(I,O){var k=I.replace("data:image/jpeg;base64,",""),w=this.decode64(k),P=w.indexOf(255,3),R=w.slice(0,P),K=w.slice(P),Q=R;return Q=Q.concat(O),Q=Q.concat(K),Q}},{key:"slice2Segments",value:function(I){for(var O=0,k=[];;){var w;if(I[O]===255&I[O+1]===218)break;if(I[O]===255&I[O+1]===216)O+=2;else{w=I[O+2]*256+I[O+3];var P=O+w+2,R=I.slice(O,P);k.push(R),O=P}if(O>I.length)break}return k}},{key:"decode64",value:function(I){var O=void 0,k=void 0,w="",P=void 0,R=void 0,K=void 0,Q="",A=0,x=[],B=/[^A-Za-z0-9\+\/\=]/g;for(B.exec(I)&&console.warn(`There were invalid base64 characters in the input text.
1179
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var w=!0,P=!1,R;return{s:function(){I=N[Symbol.iterator]()},n:function(){var Q=I.next();return w=Q.done,Q},e:function(Q){P=!0,R=Q},f:function(){try{!w&&I.return!=null&&I.return()}finally{if(P)throw R}}}}function _(N,M){if(N){if(typeof N=="string")return T(N,M);var I=Object.prototype.toString.call(N).slice(8,-1);if(I==="Object"&&N.constructor&&(I=N.constructor.name),I==="Map"||I==="Set")return Array.from(N);if(I==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(I))return T(N,M)}}function T(N,M){(M==null||M>N.length)&&(M=N.length);for(var I=0,O=new Array(M);I<M;I++)O[I]=N[I];return O}function D(N,M){if(!(N instanceof M))throw new TypeError("Cannot call a class as a function")}function G(N,M){for(var I=0;I<M.length;I++){var O=M[I];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(N,O.key,O)}}function $(N,M,I){return M&&G(N.prototype,M),I&&G(N,I),N}function j(N,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");N.prototype=Object.create(M&&M.prototype,{constructor:{value:N,writable:!0,configurable:!0}}),M&&W(N,M)}function W(N,M){return W=Object.setPrototypeOf||function(O,k){return O.__proto__=k,O},W(N,M)}function Y(N){var M=F();return function(){var O=X(N),k;if(M){var w=X(this).constructor;k=Reflect.construct(O,arguments,w)}else k=O.apply(this,arguments);return z(this,k)}}function z(N,M){return M&&(C(M)==="object"||typeof M=="function")?M:U(N)}function U(N){if(N===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N}function F(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function X(N){return X=Object.setPrototypeOf?Object.getPrototypeOf:function(I){return I.__proto__||Object.getPrototypeOf(I)},X(N)}var H=(function(N){j(I,N);var M=Y(I);function I(O,k){var w;D(this,I),w=M.call(this);var P,R;if(w.element=O,w.version=I.version,w.clickableElements=[],w.listeners=[],w.files=[],typeof w.element=="string"&&(w.element=document.querySelector(w.element)),!w.element||w.element.nodeType==null)throw new Error("Invalid dropzone element.");if(w.element.dropzone)throw new Error("Dropzone already attached.");I.instances.push(U(w)),w.element.dropzone=U(w);var K=(R=I.optionsForElement(w.element))!=null?R:{};if(w.options=I.extend({},E,K,k??{}),w.options.previewTemplate=w.options.previewTemplate.replace(/\n*/g,""),w.options.forceFallback||!I.isBrowserSupported())return z(w,w.options.fallback.call(U(w)));if(w.options.url==null&&(w.options.url=w.element.getAttribute("action")),!w.options.url)throw new Error("No URL provided.");if(w.options.acceptedFiles&&w.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(w.options.uploadMultiple&&w.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return w.options.acceptedMimeTypes&&(w.options.acceptedFiles=w.options.acceptedMimeTypes,delete w.options.acceptedMimeTypes),w.options.renameFilename!=null&&(w.options.renameFile=function(Q){return w.options.renameFilename.call(U(w),Q.name,Q)}),typeof w.options.method=="string"&&(w.options.method=w.options.method.toUpperCase()),(P=w.getExistingFallback())&&P.parentNode&&P.parentNode.removeChild(P),w.options.previewsContainer!==!1&&(w.options.previewsContainer?w.previewsContainer=I.getElement(w.options.previewsContainer,"previewsContainer"):w.previewsContainer=w.element),w.options.clickable&&(w.options.clickable===!0?w.clickableElements=[w.element]:w.clickableElements=I.getElements(w.options.clickable,"clickable")),w.init(),w}return $(I,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(k){return k.accepted}).map(function(k){return k})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(k){return!k.accepted}).map(function(k){return k})}},{key:"getFilesWithStatus",value:function(k){return this.files.filter(function(w){return w.status===k}).map(function(w){return w})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(I.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(I.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(I.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(k){return k.status===I.UPLOADING||k.status===I.QUEUED}).map(function(k){return k})}},{key:"init",value:function(){var k=this;if(this.element.tagName==="form"&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(I.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var w=function x(){k.hiddenFileInput&&k.hiddenFileInput.parentNode.removeChild(k.hiddenFileInput),k.hiddenFileInput=document.createElement("input"),k.hiddenFileInput.setAttribute("type","file"),(k.options.maxFiles===null||k.options.maxFiles>1)&&k.hiddenFileInput.setAttribute("multiple","multiple"),k.hiddenFileInput.className="dz-hidden-input",k.options.acceptedFiles!==null&&k.hiddenFileInput.setAttribute("accept",k.options.acceptedFiles),k.options.capture!==null&&k.hiddenFileInput.setAttribute("capture",k.options.capture),k.hiddenFileInput.setAttribute("tabindex","-1"),k.hiddenFileInput.style.visibility="hidden",k.hiddenFileInput.style.position="absolute",k.hiddenFileInput.style.top="0",k.hiddenFileInput.style.left="0",k.hiddenFileInput.style.height="0",k.hiddenFileInput.style.width="0",I.getElement(k.options.hiddenInputContainer,"hiddenInputContainer").appendChild(k.hiddenFileInput),k.hiddenFileInput.addEventListener("change",function(){var B=k.hiddenFileInput.files;if(B.length){var Z=S(B),q;try{for(Z.s();!(q=Z.n()).done;){var te=q.value;k.addFile(te)}}catch(se){Z.e(se)}finally{Z.f()}}k.emit("addedfiles",B),x()})};w()}this.URL=window.URL!==null?window.URL:window.webkitURL;var P=S(this.events),R;try{for(P.s();!(R=P.n()).done;){var K=R.value;this.on(K,this.options[K])}}catch(x){P.e(x)}finally{P.f()}this.on("uploadprogress",function(){return k.updateTotalUploadProgress()}),this.on("removedfile",function(){return k.updateTotalUploadProgress()}),this.on("canceled",function(x){return k.emit("complete",x)}),this.on("complete",function(x){if(k.getAddedFiles().length===0&&k.getUploadingFiles().length===0&&k.getQueuedFiles().length===0)return setTimeout(function(){return k.emit("queuecomplete")},0)});var Q=function(B){if(B.dataTransfer.types){for(var Z=0;Z<B.dataTransfer.types.length;Z++)if(B.dataTransfer.types[Z]==="Files")return!0}return!1},A=function(B){if(Q(B))return B.stopPropagation(),B.preventDefault?B.preventDefault():B.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(B){return k.emit("dragstart",B)},dragenter:function(B){return A(B),k.emit("dragenter",B)},dragover:function(B){var Z;try{Z=B.dataTransfer.effectAllowed}catch{}return B.dataTransfer.dropEffect=Z==="move"||Z==="linkMove"?"move":"copy",A(B),k.emit("dragover",B)},dragleave:function(B){return k.emit("dragleave",B)},drop:function(B){return A(B),k.drop(B)},dragend:function(B){return k.emit("dragend",B)}}}],this.clickableElements.forEach(function(x){return k.listeners.push({element:x,events:{click:function(Z){return(x!==k.element||Z.target===k.element||I.elementInside(Z.target,k.element.querySelector(".dz-message")))&&k.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),this.hiddenFileInput!=null&&this.hiddenFileInput.parentNode&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,I.instances.splice(I.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var k,w=0,P=0,R=this.getActiveFiles();if(R.length){var K=S(this.getActiveFiles()),Q;try{for(K.s();!(Q=K.n()).done;){var A=Q.value;w+=A.upload.bytesSent,P+=A.upload.total}}catch(x){K.e(x)}finally{K.f()}k=100*w/P}else k=100;return this.emit("totaluploadprogress",k,P,w)}},{key:"_getParamName",value:function(k){return typeof this.options.paramName=="function"?this.options.paramName(k):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(k,"]"):"")}},{key:"_renameFile",value:function(k){return typeof this.options.renameFile!="function"?k.name:this.options.renameFile(k)}},{key:"getFallbackForm",value:function(){var k,w;if(k=this.getExistingFallback())return k;var P='<div class="dz-fallback">';this.options.dictFallbackText&&(P+="<p>".concat(this.options.dictFallbackText,"</p>")),P+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var R=I.createElement(P);return this.element.tagName!=="FORM"?(w=I.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),w.appendChild(R)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),w??R}},{key:"getExistingFallback",value:function(){for(var k=function(A){var x=S(A),B;try{for(x.s();!(B=x.n()).done;){var Z=B.value;if(/(^| )fallback($| )/.test(Z.className))return Z}}catch(q){x.e(q)}finally{x.f()}},w=0,P=["div","form"];w<P.length;w++){var R=P[w],K;if(K=k(this.element.getElementsByTagName(R)))return K}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(k){return(function(){var w=[];for(var P in k.events){var R=k.events[P];w.push(k.element.addEventListener(P,R,!1))}return w})()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(k){return(function(){var w=[];for(var P in k.events){var R=k.events[P];w.push(k.element.removeEventListener(P,R,!1))}return w})()})}},{key:"disable",value:function(){var k=this;return this.clickableElements.forEach(function(w){return w.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(w){return k.cancelUpload(w)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(k){return k.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(k){var w=0,P="b";if(k>0){for(var R=["tb","gb","mb","kb","b"],K=0;K<R.length;K++){var Q=R[K],A=Math.pow(this.options.filesizeBase,4-K)/10;if(k>=A){w=k/Math.pow(this.options.filesizeBase,4-K),P=Q;break}}w=Math.round(10*w)/10}return"<strong>".concat(w,"</strong> ").concat(this.options.dictFileSizeUnits[P])}},{key:"_updateMaxFilesReachedClass",value:function(){return this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(k){if(k.dataTransfer){this.emit("drop",k);for(var w=[],P=0;P<k.dataTransfer.files.length;P++)w[P]=k.dataTransfer.files[P];if(w.length){var R=k.dataTransfer.items;R&&R.length&&R[0].webkitGetAsEntry!=null?this._addFilesFromItems(R):this.handleFiles(w)}this.emit("addedfiles",w)}}},{key:"paste",value:function(k){if(Ee(k?.clipboardData,function(P){return P.items})!=null){this.emit("paste",k);var w=k.clipboardData.items;if(w.length)return this._addFilesFromItems(w)}}},{key:"handleFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;this.addFile(R)}}catch(K){w.e(K)}finally{w.f()}}},{key:"_addFilesFromItems",value:function(k){var w=this;return(function(){var P=[],R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value,A;Q.webkitGetAsEntry!=null&&(A=Q.webkitGetAsEntry())?A.isFile?P.push(w.addFile(Q.getAsFile())):A.isDirectory?P.push(w._addFilesFromDirectory(A,A.name)):P.push(void 0):Q.getAsFile!=null&&(Q.kind==null||Q.kind==="file")?P.push(w.addFile(Q.getAsFile())):P.push(void 0)}}catch(x){R.e(x)}finally{R.f()}return P})()}},{key:"_addFilesFromDirectory",value:function(k,w){var P=this,R=k.createReader(),K=function(x){return Te(console,"log",function(B){return B.log(x)})},Q=function A(){return R.readEntries(function(x){if(x.length>0){var B=S(x),Z;try{for(B.s();!(Z=B.n()).done;){var q=Z.value;q.isFile?q.file(function(te){if(!(P.options.ignoreHiddenFiles&&te.name.substring(0,1)==="."))return te.fullPath="".concat(w,"/").concat(te.name),P.addFile(te)}):q.isDirectory&&P._addFilesFromDirectory(q,"".concat(w,"/").concat(q.name))}}catch(te){B.e(te)}finally{B.f()}A()}return null},K)};return Q()}},{key:"accept",value:function(k,w){this.options.maxFilesize&&k.size>this.options.maxFilesize*1024*1024?w(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(k.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):I.isValidFile(k,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(w(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",k)):this.options.accept.call(this,k,w):w(this.options.dictInvalidFileType)}},{key:"addFile",value:function(k){var w=this;k.upload={uuid:I.uuidv4(),progress:0,total:k.size,bytesSent:0,filename:this._renameFile(k)},this.files.push(k),k.status=I.ADDED,this.emit("addedfile",k),this._enqueueThumbnail(k),this.accept(k,function(P){P?(k.accepted=!1,w._errorProcessing([k],P)):(k.accepted=!0,w.options.autoQueue&&w.enqueueFile(k)),w._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;this.enqueueFile(R)}}catch(K){w.e(K)}finally{w.f()}return null}},{key:"enqueueFile",value:function(k){var w=this;if(k.status===I.ADDED&&k.accepted===!0){if(k.status=I.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return w.processQueue()},0)}else throw new Error("This file can't be queued because it has already been processed or was rejected.")}},{key:"_enqueueThumbnail",value:function(k){var w=this;if(this.options.createImageThumbnails&&k.type.match(/image.*/)&&k.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(k),setTimeout(function(){return w._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var k=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var w=this._thumbnailQueue.shift();return this.createThumbnail(w,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(P){return k.emit("thumbnail",w,P),k._processingThumbnail=!1,k._processThumbnailQueue()})}}},{key:"removeFile",value:function(k){if(k.status===I.UPLOADING&&this.cancelUpload(k),this.files=ee(this.files,k),this.emit("removedfile",k),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(k){k==null&&(k=!1);var w=S(this.files.slice()),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;(R.status!==I.UPLOADING||k)&&this.removeFile(R)}}catch(K){w.e(K)}finally{w.f()}return null}},{key:"resizeImage",value:function(k,w,P,R,K){var Q=this;return this.createThumbnail(k,w,P,R,!0,function(A,x){if(x==null)return K(k);var B=Q.options.resizeMimeType;B==null&&(B=k.type);var Z=x.toDataURL(B,Q.options.resizeQuality);return(B==="image/jpeg"||B==="image/jpg")&&(Z=me.restore(k.dataURL,Z)),K(I.dataURItoBlob(Z))})}},{key:"createThumbnail",value:function(k,w,P,R,K,Q){var A=this,x=new FileReader;x.onload=function(){if(k.dataURL=x.result,k.type==="image/svg+xml"){Q?.(x.result);return}A.createThumbnailFromUrl(k,w,P,R,K,Q)},x.readAsDataURL(k)}},{key:"displayExistingFile",value:function(k,w,P,R){var K=this,Q=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",k),this.emit("complete",k),!Q)this.emit("thumbnail",k,w),P&&P();else{var A=function(B){K.emit("thumbnail",k,B),P&&P()};k.dataURL=w,this.createThumbnailFromUrl(k,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,A,R)}}},{key:"createThumbnailFromUrl",value:function(k,w,P,R,K,Q,A){var x=this,B=document.createElement("img");return A&&(B.crossOrigin=A),K=getComputedStyle(document.body).imageOrientation=="from-image"?!1:K,B.onload=function(){var Z=function(te){return te(1)};return typeof EXIF<"u"&&EXIF!==null&&K&&(Z=function(te){return EXIF.getData(B,function(){return te(EXIF.getTag(this,"Orientation"))})}),Z(function(q){k.width=B.width,k.height=B.height;var te=x.options.resize.call(x,k,w,P,R),se=document.createElement("canvas"),J=se.getContext("2d");switch(se.width=te.trgWidth,se.height=te.trgHeight,q>4&&(se.width=te.trgHeight,se.height=te.trgWidth),q){case 2:J.translate(se.width,0),J.scale(-1,1);break;case 3:J.translate(se.width,se.height),J.rotate(Math.PI);break;case 4:J.translate(0,se.height),J.scale(1,-1);break;case 5:J.rotate(.5*Math.PI),J.scale(1,-1);break;case 6:J.rotate(.5*Math.PI),J.translate(0,-se.width);break;case 7:J.rotate(.5*Math.PI),J.translate(se.height,-se.width),J.scale(-1,1);break;case 8:J.rotate(-.5*Math.PI),J.translate(-se.height,0);break}pe(J,B,te.srcX!=null?te.srcX:0,te.srcY!=null?te.srcY:0,te.srcWidth,te.srcHeight,te.trgX!=null?te.trgX:0,te.trgY!=null?te.trgY:0,te.trgWidth,te.trgHeight);var re=se.toDataURL("image/png");if(Q!=null)return Q(re,se)})},Q!=null&&(B.onerror=Q),B.src=k.dataURL}},{key:"processQueue",value:function(){var k=this.options.parallelUploads,w=this.getUploadingFiles().length,P=w;if(!(w>=k)){var R=this.getQueuedFiles();if(R.length>0){if(this.options.uploadMultiple)return this.processFiles(R.slice(0,k-w));for(;P<k;){if(!R.length)return;this.processFile(R.shift()),P++}}}}},{key:"processFile",value:function(k){return this.processFiles([k])}},{key:"processFiles",value:function(k){var w=S(k),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;R.processing=!0,R.status=I.UPLOADING,this.emit("processing",R)}}catch(K){w.e(K)}finally{w.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",k),this.uploadFiles(k)}},{key:"_getFilesWithXhr",value:function(k){return this.files.filter(function(w){return w.xhr===k}).map(function(w){return w})}},{key:"cancelUpload",value:function(k){if(k.status===I.UPLOADING){var w=this._getFilesWithXhr(k.xhr),P=S(w),R;try{for(P.s();!(R=P.n()).done;){var K=R.value;K.status=I.CANCELED}}catch(B){P.e(B)}finally{P.f()}typeof k.xhr<"u"&&k.xhr.abort();var Q=S(w),A;try{for(Q.s();!(A=Q.n()).done;){var x=A.value;this.emit("canceled",x)}}catch(B){Q.e(B)}finally{Q.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",w)}else(k.status===I.ADDED||k.status===I.QUEUED)&&(k.status=I.CANCELED,this.emit("canceled",k),this.options.uploadMultiple&&this.emit("canceledmultiple",[k]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(k){if(typeof k=="function"){for(var w=arguments.length,P=new Array(w>1?w-1:0),R=1;R<w;R++)P[R-1]=arguments[R];return k.apply(this,P)}return k}},{key:"uploadFile",value:function(k){return this.uploadFiles([k])}},{key:"uploadFiles",value:function(k){var w=this;this._transformFiles(k,function(P){if(w.options.chunking){var R=P[0];k[0].upload.chunked=w.options.chunking&&(w.options.forceChunking||R.size>w.options.chunkSize),k[0].upload.totalChunkCount=Math.ceil(R.size/w.options.chunkSize)}if(k[0].upload.chunked){var K=k[0],Q=P[0];K.upload.chunks=[];var A=function(){for(var te=0;K.upload.chunks[te]!==void 0;)te++;if(!(te>=K.upload.totalChunkCount)){var se=te*w.options.chunkSize,J=Math.min(se+w.options.chunkSize,Q.size),re={name:w._getParamName(0),data:Q.webkitSlice?Q.webkitSlice(se,J):Q.slice(se,J),filename:K.upload.filename,chunkIndex:te};K.upload.chunks[te]={file:K,index:te,dataBlock:re,status:I.UPLOADING,progress:0,retries:0},w._uploadData(k,[re])}};if(K.upload.finishedChunkUpload=function(q,te){var se=!0;q.status=I.SUCCESS,q.dataBlock=null,q.xhr=null;for(var J=0;J<K.upload.totalChunkCount;J++){if(K.upload.chunks[J]===void 0)return A();K.upload.chunks[J].status!==I.SUCCESS&&(se=!1)}se&&w.options.chunksUploaded(K,function(){w._finished(k,te,null)})},w.options.parallelChunkUploads)for(var x=0;x<K.upload.totalChunkCount;x++)A();else A()}else{for(var B=[],Z=0;Z<k.length;Z++)B[Z]={name:w._getParamName(Z),data:P[Z],filename:k[Z].upload.filename};w._uploadData(k,B)}})}},{key:"_getChunk",value:function(k,w){for(var P=0;P<k.upload.totalChunkCount;P++)if(k.upload.chunks[P]!==void 0&&k.upload.chunks[P].xhr===w)return k.upload.chunks[P]}},{key:"_uploadData",value:function(k,w){var P=this,R=new XMLHttpRequest,K=S(k),Q;try{for(K.s();!(Q=K.n()).done;){var A=Q.value;A.xhr=R}}catch($e){K.e($e)}finally{K.f()}k[0].upload.chunked&&(k[0].upload.chunks[w[0].chunkIndex].xhr=R);var x=this.resolveOption(this.options.method,k),B=this.resolveOption(this.options.url,k);R.open(x,B,!0);var Z=this.resolveOption(this.options.timeout,k);Z&&(R.timeout=this.resolveOption(this.options.timeout,k)),R.withCredentials=!!this.options.withCredentials,R.onload=function($e){P._finishedUploading(k,R,$e)},R.ontimeout=function(){P._handleUploadError(k,R,"Request timedout after ".concat(P.options.timeout/1e3," seconds"))},R.onerror=function(){P._handleUploadError(k,R)};var q=R.upload!=null?R.upload:R;q.onprogress=function($e){return P._updateFilesUploadProgress(k,R,$e)};var te={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&I.extend(te,this.options.headers);for(var se in te){var J=te[se];J&&R.setRequestHeader(se,J)}var re=new FormData;if(this.options.params){var Se=this.options.params;typeof Se=="function"&&(Se=Se.call(this,k,R,k[0].upload.chunked?this._getChunk(k[0],R):null));for(var Ne in Se){var Oe=Se[Ne];if(Array.isArray(Oe))for(var nt=0;nt<Oe.length;nt++)re.append(Ne,Oe[nt]);else re.append(Ne,Oe)}}var pt=S(k),rt;try{for(pt.s();!(rt=pt.n()).done;){var Qr=rt.value;this.emit("sending",Qr,R,re)}}catch($e){pt.e($e)}finally{pt.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",k,R,re),this._addFormElementData(re);for(var Tn=0;Tn<w.length;Tn++){var Xe=w[Tn];re.append(Xe.name,Xe.data,Xe.filename)}this.submitRequest(R,re,k)}},{key:"_transformFiles",value:function(k,w){for(var P=this,R=[],K=0,Q=function(B){P.options.transformFile.call(P,k[B],function(Z){R[B]=Z,++K===k.length&&w(R)})},A=0;A<k.length;A++)Q(A)}},{key:"_addFormElementData",value:function(k){if(this.element.tagName==="FORM"){var w=S(this.element.querySelectorAll("input, textarea, select, button")),P;try{for(w.s();!(P=w.n()).done;){var R=P.value,K=R.getAttribute("name"),Q=R.getAttribute("type");if(Q&&(Q=Q.toLowerCase()),!(typeof K>"u"||K===null))if(R.tagName==="SELECT"&&R.hasAttribute("multiple")){var A=S(R.options,!0),x;try{for(A.s();!(x=A.n()).done;){var B=x.value;B.selected&&k.append(K,B.value)}}catch(Z){A.e(Z)}finally{A.f()}}else(!Q||Q!=="checkbox"&&Q!=="radio"||R.checked)&&k.append(K,R.value)}}catch(Z){w.e(Z)}finally{w.f()}}}},{key:"_updateFilesUploadProgress",value:function(k,w,P){if(k[0].upload.chunked){var A=k[0],x=this._getChunk(A,w);P?(x.progress=100*P.loaded/P.total,x.total=P.total,x.bytesSent=P.loaded):(x.progress=100,x.bytesSent=x.total),A.upload.progress=0,A.upload.total=0,A.upload.bytesSent=0;for(var B=0;B<A.upload.totalChunkCount;B++)A.upload.chunks[B]&&typeof A.upload.chunks[B].progress<"u"&&(A.upload.progress+=A.upload.chunks[B].progress,A.upload.total+=A.upload.chunks[B].total,A.upload.bytesSent+=A.upload.chunks[B].bytesSent);A.upload.progress=A.upload.progress/A.upload.totalChunkCount,this.emit("uploadprogress",A,A.upload.progress,A.upload.bytesSent)}else{var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.upload.total&&Q.upload.bytesSent&&Q.upload.bytesSent==Q.upload.total||(P?(Q.upload.progress=100*P.loaded/P.total,Q.upload.total=P.total,Q.upload.bytesSent=P.loaded):(Q.upload.progress=100,Q.upload.bytesSent=Q.upload.total),this.emit("uploadprogress",Q,Q.upload.progress,Q.upload.bytesSent))}}catch(Z){R.e(Z)}finally{R.f()}}}},{key:"_finishedUploading",value:function(k,w,P){var R;if(k[0].status!==I.CANCELED&&w.readyState===4){if(w.responseType!=="arraybuffer"&&w.responseType!=="blob"&&(R=w.responseText,w.getResponseHeader("content-type")&&~w.getResponseHeader("content-type").indexOf("application/json")))try{R=JSON.parse(R)}catch(K){P=K,R="Invalid JSON response from server."}this._updateFilesUploadProgress(k,w),200<=w.status&&w.status<300?k[0].upload.chunked?k[0].upload.finishedChunkUpload(this._getChunk(k[0],w),R):this._finished(k,R,P):this._handleUploadError(k,w,R)}}},{key:"_handleUploadError",value:function(k,w,P){if(k[0].status!==I.CANCELED){if(k[0].upload.chunked&&this.options.retryChunks){var R=this._getChunk(k[0],w);if(R.retries++<this.options.retryChunksLimit){this._uploadData(k,[R.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(k,P||this.options.dictResponseError.replace("{{statusCode}}",w.status),w)}}},{key:"submitRequest",value:function(k,w,P){if(k.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}k.send(w)}},{key:"_finished",value:function(k,w,P){var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.status=I.SUCCESS,this.emit("success",Q,w,P),this.emit("complete",Q)}}catch(A){R.e(A)}finally{R.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",k,w,P),this.emit("completemultiple",k)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(k,w,P){var R=S(k),K;try{for(R.s();!(K=R.n()).done;){var Q=K.value;Q.status=I.ERROR,this.emit("error",Q,w,P),this.emit("complete",Q)}}catch(A){R.e(A)}finally{R.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",k,w,P),this.emit("completemultiple",k)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"initClass",value:function(){this.prototype.Emitter=h,this.prototype.events=["drop","dragstart","dragend","dragenter","dragover","dragleave","addedfile","addedfiles","removedfile","thumbnail","error","errormultiple","processing","processingmultiple","uploadprogress","totaluploadprogress","sending","sendingmultiple","success","successmultiple","canceled","canceledmultiple","complete","completemultiple","reset","maxfilesexceeded","maxfilesreached","queuecomplete"],this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(k){for(var w=arguments.length,P=new Array(w>1?w-1:0),R=1;R<w;R++)P[R-1]=arguments[R];for(var K=0,Q=P;K<Q.length;K++){var A=Q[K];for(var x in A){var B=A[x];k[x]=B}}return k}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(k){var w=Math.random()*16|0,P=k==="x"?w:w&3|8;return P.toString(16)})}}]),I})(h);H.initClass(),H.version="5.9.3",H.options={},H.optionsForElement=function(N){if(N.getAttribute("id"))return H.options[ne(N.getAttribute("id"))]},H.instances=[],H.forElement=function(N){if(typeof N=="string"&&(N=document.querySelector(N)),N?.dropzone==null)throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return N.dropzone},H.autoDiscover=!0,H.discover=function(){var N;if(document.querySelectorAll)N=document.querySelectorAll(".dropzone");else{N=[];var M=function(O){return(function(){var k=[],w=S(O),P;try{for(w.s();!(P=w.n()).done;){var R=P.value;/(^| )dropzone($| )/.test(R.className)?k.push(N.push(R)):k.push(void 0)}}catch(K){w.e(K)}finally{w.f()}return k})()};M(document.getElementsByTagName("div")),M(document.getElementsByTagName("form"))}return(function(){var I=[],O=S(N),k;try{for(O.s();!(k=O.n()).done;){var w=k.value;H.optionsForElement(w)!==!1?I.push(new H(w)):I.push(void 0)}}catch(P){O.e(P)}finally{O.f()}return I})()},H.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],H.isBrowserSupported=function(){var N=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))N=!1;else{H.blacklistedBrowsers!==void 0&&(H.blockedBrowsers=H.blacklistedBrowsers);var M=S(H.blockedBrowsers),I;try{for(M.s();!(I=M.n()).done;){var O=I.value;if(O.test(navigator.userAgent)){N=!1;continue}}}catch(k){M.e(k)}finally{M.f()}}else N=!1;return N},H.dataURItoBlob=function(N){for(var M=atob(N.split(",")[1]),I=N.split(",")[0].split(":")[1].split(";")[0],O=new ArrayBuffer(M.length),k=new Uint8Array(O),w=0,P=M.length,R=0<=P;R?w<=P:w>=P;R?w++:w--)k[w]=M.charCodeAt(w);return new Blob([O],{type:I})};var ee=function(M,I){return M.filter(function(O){return O!==I}).map(function(O){return O})},ne=function(M){return M.replace(/[\-_](\w)/g,function(I){return I.charAt(1).toUpperCase()})};H.createElement=function(N){var M=document.createElement("div");return M.innerHTML=N,M.childNodes[0]},H.elementInside=function(N,M){if(N===M)return!0;for(;N=N.parentNode;)if(N===M)return!0;return!1},H.getElement=function(N,M){var I;if(typeof N=="string"?I=document.querySelector(N):N.nodeType!=null&&(I=N),I==null)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector or a plain HTML element."));return I},H.getElements=function(N,M){var I,O;if(N instanceof Array){O=[];try{var k=S(N,!0),w;try{for(k.s();!(w=k.n()).done;)I=w.value,O.push(this.getElement(I,M))}catch(K){k.e(K)}finally{k.f()}}catch{O=null}}else if(typeof N=="string"){O=[];var P=S(document.querySelectorAll(N)),R;try{for(P.s();!(R=P.n()).done;)I=R.value,O.push(I)}catch(K){P.e(K)}finally{P.f()}}else N.nodeType!=null&&(O=[N]);if(O==null||!O.length)throw new Error("Invalid `".concat(M,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return O},H.confirm=function(N,M,I){if(window.confirm(N))return M();if(I!=null)return I()},H.isValidFile=function(N,M){if(!M)return!0;M=M.split(",");var I=N.type,O=I.replace(/\/.*$/,""),k=S(M),w;try{for(k.s();!(w=k.n()).done;){var P=w.value;if(P=P.trim(),P.charAt(0)==="."){if(N.name.toLowerCase().indexOf(P.toLowerCase(),N.name.length-P.length)!==-1)return!0}else if(/\/\*$/.test(P)){if(O===P.replace(/\/.*$/,""))return!0}else if(I===P)return!0}}catch(R){k.e(R)}finally{k.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(N){return this.each(function(){return new H(this,N)})}),H.ADDED="added",H.QUEUED="queued",H.ACCEPTED=H.QUEUED,H.UPLOADING="uploading",H.PROCESSING=H.UPLOADING,H.CANCELED="canceled",H.ERROR="error",H.SUCCESS="success";var ae=function(M){M.naturalWidth;var I=M.naturalHeight,O=document.createElement("canvas");O.width=1,O.height=I;var k=O.getContext("2d");k.drawImage(M,0,0);for(var w=k.getImageData(1,0,1,I),P=w.data,R=0,K=I,Q=I;Q>R;){var A=P[(Q-1)*4+3];A===0?K=Q:R=Q,Q=K+R>>1}var x=Q/I;return x===0?1:x},pe=function(M,I,O,k,w,P,R,K,Q,A){var x=ae(I);return M.drawImage(I,O,k,w,P,R,K,Q,A/x)},me=(function(){function N(){D(this,N)}return $(N,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(I){for(var O="",k=void 0,w=void 0,P="",R=void 0,K=void 0,Q=void 0,A="",x=0;k=I[x++],w=I[x++],P=I[x++],R=k>>2,K=(k&3)<<4|w>>4,Q=(w&15)<<2|P>>6,A=P&63,isNaN(w)?Q=A=64:isNaN(P)&&(A=64),O=O+this.KEY_STR.charAt(R)+this.KEY_STR.charAt(K)+this.KEY_STR.charAt(Q)+this.KEY_STR.charAt(A),k=w=P="",R=K=Q=A="",x<I.length;);return O}},{key:"restore",value:function(I,O){if(!I.match("data:image/jpeg;base64,"))return O;var k=this.decode64(I.replace("data:image/jpeg;base64,","")),w=this.slice2Segments(k),P=this.exifManipulation(O,w);return"data:image/jpeg;base64,".concat(this.encode64(P))}},{key:"exifManipulation",value:function(I,O){var k=this.getExifArray(O),w=this.insertExif(I,k),P=new Uint8Array(w);return P}},{key:"getExifArray",value:function(I){for(var O=void 0,k=0;k<I.length;){if(O=I[k],O[0]===255&O[1]===225)return O;k++}return[]}},{key:"insertExif",value:function(I,O){var k=I.replace("data:image/jpeg;base64,",""),w=this.decode64(k),P=w.indexOf(255,3),R=w.slice(0,P),K=w.slice(P),Q=R;return Q=Q.concat(O),Q=Q.concat(K),Q}},{key:"slice2Segments",value:function(I){for(var O=0,k=[];;){var w;if(I[O]===255&I[O+1]===218)break;if(I[O]===255&I[O+1]===216)O+=2;else{w=I[O+2]*256+I[O+3];var P=O+w+2,R=I.slice(O,P);k.push(R),O=P}if(O>I.length)break}return k}},{key:"decode64",value:function(I){var O=void 0,k=void 0,w="",P=void 0,R=void 0,K=void 0,Q="",A=0,x=[],B=/[^A-Za-z0-9\+\/\=]/g;for(B.exec(I)&&console.warn(`There were invalid base64 characters in the input text.
1180
1180
  Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
1181
1181
  Expect errors in decoding.`),I=I.replace(/[^A-Za-z0-9\+\/\=]/g,"");P=this.KEY_STR.indexOf(I.charAt(A++)),R=this.KEY_STR.indexOf(I.charAt(A++)),K=this.KEY_STR.indexOf(I.charAt(A++)),Q=this.KEY_STR.indexOf(I.charAt(A++)),O=P<<2|R>>4,k=(R&15)<<4|K>>2,w=(K&3)<<6|Q,x.push(O),K!==64&&x.push(k),Q!==64&&x.push(w),O=k=w="",P=R=K=Q="",A<I.length;);return x}}]),N})();me.initClass();var be=function(M,I){var O=!1,k=!0,w=M.document,P=w.documentElement,R=w.addEventListener?"addEventListener":"attachEvent",K=w.addEventListener?"removeEventListener":"detachEvent",Q=w.addEventListener?"":"on",A=function B(Z){if(!(Z.type==="readystatechange"&&w.readyState!=="complete")&&((Z.type==="load"?M:w)[K](Q+Z.type,B,!1),!O&&(O=!0)))return I.call(M,Z.type||Z)},x=function B(){try{P.doScroll("left")}catch{setTimeout(B,50);return}return A("poll")};if(w.readyState!=="complete"){if(w.createEventObject&&P.doScroll){try{k=!M.frameElement}catch{}k&&x()}return w[R](Q+"DOMContentLoaded",A,!1),w[R](Q+"readystatechange",A,!1),M[R](Q+"load",A,!1)}};H._autoDiscoverFunction=function(){if(H.autoDiscover)return H.discover()},be(window,H._autoDiscoverFunction);function Ee(N,M){return typeof N<"u"&&N!==null?M(N):void 0}function Te(N,M,I){if(typeof N<"u"&&N!==null&&typeof N[M]=="function")return I(N,M)}window.Dropzone=H;var ve=H})(),i})()})})(jd)),jd.exports}var mS=pS();const Qm=Yo(mS),gS={class:"fallback"},vS={for:"file"},yS={class:"dz-message","data-dz-message":""},bS={id:"bd-dropzone-theme",style:{display:"none"}},CS={class:"dz-preview dz-file-preview"},ES={class:"dz-details"},kS={class:"dz-success-mark"},wS={class:"dz-error-message text-danger"},Wd=l.defineComponent({__name:"BDDropzone",props:{modelValue:{default:[]},buttonText:{default:void 0},multiple:{type:Boolean,default:!1},errorMessage:{default:void 0},fileSizeExceededMessage:{default:void 0},acceptedFiles:{default:".jpg"},url:{default:""},tag:{default:"form"},token:{default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>({variant:ia.PRIMARY,size:at.SM})),i=Vr(n,"modelValue",r);let s=null;Qm.autoDiscover=!1,l.watch(()=>n.modelValue,()=>{c()}),l.onMounted(()=>{document.getElementById("dropzone")&&a()});const c=()=>{s&&(s.destroy(),a())},a=()=>{s=new Qm("#dropzone",{url:n.url,method:"post",acceptedFiles:n.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:n.multiple?10:1,headers:{RequestVerificationToken:n.token},dictResponseError:n.errorMessage,dictFileTooBig:n.fileSizeExceededMessage,previewTemplate:document.querySelector("#bd-dropzone-theme")?.innerHTML}),s.on("error",u),s.on("success",d),s.on("removedfile",h)},d=function(m,g){i.value.push({UUID:m.upload?.uuid,CorrelationId:g.CorrelationId,Naam:g.Naam}),f(m)},u=function(m){f(m)},f=function(m){const g=m.name;if(!(g.endsWith(".png")||g.endsWith(".jpg")||g.endsWith(".jpeg")||g.endsWith(".gif"))){const v=m.previewElement.getElementsByClassName("icon-file"),y=m.previewElement.getElementsByClassName("dz-image");v[0].classList.remove("d-none"),y[0].classList.add("d-none")}},h=function(m){const g=i.value.findIndex(v=>v?.UUID===m.upload?.uuid);g!==-1&&i.value.splice(g,1)},p=l.computed(()=>n.tag??"form");return(m,g)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(p.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:l.withCtx(()=>[l.createElementVNode("div",gS,[g[0]||(g[0]=l.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1)),g[1]||(g[1]=l.createTextVNode(" test ",-1)),l.createElementVNode("label",vS,[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(n.buttonText),1)])]),l.createElementVNode("div",yS,[l.createVNode(Re,l.normalizeProps(l.guardReactiveProps(o.value)),{default:l.withCtx(()=>[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(n.buttonText),1)]),_:1},16)])]),_:1})),l.createElementVNode("div",bS,[l.createElementVNode("div",CS,[l.createElementVNode("div",ES,[g[2]||(g[2]=l.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1)),l.createVNode(l.unref(Rc),{"data-dz-thumbnail":"",class:"d-none"}),g[3]||(g[3]=l.createElementVNode("div",{class:"dz-filename"},[l.createElementVNode("small",{"data-dz-name":""})],-1)),l.createVNode(Re,{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:l.withCtx(()=>[l.createVNode(l.unref(Ii))]),_:1})]),g[5]||(g[5]=l.createElementVNode("div",{class:"dz-progress"},[l.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[l.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1)),l.createElementVNode("div",kS,[l.createVNode(l.unref($o))]),l.createElementVNode("div",wS,[l.createVNode(l.unref(na)),g[4]||(g[4]=l.createElementVNode("small",{"data-dz-errormessage":""},null,-1))])])])],64))}});function wt(t){this.content=t}wt.prototype={constructor:wt,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new wt(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new wt(n)},addToStart:function(t,e){return new wt([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new wt(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new wt(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=wt.from(t),t.size?new wt(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=wt.from(t),t.size?new wt(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=wt.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}},wt.from=function(t){if(t instanceof wt)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new wt(e)};function Zm(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=Zm(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function Jm(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),c=e.child(--i),a=s.nodeSize;if(s==c){n-=a,r-=a;continue}if(!s.sameMarkup(c))return{a:n,b:r};if(s.isText&&s.text!=c.text){let d=0,u=Math.min(s.text.length,c.text.length);for(;d<u&&s.text[s.text.length-d-1]==c.text[c.text.length-d-1];)d++,n--,r--;return{a:n,b:r}}if(s.content.size||c.content.size){let d=Jm(s.content,c.content,n-1,r-1);if(d)return d}n-=a,r-=a}}class ce{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,c=0;c<n;s++){let a=this.content[s],d=c+a.nodeSize;if(d>e&&r(a,o+c,i||null,s)!==!1&&a.content.size){let u=c+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,n-u),r,o+u)}c=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(c,a)=>{let d=c.isText?c.text.slice(Math.max(e,a)-a,n-a):c.isLeaf?o?typeof o=="function"?o(c):o:c.type.spec.leafText?c.type.spec.leafText(c):"":"";c.isBlock&&(c.isLeaf&&d||c.isTextblock)&&r&&(s?s=!1:i+=r),i+=d},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new ce(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let c=this.content[i],a=s+c.nodeSize;a>e&&((s<e||a>n)&&(c.isText?c=c.cut(Math.max(0,e-s),Math.min(c.text.length,n-s)):c=c.cut(Math.max(0,e-s-1),Math.min(c.content.size,n-s-1))),r.push(c),o+=c.nodeSize),s=a}return new ce(r,o)}cutByIndex(e,n){return e==n?ce.empty:e==0&&n==this.content.length?this:new ce(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new ce(o,i)}addToStart(e){return new ce([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new ce(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return Zm(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Jm(this,e,n,r)}findIndex(e){if(e==0)return Ra(0,e);if(e==this.size)return Ra(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?Ra(n+1,i):Ra(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return ce.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new ce(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return ce.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new ce(n||e,r)}static from(e){if(!e)return ce.empty;if(e instanceof ce)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new ce([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}ce.empty=new ce([],0);const Kd={index:0,offset:0};function Ra(t,e){return Kd.index=t,Kd.offset=e,Kd}function $a(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!$a(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!$a(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let Ye=class Sh{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&$a(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Sh.none;if(e instanceof Sh)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};Ye.none=[];class Fa extends Error{}class ye{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=qm(this.content,e+this.openStart,n);return r&&new ye(r,this.openStart,this.openEnd)}removeBetween(e,n){return new ye(Xm(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return ye.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new ye(ce.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new ye(e,r,o)}}ye.empty=new ye(ce.empty,0,0);function Xm(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:c}=t.findIndex(n);if(o==e||i.isText){if(c!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(Xm(i.content,e-o-1,n-o-1)))}function qm(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let c=qm(s.content,e-i-1,n,s);return c&&t.replaceChild(o,s.copy(c))}function SS(t,e,n){if(n.openStart>t.depth)throw new Fa("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Fa("Inconsistent open depths");return Vm(t,e,n,0)}function Vm(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=Vm(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,c=s.content;return lo(s,c.cut(0,t.parentOffset).append(n.content).append(c.cut(e.parentOffset)))}else{let{start:s,end:c}=AS(n,t);return lo(i,t0(t,s,c,e,r))}else return lo(i,za(t,e,r))}function e0(t,e){if(!e.type.compatibleContent(t.type))throw new Fa("Cannot join "+e.type.name+" onto "+t.type.name)}function Yd(t,e,n){let r=t.node(n);return e0(r,e.node(n)),r}function ao(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function ts(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(ao(t.nodeAfter,r),i++));for(let c=i;c<s;c++)ao(o.child(c),r);e&&e.depth==n&&e.textOffset&&ao(e.nodeBefore,r)}function lo(t,e){return t.type.checkContent(e),t.copy(e)}function t0(t,e,n,r,o){let i=t.depth>o&&Yd(t,e,o+1),s=r.depth>o&&Yd(n,r,o+1),c=[];return ts(null,t,o,c),i&&s&&e.index(o)==n.index(o)?(e0(i,s),ao(lo(i,t0(t,e,n,r,o+1)),c)):(i&&ao(lo(i,za(t,e,o+1)),c),ts(e,n,o,c),s&&ao(lo(s,za(n,r,o+1)),c)),ts(r,null,o,c),new ce(c)}function za(t,e,n){let r=[];if(ts(null,t,n,r),t.depth>n){let o=Yd(t,e,n+1);ao(lo(o,za(t,e,n+1)),r)}return ts(e,null,n,r),new ce(r)}function AS(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(ce.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ns{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return Ye.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let c=r;r=o,o=c}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new Ua(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:c,offset:a}=s.content.findIndex(i),d=i-a;if(r.push(s,c,o+a),!d||(s=s.child(c),s.isText))break;i=d-1,o+=a+1}return new ns(n,r,i)}static resolveCached(e,n){let r=n0.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else n0.set(e,r=new xS);let o=r.elts[r.i]=ns.resolve(e,n);return r.i=(r.i+1)%TS,o}}class xS{constructor(){this.elts=[],this.i=0}}const TS=12,n0=new WeakMap;class Ua{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const IS=Object.create(null);let Er=class Ah{constructor(e,n,r,o=Ye.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||ce.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,o=0){this.content.nodesBetween(e,n,r,o,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,o){return this.content.textBetween(e,n,r,o)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&$a(this.attrs,n||e.defaultAttrs||IS)&&Ye.sameSet(this.marks,r||Ye.none)}copy(e=null){return e==this.content?this:new Ah(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ah(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return ye.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),c=o.start(s),d=o.node(s).content.cut(o.pos-c,i.pos-c);return new ye(d,o.depth-s,i.depth-s)}replace(e,n,r){return SS(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ns.resolveCached(this,e)}resolveNoCache(e){return ns.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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 e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),r0(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=ce.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),c=s&&s.matchFragment(this.content,n);if(!c||!c.validEnd)return!1;for(let a=o;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=Ye.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!Ye.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=ce.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Er.prototype.text=void 0;class Ha extends Er{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):r0(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ha(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ha(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function r0(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class co{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new _S(e,n);if(r.next==null)return co.empty;let o=o0(r);r.next&&r.err("Unexpected trailing text");let i=BS(PS(o));return RS(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,c){let a=s.matchFragment(e,r);if(a&&(!n||a.validEnd))return ce.from(c.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=i(f,c.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let c=o;c.type;c=c.via)s.push(c.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:c,next:a}=i.next[s];!c.isLeaf&&!c.hasRequiredAttrs()&&!(c.name in n)&&(!o.type||a.validEnd)&&(r.push({match:c.contentMatch,type:c,via:o}),n[c.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
1182
1182
  `)}}co.empty=new co(!0);class _S{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.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(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function o0(t){let e=[];do e.push(NS(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function NS(t){let e=[];do e.push(OS(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function OS(t){let e=DS(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=MS(t,e);else break;return e}function i0(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function MS(t,e){let n=i0(t),r=n;return t.eat(",")&&(t.next!="}"?r=i0(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function LS(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function DS(t){if(t.eat("(")){let e=o0(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=LS(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function PS(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,c,a){let d={term:a,to:c};return e[s].push(d),d}function o(s,c){s.forEach(a=>a.to=c)}function i(s,c){if(s.type=="choice")return s.exprs.reduce((a,d)=>a.concat(i(d,c)),[]);if(s.type=="seq")for(let a=0;;a++){let d=i(s.exprs[a],c);if(a==s.exprs.length-1)return d;o(d,c=n())}else if(s.type=="star"){let a=n();return r(c,a),o(i(s.expr,a),a),[r(a)]}else if(s.type=="plus"){let a=n();return o(i(s.expr,c),a),o(i(s.expr,a),a),[r(a)]}else{if(s.type=="opt")return[r(c)].concat(i(s.expr,c));if(s.type=="range"){let a=c;for(let d=0;d<s.min;d++){let u=n();o(i(s.expr,a),u),a=u}if(s.max==-1)o(i(s.expr,a),a);else for(let d=s.min;d<s.max;d++){let u=n();r(a,u),o(i(s.expr,a),u),a=u}return[r(a)]}else{if(s.type=="name")return[r(c,void 0,s.value)];throw new Error("Unknown expr type")}}}}function s0(t,e){return e-t}function a0(t,e){let n=[];return r(e),n.sort(s0);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:c,to:a}=i[s];!c&&n.indexOf(a)==-1&&r(a)}}}function BS(t){let e=Object.create(null);return n(a0(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:c,to:a})=>{if(!c)return;let d;for(let u=0;u<o.length;u++)o[u][0]==c&&(d=o[u][1]);a0(t,a).forEach(u=>{d||o.push([c,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let i=e[r.join(",")]=new co(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let c=o[s][1].sort(s0);i.next.push({type:o[s][0],next:e[c.join(",")]||n(c)})}return i}}function RS(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let c=0;c<o.next.length;c++){let{type:a,next:d}=o.next[c];s.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(d)==-1&&r.push(d)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function l0(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function c0(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function d0(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function u0(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new FS(t,r,e[r]);return n}let f0=class N3{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=u0(e,r.attrs),this.defaultAttrs=l0(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==co.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:c0(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Er(this,this.computeAttrs(e),ce.from(n),Ye.setFrom(r))}createChecked(e=null,n,r){return n=ce.from(n),this.checkContent(n),new Er(this,this.computeAttrs(e),n,Ye.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=ce.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(ce.empty,!0);return i?new Er(this,e,n.append(i),Ye.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){d0(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:Ye.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new N3(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function $S(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class FS{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?$S(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ja{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=u0(e,o.attrs),this.excluded=null;let i=l0(this.attrs);this.instance=i?new Ye(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Ye(this,c0(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new ja(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){d0(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class h0{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=wt.from(e.nodes),n.marks=wt.from(e.marks||{}),this.nodes=f0.compile(this.spec.nodes,this),this.marks=ja.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",c=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=co.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=c=="_"?null:c?p0(this,c.split(" ")):c==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:p0(this,s.split(" "))}this.nodeFromJSON=o=>Er.fromJSON(this,o),this.markFromJSON=o=>Ye.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof f0){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,o)}text(e,n){let r=this.nodes.text;return new Ha(r,r.defaultAttrs,e,Ye.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function p0(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let c in t.marks){let a=t.marks[c];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=a)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function zS(t){return t.tag!=null}function US(t){return t.style!=null}class kr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(zS(o))this.tags.push(o);else if(US(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new y0(this,n,!1);return r.addAll(e,Ye.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new y0(this,n,!0);return r.addAll(e,Ye.none,n.from,n.to),ye.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(WS(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],c=s.style;if(!(c.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||c.length>e.length&&(c.charCodeAt(e.length)!=61||c.slice(e.length+1)!=n))){if(s.getAttrs){let a=s.getAttrs(n);if(a===!1)continue;s.attrs=a||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let c=n[s];if((c.priority==null?50:c.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=b0(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=b0(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new kr(e,kr.schemaRules(e)))}}const m0={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},HS={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},g0={ol:!0,ul:!0},rs=1,Gd=2,is=4;function v0(t,e,n){return e!=null?(e?rs:0)|(e==="full"?Gd:0):t&&t.whitespace=="pre"?rs|Gd:n&~is}class Wa{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=Ye.none,this.match=i||(s&is?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(ce.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&rs)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=ce.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(ce.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!m0.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class y0{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=v0(null,n.preserveWhitespace,0)|(r?is:0);o?i=new Wa(o.type,o.attrs,Ye.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Wa(null,null,Ye.none,!0,null,s):i=new Wa(e.schema.topNodeType,null,Ye.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&Gd?"full":this.localPreserveWS||(o.options&rs)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
1183
1183
  `);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let c=r.split(/\r?\n|\r/);for(let a=0;a<c.length;a++)a&&this.insertNode(s.linebreakReplacement.create(),n,!0),c[a]&&this.insertNode(s.text(c[a]),n,!/\S/.test(c[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let c=o.content[o.content.length-1],a=e.previousSibling;(!c||a&&a.nodeName=="BR"||c.isText&&/[ \t\r\n\u000c]$/.test(c.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),c;g0.hasOwnProperty(s)&&this.parser.normalizeLists&&jS(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(c=this.parser.matchTag(e,this,r));e:if(a?a.ignore:HS.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let d,u=this.needsBlock;if(m0.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),d=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=a&&a.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),d&&this.sync(i),this.needsBlock=u}else{let d=this.readStyles(e,n);d&&this.addElementByRule(e,a,d,a.consuming===!1?c:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
1184
- `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let c=void 0;;){let a=this.parser.matchStyle(i,s,this,c);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(d=>!a.clearMark(d)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)c=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let c=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(c)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,c=o==null?null:e.childNodes[o];s!=c;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,c=0;s>=0;s--){let a=this.nodes[s],d=a.findWrapping(e);if(d&&(!o||o.length>d.length+c)&&(o=d,i=a,!d.length))break;if(a.solid){if(r)break;c+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=Ye.none;for(let c of o.concat(e.marks))(i.type?i.type.allowsMarkType(c.type):C0(c.type,e.type))&&(s=c.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let c=v0(e,i,s.options);s.options&is&&s.content.length==0&&(c|=is);let a=Ye.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):C0(d.type,e))?(a=d.addToSet(a),!1):!0),this.nodes.push(new Wa(e,n,a,o,null,c)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=rs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(c,a)=>{for(;c>=0;c--){let d=n[c];if(d==""){if(c==n.length-1||c==0)continue;for(;a>=i;a--)if(s(c-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function jS(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&g0.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function WS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function b0(t){let e={};for(let n in t)e[n]=t[n];return e}function C0(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=c=>{i.push(c);for(let a=0;a<c.edgeCount;a++){let{type:d,next:u}=c.edge(a);if(d==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}class uo{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Qd(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let c=0,a=0;for(;c<i.length&&a<s.marks.length;){let d=s.marks[a];if(!this.marks[d.type.name]){a++;continue}if(!d.eq(i[c][0])||d.type.spec.spanning===!1)break;c++,a++}for(;c<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let d=s.marks[a++],u=this.serializeMark(d,s.isInline,n);u&&(i.push([d,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Ka(Qd(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ka(Qd(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Ka(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new uo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=E0(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return E0(e.marks)}}function E0(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Qd(t){return t.document||window.document}const k0=new WeakMap;function KS(t){let e=k0.get(t);return e===void 0&&k0.set(t,e=YS(t)),e}function YS(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Ka(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=KS(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let c,a=n?t.createElementNS(n,o):t.createElement(o),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?a.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):f=="style"&&a.style?a.style.cssText=d[f]:a.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:m}=Ka(t,h,n,r);if(a.appendChild(p),m){if(c)throw new RangeError("Multiple content holes");c=m}}}return{dom:a,contentDOM:c}}const w0=65535,S0=Math.pow(2,16);function GS(t,e){return t+e*S0}function A0(t){return t&w0}function QS(t){return(t-(t&w0))/S0}const x0=1,T0=2,Ya=4,I0=8;class Zd{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&I0)>0}get deletedBefore(){return(this.delInfo&(x0|Ya))>0}get deletedAfter(){return(this.delInfo&(T0|Ya))>0}get deletedAcross(){return(this.delInfo&Ya)>0}}class Jt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Jt.empty)return Jt.empty}recover(e){let n=0,r=A0(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+QS(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let a=this.ranges[c]-(this.inverted?o:0);if(a>e)break;let d=this.ranges[c+i],u=this.ranges[c+s],f=a+d;if(e<=f){let h=d?e==a?-1:e==f?1:n:n,p=a+o+(h<0?0:u);if(r)return p;let m=e==(n<0?a:f)?null:GS(c/3,e-a),g=e==a?T0:e==f?x0:Ya;return(n<0?e!=a:e!=f)&&(g|=I0),new Zd(p,g,m)}o+=u-d}return r?e+o:new Zd(e+o,0,null)}touches(e,n){let r=0,o=A0(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let a=this.ranges[c]-(this.inverted?r:0);if(a>e)break;let d=this.ranges[c+i],u=a+d;if(e<=u&&c==o*3)return!0;r+=this.ranges[c+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],c=s-(this.inverted?i:0),a=s+(this.inverted?0:i),d=this.ranges[o+n],u=this.ranges[o+r];e(c,c+d,a,a+u),i+=u-d}}invert(){return new Jt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Jt.empty:new Jt(e<0?[0,-e,0]:[0,0,e])}}Jt.empty=new Jt([]);class ss{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ss(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new ss;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],c=s.mapResult(e,n);if(c.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(c.recover);continue}}o|=c.delInfo,e=c.pos}return r?e:new Zd(e,o,null)}}const Jd=Object.create(null);class Nt{getMap(){return Jt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Jd[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Jd)throw new RangeError("Duplicate use of step JSON ID "+e);return Jd[e]=n,n.prototype.jsonID=e,n}}class ct{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ct(e,null)}static fail(e){return new ct(null,e)}static fromReplace(e,n,r,o){try{return ct.ok(e.replace(n,r,o))}catch(i){if(i instanceof Fa)return ct.fail(i.message);throw i}}}function Xd(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Xd(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return ce.fromArray(r)}class wr extends Nt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new ye(Xd(n.content,(s,c)=>!s.isAtom||!c.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return ct.fromReplace(e,this.from,this.to,i)}invert(){return new wn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new wr(n.pos,r.pos,this.mark)}merge(e){return e instanceof wr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new wr(n.from,n.to,e.markFromJSON(n.mark))}}Nt.jsonID("addMark",wr);class wn extends Nt{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ye(Xd(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return ct.fromReplace(e,this.from,this.to,r)}invert(){return new wr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new wn(n.pos,r.pos,this.mark)}merge(e){return e instanceof wn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new wn(n.from,n.to,e.markFromJSON(n.mark))}}Nt.jsonID("removeMark",wn);class Sr extends Nt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new Sr(this.pos,n.marks[o]);return new Sr(this.pos,this.mark)}}return new fo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Sr(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Sr(n.pos,e.markFromJSON(n.mark))}}Nt.jsonID("addNodeMark",Sr);class fo extends Nt{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Sr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new fo(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new fo(n.pos,e.markFromJSON(n.mark))}}Nt.jsonID("removeNodeMark",fo);class vt extends Nt{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&qd(e,this.from,this.to)?ct.fail("Structure replace would overwrite content"):ct.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Jt([this.from,this.to-this.from,this.slice.size])}invert(e){return new vt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new vt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof vt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new vt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new vt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new vt(n.from,n.to,ye.fromJSON(e,n.slice),!!n.structure)}}Nt.jsonID("replace",vt);class yt extends Nt{constructor(e,n,r,o,i,s,c=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=c}apply(e){if(this.structure&&(qd(e,this.from,this.gapFrom)||qd(e,this.gapTo,this.to)))return ct.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ct.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ct.fromReplace(e,this.from,this.to,r):ct.fail("Content does not fit in gap")}getMap(){return new Jt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new yt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new yt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new yt(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(e,n.slice),n.insert,!!n.structure)}}Nt.jsonID("replaceAround",yt);function qd(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function ZS(t,e,n,r){let o=[],i=[],s,c;t.doc.nodesBetween(e,n,(a,d,u)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+a.nodeSize,n),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[g])?s.to=p:o.push(s=new wn(h,p,f[g])));c&&c.to==h?c.to=p:i.push(c=new wr(h,p,r))}}),o.forEach(a=>t.step(a)),i.forEach(a=>t.step(a))}function JS(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,c)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof ja){let d=s.marks,u;for(;u=r.isInSet(d);)(a||(a=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let d=Math.min(c+s.nodeSize,n);for(let u=0;u<a.length;u++){let f=a[u],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=d,h.step=i):o.push({style:f,from:Math.max(c,e),to:d,step:i})}}}),o.forEach(s=>t.step(new wn(s.from,s.to,s.style)))}function Vd(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],c=e+1;for(let a=0;a<i.childCount;a++){let d=i.child(a),u=c+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new vt(c,u,ye.empty));else{r=f;for(let h=0;h<d.marks.length;h++)n.allowsMarkType(d.marks[h].type)||t.step(new wn(c,u,d.marks[h]));if(o&&d.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new ye(ce.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new vt(c+h.index,c+h.index+h[0].length,m))}}c=u}if(!r.validEnd){let a=r.fillBefore(ce.empty,!0);t.replace(c,c,new ye(a,0,0))}for(let a=s.length-1;a>=0;a--)t.step(s[a])}function XS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Go(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),c=t.$from.index(r)+o,a=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(c,a,n))return r;if(r==0||s.type.spec.isolating||!XS(s,c,a))break;c&&(o=1),a<s.childCount&&(i=1)}return null}function qS(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),c=o.after(i+1),a=s,d=c,u=ce.empty,f=0;for(let m=i,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,u=ce.from(r.node(m).copy(u)),f++):a--;let h=ce.empty,p=0;for(let m=i,g=!1;m>n;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=ce.from(o.node(m).copy(h)),p++):d++;t.step(new yt(a,d,s,c,new ye(u.append(h),f,p),u.size-f,!0))}function eu(t,e,n=null,r=t){let o=VS(t,e),i=o&&eA(r,e);return i?o.map(_0).concat({type:e,attrs:n}).concat(i.map(_0)):null}function _0(t){return{type:t,attrs:null}}function VS(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function eA(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;a&&d<o;d++)a=a.matchType(n.child(d).type);return!a||!a.validEnd?null:s}function tA(t,e,n){let r=ce.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let c=n[s].type.contentMatch.matchFragment(r);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ce.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new yt(o,i,o,i,new ye(r,0,0),n.length,!0))}function nA(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,c)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&rA(t.doc,t.mapping.slice(i).map(c),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&O0(t,s,c,i),Vd(t,t.mapping.slice(i).map(c,1),r,void 0,d===null);let u=t.mapping.slice(i),f=u.map(c,1),h=u.map(c+s.nodeSize,1);return t.step(new yt(f,h,f+1,h-1,new ye(ce.from(r.create(a,null,s.marks)),0,0),1,!0)),d===!0&&N0(t,s,c,i),!1}})}function N0(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,c=/\r?\n|\r/g;for(;s=c.exec(o.text);){let a=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function O0(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
1185
- `))}})}function rA(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function oA(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new yt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ye(ce.from(s),0,0),1,!0))}function Jn(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let d=o.depth-1,u=n-2;d>i;d--,u--){let f=o.node(d),h=o.index(d);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!g.type.validContent(p))return!1}let c=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(c,c,a?a.type:o.node(i+1).type)}function iA(t,e,n=1,r){let o=t.doc.resolve(e),i=ce.empty,s=ce.empty;for(let c=o.depth,a=o.depth-n,d=n-1;c>a;c--,d--){i=ce.from(o.node(c).copy(i));let u=r&&r[d];s=ce.from(u?u.type.create(u.attrs,s):o.node(c).copy(s))}t.step(new vt(e,e,new ye(i.append(s),n,n),!0))}function Ar(t,e){let n=t.resolve(e),r=n.index();return M0(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function sA(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function M0(t,e){return!!(t&&e&&!t.isLeaf&&sA(t,e))}function Ga(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,c=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),c++,s=r.node(o).maybeChild(c)):(i=r.node(o).maybeChild(c-1),s=r.node(o+1)),i&&!i.isTextblock&&M0(i,s)&&r.node(o).canReplace(c,c+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function aA(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let u=s.whitespace=="pre",f=!!s.contentMatch.matchType(o);u&&!f?r=!1:!u&&f&&(r=!0)}let c=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);O0(t,u.node(),u.before(),c)}s.inlineContent&&Vd(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(c),d=a.map(e-n);if(t.step(new vt(d,a.map(e+n,-1),ye.empty,!0)),r===!0){let u=t.doc.resolve(d);N0(t,u.node(),u.before(),t.steps.length)}return t}function lA(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function L0(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(c>0?1:0),d=r.node(s),u=!1;if(i==1)u=d.canReplace(a,a,o);else{let f=d.contentMatchAt(a).findWrapping(o.firstChild.type);u=f&&d.canReplaceWith(a,a,f[0])}if(u)return c==0?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}function Qa(t,e,n=e,r=ye.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return D0(o,i,r)?new vt(e,n,r):new cA(o,i,r).fit()}function D0(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class cA{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ce.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=ce.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,c=o.depth;for(;s&&c&&i.childCount==1;)i=i.firstChild.content,s--,c--;let a=new ye(i,s,c);return e>-1?new yt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new vt(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=tu(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let c=this.depth;c>=0;c--){let{type:a,match:d}=this.frontier[c],u,f=null;if(n==1&&(s?d.matchType(s.type)||(f=d.fillBefore(ce.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:c,parent:i,inject:f};if(n==2&&s&&(u=d.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:c,parent:i,wrap:u};if(i&&d.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=tu(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=tu(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ye(as(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(as(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,c=r?r.content:s.content,a=s.openStart-e,d=0,u=[],{match:f,type:h}=this.frontier[n];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));f=f.matchFragment(o)}let p=c.size+e-(s.content.size-s.openEnd);for(;d<c.childCount;){let g=c.child(d),v=f.matchType(g.type);if(!v)break;d++,(d>1||a==0||g.content.size)&&(f=v,u.push(P0(g.mark(h.allowedMarks(g.marks)),d==1?a:0,d==c.childCount?p:-1)))}let m=d==c.childCount;m||(p=-1),this.placed=ls(this.placed,n,ce.from(u)),this.frontier[n].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=c;g<p;g++){let y=v.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),v=y.content}this.unplaced=m?e==0?ye.empty:new ye(as(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new ye(as(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!nu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=nu(e,n,o,r,i);if(s){for(let c=n-1;c>=0;c--){let{match:a,type:d}=this.frontier[c],u=nu(e,c,d,a,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ls(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=ls(this.placed,this.depth,ce.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ce.empty,!0);n.childCount&&(this.placed=ls(this.placed,this.frontier.length,n))}}function as(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(as(t.firstChild.content,e-1,n)))}function ls(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(ls(t.lastChild.content,e-1,n)))}function tu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function P0(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,P0(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ce.empty,!0)))),t.copy(r)}function nu(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let c=r.fillBefore(i.content,!0,s);return c&&!dA(n,i.content,s)?c:null}function dA(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function uA(t){return t.spec.defining||t.spec.definingForContent}function fA(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(D0(o,i,r))return t.step(new vt(e,n,r));let s=R0(o,i);s[s.length-1]==0&&s.pop();let c=-(o.depth+1);s.unshift(c);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let m=o.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?c=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(c),d=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(d.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=d[h],m=uA(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(c)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=d[p];if(m)for(let g=0;g<s.length;g++){let v=s[(g+a)%s.length],y=!0;v<0&&(y=!1,v=-v);let b=o.node(v-1),E=o.index(v-1);if(b.canReplaceWith(E,E,m.type,m.marks))return t.replace(o.before(v),y?i.after(v):n,new ye(B0(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function B0(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(B0(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(ce.empty,!0))}return t}function hA(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=lA(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ye(ce.from(r),0,0))}function pA(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=R0(r,o);for(let s=0;s<i.length;s++){let c=i[s],a=s==i.length-1;if(a&&c==0||r.node(c).type.contentMatch.validEnd)return t.delete(r.start(c),o.end(c));if(c>0&&(a||r.node(c-1).canReplace(r.index(c-1),o.indexAfter(c-1))))return t.delete(r.before(c),o.after(c))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function R0(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class Qo extends Nt{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(o),0,n.isLeaf?0:1))}getMap(){return Jt.empty}invert(e){return new Qo(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Qo(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Qo(n.pos,n.attr,n.value)}}Nt.jsonID("attr",Qo);class cs extends Nt{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return ct.ok(r)}getMap(){return Jt.empty}invert(e){return new cs(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new cs(n.attr,n.value)}}Nt.jsonID("docAttr",cs);let Zo=class extends Error{};Zo=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Zo.prototype=Object.create(Error.prototype),Zo.prototype.constructor=Zo,Zo.prototype.name="TransformError";class $0{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ss}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Zo(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((i,s,c,a)=>{e=Math.min(e,c),n=Math.max(n,a)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ye.empty){let o=Qa(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ye(ce.from(r),0,0))}delete(e,n){return this.replace(e,n,ye.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return fA(this,e,n,r),this}replaceRangeWith(e,n,r){return hA(this,e,n,r),this}deleteRange(e,n){return pA(this,e,n),this}lift(e,n){return qS(this,e,n),this}join(e,n=1){return aA(this,e,n),this}wrap(e,n){return tA(this,e,n),this}setBlockType(e,n=e,r,o=null){return nA(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return oA(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Qo(e,n,r)),this}setDocAttribute(e,n){return this.step(new cs(e,n)),this}addNodeMark(e,n){return this.step(new Sr(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ye)n.isInSet(r.marks)&&this.step(new fo(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new fo(e,i)),o=i.removeFromSet(o);for(let c=s.length-1;c>=0;c--)this.step(s[c])}return this}split(e,n=1,r){return iA(this,e,n,r),this}addMark(e,n,r){return ZS(this,e,n,r),this}removeMark(e,n,r){return JS(this,e,n,r),this}clearIncompatible(e,n,r){return Vd(this,e,n,r),this}}const ru=Object.create(null);class Be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new mA(e.min(n),e.max(n))]}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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=ye.empty){let r=n.content.lastChild,o=null;for(let c=0;c<n.openEnd;c++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let c=0;c<s.length;c++){let{$from:a,$to:d}=s[c],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(d.pos),c?ye.empty:n),c==0&&U0(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:c}=o[i],a=e.mapping.slice(r),d=a.map(s.pos),u=a.map(c.pos);i?e.deleteRange(d,u):(e.replaceRangeWith(d,u,n),U0(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new Le(e):Jo(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?Jo(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Jo(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Xt(e.node(0))}static atStart(e){return Jo(e,e,0,0,1)||new Xt(e)}static atEnd(e){return Jo(e,e,e.content.size,e.childCount,-1)||new Xt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ru[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ru)throw new RangeError("Duplicate use of selection JSON ID "+e);return ru[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Le.between(this.$anchor,this.$head).getBookmark()}}Be.prototype.visible=!0;class mA{constructor(e,n){this.$from=e,this.$to=n}}let F0=!1;function z0(t){!F0&&!t.parent.inlineContent&&(F0=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Le extends Be{constructor(e,n=e){z0(e),z0(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Be.near(r);let o=e.resolve(n.map(this.anchor));return new Le(o.parent.inlineContent?o:r,r)}replace(e,n=ye.empty){if(super.replace(e,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Le&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Za(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Le(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Be.findFrom(n,r,!0)||Be.findFrom(n,-r,!0);if(i)n=i.$head;else return Be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Be.findFrom(e,-r,!0)||Be.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new Le(e,n)}}Be.jsonID("text",Le);class Za{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Za(e.map(this.anchor),e.map(this.head))}resolve(e){return Le.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Be{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?Be.near(i):new xe(i)}content(){return new ye(ce.from(this.node),0,0)}eq(e){return e instanceof xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ou(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new xe(e.resolve(n.anchor))}static create(e,n){return new xe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}xe.prototype.visible=!1,Be.jsonID("node",xe);class ou{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Za(r,r):new ou(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&xe.isSelectable(r)?new xe(n):Be.near(n)}}class Xt extends Be{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=ye.empty){if(n==ye.empty){e.delete(0,e.doc.content.size);let r=Be.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Xt(e)}map(e){return new Xt(e)}eq(e){return e instanceof Xt}getBookmark(){return gA}}Be.jsonID("all",Xt);const gA={map(){return this},resolve(t){return new Xt(t)}};function Jo(t,e,n,r,o,i=!1){if(e.inlineContent)return Le.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let c=e.child(s);if(c.isAtom){if(!i&&xe.isSelectable(c))return xe.create(t,n-(o<0?c.nodeSize:0))}else{let a=Jo(t,c,n+o,o<0?c.childCount:0,o,i);if(a)return a}n+=c.nodeSize*o}return null}function U0(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof vt||o instanceof yt))return;let i=t.mapping.maps[r],s;i.forEach((c,a,d,u)=>{s==null&&(s=u)}),t.setSelection(Be.near(t.doc.resolve(s),n))}const H0=1,Ja=2,j0=4;class vA extends $0{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|H0)&~Ja,this.storedMarks=null,this}get selectionSet(){return(this.updated&H0)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ja,this}ensureMarks(e){return Ye.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ja)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Ja,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ye.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Be.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=j0,this}get scrolledIntoView(){return(this.updated&j0)>0}}function W0(t,e){return!e||!t?t:t.bind(e)}class ds{constructor(e,n,r){this.name=e,this.init=W0(n.init,r),this.apply=W0(n.apply,r)}}const yA=[new ds("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ds("selection",{init(t,e){return t.selection||Be.atStart(e.doc)},apply(t){return t.selection}}),new ds("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new ds("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class iu{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yA.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ds(r.key,r.spec.state,r))})}}class Xo{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let c=this.config.plugins[s];if(c.spec.appendTransaction){let a=o?o[s].n:0,d=o?o[s].state:this,u=a<n.length&&c.spec.appendTransaction.call(c,a?n.slice(a):n,d,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Xo(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new vA(this)}static create(e){let n=new iu(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Xo(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new iu(this.schema,e.plugins),r=n.fields,o=new Xo(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new iu(e.schema,e.plugins),i=new Xo(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Er.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Be.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let c in r){let a=r[c],d=a.spec.state;if(a.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(n,c)){i[s.name]=d.fromJSON.call(a,e,n[c],i);return}}i[s.name]=s.init(e,i)}}),i}}function K0(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=K0(o,e,{})),n[r]=o}return n}class Ve{constructor(e){this.spec=e,this.props={},e.props&&K0(e.props,this,this.props),this.key=e.key?e.key.key:Y0("plugin")}getState(e){return e[this.key]}}const su=Object.create(null);function Y0(t){return t in su?t+"$"+ ++su[t]:(su[t]=0,t+"$")}class bt{constructor(e="key"){this.key=Y0(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const au=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function G0(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Q0=(t,e,n)=>{let r=G0(t,n);if(!r)return!1;let o=lu(r);if(!o){let s=r.blockRange(),c=s&&Go(s);return c==null?!1:(e&&e(t.tr.lift(s,c).scrollIntoView()),!0)}let i=o.nodeBefore;if(rg(t,o,e,-1))return!0;if(r.parent.content.size==0&&(qo(i,"end")||xe.isSelectable(i)))for(let s=r.depth;;s--){let c=Qa(t.doc,r.before(s),r.after(s),ye.empty);if(c&&c.slice.size<c.to-c.from){if(e){let a=t.tr.step(c);a.setSelection(qo(i,"end")?Be.findFrom(a.doc.resolve(a.mapping.map(o.pos,-1)),-1):xe.create(a.doc,o.pos-i.nodeSize)),e(a.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},bA=(t,e,n)=>{let r=G0(t,n);if(!r)return!1;let o=lu(r);return o?Z0(t,o,e):!1},CA=(t,e,n)=>{let r=X0(t,n);if(!r)return!1;let o=cu(r);return o?Z0(t,o,e):!1};function Z0(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let s=e.nodeAfter,c=s,a=e.pos+1;for(;!c.isTextblock;a++){if(c.type.spec.isolating)return!1;let u=c.firstChild;if(!u)return!1;c=u}let d=Qa(t.doc,i,a,ye.empty);if(!d||d.from!=i||d instanceof vt&&d.slice.size>=a-i)return!1;if(n){let u=t.tr.step(d);u.setSelection(Le.create(u.doc,i)),n(u.scrollIntoView())}return!0}function qo(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const J0=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=lu(r)}let s=i&&i.nodeBefore;return!s||!xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function lu(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function X0(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const q0=(t,e,n)=>{let r=X0(t,n);if(!r)return!1;let o=cu(r);if(!o)return!1;let i=o.nodeAfter;if(rg(t,o,e,1))return!0;if(r.parent.content.size==0&&(qo(i,"start")||xe.isSelectable(i))){let s=Qa(t.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size<s.to-s.from){if(e){let c=t.tr.step(s);c.setSelection(qo(i,"start")?Be.findFrom(c.doc.resolve(c.mapping.map(o.pos)),1):xe.create(c.doc,c.mapping.map(o.pos))),e(c.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},V0=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=cu(r)}let s=i&&i.nodeAfter;return!s||!xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,i.pos)).scrollIntoView()),!0)};function cu(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const EA=(t,e)=>{let n=t.selection,r=n instanceof xe,o;if(r){if(n.node.isTextblock||!Ar(t.doc,n.from))return!1;o=n.from}else if(o=Ga(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(xe.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},kA=(t,e)=>{let n=t.selection,r;if(n instanceof xe){if(n.node.isTextblock||!Ar(t.doc,n.to))return!1;r=n.to}else if(r=Ga(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},wA=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Go(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},eg=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
1186
- `).scrollIntoView()),!0)};function du(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const SA=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=du(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let c=n.after(),a=t.tr.replaceWith(c,c,s.createAndFill());a.setSelection(Be.near(a.doc.resolve(c),1)),e(a.scrollIntoView())}return!0},tg=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Xt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=du(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,c=t.tr.insert(s,i.createAndFill());c.setSelection(Le.create(c.doc,s+1)),e(c.scrollIntoView())}return!0},ng=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Jn(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Go(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function AA(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof xe&&e.selection.node.isBlock)return!r.parentOffset||!Jn(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,c,a=!1,d=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),d=r.start(p)==r.pos-(r.depth-p),c=du(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(a&&c?{type:c}:null),s=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof Le||e.selection instanceof Xt)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=Jn(u.doc,f,i.length,i);if(h||(i[0]=c?{type:c}:null,h=Jn(u.doc,f,i.length,i)),!h)return!1;if(u.split(f,i.length,i),!a&&d&&r.node(s).type!=c){let p=u.mapping.map(r.before(s)),m=u.doc.resolve(p);c&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,c)&&u.setNodeMarkup(u.mapping.map(r.before(s)),c)}return n&&n(u.scrollIntoView()),!0}}const xA=AA(),TA=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(xe.create(t.doc,o))),!0)};function IA(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Ar(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function rg(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,c,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&IA(t,e,n))return!0;let d=!a&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(c=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&c.matchType(s[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=ce.empty;for(let y=s.length-1;y>=0;y--)m=ce.from(s[y].create(null,m));m=ce.from(o.copy(m));let g=t.tr.step(new yt(e.pos-1,p,e.pos,p,new ye(m,1,0),s.length,!0)),v=g.doc.resolve(p+2*s.length);v.nodeAfter&&v.nodeAfter.type==o.type&&Ar(g.doc,v.pos)&&g.join(v.pos),n(g.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&a?null:Be.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Go(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(d&&qo(i,"start",!0)&&qo(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let g=i,v=1;for(;!g.isTextblock;g=g.firstChild)v++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let y=ce.empty;for(let E=m.length-1;E>=0;E--)y=ce.from(m[E].copy(y));let b=t.tr.step(new yt(e.pos-m.length,e.pos+i.nodeSize,e.pos+v,e.pos+i.nodeSize-v,new ye(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function og(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Le.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const _A=og(-1),NA=og(1);function OA(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),c=s&&eu(s,t,e);return c?(r&&r(n.tr.wrap(s,c).scrollIntoView()),!0):!1}}function ig(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:c}}=n.selection.ranges[i];n.doc.nodesBetween(s,c,(a,d)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let u=n.doc.resolve(d),f=u.index();o=u.parent.canReplaceWith(f,f+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:c},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(c,a,t,e)}r(i.scrollIntoView())}return!0}}function uu(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}uu(au,Q0,J0),uu(au,q0,V0),uu(eg,tg,ng,xA),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function MA(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let c=r?n.tr:null;return LA(c,s,t,e)?(r&&r(c.scrollIntoView()),!0):!1}}function LA(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=s.resolve(e.start-2);i=new Ua(a,a,e.depth),e.endIndex<e.parent.childCount&&(e=new Ua(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let c=eu(i,n,r,e);return c?(t&&DA(t,e,c,o,n),!0):!1}function DA(t,e,n,r,o){let i=ce.empty;for(let u=n.length-1;u>=0;u--)i=ce.from(n[u].type.create(n[u].attrs,i));t.step(new yt(e.start-(r?2:0),e.end,e.start,e.end,new ye(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let c=n.length-s,a=e.start+n.length-(r?2:0),d=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&&Jn(t.doc,a,c)&&(t.split(a,c),a+=2*c),a+=d.child(u).nodeSize;return t}function PA(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?BA(e,n,t,i):RA(e,n,i):!0:!1}}function BA(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new yt(i-1,s,i,s,new ye(ce.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ua(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const c=Go(r);if(c==null)return!1;o.lift(r,c);let a=o.doc.resolve(o.mapping.map(i,-1)-1);return Ar(o.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&o.join(a.pos),e(o.scrollIntoView()),!0}function RA(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=n.startIndex==0,a=n.endIndex==o.childCount,d=i.node(-1),u=i.index(-1);if(!d.canReplace(u+(c?0:1),u+1,s.content.append(a?ce.empty:ce.from(o))))return!1;let f=i.pos,h=f+s.nodeSize;return r.step(new yt(f-(c?1:0),h+(a?1:0),f+1,h-1,new ye((c?ce.empty:ce.from(o.copy(ce.empty))).append(a?ce.empty:ce.from(o.copy(ce.empty))),c?0:1,a?0:1),c?0:1)),e(r.scrollIntoView()),!0}function $A(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,d=>d.childCount>0&&d.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let c=i.parent,a=c.child(s-1);if(a.type!=t)return!1;if(n){let d=a.lastChild&&a.lastChild.type==c.type,u=ce.from(d?t.create():null),f=new ye(ce.from(t.create(null,ce.from(c.type.create(null,u)))),d?3:1,0),h=i.start,p=i.end;n(e.tr.step(new yt(h-(d?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}const St=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Vo=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let fu=null;const Xn=function(t,e,n){let r=fu||(fu=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},FA=function(){fu=null},ho=function(t,e,n,r){return n&&(sg(t,e,n,r,-1)||sg(t,e,n,r,1))},zA=/^(img|br|input|textarea|hr)$/i;function sg(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:rn(t))){let s=t.parentNode;if(!s||s.nodeType!=1||us(t)||zA.test(t.nodeName)||t.contentEditable=="false")return!1;e=St(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?rn(t):0}else return!1}}function rn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function UA(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=rn(t)}else if(t.parentNode&&!us(t))e=St(t),t=t.parentNode;else return null}}function HA(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!us(t))e=St(t)+1,t=t.parentNode;else return null}}function jA(t,e,n){for(let r=e==0,o=e==rn(t);r||o;){if(t==n)return!0;let i=St(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==rn(t)}}function us(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Xa=function(t){return t.focusNode&&ho(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function po(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function WA(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function KA(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(rn(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(rn(r.startContainer),r.startOffset)}}}const Dn=typeof navigator<"u"?navigator:null,ag=typeof document<"u"?document:null,xr=Dn&&Dn.userAgent||"",hu=/Edge\/(\d+)/.exec(xr),lg=/MSIE \d/.exec(xr),pu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xr),Kt=!!(lg||pu||hu),Tr=lg?document.documentMode:pu?+pu[1]:hu?+hu[1]:0,on=!Kt&&/gecko\/(\d+)/i.test(xr);on&&+(/Firefox\/(\d+)/.exec(xr)||[0,0])[1];const mu=!Kt&&/Chrome\/(\d+)/.exec(xr),At=!!mu,cg=mu?+mu[1]:0,Ot=!Kt&&!!Dn&&/Apple Computer/.test(Dn.vendor),ei=Ot&&(/Mobile\/\w+/.test(xr)||!!Dn&&Dn.maxTouchPoints>2),sn=ei||(Dn?/Mac/.test(Dn.platform):!1),dg=Dn?/Win/.test(Dn.platform):!1,qn=/Android \d/.test(xr),fs=!!ag&&"webkitFontSmoothing"in ag.documentElement.style,YA=fs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function GA(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Vn(t,e){return typeof t=="number"?t:t[e]}function QA(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function ug(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=Vo(s);continue}let c=s,a=c==i.body,d=a?GA(i):QA(c),u=0,f=0;if(e.top<d.top+Vn(r,"top")?f=-(d.top-e.top+Vn(o,"top")):e.bottom>d.bottom-Vn(r,"bottom")&&(f=e.bottom-e.top>d.bottom-d.top?e.top+Vn(o,"top")-d.top:e.bottom-d.bottom+Vn(o,"bottom")),e.left<d.left+Vn(r,"left")?u=-(d.left-e.left+Vn(o,"left")):e.right>d.right-Vn(r,"right")&&(u=e.right-d.right+Vn(o,"right")),u||f)if(a)i.defaultView.scrollBy(u,f);else{let p=c.scrollLeft,m=c.scrollTop;f&&(c.scrollTop+=f),u&&(c.scrollLeft+=u);let g=c.scrollLeft-p,v=c.scrollTop-m;e={left:e.left-g,top:e.top-v,right:e.right-g,bottom:e.bottom-v}}let h=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:Vo(s)}}function ZA(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let c=t.root.elementFromPoint(i,s);if(!c||c==t.dom||!t.dom.contains(c))continue;let a=c.getBoundingClientRect();if(a.top>=n-20){r=c,o=a.top;break}}return{refDOM:r,refTop:o,stack:fg(t.dom)}}function fg(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Vo(r));return e}function JA({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;hg(n,r==0?0:r-e)}function hg(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ti=null;function XA(t){if(t.setActive)return t.setActive();if(ti)return t.focus(ti);let e=fg(t);t.focus(ti==null?{get preventScroll(){return ti={preventScroll:!0},!0}}:void 0),ti||(ti=!1,hg(e,0))}function pg(t,e){let n,r=2e8,o,i=0,s=e.top,c=e.top,a,d;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=Xn(u).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=c){s=Math.max(m.bottom,s),c=Math.min(m.top,c);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){n=u,r=g,o=g&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&g&&(i=f+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!a&&m.left<=e.left&&m.right>=e.left&&(a=u,d={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=f+1)}}return!n&&a&&(n=a,o=d,r=0),n&&n.nodeType==3?qA(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:pg(n,o)}function qA(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=Ir(r,1);if(s.top!=s.bottom&&gu(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function gu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function VA(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function ex(t,e,n){let{node:r,offset:o}=pg(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function tx(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let c=t.docView.nearestDesc(i,!0),a;if(!c)return null;if(c.dom.nodeType==1&&(c.node.isBlock&&c.parent||!c.contentDOM)&&((a=c.dom.getBoundingClientRect()).width||a.height)&&(c.node.isBlock&&c.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(c.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=c.posBefore:(!s&&a.right<r.left||a.bottom<r.top)&&(o=c.posAfter),s=!0),!c.contentDOM&&o<0&&!c.node.isText))return(c.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?c.posBefore:c.posAfter;i=c.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function mg(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let c=s.getClientRects();for(let a=0;a<c.length;a++){let d=c[a];if(gu(e,d))return mg(s,e,d)}}if((i=(i+1)%r)==o)break}return t}function nx(t,e){let n=t.dom.ownerDocument,r,o=0,i=KA(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),c;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=t.dom.getBoundingClientRect();if(!gu(e,d)||(s=mg(t.dom,e,d),!s))return null}if(Ot)for(let d=s;r&&d;d=Vo(d))d.draggable&&(r=void 0);if(s=VA(s,e),r){if(on&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let d;fs&&o&&r.nodeType==1&&(d=r.childNodes[o-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(c=tx(t,r,o,e))}c==null&&(c=ex(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:c,inside:a?a.posAtStart-a.border:-1}}function gg(t){return t.top<t.bottom||t.left<t.right}function Ir(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(gg(r))return r}return Array.prototype.find.call(n,gg)||t.getBoundingClientRect()}const rx=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function vg(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=fs||on;if(r.nodeType==3)if(s&&(rx.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let a=Ir(Xn(r,o,o),n);if(on&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let d=Ir(Xn(r,o-1,o-1),-1);if(d.top==a.top){let u=Ir(Xn(r,o,o+1),-1);if(u.top!=a.top)return hs(u,u.left<d.left)}}return a}else{let a=o,d=o,u=n<0?1:-1;return n<0&&!o?(d++,u=-1):n>=0&&o==r.nodeValue.length?(a--,u=1):n<0?a--:d++,hs(Ir(Xn(r,a,d),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==rn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return vu(a.getBoundingClientRect(),!1)}if(i==null&&o<rn(r)){let a=r.childNodes[o];if(a.nodeType==1)return vu(a.getBoundingClientRect(),!0)}return vu(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==rn(r))){let a=r.childNodes[o-1],d=a.nodeType==3?Xn(a,rn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(d)return hs(Ir(d,1),!1)}if(i==null&&o<rn(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let d=a?a.nodeType==3?Xn(a,0,s?0:1):a.nodeType==1?a:null:null;if(d)return hs(Ir(d,-1),!0)}return hs(Ir(r.nodeType==3?Xn(r):r,-n),n>=0)}function hs(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function vu(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function yg(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function ox(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return yg(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let c=t.docView.nearestDesc(i,!0);if(!c)break;if(c.node.isBlock){i=c.contentDOM||c.dom;break}i=c.dom.parentNode}let s=vg(t,o.pos,1);for(let c=i.firstChild;c;c=c.nextSibling){let a;if(c.nodeType==1)a=c.getClientRects();else if(c.nodeType==3)a=Xn(c,0,c.nodeValue.length).getClientRects();else continue;for(let d=0;d<a.length;d++){let u=a[d];if(u.bottom>u.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const ix=/[\u0590-\u08ac]/;function sx(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,c=t.domSelection();return c?!ix.test(r.parent.textContent)||!c.modify?n=="left"||n=="backward"?i:s:yg(t,e,()=>{let{focusNode:a,focusOffset:d,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),h=c.caretBidiLevel;c.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:g}=t.domSelectionRange(),v=m&&!p.contains(m.nodeType==1?m:m.parentNode)||a==m&&d==g;try{c.collapse(u,f),a&&(a!=u||d!=f)&&c.extend&&c.extend(a,d)}catch{}return h!=null&&(c.caretBidiLevel=h),v}):r.pos==r.start()||r.pos==r.end()}let bg=null,Cg=null,Eg=!1;function ax(t,e,n){return bg==e&&Cg==n?Eg:(bg=e,Cg=n,Eg=n=="up"||n=="down"?ox(t,e,n):sx(t,e,n))}const an=0,kg=1,mo=2,Pn=3;class ps{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=an,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>St(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let c=o.children[s];if(c.size){o=c;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],c=i+s.size;if(c>e||s instanceof Ag){o=e-i;break}i=c}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof wg&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?St(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?St(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,c=0;;c++){let a=this.children[c],d=s+a.size;if(o==-1&&e<=d){let u=s+a.border;if(e>=u&&n<=d-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,u);e=s;for(let f=c;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=St(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(d>n||c==this.children.length-1)){n=d;for(let u=c+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=St(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let g=this.children[p],v=m+g.size;if(i>m&&s<v)return g.setSelection(e-m-g.border,n-m-g.border,r,o);m=v}let c=this.domFromPos(e,e?-1:1),a=n==e?c:this.domFromPos(n,n?-1:1),d=r.root.getSelection(),u=r.domSelectionRange(),f=!1;if((on||Ot)&&e==n){let{node:p,offset:m}=c;if(p.nodeType==3){if(f=!!(m&&p.nodeValue[m-1]==`
1187
- `),f&&m==p.nodeValue.length)for(let g=p,v;g;g=g.parentNode){if(v=g.nextSibling){v.nodeName=="BR"&&(c=a={node:v.parentNode,offset:St(v)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=p.childNodes[m-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(on&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||f&&Ot)&&ho(c.node,c.offset,u.anchorNode,u.anchorOffset)&&ho(a.node,a.offset,u.focusNode,u.focusOffset))return;let h=!1;if((d.extend||e==n)&&!(f&&on)){d.collapse(c.node,c.offset);try{e!=n&&d.extend(a.node,a.offset),h=!0}catch{}}if(!h){if(e>n){let m=c;c=a,a=m}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let c=r+i.border,a=s-i.border;if(e>=c&&n<=a){this.dirty=e==r||n==s?mo:kg,e==c&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Pn:i.markDirty(e-c,n-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?mo:Pn}r=s}this.dirty=mo}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?mo:kg;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class wg extends ps{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let c=document.createElement("span");c.appendChild(s),s=c}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==an&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class lx extends ps{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class go extends ps{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=uo.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new go(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Pn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Pn&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=an){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=an}}slice(e,n,r){let o=go.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=bu(i,n,s,r)),e>0&&(i=bu(i,0,e,r));for(let c=0;c<i.length;c++)i[c].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class _r extends ps{constructor(e,n,r,o,i,s,c,a,d){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=c}static create(e,n,r,o,i,s){let c=i.nodeViews[n.type.name],a,d=c&&c(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),u=d&&d.dom,f=d&&d.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=uo.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Ig(u,r,n),d?a=new cx(e,n,r,o,u,f||null,h,d,i,s+1):n.isText?new qa(e,n,r,o,u,h,i):new _r(e,n,r,o,u,f||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ce.empty)}return e}matchesNode(e,n,r){return this.dirty==an&&e.eq(this.node)&&Va(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,c=i&&i.pos<0,a=new ux(this,s&&s.node,e);px(this.node,this.innerDeco,(d,u,f)=>{d.spec.marks?a.syncToMarks(d.spec.marks,r,e,u):d.type.side>=0&&!f&&a.syncToMarks(u==this.node.childCount?Ye.none:this.node.child(u).marks,r,e,u),a.placeWidget(d,e,o)},(d,u,f,h)=>{a.syncToMarks(d.marks,r,e,h);let p;a.findNodeMatch(d,u,f,h)||c&&e.state.selection.from>o&&e.state.selection.to<o+d.nodeSize&&(p=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(d,u,f,p,e)||a.updateNextNode(d,u,f,e,h,o)||a.addNode(d,u,f,e,o),o+=d.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==mo)&&(s&&this.protectLocalComposition(e,s),xg(this.contentDOM,this.children,e),ei&&mx(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Le)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,c=gx(this.node.content,s,r-n,o-n);return c<0?null:{node:i,pos:c,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new lx(this,i,n,o);e.input.compositionNodes.push(s),this.children=bu(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Pn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=an}updateOuterDeco(e){if(Va(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Tg(this.dom,this.nodeDOM,yu(this.outerDeco,this.node,n),yu(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Sg(t,e,n,r,o){Ig(r,e,t);let i=new _r(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class qa extends _r{constructor(e,n,r,o,i,s,c){super(e,n,r,o,i,null,s,c,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Pn||this.dirty!=an&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=an||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=an,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new qa(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Pn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Ag extends ps{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==an&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class cx extends _r{constructor(e,n,r,o,i,s,c,a,d,u){super(e,n,r,o,i,s,c,d,u),this.spec=a}update(e,n,r,o){if(this.dirty==Pn)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function xg(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],c=s.dom;if(c.parentNode==t){for(;c!=r;)r=_g(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(c,r);if(s instanceof go){let a=r?r.previousSibling:t.lastChild;xg(s.contentDOM,s.children,n),r=a?a.nextSibling:t.firstChild}}for(;r;)r=_g(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const ms=function(t){t&&(this.nodeName=t)};ms.prototype=Object.create(null);const vo=[new ms];function yu(t,e,n){if(t.length==0)return vo;let r=n?vo[0]:new ms,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new ms(s.nodeName));for(let c in s){let a=s[c];a!=null&&(n&&o.length==1&&o.push(r=new ms(e.isInline?"span":"div")),c=="class"?r.class=(r.class?r.class+" ":"")+a:c=="style"?r.style=(r.style?r.style+";":"")+a:c!="nodeName"&&(r[c]=a))}}}return o}function Tg(t,e,n,r){if(n==vo&&r==vo)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],c=n[i];if(i){let a;c&&c.nodeName==s.nodeName&&o!=t&&(a=o.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(o),c=vo[0]),o=a}dx(o,c||vo[0],s)}return o}function dx(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function Ig(t,e,n){return Tg(t,t,vo,yu(e,n,t.nodeType!=1))}function Va(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function _g(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ux{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=fx(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let i=0,s=this.stack.length>>1,c=Math.min(s,e.length);for(;i<c&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=an,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let a=-1,d=this.top.children.length;o<this.preMatch.index&&(d=Math.min(this.index+3,d));for(let u=this.index;u<d;u++){let f=this.top.children[u];if(f.matchesMark(e[s])&&!this.isLocked(f.dom)){a=u;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let u=go.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let c=this.index,a=Math.min(this.top.children.length,c+5);c<a;c++){let d=this.top.children[c];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){i=c;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Pn&&s.dom==s.contentDOM&&(s.dirty=mo),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let c=this.index;c<this.top.children.length;c++){let a=this.top.children[c];if(a instanceof _r){let d=this.preMatch.matched.get(a);if(d!=null&&d!=i)return!1;let u=a.dom,f,h=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Pn&&Va(n,a.outerDeco));if(!h&&a.update(e,n,r,o))return this.destroyBetween(this.index,c),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,n,r,o,s)))return this.destroyBetween(this.index,c),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=mo,f.updateChildren(o,s+1),f.dirty=an),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Va(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let c=_r.create(this.top,n,r,o,i,s);if(c.contentDOM){c.children=e.children,e.children=[];for(let a of c.children)a.parent=c}return e.destroy(),c}addNode(e,n,r,o,i){let s=_r.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new wg(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof go;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof qa)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ot||At)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Ag(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function fx(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let c;for(;;)if(r){let d=n.children[r-1];if(d instanceof go)n=d,r=d.children.length;else{c=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=c.node;if(a){if(a!=t.child(o-1))break;--o,i.set(c,o),s.push(c)}}return{index:o,matched:i,matches:s.reverse()}}function hx(t,e){return t.type.side-e.type.side}function px(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let d=0;d<t.childCount;d++){let u=t.child(d);r(u,o,e.forChild(i,u),d),i+=u.nodeSize}return}let s=0,c=[],a=null;for(let d=0;;){let u,f;for(;s<o.length&&o[s].to==i;){let v=o[s++];v.widget&&(u?(f||(f=[u])).push(v):u=v)}if(u)if(f){f.sort(hx);for(let v=0;v<f.length;v++)n(f[v],d,!!a)}else n(u,d,!!a);let h,p;if(a)p=-1,h=a,a=null;else if(d<t.childCount)p=d,h=t.child(d++);else break;for(let v=0;v<c.length;v++)c[v].to<=i&&c.splice(v--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)c.push(o[s++]);let m=i+h.nodeSize;if(h.isText){let v=m;s<o.length&&o[s].from<v&&(v=o[s].from);for(let y=0;y<c.length;y++)c[y].to<v&&(v=c[y].to);v<m&&(a=h.cut(v-i),h=h.cut(0,v-i),m=v,p=-1)}else for(;s<o.length&&o[s].to<m;)s++;let g=h.isInline&&!h.isLeaf?c.filter(v=>!v.inline):c.slice();r(h,g,e.forChild(i,h),p),i=m}}function mx(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function gx(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),c=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<t.childCount;){let d=t.child(o++);if(i+=d.nodeSize,!d.isText)break;a+=d.text}if(i>=n){if(i>=r&&a.slice(r-e.length-c,r-c)==e)return r-e.length;let d=c<r?a.lastIndexOf(e,r-c-1):-1;if(d>=0&&d+e.length+c>=n)return c+d;if(n==r&&a.length>=r+e.length-c&&a.slice(r-c,r-c+e.length)==e)return r}}return-1}function bu(t,e,n,r,o){let i=[];for(let s=0,c=0;s<t.length;s++){let a=t[s],d=c,u=c+=a.size;d>=n||u<=e?i.push(a):(d<e&&i.push(a.slice(0,e-d,r)),o&&(i.push(o),o=void 0),u>n&&i.push(a.slice(n-d,a.size,r)))}return i}function Cu(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let c=r.resolve(s),a,d;if(Xa(n)){for(a=s;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&xe.isSelectable(f)&&o.parent&&!(f.isInline&&jA(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;d=new xe(s==h?c:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[a,s]=h==t.state.selection.anchor?[h,f]:[f,h],c=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let u=r.resolve(a);if(!d){let f=e=="pointer"||t.state.selection.head<c.pos&&!i?1:-1;d=ku(t,u,c,f)}return d}function Ng(t){return t.editable?t.hasFocus():Rg(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function er(t,e=!1){let n=t.state.selection;if(Dg(t,n),!!Ng(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&At){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ho(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)yx(t);else{let{anchor:r,head:o}=n,i,s;Og&&!(n instanceof Le)&&(n.$from.parent.inlineContent||(i=Mg(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Mg(t,n.to))),t.docView.setSelection(r,o,t,e),Og&&(i&&Lg(i),s&&Lg(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&vx(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Og=Ot||At&&cg<63;function Mg(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Ot&&o&&o.contentEditable=="false")return Eu(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Eu(o);if(i)return Eu(i)}}function Eu(t){return t.contentEditable="true",Ot&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Lg(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function vx(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ng(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function yx(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,St(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Kt&&Tr<=11&&(n.disabled=!0,n.disabled=!1)}function Dg(t,e){if(e instanceof xe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Pg(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Pg(t)}function Pg(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ku(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Le.between(e,n,r)}function Bg(t){return t.editable&&!t.hasFocus()?!1:Rg(t)}function Rg(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function bx(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ho(e.node,e.offset,n.anchorNode,n.anchorOffset)}function wu(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Be.findFrom(i,e)}function Nr(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function $g(t,e,n){let r=t.state.selection;if(r instanceof Le)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return Nr(t,new Le(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=wu(t.state,e);return o&&o instanceof xe?Nr(t,o):!1}else if(!(sn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let c=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(c))&&!s.contentDOM?xe.isSelectable(i)?Nr(t,new xe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):fs?Nr(t,new Le(t.state.doc.resolve(e<0?c:c+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof xe&&r.node.isInline)return Nr(t,new Le(e>0?r.$to:r.$from));{let o=wu(t.state,e);return o?Nr(t,o):!1}}}function el(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function gs(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ni(t,e){return e<0?Cx(t):Ex(t)}function Cx(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(on&&n.nodeType==1&&r<el(n)&&gs(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let c=n.childNodes[r-1];if(gs(c,-1))o=n,i=--r;else if(c.nodeType==3)n=c,r=n.nodeValue.length;else break}}else{if(Fg(n))break;{let c=n.previousSibling;for(;c&&gs(c,-1);)o=n.parentNode,i=St(c),c=c.previousSibling;if(c)n=c,r=el(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Su(t,n,r):o&&Su(t,o,i)}function Ex(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=el(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let c=n.childNodes[r];if(gs(c,1))i=n,s=++r;else break}else{if(Fg(n))break;{let c=n.nextSibling;for(;c&&gs(c,1);)i=c.parentNode,s=St(c)+1,c=c.nextSibling;if(c)n=c,r=0,o=el(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&Su(t,i,s)}function Fg(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function kx(t,e){for(;t&&e==t.childNodes.length&&!us(t);)e=St(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function wx(t,e){for(;t&&!e&&!us(t);)e=St(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Su(t,e,n){if(e.nodeType!=3){let i,s;(s=kx(e,n))?(e=s,n=0):(i=wx(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Xa(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&er(t)},50)}function zg(t,e){let n=t.state.doc.resolve(e);if(!(At||dg)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Ug(t,e,n){let r=t.state.selection;if(r instanceof Le&&!r.empty||n.indexOf("s")>-1||sn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=wu(t.state,e);if(s&&s instanceof xe)return Nr(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,c=r instanceof Xt?Be.near(s,e):Be.findFrom(s,e);return c?Nr(t,c):!1}return!1}function Hg(t,e){if(!(t.state.selection instanceof Le))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function jg(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Sx(t){if(!Ot||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;jg(t,r,"true"),setTimeout(()=>jg(t,r,"false"),20)}return!1}function Ax(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function xx(t,e){let n=e.keyCode,r=Ax(e);if(n==8||sn&&n==72&&r=="c")return Hg(t,-1)||ni(t,-1);if(n==46&&!e.shiftKey||sn&&n==68&&r=="c")return Hg(t,1)||ni(t,1);if(n==13||n==27)return!0;if(n==37||sn&&n==66&&r=="c"){let o=n==37?zg(t,t.state.selection.from)=="ltr"?-1:1:-1;return $g(t,o,r)||ni(t,o)}else if(n==39||sn&&n==70&&r=="c"){let o=n==39?zg(t,t.state.selection.from)=="ltr"?1:-1:1;return $g(t,o,r)||ni(t,o)}else{if(n==38||sn&&n==80&&r=="c")return Ug(t,-1,r)||ni(t,-1);if(n==40||sn&&n==78&&r=="c")return Sx(t)||Ug(t,1,r)||ni(t,1);if(r==(sn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Au(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||uo.fromSchema(t.state.schema),c=Xg(),a=c.createElement("div");a.appendChild(s.serializeFragment(r,{document:c}));let d=a.firstChild,u,f=0;for(;d&&d.nodeType==1&&(u=Zg[d.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=c.createElement(u[p]);for(;a.firstChild;)m.appendChild(a.firstChild);a.appendChild(m),f++}d=a.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${o} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
1184
+ `),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let c=void 0;;){let a=this.parser.matchStyle(i,s,this,c);if(!a)break;if(a.ignore)return null;if(a.clearMark?n=n.filter(d=>!a.clearMark(d)):n=n.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)c=a;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(s,n.attrs||null,r,n.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[n.mark];r=r.concat(a.create(n.attrs))}let c=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof n.contentElement=="string"?a=e.querySelector(n.contentElement):typeof n.contentElement=="function"?a=n.contentElement(e):n.contentElement&&(a=n.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(c)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,c=o==null?null:e.childNodes[o];s!=c;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,c=0;s>=0;s--){let a=this.nodes[s],d=a.findWrapping(e);if(d&&(!o||o.length>d.length+c)&&(o=d,i=a,!d.length))break;if(a.solid){if(r)break;c+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=Ye.none;for(let c of o.concat(e.marks))(i.type?i.type.allowsMarkType(c.type):C0(c.type,e.type))&&(s=c.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let c=v0(e,i,s.options);s.options&is&&s.content.length==0&&(c|=is);let a=Ye.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):C0(d.type,e))?(a=d.addToSet(a),!1):!0),this.nodes.push(new Wa(e,n,a,o,null,c)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));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(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=rs)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(c,a)=>{for(;c>=0;c--){let d=n[c];if(d==""){if(c==n.length-1||c==0)continue;for(;a>=i;a--)if(s(c-1,a))return!0;return!1}else{let u=a>0||a==0&&o?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;a--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function jS(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&g0.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function WS(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function b0(t){let e={};for(let n in t)e[n]=t[n];return e}function C0(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=c=>{i.push(c);for(let a=0;a<c.edgeCount;a++){let{type:d,next:u}=c.edge(a);if(d==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}class uo{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=Qd(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let c=0,a=0;for(;c<i.length&&a<s.marks.length;){let d=s.marks[a];if(!this.marks[d.type.name]){a++;continue}if(!d.eq(i[c][0])||d.type.spec.spanning===!1)break;c++,a++}for(;c<i.length;)o=i.pop()[1];for(;a<s.marks.length;){let d=s.marks[a++],u=this.serializeMark(d,s.isInline,n);u&&(i.push([d,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Ka(Qd(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Ka(Qd(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Ka(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new uo(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=E0(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return E0(e.marks)}}function E0(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function Qd(t){return t.document||window.document}const k0=new WeakMap;function KS(t){let e=k0.get(t);return e===void 0&&k0.set(t,e=YS(t)),e}function YS(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Ka(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=KS(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let c,a=n?t.createElementNS(n,o):t.createElement(o),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?a.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):f=="style"&&a.style?a.style.cssText=d[f]:a.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else{let{dom:p,contentDOM:m}=Ka(t,h,n,r);if(a.appendChild(p),m){if(c)throw new RangeError("Multiple content holes");c=m}}}return{dom:a,contentDOM:c}}const w0=65535,S0=Math.pow(2,16);function GS(t,e){return t+e*S0}function A0(t){return t&w0}function QS(t){return(t-(t&w0))/S0}const x0=1,T0=2,Ya=4,I0=8;class Zd{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&I0)>0}get deletedBefore(){return(this.delInfo&(x0|Ya))>0}get deletedAfter(){return(this.delInfo&(T0|Ya))>0}get deletedAcross(){return(this.delInfo&Ya)>0}}class Jt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Jt.empty)return Jt.empty}recover(e){let n=0,r=A0(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+QS(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let a=this.ranges[c]-(this.inverted?o:0);if(a>e)break;let d=this.ranges[c+i],u=this.ranges[c+s],f=a+d;if(e<=f){let h=d?e==a?-1:e==f?1:n:n,p=a+o+(h<0?0:u);if(r)return p;let m=e==(n<0?a:f)?null:GS(c/3,e-a),g=e==a?T0:e==f?x0:Ya;return(n<0?e!=a:e!=f)&&(g|=I0),new Zd(p,g,m)}o+=u-d}return r?e+o:new Zd(e+o,0,null)}touches(e,n){let r=0,o=A0(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let c=0;c<this.ranges.length;c+=3){let a=this.ranges[c]-(this.inverted?r:0);if(a>e)break;let d=this.ranges[c+i],u=a+d;if(e<=u&&c==o*3)return!0;r+=this.ranges[c+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],c=s-(this.inverted?i:0),a=s+(this.inverted?0:i),d=this.ranges[o+n],u=this.ranges[o+r];e(c,c+d,a,a+u),i+=u-d}}invert(){return new Jt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Jt.empty:new Jt(e<0?[0,-e,0]:[0,0,e])}}Jt.empty=new Jt([]);class ss{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ss(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new ss;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],c=s.mapResult(e,n);if(c.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(c.recover);continue}}o|=c.delInfo,e=c.pos}return r?e:new Zd(e,o,null)}}const Jd=Object.create(null);class Ot{getMap(){return Jt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Jd[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Jd)throw new RangeError("Duplicate use of step JSON ID "+e);return Jd[e]=n,n.prototype.jsonID=e,n}}class ct{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new ct(e,null)}static fail(e){return new ct(null,e)}static fromReplace(e,n,r,o){try{return ct.ok(e.replace(n,r,o))}catch(i){if(i instanceof Fa)return ct.fail(i.message);throw i}}}function Xd(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Xd(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return ce.fromArray(r)}class wr extends Ot{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new ye(Xd(n.content,(s,c)=>!s.isAtom||!c.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return ct.fromReplace(e,this.from,this.to,i)}invert(){return new wn(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new wr(n.pos,r.pos,this.mark)}merge(e){return e instanceof wr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new wr(n.from,n.to,e.markFromJSON(n.mark))}}Ot.jsonID("addMark",wr);class wn extends Ot{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new ye(Xd(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return ct.fromReplace(e,this.from,this.to,r)}invert(){return new wr(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new wn(n.pos,r.pos,this.mark)}merge(e){return e instanceof wn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new wn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new wn(n.from,n.to,e.markFromJSON(n.mark))}}Ot.jsonID("removeMark",wn);class Sr extends Ot{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new Sr(this.pos,n.marks[o]);return new Sr(this.pos,this.mark)}}return new fo(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Sr(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Sr(n.pos,e.markFromJSON(n.mark))}}Ot.jsonID("addNodeMark",Sr);class fo extends Ot{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Sr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new fo(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new fo(n.pos,e.markFromJSON(n.mark))}}Ot.jsonID("removeNodeMark",fo);class vt extends Ot{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&qd(e,this.from,this.to)?ct.fail("Structure replace would overwrite content"):ct.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Jt([this.from,this.to-this.from,this.slice.size])}invert(e){return new vt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new vt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof vt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new vt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?ye.empty:new ye(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new vt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new vt(n.from,n.to,ye.fromJSON(e,n.slice),!!n.structure)}}Ot.jsonID("replace",vt);class yt extends Ot{constructor(e,n,r,o,i,s,c=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=c}apply(e){if(this.structure&&(qd(e,this.from,this.gapFrom)||qd(e,this.gapTo,this.to)))return ct.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ct.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ct.fromReplace(e,this.from,this.to,r):ct.fail("Content does not fit in gap")}getMap(){return new Jt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new yt(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new yt(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new yt(n.from,n.to,n.gapFrom,n.gapTo,ye.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ot.jsonID("replaceAround",yt);function qd(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function ZS(t,e,n,r){let o=[],i=[],s,c;t.doc.nodesBetween(e,n,(a,d,u)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+a.nodeSize,n),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[g])?s.to=p:o.push(s=new wn(h,p,f[g])));c&&c.to==h?c.to=p:i.push(c=new wr(h,p,r))}}),o.forEach(a=>t.step(a)),i.forEach(a=>t.step(a))}function JS(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,c)=>{if(!s.isInline)return;i++;let a=null;if(r instanceof ja){let d=s.marks,u;for(;u=r.isInSet(d);)(a||(a=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(a=[r]):a=s.marks;if(a&&a.length){let d=Math.min(c+s.nodeSize,n);for(let u=0;u<a.length;u++){let f=a[u],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=d,h.step=i):o.push({style:f,from:Math.max(c,e),to:d,step:i})}}}),o.forEach(s=>t.step(new wn(s.from,s.to,s.style)))}function Vd(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],c=e+1;for(let a=0;a<i.childCount;a++){let d=i.child(a),u=c+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new vt(c,u,ye.empty));else{r=f;for(let h=0;h<d.marks.length;h++)n.allowsMarkType(d.marks[h].type)||t.step(new wn(c,u,d.marks[h]));if(o&&d.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new ye(ce.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new vt(c+h.index,c+h.index+h[0].length,m))}}c=u}if(!r.validEnd){let a=r.fillBefore(ce.empty,!0);t.replace(c,c,new ye(a,0,0))}for(let a=s.length-1;a>=0;a--)t.step(s[a])}function XS(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Go(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),c=t.$from.index(r)+o,a=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(c,a,n))return r;if(r==0||s.type.spec.isolating||!XS(s,c,a))break;c&&(o=1),a<s.childCount&&(i=1)}return null}function qS(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),c=o.after(i+1),a=s,d=c,u=ce.empty,f=0;for(let m=i,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,u=ce.from(r.node(m).copy(u)),f++):a--;let h=ce.empty,p=0;for(let m=i,g=!1;m>n;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=ce.from(o.node(m).copy(h)),p++):d++;t.step(new yt(a,d,s,c,new ye(u.append(h),f,p),u.size-f,!0))}function eu(t,e,n=null,r=t){let o=VS(t,e),i=o&&eA(r,e);return i?o.map(_0).concat({type:e,attrs:n}).concat(i.map(_0)):null}function _0(t){return{type:t,attrs:null}}function VS(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function eA(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;a&&d<o;d++)a=a.matchType(n.child(d).type);return!a||!a.validEnd?null:s}function tA(t,e,n){let r=ce.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let c=n[s].type.contentMatch.matchFragment(r);if(!c||!c.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=ce.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new yt(o,i,o,i,new ye(r,0,0),n.length,!0))}function nA(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,c)=>{let a=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,a)&&rA(t.doc,t.mapping.slice(i).map(c),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&O0(t,s,c,i),Vd(t,t.mapping.slice(i).map(c,1),r,void 0,d===null);let u=t.mapping.slice(i),f=u.map(c,1),h=u.map(c+s.nodeSize,1);return t.step(new yt(f,h,f+1,h-1,new ye(ce.from(r.create(a,null,s.marks)),0,0),1,!0)),d===!0&&N0(t,s,c,i),!1}})}function N0(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,c=/\r?\n|\r/g;for(;s=c.exec(o.text);){let a=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function O0(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
1185
+ `))}})}function rA(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function oA(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new yt(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new ye(ce.from(s),0,0),1,!0))}function Jn(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let d=o.depth-1,u=n-2;d>i;d--,u--){let f=o.node(d),h=o.index(d);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!g.type.validContent(p))return!1}let c=o.indexAfter(i),a=r&&r[0];return o.node(i).canReplaceWith(c,c,a?a.type:o.node(i+1).type)}function iA(t,e,n=1,r){let o=t.doc.resolve(e),i=ce.empty,s=ce.empty;for(let c=o.depth,a=o.depth-n,d=n-1;c>a;c--,d--){i=ce.from(o.node(c).copy(i));let u=r&&r[d];s=ce.from(u?u.type.create(u.attrs,s):o.node(c).copy(s))}t.step(new vt(e,e,new ye(i.append(s),n,n),!0))}function Ar(t,e){let n=t.resolve(e),r=n.index();return M0(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function sA(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function M0(t,e){return!!(t&&e&&!t.isLeaf&&sA(t,e))}function Ga(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,c=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),c++,s=r.node(o).maybeChild(c)):(i=r.node(o).maybeChild(c-1),s=r.node(o+1)),i&&!i.isTextblock&&M0(i,s)&&r.node(o).canReplace(c,c+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function aA(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let u=s.whitespace=="pre",f=!!s.contentMatch.matchType(o);u&&!f?r=!1:!u&&f&&(r=!0)}let c=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);O0(t,u.node(),u.before(),c)}s.inlineContent&&Vd(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let a=t.mapping.slice(c),d=a.map(e-n);if(t.step(new vt(d,a.map(e+n,-1),ye.empty,!0)),r===!0){let u=t.doc.resolve(d);N0(t,u.node(),u.before(),t.steps.length)}return t}function lA(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function L0(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,a=r.index(s)+(c>0?1:0),d=r.node(s),u=!1;if(i==1)u=d.canReplace(a,a,o);else{let f=d.contentMatchAt(a).findWrapping(o.firstChild.type);u=f&&d.canReplaceWith(a,a,f[0])}if(u)return c==0?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}function Qa(t,e,n=e,r=ye.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return D0(o,i,r)?new vt(e,n,r):new cA(o,i,r).fit()}function D0(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class cA{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=ce.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=ce.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,c=o.depth;for(;s&&c&&i.childCount==1;)i=i.firstChild.content,s--,c--;let a=new ye(i,s,c);return e>-1?new yt(r.pos,e,this.$to.pos,this.$to.end(),a,n):a.size||r.pos!=this.$to.pos?new vt(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=tu(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let c=this.depth;c>=0;c--){let{type:a,match:d}=this.frontier[c],u,f=null;if(n==1&&(s?d.matchType(s.type)||(f=d.fillBefore(ce.from(s),!1)):i&&a.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:c,parent:i,inject:f};if(n==2&&s&&(u=d.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:c,parent:i,wrap:u};if(i&&d.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=tu(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new ye(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=tu(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new ye(as(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new ye(as(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let g=0;g<i.length;g++)this.openFrontierNode(i[g]);let s=this.unplaced,c=r?r.content:s.content,a=s.openStart-e,d=0,u=[],{match:f,type:h}=this.frontier[n];if(o){for(let g=0;g<o.childCount;g++)u.push(o.child(g));f=f.matchFragment(o)}let p=c.size+e-(s.content.size-s.openEnd);for(;d<c.childCount;){let g=c.child(d),v=f.matchType(g.type);if(!v)break;d++,(d>1||a==0||g.content.size)&&(f=v,u.push(P0(g.mark(h.allowedMarks(g.marks)),d==1?a:0,d==c.childCount?p:-1)))}let m=d==c.childCount;m||(p=-1),this.placed=ls(this.placed,n,ce.from(u)),this.frontier[n].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=c;g<p;g++){let y=v.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),v=y.content}this.unplaced=m?e==0?ye.empty:new ye(as(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new ye(as(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!nu(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=nu(e,n,o,r,i);if(s){for(let c=n-1;c>=0;c--){let{match:a,type:d}=this.frontier[c],u=nu(e,c,d,a,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=ls(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=ls(this.placed,this.depth,ce.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(ce.empty,!0);n.childCount&&(this.placed=ls(this.placed,this.frontier.length,n))}}function as(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(as(t.firstChild.content,e-1,n)))}function ls(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(ls(t.lastChild.content,e-1,n)))}function tu(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function P0(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,P0(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(ce.empty,!0)))),t.copy(r)}function nu(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let c=r.fillBefore(i.content,!0,s);return c&&!dA(n,i.content,s)?c:null}function dA(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function uA(t){return t.spec.defining||t.spec.definingForContent}function fA(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(D0(o,i,r))return t.step(new vt(e,n,r));let s=R0(o,i);s[s.length-1]==0&&s.pop();let c=-(o.depth+1);s.unshift(c);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let m=o.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?c=h:o.before(h)==p&&s.splice(1,0,-h)}let a=s.indexOf(c),d=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(d.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=d[h],m=uA(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(c)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=d[p];if(m)for(let g=0;g<s.length;g++){let v=s[(g+a)%s.length],y=!0;v<0&&(y=!1,v=-v);let b=o.node(v-1),E=o.index(v-1);if(b.canReplaceWith(E,E,m.type,m.marks))return t.replace(o.before(v),y?i.after(v):n,new ye(B0(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function B0(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(B0(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(ce.empty,!0))}return t}function hA(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=lA(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new ye(ce.from(r),0,0))}function pA(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=R0(r,o);for(let s=0;s<i.length;s++){let c=i[s],a=s==i.length-1;if(a&&c==0||r.node(c).type.contentMatch.validEnd)return t.delete(r.start(c),o.end(c));if(c>0&&(a||r.node(c-1).canReplace(r.index(c-1),o.indexAfter(c-1))))return t.delete(r.before(c),o.after(c))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function R0(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class Qo extends Ot{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return ct.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return ct.fromReplace(e,this.pos,this.pos+1,new ye(ce.from(o),0,n.isLeaf?0:1))}getMap(){return Jt.empty}invert(e){return new Qo(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Qo(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Qo(n.pos,n.attr,n.value)}}Ot.jsonID("attr",Qo);class cs extends Ot{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return ct.ok(r)}getMap(){return Jt.empty}invert(e){return new cs(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new cs(n.attr,n.value)}}Ot.jsonID("docAttr",cs);let Zo=class extends Error{};Zo=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n},Zo.prototype=Object.create(Error.prototype),Zo.prototype.constructor=Zo,Zo.prototype.name="TransformError";class $0{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ss}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Zo(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((i,s,c,a)=>{e=Math.min(e,c),n=Math.max(n,a)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=ye.empty){let o=Qa(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new ye(ce.from(r),0,0))}delete(e,n){return this.replace(e,n,ye.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return fA(this,e,n,r),this}replaceRangeWith(e,n,r){return hA(this,e,n,r),this}deleteRange(e,n){return pA(this,e,n),this}lift(e,n){return qS(this,e,n),this}join(e,n=1){return aA(this,e,n),this}wrap(e,n){return tA(this,e,n),this}setBlockType(e,n=e,r,o=null){return nA(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return oA(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new Qo(e,n,r)),this}setDocAttribute(e,n){return this.step(new cs(e,n)),this}addNodeMark(e,n){return this.step(new Sr(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof Ye)n.isInSet(r.marks)&&this.step(new fo(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new fo(e,i)),o=i.removeFromSet(o);for(let c=s.length-1;c>=0;c--)this.step(s[c])}return this}split(e,n=1,r){return iA(this,e,n,r),this}addMark(e,n,r){return ZS(this,e,n,r),this}removeMark(e,n,r){return JS(this,e,n,r),this}clearIncompatible(e,n,r){return Vd(this,e,n,r),this}}const ru=Object.create(null);class Be{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new mA(e.min(n),e.max(n))]}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 e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=ye.empty){let r=n.content.lastChild,o=null;for(let c=0;c<n.openEnd;c++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let c=0;c<s.length;c++){let{$from:a,$to:d}=s[c],u=e.mapping.slice(i);e.replaceRange(u.map(a.pos),u.map(d.pos),c?ye.empty:n),c==0&&U0(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:c}=o[i],a=e.mapping.slice(r),d=a.map(s.pos),u=a.map(c.pos);i?e.deleteRange(d,u):(e.replaceRangeWith(d,u,n),U0(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new Le(e):Jo(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?Jo(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):Jo(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Xt(e.node(0))}static atStart(e){return Jo(e,e,0,0,1)||new Xt(e)}static atEnd(e){return Jo(e,e,e.content.size,e.childCount,-1)||new Xt(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ru[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in ru)throw new RangeError("Duplicate use of selection JSON ID "+e);return ru[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Le.between(this.$anchor,this.$head).getBookmark()}}Be.prototype.visible=!0;class mA{constructor(e,n){this.$from=e,this.$to=n}}let F0=!1;function z0(t){!F0&&!t.parent.inlineContent&&(F0=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Le extends Be{constructor(e,n=e){z0(e),z0(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return Be.near(r);let o=e.resolve(n.map(this.anchor));return new Le(o.parent.inlineContent?o:r,r)}replace(e,n=ye.empty){if(super.replace(e,n),n==ye.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Le&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Za(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Le(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=Be.findFrom(n,r,!0)||Be.findFrom(n,-r,!0);if(i)n=i.$head;else return Be.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(Be.findFrom(e,-r,!0)||Be.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new Le(e,n)}}Be.jsonID("text",Le);class Za{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Za(e.map(this.anchor),e.map(this.head))}resolve(e){return Le.between(e.resolve(this.anchor),e.resolve(this.head))}}class xe extends Be{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?Be.near(i):new xe(i)}content(){return new ye(ce.from(this.node),0,0)}eq(e){return e instanceof xe&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ou(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new xe(e.resolve(n.anchor))}static create(e,n){return new xe(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}xe.prototype.visible=!1,Be.jsonID("node",xe);class ou{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new Za(r,r):new ou(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&xe.isSelectable(r)?new xe(n):Be.near(n)}}class Xt extends Be{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=ye.empty){if(n==ye.empty){e.delete(0,e.doc.content.size);let r=Be.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Xt(e)}map(e){return new Xt(e)}eq(e){return e instanceof Xt}getBookmark(){return gA}}Be.jsonID("all",Xt);const gA={map(){return this},resolve(t){return new Xt(t)}};function Jo(t,e,n,r,o,i=!1){if(e.inlineContent)return Le.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let c=e.child(s);if(c.isAtom){if(!i&&xe.isSelectable(c))return xe.create(t,n-(o<0?c.nodeSize:0))}else{let a=Jo(t,c,n+o,o<0?c.childCount:0,o,i);if(a)return a}n+=c.nodeSize*o}return null}function U0(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof vt||o instanceof yt))return;let i=t.mapping.maps[r],s;i.forEach((c,a,d,u)=>{s==null&&(s=u)}),t.setSelection(Be.near(t.doc.resolve(s),n))}const H0=1,Ja=2,j0=4;class vA extends $0{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|H0)&~Ja,this.storedMarks=null,this}get selectionSet(){return(this.updated&H0)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Ja,this}ensureMarks(e){return Ye.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Ja)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Ja,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Ye.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(Be.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=j0,this}get scrolledIntoView(){return(this.updated&j0)>0}}function W0(t,e){return!e||!t?t:t.bind(e)}class ds{constructor(e,n,r){this.name=e,this.init=W0(n.init,r),this.apply=W0(n.apply,r)}}const yA=[new ds("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new ds("selection",{init(t,e){return t.selection||Be.atStart(e.doc)},apply(t){return t.selection}}),new ds("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new ds("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class iu{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yA.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new ds(r.key,r.spec.state,r))})}}class Xo{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let c=this.config.plugins[s];if(c.spec.appendTransaction){let a=o?o[s].n:0,d=o?o[s].state:this,u=a<n.length&&c.spec.appendTransaction.call(c,a?n.slice(a):n,d,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Xo(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new vA(this)}static create(e){let n=new iu(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Xo(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new iu(this.schema,e.plugins),r=n.fields,o=new Xo(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new iu(e.schema,e.plugins),i=new Xo(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Er.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=Be.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let c in r){let a=r[c],d=a.spec.state;if(a.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(n,c)){i[s.name]=d.fromJSON.call(a,e,n[c],i);return}}i[s.name]=s.init(e,i)}}),i}}function K0(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=K0(o,e,{})),n[r]=o}return n}class Ve{constructor(e){this.spec=e,this.props={},e.props&&K0(e.props,this,this.props),this.key=e.key?e.key.key:Y0("plugin")}getState(e){return e[this.key]}}const su=Object.create(null);function Y0(t){return t in su?t+"$"+ ++su[t]:(su[t]=0,t+"$")}class bt{constructor(e="key"){this.key=Y0(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const au=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function G0(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const Q0=(t,e,n)=>{let r=G0(t,n);if(!r)return!1;let o=lu(r);if(!o){let s=r.blockRange(),c=s&&Go(s);return c==null?!1:(e&&e(t.tr.lift(s,c).scrollIntoView()),!0)}let i=o.nodeBefore;if(rg(t,o,e,-1))return!0;if(r.parent.content.size==0&&(qo(i,"end")||xe.isSelectable(i)))for(let s=r.depth;;s--){let c=Qa(t.doc,r.before(s),r.after(s),ye.empty);if(c&&c.slice.size<c.to-c.from){if(e){let a=t.tr.step(c);a.setSelection(qo(i,"end")?Be.findFrom(a.doc.resolve(a.mapping.map(o.pos,-1)),-1):xe.create(a.doc,o.pos-i.nodeSize)),e(a.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},bA=(t,e,n)=>{let r=G0(t,n);if(!r)return!1;let o=lu(r);return o?Z0(t,o,e):!1},CA=(t,e,n)=>{let r=X0(t,n);if(!r)return!1;let o=cu(r);return o?Z0(t,o,e):!1};function Z0(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let s=e.nodeAfter,c=s,a=e.pos+1;for(;!c.isTextblock;a++){if(c.type.spec.isolating)return!1;let u=c.firstChild;if(!u)return!1;c=u}let d=Qa(t.doc,i,a,ye.empty);if(!d||d.from!=i||d instanceof vt&&d.slice.size>=a-i)return!1;if(n){let u=t.tr.step(d);u.setSelection(Le.create(u.doc,i)),n(u.scrollIntoView())}return!0}function qo(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const J0=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=lu(r)}let s=i&&i.nodeBefore;return!s||!xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function lu(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function X0(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const q0=(t,e,n)=>{let r=X0(t,n);if(!r)return!1;let o=cu(r);if(!o)return!1;let i=o.nodeAfter;if(rg(t,o,e,1))return!0;if(r.parent.content.size==0&&(qo(i,"start")||xe.isSelectable(i))){let s=Qa(t.doc,r.before(),r.after(),ye.empty);if(s&&s.slice.size<s.to-s.from){if(e){let c=t.tr.step(s);c.setSelection(qo(i,"start")?Be.findFrom(c.doc.resolve(c.mapping.map(o.pos)),1):xe.create(c.doc,c.mapping.map(o.pos))),e(c.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},V0=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=cu(r)}let s=i&&i.nodeAfter;return!s||!xe.isSelectable(s)?!1:(e&&e(t.tr.setSelection(xe.create(t.doc,i.pos)).scrollIntoView()),!0)};function cu(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const EA=(t,e)=>{let n=t.selection,r=n instanceof xe,o;if(r){if(n.node.isTextblock||!Ar(t.doc,n.from))return!1;o=n.from}else if(o=Ga(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(xe.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},kA=(t,e)=>{let n=t.selection,r;if(n instanceof xe){if(n.node.isTextblock||!Ar(t.doc,n.to))return!1;r=n.to}else if(r=Ga(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},wA=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Go(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},eg=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
1186
+ `).scrollIntoView()),!0)};function du(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const SA=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=du(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let c=n.after(),a=t.tr.replaceWith(c,c,s.createAndFill());a.setSelection(Be.near(a.doc.resolve(c),1)),e(a.scrollIntoView())}return!0},tg=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof Xt||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=du(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,c=t.tr.insert(s,i.createAndFill());c.setSelection(Le.create(c.doc,s+1)),e(c.scrollIntoView())}return!0},ng=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(Jn(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Go(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function AA(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof xe&&e.selection.node.isBlock)return!r.parentOffset||!Jn(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,c,a=!1,d=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){a=r.end(p)==r.pos+(r.depth-p),d=r.start(p)==r.pos-(r.depth-p),c=du(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(a&&c?{type:c}:null),s=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof Le||e.selection instanceof Xt)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=Jn(u.doc,f,i.length,i);if(h||(i[0]=c?{type:c}:null,h=Jn(u.doc,f,i.length,i)),!h)return!1;if(u.split(f,i.length,i),!a&&d&&r.node(s).type!=c){let p=u.mapping.map(r.before(s)),m=u.doc.resolve(p);c&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,c)&&u.setNodeMarkup(u.mapping.map(r.before(s)),c)}return n&&n(u.scrollIntoView()),!0}}const xA=AA(),TA=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(xe.create(t.doc,o))),!0)};function IA(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Ar(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function rg(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,c,a=o.type.spec.isolating||i.type.spec.isolating;if(!a&&IA(t,e,n))return!0;let d=!a&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(c=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&c.matchType(s[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=ce.empty;for(let y=s.length-1;y>=0;y--)m=ce.from(s[y].create(null,m));m=ce.from(o.copy(m));let g=t.tr.step(new yt(e.pos-1,p,e.pos,p,new ye(m,1,0),s.length,!0)),v=g.doc.resolve(p+2*s.length);v.nodeAfter&&v.nodeAfter.type==o.type&&Ar(g.doc,v.pos)&&g.join(v.pos),n(g.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&a?null:Be.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Go(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(d&&qo(i,"start",!0)&&qo(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let g=i,v=1;for(;!g.isTextblock;g=g.firstChild)v++;if(p.canReplace(p.childCount,p.childCount,g.content)){if(n){let y=ce.empty;for(let E=m.length-1;E>=0;E--)y=ce.from(m[E].copy(y));let b=t.tr.step(new yt(e.pos-m.length,e.pos+i.nodeSize,e.pos+v,e.pos+i.nodeSize-v,new ye(y,m.length,0),0,!0));n(b.scrollIntoView())}return!0}}return!1}function og(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(Le.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const _A=og(-1),NA=og(1);function OA(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),c=s&&eu(s,t,e);return c?(r&&r(n.tr.wrap(s,c).scrollIntoView()),!0):!1}}function ig(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:c}}=n.selection.ranges[i];n.doc.nodesBetween(s,c,(a,d)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(t,e)))if(a.type==t)o=!0;else{let u=n.doc.resolve(d),f=u.index();o=u.parent.canReplaceWith(f,f+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:c},$to:{pos:a}}=n.selection.ranges[s];i.setBlockType(c,a,t,e)}r(i.scrollIntoView())}return!0}}function uu(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}uu(au,Q0,J0),uu(au,q0,V0),uu(eg,tg,ng,xA),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function MA(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let c=r?n.tr:null;return LA(c,s,t,e)?(r&&r(c.scrollIntoView()),!0):!1}}function LA(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let a=s.resolve(e.start-2);i=new Ua(a,a,e.depth),e.endIndex<e.parent.childCount&&(e=new Ua(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let c=eu(i,n,r,e);return c?(t&&DA(t,e,c,o,n),!0):!1}function DA(t,e,n,r,o){let i=ce.empty;for(let u=n.length-1;u>=0;u--)i=ce.from(n[u].type.create(n[u].attrs,i));t.step(new yt(e.start-(r?2:0),e.end,e.start,e.end,new ye(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let c=n.length-s,a=e.start+n.length-(r?2:0),d=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&&Jn(t.doc,a,c)&&(t.split(a,c),a+=2*c),a+=d.child(u).nodeSize;return t}function PA(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?BA(e,n,t,i):RA(e,n,i):!0:!1}}function BA(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new yt(i-1,s,i,s,new ye(ce.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new Ua(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const c=Go(r);if(c==null)return!1;o.lift(r,c);let a=o.doc.resolve(o.mapping.map(i,-1)-1);return Ar(o.doc,a.pos)&&a.nodeBefore.type==a.nodeAfter.type&&o.join(a.pos),e(o.scrollIntoView()),!0}function RA(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,g=n.startIndex;m>g;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let c=n.startIndex==0,a=n.endIndex==o.childCount,d=i.node(-1),u=i.index(-1);if(!d.canReplace(u+(c?0:1),u+1,s.content.append(a?ce.empty:ce.from(o))))return!1;let f=i.pos,h=f+s.nodeSize;return r.step(new yt(f-(c?1:0),h+(a?1:0),f+1,h-1,new ye((c?ce.empty:ce.from(o.copy(ce.empty))).append(a?ce.empty:ce.from(o.copy(ce.empty))),c?0:1,a?0:1),c?0:1)),e(r.scrollIntoView()),!0}function $A(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,d=>d.childCount>0&&d.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let c=i.parent,a=c.child(s-1);if(a.type!=t)return!1;if(n){let d=a.lastChild&&a.lastChild.type==c.type,u=ce.from(d?t.create():null),f=new ye(ce.from(t.create(null,ce.from(c.type.create(null,u)))),d?3:1,0),h=i.start,p=i.end;n(e.tr.step(new yt(h-(d?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}const St=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Vo=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let fu=null;const Xn=function(t,e,n){let r=fu||(fu=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},FA=function(){fu=null},ho=function(t,e,n,r){return n&&(sg(t,e,n,r,-1)||sg(t,e,n,r,1))},zA=/^(img|br|input|textarea|hr)$/i;function sg(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:rn(t))){let s=t.parentNode;if(!s||s.nodeType!=1||us(t)||zA.test(t.nodeName)||t.contentEditable=="false")return!1;e=St(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?rn(t):0}else return!1}}function rn(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function UA(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=rn(t)}else if(t.parentNode&&!us(t))e=St(t),t=t.parentNode;else return null}}function HA(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!us(t))e=St(t)+1,t=t.parentNode;else return null}}function jA(t,e,n){for(let r=e==0,o=e==rn(t);r||o;){if(t==n)return!0;let i=St(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==rn(t)}}function us(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Xa=function(t){return t.focusNode&&ho(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function po(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function WA(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function KA(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(rn(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(rn(r.startContainer),r.startOffset)}}}const Dn=typeof navigator<"u"?navigator:null,ag=typeof document<"u"?document:null,xr=Dn&&Dn.userAgent||"",hu=/Edge\/(\d+)/.exec(xr),lg=/MSIE \d/.exec(xr),pu=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xr),Kt=!!(lg||pu||hu),Tr=lg?document.documentMode:pu?+pu[1]:hu?+hu[1]:0,on=!Kt&&/gecko\/(\d+)/i.test(xr);on&&+(/Firefox\/(\d+)/.exec(xr)||[0,0])[1];const mu=!Kt&&/Chrome\/(\d+)/.exec(xr),At=!!mu,cg=mu?+mu[1]:0,Mt=!Kt&&!!Dn&&/Apple Computer/.test(Dn.vendor),ei=Mt&&(/Mobile\/\w+/.test(xr)||!!Dn&&Dn.maxTouchPoints>2),sn=ei||(Dn?/Mac/.test(Dn.platform):!1),dg=Dn?/Win/.test(Dn.platform):!1,qn=/Android \d/.test(xr),fs=!!ag&&"webkitFontSmoothing"in ag.documentElement.style,YA=fs?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function GA(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Vn(t,e){return typeof t=="number"?t:t[e]}function QA(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function ug(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=Vo(s);continue}let c=s,a=c==i.body,d=a?GA(i):QA(c),u=0,f=0;if(e.top<d.top+Vn(r,"top")?f=-(d.top-e.top+Vn(o,"top")):e.bottom>d.bottom-Vn(r,"bottom")&&(f=e.bottom-e.top>d.bottom-d.top?e.top+Vn(o,"top")-d.top:e.bottom-d.bottom+Vn(o,"bottom")),e.left<d.left+Vn(r,"left")?u=-(d.left-e.left+Vn(o,"left")):e.right>d.right-Vn(r,"right")&&(u=e.right-d.right+Vn(o,"right")),u||f)if(a)i.defaultView.scrollBy(u,f);else{let p=c.scrollLeft,m=c.scrollTop;f&&(c.scrollTop+=f),u&&(c.scrollLeft+=u);let g=c.scrollLeft-p,v=c.scrollTop-m;e={left:e.left-g,top:e.top-v,right:e.right-g,bottom:e.bottom-v}}let h=a?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:Vo(s)}}function ZA(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let c=t.root.elementFromPoint(i,s);if(!c||c==t.dom||!t.dom.contains(c))continue;let a=c.getBoundingClientRect();if(a.top>=n-20){r=c,o=a.top;break}}return{refDOM:r,refTop:o,stack:fg(t.dom)}}function fg(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Vo(r));return e}function JA({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;hg(n,r==0?0:r-e)}function hg(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let ti=null;function XA(t){if(t.setActive)return t.setActive();if(ti)return t.focus(ti);let e=fg(t);t.focus(ti==null?{get preventScroll(){return ti={preventScroll:!0},!0}}:void 0),ti||(ti=!1,hg(e,0))}function pg(t,e){let n,r=2e8,o,i=0,s=e.top,c=e.top,a,d;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=Xn(u).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=c){s=Math.max(m.bottom,s),c=Math.min(m.top,c);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){n=u,r=g,o=g&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&g&&(i=f+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!a&&m.left<=e.left&&m.right>=e.left&&(a=u,d={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=f+1)}}return!n&&a&&(n=a,o=d,r=0),n&&n.nodeType==3?qA(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:pg(n,o)}function qA(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=Ir(r,1);if(s.top!=s.bottom&&gu(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function gu(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function VA(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function ex(t,e,n){let{node:r,offset:o}=pg(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function tx(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let c=t.docView.nearestDesc(i,!0),a;if(!c)return null;if(c.dom.nodeType==1&&(c.node.isBlock&&c.parent||!c.contentDOM)&&((a=c.dom.getBoundingClientRect()).width||a.height)&&(c.node.isBlock&&c.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(c.dom.nodeName)&&(!s&&a.left>r.left||a.top>r.top?o=c.posBefore:(!s&&a.right<r.left||a.bottom<r.top)&&(o=c.posAfter),s=!0),!c.contentDOM&&o<0&&!c.node.isText))return(c.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?c.posBefore:c.posAfter;i=c.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function mg(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let c=s.getClientRects();for(let a=0;a<c.length;a++){let d=c[a];if(gu(e,d))return mg(s,e,d)}}if((i=(i+1)%r)==o)break}return t}function nx(t,e){let n=t.dom.ownerDocument,r,o=0,i=KA(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),c;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=t.dom.getBoundingClientRect();if(!gu(e,d)||(s=mg(t.dom,e,d),!s))return null}if(Mt)for(let d=s;r&&d;d=Vo(d))d.draggable&&(r=void 0);if(s=VA(s,e),r){if(on&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let d;fs&&o&&r.nodeType==1&&(d=r.childNodes[o-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?c=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(c=tx(t,r,o,e))}c==null&&(c=ex(t,s,e));let a=t.docView.nearestDesc(s,!0);return{pos:c,inside:a?a.posAtStart-a.border:-1}}function gg(t){return t.top<t.bottom||t.left<t.right}function Ir(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(gg(r))return r}return Array.prototype.find.call(n,gg)||t.getBoundingClientRect()}const rx=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function vg(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=fs||on;if(r.nodeType==3)if(s&&(rx.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let a=Ir(Xn(r,o,o),n);if(on&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let d=Ir(Xn(r,o-1,o-1),-1);if(d.top==a.top){let u=Ir(Xn(r,o,o+1),-1);if(u.top!=a.top)return hs(u,u.left<d.left)}}return a}else{let a=o,d=o,u=n<0?1:-1;return n<0&&!o?(d++,u=-1):n>=0&&o==r.nodeValue.length?(a--,u=1):n<0?a--:d++,hs(Ir(Xn(r,a,d),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==rn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return vu(a.getBoundingClientRect(),!1)}if(i==null&&o<rn(r)){let a=r.childNodes[o];if(a.nodeType==1)return vu(a.getBoundingClientRect(),!0)}return vu(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==rn(r))){let a=r.childNodes[o-1],d=a.nodeType==3?Xn(a,rn(a)-(s?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(d)return hs(Ir(d,1),!1)}if(i==null&&o<rn(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let d=a?a.nodeType==3?Xn(a,0,s?0:1):a.nodeType==1?a:null:null;if(d)return hs(Ir(d,-1),!0)}return hs(Ir(r.nodeType==3?Xn(r):r,-n),n>=0)}function hs(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function vu(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function yg(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function ox(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return yg(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let c=t.docView.nearestDesc(i,!0);if(!c)break;if(c.node.isBlock){i=c.contentDOM||c.dom;break}i=c.dom.parentNode}let s=vg(t,o.pos,1);for(let c=i.firstChild;c;c=c.nextSibling){let a;if(c.nodeType==1)a=c.getClientRects();else if(c.nodeType==3)a=Xn(c,0,c.nodeValue.length).getClientRects();else continue;for(let d=0;d<a.length;d++){let u=a[d];if(u.bottom>u.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const ix=/[\u0590-\u08ac]/;function sx(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,c=t.domSelection();return c?!ix.test(r.parent.textContent)||!c.modify?n=="left"||n=="backward"?i:s:yg(t,e,()=>{let{focusNode:a,focusOffset:d,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),h=c.caretBidiLevel;c.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:g}=t.domSelectionRange(),v=m&&!p.contains(m.nodeType==1?m:m.parentNode)||a==m&&d==g;try{c.collapse(u,f),a&&(a!=u||d!=f)&&c.extend&&c.extend(a,d)}catch{}return h!=null&&(c.caretBidiLevel=h),v}):r.pos==r.start()||r.pos==r.end()}let bg=null,Cg=null,Eg=!1;function ax(t,e,n){return bg==e&&Cg==n?Eg:(bg=e,Cg=n,Eg=n=="up"||n=="down"?ox(t,e,n):sx(t,e,n))}const an=0,kg=1,mo=2,Pn=3;class ps{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=an,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>St(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let c=o.children[s];if(c.size){o=c;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],c=i+s.size;if(c>e||s instanceof Ag){o=e-i;break}i=c}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof wg&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?St(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?St(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,c=0;;c++){let a=this.children[c],d=s+a.size;if(o==-1&&e<=d){let u=s+a.border;if(e>=u&&n<=d-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,n,u);e=s;for(let f=c;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=St(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(d>n||c==this.children.length-1)){n=d;for(let u=c+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=St(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let g=this.children[p],v=m+g.size;if(i>m&&s<v)return g.setSelection(e-m-g.border,n-m-g.border,r,o);m=v}let c=this.domFromPos(e,e?-1:1),a=n==e?c:this.domFromPos(n,n?-1:1),d=r.root.getSelection(),u=r.domSelectionRange(),f=!1;if((on||Mt)&&e==n){let{node:p,offset:m}=c;if(p.nodeType==3){if(f=!!(m&&p.nodeValue[m-1]==`
1187
+ `),f&&m==p.nodeValue.length)for(let g=p,v;g;g=g.parentNode){if(v=g.nextSibling){v.nodeName=="BR"&&(c=a={node:v.parentNode,offset:St(v)+1});break}let y=g.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let g=p.childNodes[m-1];f=g&&(g.nodeName=="BR"||g.contentEditable=="false")}}if(on&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||f&&Mt)&&ho(c.node,c.offset,u.anchorNode,u.anchorOffset)&&ho(a.node,a.offset,u.focusNode,u.focusOffset))return;let h=!1;if((d.extend||e==n)&&!(f&&on)){d.collapse(c.node,c.offset);try{e!=n&&d.extend(a.node,a.offset),h=!0}catch{}}if(!h){if(e>n){let m=c;c=a,a=m}let p=document.createRange();p.setEnd(a.node,a.offset),p.setStart(c.node,c.offset),d.removeAllRanges(),d.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let c=r+i.border,a=s-i.border;if(e>=c&&n<=a){this.dirty=e==r||n==s?mo:kg,e==c&&n==a&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Pn:i.markDirty(e-c,n-c);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?mo:Pn}r=s}this.dirty=mo}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?mo:kg;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class wg extends ps{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let c=document.createElement("span");c.appendChild(s),s=c}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==an&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class lx extends ps{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class go extends ps{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=uo.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new go(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Pn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Pn&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=an){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=an}}slice(e,n,r){let o=go.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=bu(i,n,s,r)),e>0&&(i=bu(i,0,e,r));for(let c=0;c<i.length;c++)i[c].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class _r extends ps{constructor(e,n,r,o,i,s,c,a,d){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=c}static create(e,n,r,o,i,s){let c=i.nodeViews[n.type.name],a,d=c&&c(n,i,()=>{if(!a)return s;if(a.parent)return a.parent.posBeforeChild(a)},r,o),u=d&&d.dom,f=d&&d.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=uo.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Ig(u,r,n),d?a=new cx(e,n,r,o,u,f||null,h,d,i,s+1):n.isText?new qa(e,n,r,o,u,h,i):new _r(e,n,r,o,u,f||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>ce.empty)}return e}matchesNode(e,n,r){return this.dirty==an&&e.eq(this.node)&&Va(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,c=i&&i.pos<0,a=new ux(this,s&&s.node,e);px(this.node,this.innerDeco,(d,u,f)=>{d.spec.marks?a.syncToMarks(d.spec.marks,r,e,u):d.type.side>=0&&!f&&a.syncToMarks(u==this.node.childCount?Ye.none:this.node.child(u).marks,r,e,u),a.placeWidget(d,e,o)},(d,u,f,h)=>{a.syncToMarks(d.marks,r,e,h);let p;a.findNodeMatch(d,u,f,h)||c&&e.state.selection.from>o&&e.state.selection.to<o+d.nodeSize&&(p=a.findIndexWithChild(i.node))>-1&&a.updateNodeAt(d,u,f,p,e)||a.updateNextNode(d,u,f,e,h,o)||a.addNode(d,u,f,e,o),o+=d.nodeSize}),a.syncToMarks([],r,e,0),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==mo)&&(s&&this.protectLocalComposition(e,s),xg(this.contentDOM,this.children,e),ei&&mx(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Le)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,c=gx(this.node.content,s,r-n,o-n);return c<0?null:{node:i,pos:c,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new lx(this,i,n,o);e.input.compositionNodes.push(s),this.children=bu(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==Pn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=an}updateOuterDeco(e){if(Va(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Tg(this.dom,this.nodeDOM,yu(this.outerDeco,this.node,n),yu(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Sg(t,e,n,r,o){Ig(r,e,t);let i=new _r(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class qa extends _r{constructor(e,n,r,o,i,s,c){super(e,n,r,o,i,null,s,c,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==Pn||this.dirty!=an&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=an||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=an,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new qa(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Pn)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Ag extends ps{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==an&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class cx extends _r{constructor(e,n,r,o,i,s,c,a,d,u){super(e,n,r,o,i,s,c,d,u),this.spec=a}update(e,n,r,o){if(this.dirty==Pn)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function xg(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],c=s.dom;if(c.parentNode==t){for(;c!=r;)r=_g(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(c,r);if(s instanceof go){let a=r?r.previousSibling:t.lastChild;xg(s.contentDOM,s.children,n),r=a?a.nextSibling:t.firstChild}}for(;r;)r=_g(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const ms=function(t){t&&(this.nodeName=t)};ms.prototype=Object.create(null);const vo=[new ms];function yu(t,e,n){if(t.length==0)return vo;let r=n?vo[0]:new ms,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new ms(s.nodeName));for(let c in s){let a=s[c];a!=null&&(n&&o.length==1&&o.push(r=new ms(e.isInline?"span":"div")),c=="class"?r.class=(r.class?r.class+" ":"")+a:c=="style"?r.style=(r.style?r.style+";":"")+a:c!="nodeName"&&(r[c]=a))}}}return o}function Tg(t,e,n,r){if(n==vo&&r==vo)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],c=n[i];if(i){let a;c&&c.nodeName==s.nodeName&&o!=t&&(a=o.parentNode)&&a.nodeName.toLowerCase()==s.nodeName||(a=document.createElement(s.nodeName),a.pmIsDeco=!0,a.appendChild(o),c=vo[0]),o=a}dx(o,c||vo[0],s)}return o}function dx(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function Ig(t,e,n){return Tg(t,t,vo,yu(e,n,t.nodeType!=1))}function Va(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function _g(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class ux{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=fx(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let i=0,s=this.stack.length>>1,c=Math.min(s,e.length);for(;i<c&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=an,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let a=-1,d=this.top.children.length;o<this.preMatch.index&&(d=Math.min(this.index+3,d));for(let u=this.index;u<d;u++){let f=this.top.children[u];if(f.matchesMark(e[s])&&!this.isLocked(f.dom)){a=u;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let u=go.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let c=this.index,a=Math.min(this.top.children.length,c+5);c<a;c++){let d=this.top.children[c];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){i=c;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==Pn&&s.dom==s.contentDOM&&(s.dirty=mo),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let c=this.index;c<this.top.children.length;c++){let a=this.top.children[c];if(a instanceof _r){let d=this.preMatch.matched.get(a);if(d!=null&&d!=i)return!1;let u=a.dom,f,h=this.isLocked(u)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Pn&&Va(n,a.outerDeco));if(!h&&a.update(e,n,r,o))return this.destroyBetween(this.index,c),a.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,n,r,o,s)))return this.destroyBetween(this.index,c),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=mo,f.updateChildren(o,s+1),f.dirty=an),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!Va(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let c=_r.create(this.top,n,r,o,i,s);if(c.contentDOM){c.children=e.children,e.children=[];for(let a of c.children)a.parent=c}return e.destroy(),c}addNode(e,n,r,o,i){let s=_r.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new wg(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof go;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof qa)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Mt||At)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Ag(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function fx(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let c;for(;;)if(r){let d=n.children[r-1];if(d instanceof go)n=d,r=d.children.length;else{c=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let a=c.node;if(a){if(a!=t.child(o-1))break;--o,i.set(c,o),s.push(c)}}return{index:o,matched:i,matches:s.reverse()}}function hx(t,e){return t.type.side-e.type.side}function px(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let d=0;d<t.childCount;d++){let u=t.child(d);r(u,o,e.forChild(i,u),d),i+=u.nodeSize}return}let s=0,c=[],a=null;for(let d=0;;){let u,f;for(;s<o.length&&o[s].to==i;){let v=o[s++];v.widget&&(u?(f||(f=[u])).push(v):u=v)}if(u)if(f){f.sort(hx);for(let v=0;v<f.length;v++)n(f[v],d,!!a)}else n(u,d,!!a);let h,p;if(a)p=-1,h=a,a=null;else if(d<t.childCount)p=d,h=t.child(d++);else break;for(let v=0;v<c.length;v++)c[v].to<=i&&c.splice(v--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)c.push(o[s++]);let m=i+h.nodeSize;if(h.isText){let v=m;s<o.length&&o[s].from<v&&(v=o[s].from);for(let y=0;y<c.length;y++)c[y].to<v&&(v=c[y].to);v<m&&(a=h.cut(v-i),h=h.cut(0,v-i),m=v,p=-1)}else for(;s<o.length&&o[s].to<m;)s++;let g=h.isInline&&!h.isLeaf?c.filter(v=>!v.inline):c.slice();r(h,g,e.forChild(i,h),p),i=m}}function mx(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function gx(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),c=i;if(i+=s.nodeSize,!s.isText)continue;let a=s.text;for(;o<t.childCount;){let d=t.child(o++);if(i+=d.nodeSize,!d.isText)break;a+=d.text}if(i>=n){if(i>=r&&a.slice(r-e.length-c,r-c)==e)return r-e.length;let d=c<r?a.lastIndexOf(e,r-c-1):-1;if(d>=0&&d+e.length+c>=n)return c+d;if(n==r&&a.length>=r+e.length-c&&a.slice(r-c,r-c+e.length)==e)return r}}return-1}function bu(t,e,n,r,o){let i=[];for(let s=0,c=0;s<t.length;s++){let a=t[s],d=c,u=c+=a.size;d>=n||u<=e?i.push(a):(d<e&&i.push(a.slice(0,e-d,r)),o&&(i.push(o),o=void 0),u>n&&i.push(a.slice(n-d,a.size,r)))}return i}function Cu(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let c=r.resolve(s),a,d;if(Xa(n)){for(a=s;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&xe.isSelectable(f)&&o.parent&&!(f.isInline&&jA(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;d=new xe(s==h?c:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[a,s]=h==t.state.selection.anchor?[h,f]:[f,h],c=r.resolve(s)}else a=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let u=r.resolve(a);if(!d){let f=e=="pointer"||t.state.selection.head<c.pos&&!i?1:-1;d=ku(t,u,c,f)}return d}function Ng(t){return t.editable?t.hasFocus():Rg(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function er(t,e=!1){let n=t.state.selection;if(Dg(t,n),!!Ng(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&At){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&ho(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)yx(t);else{let{anchor:r,head:o}=n,i,s;Og&&!(n instanceof Le)&&(n.$from.parent.inlineContent||(i=Mg(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Mg(t,n.to))),t.docView.setSelection(r,o,t,e),Og&&(i&&Lg(i),s&&Lg(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&vx(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Og=Mt||At&&cg<63;function Mg(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Mt&&o&&o.contentEditable=="false")return Eu(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return Eu(o);if(i)return Eu(i)}}function Eu(t){return t.contentEditable="true",Mt&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Lg(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function vx(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ng(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function yx(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,St(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Kt&&Tr<=11&&(n.disabled=!0,n.disabled=!1)}function Dg(t,e){if(e instanceof xe){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(Pg(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else Pg(t)}function Pg(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ku(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||Le.between(e,n,r)}function Bg(t){return t.editable&&!t.hasFocus()?!1:Rg(t)}function Rg(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function bx(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return ho(e.node,e.offset,n.anchorNode,n.anchorOffset)}function wu(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&Be.findFrom(i,e)}function Nr(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function $g(t,e,n){let r=t.state.selection;if(r instanceof Le)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return Nr(t,new Le(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=wu(t.state,e);return o&&o instanceof xe?Nr(t,o):!1}else if(!(sn&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let c=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(c))&&!s.contentDOM?xe.isSelectable(i)?Nr(t,new xe(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):fs?Nr(t,new Le(t.state.doc.resolve(e<0?c:c+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof xe&&r.node.isInline)return Nr(t,new Le(e>0?r.$to:r.$from));{let o=wu(t.state,e);return o?Nr(t,o):!1}}}function el(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function gs(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function ni(t,e){return e<0?Cx(t):Ex(t)}function Cx(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(on&&n.nodeType==1&&r<el(n)&&gs(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let c=n.childNodes[r-1];if(gs(c,-1))o=n,i=--r;else if(c.nodeType==3)n=c,r=n.nodeValue.length;else break}}else{if(Fg(n))break;{let c=n.previousSibling;for(;c&&gs(c,-1);)o=n.parentNode,i=St(c),c=c.previousSibling;if(c)n=c,r=el(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?Su(t,n,r):o&&Su(t,o,i)}function Ex(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=el(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let c=n.childNodes[r];if(gs(c,1))i=n,s=++r;else break}else{if(Fg(n))break;{let c=n.nextSibling;for(;c&&gs(c,1);)i=c.parentNode,s=St(c)+1,c=c.nextSibling;if(c)n=c,r=0,o=el(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&Su(t,i,s)}function Fg(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function kx(t,e){for(;t&&e==t.childNodes.length&&!us(t);)e=St(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function wx(t,e){for(;t&&!e&&!us(t);)e=St(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function Su(t,e,n){if(e.nodeType!=3){let i,s;(s=kx(e,n))?(e=s,n=0):(i=wx(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(Xa(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&er(t)},50)}function zg(t,e){let n=t.state.doc.resolve(e);if(!(At||dg)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Ug(t,e,n){let r=t.state.selection;if(r instanceof Le&&!r.empty||n.indexOf("s")>-1||sn&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=wu(t.state,e);if(s&&s instanceof xe)return Nr(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,c=r instanceof Xt?Be.near(s,e):Be.findFrom(s,e);return c?Nr(t,c):!1}return!1}function Hg(t,e){if(!(t.state.selection instanceof Le))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function jg(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function Sx(t){if(!Mt||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;jg(t,r,"true"),setTimeout(()=>jg(t,r,"false"),20)}return!1}function Ax(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function xx(t,e){let n=e.keyCode,r=Ax(e);if(n==8||sn&&n==72&&r=="c")return Hg(t,-1)||ni(t,-1);if(n==46&&!e.shiftKey||sn&&n==68&&r=="c")return Hg(t,1)||ni(t,1);if(n==13||n==27)return!0;if(n==37||sn&&n==66&&r=="c"){let o=n==37?zg(t,t.state.selection.from)=="ltr"?-1:1:-1;return $g(t,o,r)||ni(t,o)}else if(n==39||sn&&n==70&&r=="c"){let o=n==39?zg(t,t.state.selection.from)=="ltr"?1:-1:1;return $g(t,o,r)||ni(t,o)}else{if(n==38||sn&&n==80&&r=="c")return Ug(t,-1,r)||ni(t,-1);if(n==40||sn&&n==78&&r=="c")return Sx(t)||Ug(t,1,r)||ni(t,1);if(r==(sn?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function Au(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||uo.fromSchema(t.state.schema),c=Xg(),a=c.createElement("div");a.appendChild(s.serializeFragment(r,{document:c}));let d=a.firstChild,u,f=0;for(;d&&d.nodeType==1&&(u=Zg[d.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=c.createElement(u[p]);for(;a.firstChild;)m.appendChild(a.firstChild);a.appendChild(m),f++}d=a.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${o} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
1188
1188
 
1189
1189
  `);return{dom:a,text:h,slice:e}}function Wg(t,e,n,r,o){let i=o.parent.type.spec.code,s,c;if(!n&&!e)return null;let a=!!e&&(r||i||!n);if(a){if(t.someProp("transformPastedText",h=>{e=h(e,i||r,t)}),i)return c=new ye(ce.from(t.state.schema.text(e.replace(/\r\n?/g,`
1190
- `))),0,0),t.someProp("transformPasted",h=>{c=h(c,t,!0)}),c;let f=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(f)c=f;else{let h=o.marks(),{schema:p}=t.state,m=uo.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=s.appendChild(document.createElement("p"));g&&v.appendChild(m.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=Nx(n),fs&&Ox(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(c||(c=(t.someProp("clipboardParser")||t.someProp("domParser")||kr.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!Tx.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)c=Mx(Qg(c,+u[1],+u[2]),u[4]);else if(c=ye.maxOpen(Ix(c.content,o),!0),c.openStart||c.openEnd){let f=0,h=0;for(let p=c.content.firstChild;f<c.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=c.content.lastChild;h<c.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);c=Qg(c,f,h)}return t.someProp("transformPasted",f=>{c=f(c,t,a)}),c}const Tx=/^(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 Ix(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(c=>{if(!s)return;let a=o.findWrapping(c.type),d;if(!a)return s=null;if(d=s.length&&i.length&&Yg(a,i,c,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=Gg(s[s.length-1],i.length));let u=Kg(c,a);s.push(u),o=o.matchType(u.type),i=a}}),s)return ce.from(s)}return t}function Kg(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ce.from(t));return t}function Yg(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Yg(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(ce.from(Kg(n,t,o+1))))}}function Gg(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Gg(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ce.empty,!0);return t.copy(n.append(r))}function xu(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,c=s.content;return t.childCount>1&&(i=0),o<r-1&&(c=xu(c,e,n,r,o+1,i)),o>=n&&(c=e<0?s.contentMatchAt(0).fillBefore(c,i<=o).append(c):c.append(s.contentMatchAt(s.childCount).fillBefore(ce.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(c))}function Qg(t,e,n){return e<t.openStart&&(t=new ye(xu(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ye(xu(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Zg={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Jg=null;function Xg(){return Jg||(Jg=document.implementation.createHTMLDocument("title"))}let Tu=null;function _x(t){let e=window.trustedTypes;return e?(Tu||(Tu=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Tu.createHTML(t)):t}function Nx(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Xg().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Zg[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=_x(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function Ox(t){let e=t.querySelectorAll(At?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Mx(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let c=r.length-2;c>=0;c-=2){let a=n.nodes[r[c]];if(!a||a.hasRequiredAttrs())break;o=ce.from(a.create(r[c+1],o)),i++,s++}return new ye(o,i,s)}const Bt={},Rt={},Lx={touchstart:!0,touchmove:!0};class Dx{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Px(t){for(let e in Bt){let n=Bt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Rx(t,r)&&!_u(t,r)&&(t.editable||!(r.type in Rt))&&n(t,r)},Lx[e]?{passive:!0}:void 0)}Ot&&t.dom.addEventListener("input",()=>null),Iu(t)}function Or(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Bx(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Iu(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>_u(t,r))})}function _u(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Rx(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function $x(t,e){!_u(t,e)&&Bt[e.type]&&(t.editable||!(e.type in Rt))&&Bt[e.type](t,e)}Rt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Vg(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(qn&&At&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ei&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,po(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||xx(t,n)?n.preventDefault():Or(t,"key")},Rt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},Rt.keypress=(t,e)=>{let n=e;if(Vg(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||sn&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Le)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function tl(t){return{left:t.clientX,top:t.clientY}}function Fx(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Nu(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,c=>s>i.depth?c(t,n,i.nodeAfter,i.before(s),o,!0):c(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function ri(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function zx(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&xe.isSelectable(r)?(ri(t,new xe(n)),!0):!1}function Ux(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof xe&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let c=s>i.depth?i.nodeAfter:i.node(s);if(xe.isSelectable(c)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(ri(t,xe.create(t.state.doc,o)),!0):!1}function Hx(t,e,n,r,o){return Nu(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?Ux(t,n):zx(t,n))}function jx(t,e,n,r){return Nu(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function Wx(t,e,n,r){return Nu(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||Kx(t,n,r)}function Kx(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ri(t,Le.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),c=o.before(i);if(s.inlineContent)ri(t,Le.create(r,c+1,c+1+s.content.size));else if(xe.isSelectable(s))ri(t,xe.create(r,c));else continue;return!0}}function Ou(t){return nl(t)}const qg=sn?"metaKey":"ctrlKey";Bt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Ou(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&Fx(n,t.input.lastClick)&&!n[qg]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=t.posAtCoords(tl(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Yx(t,s,n,!!r)):(i=="doubleClick"?jx:Wx)(t,s.pos,s.inside,n)?n.preventDefault():Or(t,"pointer"))};class Yx{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[qg],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,s=u.depth?u.before():0}const c=o?null:r.target,a=c?e.docView.nearestDesc(c,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:d}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||d instanceof xe&&d.from<=s&&d.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&on&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Or(e,"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(()=>er(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(tl(e))),this.updateAllowDefault(e),this.allowDefault||!n?Or(this.view,"pointer"):Hx(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ot&&this.mightDrag&&!this.mightDrag.node.isAtom||At&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ri(this.view,Be.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Or(this.view,"pointer")}move(e){this.updateAllowDefault(e),Or(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Bt.touchstart=t=>{t.input.lastTouch=Date.now(),Ou(t),Or(t,"pointer")},Bt.touchmove=t=>{t.input.lastTouch=Date.now(),Or(t,"pointer")},Bt.contextmenu=t=>Ou(t);function Vg(t,e){return t.composing?!0:Ot&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Gx=qn?5e3:-1;Rt.compositionstart=Rt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Le&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||At&&dg&&Qx(t)))t.markCursor=t.state.storedMarks||n.marks(),nl(t,!0),t.markCursor=null;else if(nl(t,!e.selection.empty),on&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let c=t.domSelection();c&&c.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}ev(t,Gx)};function Qx(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Rt.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,ev(t,20))};function ev(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>nl(t),e))}function tv(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Jx());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Zx(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=UA(e.focusNode,e.focusOffset),r=HA(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Jx(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function nl(t,e=!1){if(!(qn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),tv(t),e||t.docView&&t.docView.dirty){let n=Cu(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Xx(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const vs=Kt&&Tr<15||ei&&YA<604;Bt.copy=Rt.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=vs?null:n.clipboardData,s=r.content(),{dom:c,text:a}=Au(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",c.innerHTML),i.setData("text/plain",a)):Xx(t,c),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qx(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Vx(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ys(t,r.value,null,o,e):ys(t,r.textContent,r.innerHTML,o,e)},50)}function ys(t,e,n,r,o){let i=Wg(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ye.empty)))return!0;if(!i)return!1;let s=qx(i),c=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(c.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function nv(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Rt.paste=(t,e)=>{let n=e;if(t.composing&&!qn)return;let r=vs?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&ys(t,nv(r),r.getData("text/html"),o,n)?n.preventDefault():Vx(t,n)};class rv{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const eT=sn?"altKey":"ctrlKey";function ov(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[eT]}Bt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(tl(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof xe?o.to-1:o.to))){if(r&&r.mightDrag)s=xe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=xe.create(t.state.doc,f.posBefore))}}let c=(s||t.state.selection).content(),{dom:a,text:d,slice:u}=Au(t,c);(!n.dataTransfer.files.length||!At||cg>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(vs?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",vs||n.dataTransfer.setData("text/plain",d),t.dragging=new rv(u,ov(t,n),s)},Bt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},Rt.dragover=Rt.dragenter=(t,e)=>e.preventDefault(),Rt.drop=(t,e)=>{try{tT(t,e,t.dragging)}finally{t.dragging=null}};function tT(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(tl(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",p=>{i=p(i,t,!1)}):i=Wg(t,nv(e.dataTransfer),vs?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&ov(t,e));if(t.someProp("handleDrop",p=>p(t,e,i||ye.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let c=i?L0(t.state.doc,o.pos,i):o.pos;c==null&&(c=o.pos);let a=t.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let d=a.mapping.map(c),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=a.doc;if(u?a.replaceRangeWith(d,d,i.content.firstChild):a.replaceRange(d,d,i),a.doc.eq(f))return;let h=a.doc.resolve(d);if(u&&xe.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new xe(h));else{let p=a.mapping.map(c);a.mapping.maps[a.mapping.maps.length-1].forEach((m,g,v,y)=>p=y),a.setSelection(ku(t,h,a.doc.resolve(p)))}t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))}Bt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&er(t)},20))},Bt.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Bt.beforeinput=(t,e)=>{if(At&&qn&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,po(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Rt)Bt[t]=Rt[t];function bs(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class rl{constructor(e,n){this.toDOM=e,this.spec=n||yo,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new $t(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof rl&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&bs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Mr{constructor(e,n){this.attrs=e,this.spec=n||yo}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new $t(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Mr&&bs(this.attrs,e.attrs)&&bs(this.spec,e.spec)}static is(e){return e.type instanceof Mr}destroy(){}}class Mu{constructor(e,n){this.attrs=e,this.spec=n||yo}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new $t(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof Mu&&bs(this.attrs,e.attrs)&&bs(this.spec,e.spec)}destroy(){}}class $t{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new $t(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new $t(e,e,new rl(n,r))}static inline(e,n,r,o){return new $t(e,n,new Mr(r,o))}static node(e,n,r,o){return new $t(e,n,new Mu(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Mr}get widget(){return this.type instanceof rl}}const oi=[],yo={};class qe{constructor(e,n){this.local=e.length?e:oi,this.children=n.length?n:oi}static create(e,n){return n.length?ol(n,e,0,yo):Mt}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let c=this.local[s];c.from<=n&&c.to>=e&&(!i||i(c.spec))&&r.push(c.copy(c.from+o,c.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let c=this.children[s]+1;this.children[s+2].findInner(e-c,n-c,r,o+c,i)}}map(e,n,r){return this==Mt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||yo)}mapInner(e,n,r,o,i){let s;for(let c=0;c<this.local.length;c++){let a=this.local[c].map(e,r,o);a&&a.type.valid(n,a)?(s||(s=[])).push(a):i.onRemove&&i.onRemove(this.local[c].spec)}return this.children.length?nT(this.children,s||[],e,n,r,o,i):s?new qe(s.sort(bo),oi):Mt}add(e,n){return n.length?this==Mt?qe.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((c,a)=>{let d=a+r,u;if(u=sv(n,c,d)){for(o||(o=this.children.slice());i<o.length&&o[i]<a;)i+=3;o[i]==a?o[i+2]=o[i+2].addInner(c,u,d+1):o.splice(i,0,a,a+c.nodeSize,ol(u,c,d+1,yo)),i+=3}});let s=iv(i?av(n):n,-r);for(let c=0;c<s.length;c++)s[c].type.valid(e,s[c])||s.splice(c--,1);return new qe(s.length?this.local.concat(s).sort(bo):this.local,o||this.children)}remove(e){return e.length==0||this==Mt?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,c=r[i]+n,a=r[i+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>c&&f.to<a&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[i+2].removeInner(s,c+1);d!=Mt?r[i+2]=d:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let c=0;c<o.length;c++)o[c].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(c--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new qe(o,r):Mt}forChild(e,n){if(this==Mt)return this;if(n.isLeaf)return qe.empty;let r,o;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){this.children[c]==e&&(r=this.children[c+2]);break}let i=e+1,s=i+n.content.size;for(let c=0;c<this.local.length;c++){let a=this.local[c];if(a.from<s&&a.to>i&&a.type instanceof Mr){let d=Math.max(i,a.from)-i,u=Math.min(s,a.to)-i;d<u&&(o||(o=[])).push(a.copy(d,u))}}if(o){let c=new qe(o.sort(bo),oi);return r?new Lr([c,r]):c}return r||Mt}eq(e){if(this==e)return!0;if(!(e instanceof qe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Lu(this.localsInner(e))}localsInner(e){if(this==Mt)return oi;if(e.inlineContent||!this.local.some(Mr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Mr||n.push(this.local[r]);return n}forEachSet(e){e(this)}}qe.empty=new qe([],[]),qe.removeOverlap=Lu;const Mt=qe.empty;class Lr{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,yo));return Lr.from(r)}forChild(e,n){if(n.isLeaf)return qe.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=Mt&&(i instanceof Lr?r=r.concat(i.members):r.push(i))}return Lr.from(r)}eq(e){if(!(e instanceof Lr)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?Lu(r?n:n.sort(bo)):oi}static from(e){switch(e.length){case 0:return Mt;case 1:return e[0];default:return new Lr(e.every(n=>n instanceof qe)?e:e.reduce((n,r)=>n.concat(r instanceof qe?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function nT(t,e,n,r,o,i,s){let c=t.slice();for(let d=0,u=i;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,g)=>{let v=g-m-(p-h);for(let y=0;y<c.length;y+=3){let b=c[y+1];if(b<0||h>b+u-f)continue;let E=c[y]+u-f;p>=E?c[y+1]=h<=E?-2:-1:h>=u&&v&&(c[y]+=v,c[y+1]+=v)}f+=v}),u=n.maps[d].map(u,-1)}let a=!1;for(let d=0;d<c.length;d+=3)if(c[d+1]<0){if(c[d+1]==-2){a=!0,c[d+1]=-1;continue}let u=n.map(t[d]+i),f=u-o;if(f<0||f>=r.content.size){a=!0;continue}let h=n.map(t[d+1]+i,-1),p=h-o,{index:m,offset:g}=r.content.findIndex(f),v=r.maybeChild(m);if(v&&g==f&&g+v.nodeSize==p){let y=c[d+2].mapInner(n,v,u+1,t[d]+i+1,s);y!=Mt?(c[d]=f,c[d+1]=p,c[d+2]=y):(c[d+1]=-2,a=!0)}else a=!0}if(a){let d=rT(c,t,e,n,o,i,s),u=ol(d,r,0,s);e=u.local;for(let f=0;f<c.length;f+=3)c[f+1]<0&&(c.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<c.length&&c[h]<p;)h+=3;c.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new qe(e.sort(bo),c)}function iv(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new $t(o.from+e,o.to+e,o.type))}return n}function rT(t,e,n,r,o,i,s){function c(a,d){for(let u=0;u<a.local.length;u++){let f=a.local[u].map(r,o,d);f?n.push(f):s.onRemove&&s.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)c(a.children[u+2],a.children[u]+d+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&c(t[a+2],e[a]+i+1);return n}function sv(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function av(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function ol(t,e,n,r){let o=[],i=!1;e.forEach((c,a)=>{let d=sv(t,c,a+n);if(d){i=!0;let u=ol(d,c,n+a+1,r);u!=Mt&&o.push(a,a+c.nodeSize,u)}});let s=iv(i?av(t):t,-n).sort(bo);for(let c=0;c<s.length;c++)s[c].type.valid(e,s[c])||(r.onRemove&&r.onRemove(s[c].spec),s.splice(c--,1));return s.length||o.length?new qe(s,o):Mt}function bo(t,e){return t.from-e.from||t.to-e.to}function Lu(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),lv(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),lv(e,o,r.copy(i.from,r.to)));break}}}return e}function lv(t,e,n){for(;e<t.length&&bo(n,t[e])>0;)e++;t.splice(e,0,n)}function Du(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Mt&&e.push(r)}),t.cursorWrapper&&e.push(qe.create(t.state.doc,[t.cursorWrapper.deco])),Lr.from(e)}const oT={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},iT=Kt&&Tr<=11;class sT{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class aT{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new sT,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Kt&&Tr<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():Ot&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),iT&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,oT)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Bg(this.view)){if(this.suppressingSelectionUpdates)return er(this.view);if(Kt&&Tr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ho(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Vo(i))n.add(i);for(let i=e.anchorNode;i;i=Vo(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Bg(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,c=!1,a=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],a);f&&(i=i<0?f.from:Math.min(f.from,i),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(c=!0))}if(a.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of a)if(u.nodeName=="BR"&&u.parentNode){let f=u.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(on&&a.length){let u=a.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||dT(e,f)!=p)&&h.remove()}}}let d=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Xa(r)&&(d=Cu(e))&&d.eq(Be.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,er(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),lT(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,uT(e,a)),this.handleDOMChange(i,s,c,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||er(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Kt&&Tr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(i=h)}let s=o&&o.parentNode==e.target?St(o)+1:0,c=r.localPosFromDOM(e.target,s,-1),a=i&&i.parentNode==e.target?St(i):e.target.childNodes.length,d=r.localPosFromDOM(e.target,a,1);return{from:c,to:d}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let cv=new WeakMap,dv=!1;function lT(t){if(!cv.has(t)&&(cv.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=on,dv)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),dv=!0}}function uv(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return ho(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function cT(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return uv(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?uv(t,n):null}function dT(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function uT(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=i.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let c=s;for(;;){let a=c.firstChild;if(!a||a.nodeType!=1||a.contentEditable=="false"||/^(BR|IMG)$/.test(a.nodeName))break;c=a}c.insertBefore(i,c.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}function fT(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:c}=t.docView.parseRange(e,n),a=t.domSelectionRange(),d,u=a.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:a.anchorOffset}],Xa(a)||d.push({node:a.focusNode,offset:a.focusOffset})),At&&t.input.lastKeyCode===8)for(let v=i;v>o;v--){let y=r.childNodes[v-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=v;break}if(!b||b.size)break}let f=t.state.doc,h=t.someProp("domParser")||kr.fromSchema(t.state.schema),p=f.resolve(s),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:hT,context:p});if(d&&d[0].pos!=null){let v=d[0].pos,y=d[1]&&d[1].pos;y==null&&(y=v),m={anchor:v+s,head:y+s}}return{doc:g,sel:m,from:s,to:c}}function hT(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ot&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Ot&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const pT=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function mT(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let T=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,D=Cu(t,T);if(D&&!t.state.selection.eq(D)){if(At&&qn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",$=>$(t,po(13,"Enter"))))return;let G=t.state.tr.setSelection(D);T=="pointer"?G.setMeta("pointer",!0):T=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),t.dispatch(G)}return}let s=t.state.doc.resolve(e),c=s.sharedDepth(n);e=s.before(c+1),n=t.state.doc.resolve(n).after(c+1);let a=t.state.selection,d=fT(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=yT(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(ei&&t.input.lastIOSEnter>Date.now()-225||qn)&&o.some(T=>T.nodeType==1&&!pT.test(T.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",T=>T(t,po(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&a instanceof Le&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:a.from,endA:a.to,endB:a.to};else{if(d.sel){let T=fv(t,t.state.doc,d.sel);if(T&&!T.eq(t.state.selection)){let D=t.state.tr.setSelection(T);i&&D.setMeta("composition",i),t.dispatch(D)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof Le&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Kt&&Tr<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=d.doc.resolveNoCache(m.start-d.from),v=d.doc.resolveNoCache(m.endB-d.from),y=u.resolve(m.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=m.endA;if((ei&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!b&&g.pos<d.doc.content.size&&(!g.sameParent(v)||!g.parent.inlineContent)&&g.pos<v.pos&&!/\S/.test(d.doc.textBetween(g.pos,v.pos,"","")))&&t.someProp("handleKeyDown",T=>T(t,po(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&vT(u,m.start,m.endA,g,v)&&t.someProp("handleKeyDown",T=>T(t,po(8,"Backspace")))){qn&&At&&t.domObserver.suppressSelectionUpdates();return}At&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),qn&&!b&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,v=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(T){return T(t,po(13,"Enter"))})},20));let E=m.start,C=m.endA,S=T=>{let D=T||t.state.tr.replace(E,C,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let G=fv(t,D.doc,d.sel);G&&!(At&&t.composing&&G.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(G.head==E||G.head==D.mapping.map(C)-1)||Kt&&G.empty&&G.head==E)&&D.setSelection(G)}return i&&D.setMeta("composition",i),D.scrollIntoView()},_;if(b)if(g.pos==v.pos){Kt&&Tr<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>er(t),20));let T=S(t.state.tr.delete(E,C)),D=u.resolve(m.start).marksAcross(u.resolve(m.endA));D&&T.ensureMarks(D),t.dispatch(T)}else if(m.endA==m.endB&&(_=gT(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start())))){let T=S(t.state.tr);_.type=="add"?T.addMark(E,C,_.mark):T.removeMark(E,C,_.mark),t.dispatch(T)}else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let T=g.parent.textBetween(g.parentOffset,v.parentOffset),D=()=>S(t.state.tr.insertText(T,E,C));t.someProp("handleTextInput",G=>G(t,E,C,T,D))||t.dispatch(D())}else t.dispatch(S());else t.dispatch(S())}function fv(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ku(t,e.resolve(n.anchor),e.resolve(n.head))}function gT(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,c,a;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)c=o[0],s="add",a=u=>u.mark(c.addToSet(u.marks));else if(o.length==0&&i.length==1)c=i[0],s="remove",a=u=>u.mark(c.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(a(e.child(u)));if(ce.from(d).eq(t))return{mark:c,type:s}}function vT(t,e,n,r,o){if(n-e<=o.pos-r.pos||Pu(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let c=i.nodeAfter;return c!=null&&n==e+c.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Pu(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Pu(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Pu(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function yT(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:c}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,c));r-=s+a-i}if(s<i&&t.size<e.size){let a=r<=i&&r>=s?i-r:0;i-=a,i&&i<e.size&&hv(e.textBetween(i-1,i+1))&&(i+=a?1:-1),c=i+(c-s),s=i}else if(c<i){let a=r<=i&&r>=c?i-r:0;i-=a,i&&i<t.size&&hv(t.textBetween(i-1,i+1))&&(i+=a?1:-1),s=i+(s-c),c=i}return{start:i,endA:s,endB:c}}function hv(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class pv{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Dx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(bv),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=vv(this),gv(this),this.nodeViews=yv(this),this.docView=Sg(this.state.doc,mv(this),Du(this),this.dom,this),this.domObserver=new aT(this,(r,o,i,s)=>mT(this,r,o,i,s)),this.domObserver.start(),Px(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Iu(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(bv),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(tv(this),s=!0),this.state=e;let c=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(c||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=yv(this);CT(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(c||n.handleDOMEvents!=this._props.handleDOMEvents)&&Iu(this),this.editable=vv(this),gv(this);let a=Du(this),d=mv(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,d,a);(f||!e.selection.eq(o.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&ZA(this);if(s){this.domObserver.stop();let p=f&&(Kt||At)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&bT(o.selection,e.selection);if(f){let m=At?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Zx(this)),(i||!this.docView.update(e.doc,d,a,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Sg(e.doc,d,a,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&bx(this))?er(this,p):(Dg(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&JA(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof xe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&ug(this,n.getBoundingClientRect(),e)}else ug(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new rv(e.slice,e.move,o<0?void 0:xe.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let c=this.directPlugins[s].props[e];if(c!=null&&(o=n?n(c):c))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let c=i[s].props[e];if(c!=null&&(o=n?n(c):c))return o}}hasFocus(){if(Kt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&XA(this.dom),er(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return nx(this,e)}coordsAtPos(e,n=1){return vg(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return ax(this,n||this.state,e)}pasteHTML(e,n){return ys(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return ys(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Au(this,e)}destroy(){this.docView&&(Bx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Du(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,FA())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return $x(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ot&&this.root.nodeType===11&&WA(this.dom.ownerDocument)==this.dom&&cT(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}pv.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function mv(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[$t.node(0,t.state.doc.content.size,e)]}function gv(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:$t.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function vv(t){return!t.someProp("editable",e=>e(t.state)===!1)}function bT(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function yv(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function CT(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function bv(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Dr={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:"'"},il={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ET=typeof navigator<"u"&&/Mac/.test(navigator.platform),kT=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),xt=0;xt<10;xt++)Dr[48+xt]=Dr[96+xt]=String(xt);for(var xt=1;xt<=24;xt++)Dr[xt+111]="F"+xt;for(var xt=65;xt<=90;xt++)Dr[xt]=String.fromCharCode(xt+32),il[xt]=String.fromCharCode(xt);for(var Bu in Dr)il.hasOwnProperty(Bu)||(il[Bu]=Dr[Bu]);function wT(t){var e=ET&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||kT&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?il:Dr)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const ST=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),AT=typeof navigator<"u"&&/Win/.test(navigator.platform);function xT(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let c=0;c<e.length-1;c++){let a=e[c];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))ST?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function TT(t){let e=Object.create(null);for(let n in t)e[xT(n)]=t[n];return e}function Ru(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function IT(t){return new Ve({props:{handleKeyDown:Cv(t)}})}function Cv(t){let e=TT(t);return function(n,r){let o=wT(r),i,s=e[Ru(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let c=e[Ru(o,r,!1)];if(c&&c(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(AT&&r.ctrlKey&&r.altKey)&&(i=Dr[r.keyCode])&&i!=o){let c=e[Ru(i,r)];if(c&&c(n.state,n.dispatch,n))return!0}}return!1}}var _T=Object.defineProperty,$u=(t,e)=>{for(var n in e)_T(t,n,{get:e[n],enumerable:!0})};function sl(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var al=class{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:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,c])=>[s,(...d)=>{const u=c(...d)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],c=!!t,a=t||o.tr,d=()=>(!c&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...m)=>{const g=this.buildProps(a,e),v=h(...m)(g);return s.push(v),u}])),run:d};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([c,a])=>[c,(...d)=>a(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:sl({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([c,a])=>[c,(...d)=>a(...d)(s)]))}};return s}},Ev={};$u(Ev,{blur:()=>NT,clearContent:()=>OT,clearNodes:()=>MT,command:()=>LT,createParagraphNear:()=>DT,cut:()=>PT,deleteCurrentNode:()=>BT,deleteNode:()=>RT,deleteRange:()=>$T,deleteSelection:()=>FT,enter:()=>zT,exitCode:()=>UT,extendMarkRange:()=>HT,first:()=>jT,focus:()=>KT,forEach:()=>YT,insertContent:()=>GT,insertContentAt:()=>JT,joinBackward:()=>VT,joinDown:()=>qT,joinForward:()=>eI,joinItemBackward:()=>tI,joinItemForward:()=>nI,joinTextblockBackward:()=>rI,joinTextblockForward:()=>oI,joinUp:()=>XT,keyboardShortcut:()=>sI,lift:()=>aI,liftEmptyBlock:()=>lI,liftListItem:()=>cI,newlineInCode:()=>dI,resetAttributes:()=>uI,scrollIntoView:()=>fI,selectAll:()=>hI,selectNodeBackward:()=>pI,selectNodeForward:()=>mI,selectParentNode:()=>gI,selectTextblockEnd:()=>vI,selectTextblockStart:()=>yI,setContent:()=>bI,setMark:()=>zI,setMeta:()=>UI,setNode:()=>HI,setNodeSelection:()=>jI,setTextDirection:()=>WI,setTextSelection:()=>KI,sinkListItem:()=>YI,splitBlock:()=>GI,splitListItem:()=>QI,toggleList:()=>ZI,toggleMark:()=>JI,toggleNode:()=>XI,toggleWrap:()=>qI,undoInputRule:()=>VI,unsetAllMarks:()=>e_,unsetMark:()=>t_,unsetTextDirection:()=>n_,updateAttributes:()=>r_,wrapIn:()=>o_,wrapInList:()=>i_});var NT=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),OT=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),MT=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(c,a)=>{if(c.type.isText)return;const{doc:d,mapping:u}=e,f=d.resolve(u.map(a)),h=d.resolve(u.map(a+c.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Go(p);if(c.type.isTextblock){const{defaultType:g}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,g)}(m||m===0)&&e.lift(p,m)})}),!0},LT=t=>e=>t(e),DT=()=>({state:t,dispatch:e})=>tg(t,e),PT=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new Le(r.doc.resolve(Math.max(s-1,0)))),!0},BT=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const c=o.before(i),a=o.after(i);t.delete(c,a).scrollIntoView()}return!0}return!1};function dt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var RT=t=>({tr:e,state:n,dispatch:r})=>{const o=dt(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const a=i.before(s),d=i.after(s);e.delete(a,d).scrollIntoView()}return!0}return!1},$T=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},FT=()=>({state:t,dispatch:e})=>au(t,e),zT=()=>({commands:t})=>t.keyboardShortcut("Enter"),UT=()=>({state:t,dispatch:e})=>SA(t,e);function Fu(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function ll(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Fu(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function kv(t,e,n={}){return t.find(r=>r.type===e&&ll(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function wv(t,e,n={}){return!!kv(t,e,n)}function zu(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!kv([...o.node.marks],e,n)))return;let s=o.index,c=t.start()+o.offset,a=s+1,d=c+o.node.nodeSize;for(;s>0&&wv([...t.parent.child(s-1).marks],e,n);)s-=1,c-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&wv([...t.parent.child(a).marks],e,n);)d+=t.parent.child(a).nodeSize,a+=1;return{from:c,to:d}}function tr(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var HT=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=tr(t,r.schema),{doc:s,selection:c}=n,{$from:a,from:d,to:u}=c;if(o){const f=zu(a,i,e);if(f&&f.from<=d&&f.to>=u){const h=Le.create(s,f.from,f.to);n.setSelection(h)}}return!0},jT=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Sv(t){return t instanceof Le}function Co(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Av(t,e=null){if(!e)return null;const n=Be.atStart(t),r=Be.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?Le.create(t,Co(0,o,i),Co(t.content.size,o,i)):Le.create(t,Co(e,o,i),Co(e,o,i))}function xv(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function cl(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function WT(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var KT=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(cl()||xv())&&r.dom.focus(),WT()&&!cl()&&!xv()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!Sv(n.state.selection))return s(),!0;const c=Av(o.doc,t)||n.state.selection,a=n.state.selection.eq(c);return i&&(a||o.setSelection(c),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},YT=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),GT=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Tv=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Tv(r)}return t};function dl(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Tv(n)}function Cs(t,e,n){if(t instanceof Er||t instanceof ce)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return ce.fromArray(t.map(c=>e.nodeFromJSON(c)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Cs("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,c="";const a=new h0({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:d=>(s=!0,c=typeof d=="string"?d:d.outerHTML,null)}]}})});if(n.slice?kr.fromSchema(a).parseSlice(dl(t),n.parseOptions):kr.fromSchema(a).parse(dl(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${c}`)})}const i=kr.fromSchema(e);return n.slice?i.parseSlice(dl(t),n.parseOptions).content:i.parse(dl(t),n.parseOptions)}return Cs("",e,n)}function QT(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof vt||o instanceof yt))return;const i=t.mapping.maps[r];let s=0;i.forEach((c,a,d,u)=>{s===0&&(s=u)}),t.setSelection(Be.near(t.doc.resolve(s),n))}var ZT=t=>!("type"in t),JT=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let c;const a=v=>{i.emit("contentError",{editor:i,error:v,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Cs(e,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(v){a(v)}try{c=Cs(e,i.schema,{parseOptions:d,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(v){return a(v),!1}let{from:u,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,p=!0;if((ZT(c)?c:[c]).forEach(v=>{v.check(),h=h?v.isText&&v.marks.length===0:!1,p=p?v.isBlock:!1}),u===f&&p){const{parent:v}=r.doc.resolve(u);v.isTextblock&&!v.type.spec.code&&!v.childCount&&(u-=1,f+=1)}let g;if(h){if(Array.isArray(e))g=e.map(v=>v.text||"").join("");else if(e instanceof ce){let v="";e.forEach(y=>{y.text&&(v+=y.text)}),g=v}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,u,f)}else{g=c;const v=r.doc.resolve(u),y=v.node(),b=v.parentOffset===0,E=y.isText||y.isTextblock,C=y.content.size>0;b&&E&&C&&(u=Math.max(0,u-1)),r.replaceWith(u,f,g)}n.updateSelection&&QT(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:g})}return!0},XT=()=>({state:t,dispatch:e})=>EA(t,e),qT=()=>({state:t,dispatch:e})=>kA(t,e),VT=()=>({state:t,dispatch:e})=>Q0(t,e),eI=()=>({state:t,dispatch:e})=>q0(t,e),tI=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ga(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},nI=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ga(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},rI=()=>({state:t,dispatch:e})=>bA(t,e),oI=()=>({state:t,dispatch:e})=>CA(t,e);function Iv(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function iI(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let c=0;c<e.length-1;c+=1){const a=e[c];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))cl()||Iv()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var sI=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=iI(t).split(/-(?!$)/),s=i.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),c=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",d=>d(n,c))});return a?.steps.forEach(d=>{const u=d.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Pr(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?dt(e,t.schema):null,c=[];t.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);c.push({node:f,from:p,to:m})});const a=o-r,d=c.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>ll(f.node.attrs,n,{strict:!1}));return i?!!d.length:d.reduce((f,h)=>f+h.to-h.from,0)>=a}var aI=(t,e={})=>({state:n,dispatch:r})=>{const o=dt(t,n.schema);return Pr(n,o,e)?wA(n,r):!1},lI=()=>({state:t,dispatch:e})=>ng(t,e),cI=t=>({state:e,dispatch:n})=>{const r=dt(t,e.schema);return PA(r)(e,n)},dI=()=>({state:t,dispatch:e})=>eg(t,e);function ul(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function _v(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var uI=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const c=ul(typeof t=="string"?t:t.name,r.schema);if(!c)return!1;c==="node"&&(i=dt(t,r.schema)),c==="mark"&&(s=tr(t,r.schema));let a=!1;return n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(u,f)=>{i&&i===u.type&&(a=!0,o&&n.setNodeMarkup(f,void 0,_v(u.attrs,e))),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&(a=!0,o&&n.addMark(f,f+u.nodeSize,s.create(_v(h.attrs,e))))})})}),a},fI=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),hI=()=>({tr:t,dispatch:e})=>{if(e){const n=new Xt(t.doc);t.setSelection(n)}return!0},pI=()=>({state:t,dispatch:e})=>J0(t,e),mI=()=>({state:t,dispatch:e})=>V0(t,e),gI=()=>({state:t,dispatch:e})=>TA(t,e),vI=()=>({state:t,dispatch:e})=>NA(t,e),yI=()=>({state:t,dispatch:e})=>_A(t,e);function Uu(t,e,n={},r={}){return Cs(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var bI=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:c})=>{const{doc:a}=i;if(r.preserveWhitespace!=="full"){const d=Uu(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,d).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),c.insertContentAt({from:0,to:a.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function Nv(t,e){const n=tr(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});const c=s.find(a=>a.type.name===n.name);return c?{...c.attrs}:{}}function Ov(t,e){const n=new $0(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function CI(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function EI(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function kI(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function fl(t){return e=>kI(e.$from,t)}function we(t,e,n){return t.config[e]===void 0&&t.parent?we(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?we(t.parent,e,n):null}):t.config[e]}function Hu(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=we(e,"addExtensions",n);return r?[e,...Hu(r())]:e}).flat(10)}function ju(t,e){const n=uo.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function Mv(t){return typeof t=="function"}function Ge(t,e=void 0,...n){return Mv(t)?e?t.bind(e)(...n):t(...n):t}function wI(t={}){return Object.keys(t).length===0&&t.constructor===Object}function ii(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Lv(t){const e=[],{nodeExtensions:n,markExtensions:r}=ii(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(d=>d.name!=="text").map(d=>d.name),c=r.map(d=>d.name),a=[...s,...c];return t.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage,extensions:o},f=we(d,"addGlobalAttributes",u);if(!f)return;f().forEach(p=>{let m;Array.isArray(p.types)?m=p.types:p.types==="*"?m=a:p.types==="nodes"?m=s:p.types==="marks"?m=c:m=[],m.forEach(g=>{Object.entries(p.attributes).forEach(([v,y])=>{e.push({type:g,name:v,attribute:{...i,...y}})})})})}),o.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage},f=we(d,"addAttributes",u);if(!f)return;const h=f();Object.entries(h).forEach(([p,m])=>{const g={...i,...m};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,e.push({type:d.name,name:p,attribute:g})})}),e}function Yt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const c=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],d=c.filter(u=>!a.includes(u));r[o]=[...a,...d].join(" ")}else if(o==="style"){const c=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],d=new Map;a.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),c.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),r[o]=Array.from(d.entries()).map(([u,f])=>`${u}: ${f}`).join("; ")}else r[o]=i}),r},{})}function Es(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Yt(n,r),{})}function SI(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Dv(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const c=s.attribute.parseHTML?s.attribute.parseHTML(n):SI(n.getAttribute(s.name));return c==null?i:{...i,[s.name]:c}},{});return{...r,...o}}}}function Pv(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&wI(n)?!1:n!=null))}function Bv(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function AI(t,e){var n;const r=Lv(t),{nodeExtensions:o,markExtensions:i}=ii(t),s=(n=o.find(d=>we(d,"topNode")))==null?void 0:n.name,c=Object.fromEntries(o.map(d=>{const u=r.filter(y=>y.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((y,b)=>{const E=we(b,"extendNodeSchema",f);return{...y,...E?E(d):{}}},{}),p=Pv({...h,content:Ge(we(d,"content",f)),marks:Ge(we(d,"marks",f)),group:Ge(we(d,"group",f)),inline:Ge(we(d,"inline",f)),atom:Ge(we(d,"atom",f)),selectable:Ge(we(d,"selectable",f)),draggable:Ge(we(d,"draggable",f)),code:Ge(we(d,"code",f)),whitespace:Ge(we(d,"whitespace",f)),linebreakReplacement:Ge(we(d,"linebreakReplacement",f)),defining:Ge(we(d,"defining",f)),isolating:Ge(we(d,"isolating",f)),attrs:Object.fromEntries(u.map(Bv))}),m=Ge(we(d,"parseHTML",f));m&&(p.parseDOM=m.map(y=>Dv(y,u)));const g=we(d,"renderHTML",f);g&&(p.toDOM=y=>g({node:y,HTMLAttributes:Es(y,u)}));const v=we(d,"renderText",f);return v&&(p.toText=v),[d.name,p]})),a=Object.fromEntries(i.map(d=>{const u=r.filter(v=>v.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((v,y)=>{const b=we(y,"extendMarkSchema",f);return{...v,...b?b(d):{}}},{}),p=Pv({...h,inclusive:Ge(we(d,"inclusive",f)),excludes:Ge(we(d,"excludes",f)),group:Ge(we(d,"group",f)),spanning:Ge(we(d,"spanning",f)),code:Ge(we(d,"code",f)),attrs:Object.fromEntries(u.map(Bv))}),m=Ge(we(d,"parseHTML",f));m&&(p.parseDOM=m.map(v=>Dv(v,u)));const g=we(d,"renderHTML",f);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:Es(v,u)})),[d.name,p]}));return new h0({topNode:s,nodes:c,marks:a})}function xI(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function ks(t){return t.sort((n,r)=>{const o=we(n,"priority")||100,i=we(r,"priority")||100;return o>i?-1:o<i?1:0})}function Rv(t){const e=ks(Hu(t)),n=xI(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function $v(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
1190
+ `))),0,0),t.someProp("transformPasted",h=>{c=h(c,t,!0)}),c;let f=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(f)c=f;else{let h=o.marks(),{schema:p}=t.state,m=uo.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=s.appendChild(document.createElement("p"));g&&v.appendChild(m.serializeNode(p.text(g,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=Nx(n),fs&&Ox(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(c||(c=(t.someProp("clipboardParser")||t.someProp("domParser")||kr.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(a||u),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!Tx.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)c=Mx(Qg(c,+u[1],+u[2]),u[4]);else if(c=ye.maxOpen(Ix(c.content,o),!0),c.openStart||c.openEnd){let f=0,h=0;for(let p=c.content.firstChild;f<c.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=c.content.lastChild;h<c.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);c=Qg(c,f,h)}return t.someProp("transformPasted",f=>{c=f(c,t,a)}),c}const Tx=/^(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 Ix(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(c=>{if(!s)return;let a=o.findWrapping(c.type),d;if(!a)return s=null;if(d=s.length&&i.length&&Yg(a,i,c,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=Gg(s[s.length-1],i.length));let u=Kg(c,a);s.push(u),o=o.matchType(u.type),i=a}}),s)return ce.from(s)}return t}function Kg(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,ce.from(t));return t}function Yg(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=Yg(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(ce.from(Kg(n,t,o+1))))}}function Gg(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Gg(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(ce.empty,!0);return t.copy(n.append(r))}function xu(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,c=s.content;return t.childCount>1&&(i=0),o<r-1&&(c=xu(c,e,n,r,o+1,i)),o>=n&&(c=e<0?s.contentMatchAt(0).fillBefore(c,i<=o).append(c):c.append(s.contentMatchAt(s.childCount).fillBefore(ce.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(c))}function Qg(t,e,n){return e<t.openStart&&(t=new ye(xu(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new ye(xu(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Zg={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Jg=null;function Xg(){return Jg||(Jg=document.implementation.createHTMLDocument("title"))}let Tu=null;function _x(t){let e=window.trustedTypes;return e?(Tu||(Tu=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Tu.createHTML(t)):t}function Nx(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Xg().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Zg[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=_x(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function Ox(t){let e=t.querySelectorAll(At?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Mx(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let c=r.length-2;c>=0;c-=2){let a=n.nodes[r[c]];if(!a||a.hasRequiredAttrs())break;o=ce.from(a.create(r[c+1],o)),i++,s++}return new ye(o,i,s)}const Bt={},Rt={},Lx={touchstart:!0,touchmove:!0};class Dx{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Px(t){for(let e in Bt){let n=Bt[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Rx(t,r)&&!_u(t,r)&&(t.editable||!(r.type in Rt))&&n(t,r)},Lx[e]?{passive:!0}:void 0)}Mt&&t.dom.addEventListener("input",()=>null),Iu(t)}function Or(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function Bx(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function Iu(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>_u(t,r))})}function _u(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Rx(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function $x(t,e){!_u(t,e)&&Bt[e.type]&&(t.editable||!(e.type in Rt))&&Bt[e.type](t,e)}Rt.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Vg(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(qn&&At&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),ei&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,po(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||xx(t,n)?n.preventDefault():Or(t,"key")},Rt.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)},Rt.keypress=(t,e)=>{let n=e;if(Vg(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||sn&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof Le)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function tl(t){return{left:t.clientX,top:t.clientY}}function Fx(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function Nu(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,c=>s>i.depth?c(t,n,i.nodeAfter,i.before(s),o,!0):c(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function ri(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function zx(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&xe.isSelectable(r)?(ri(t,new xe(n)),!0):!1}function Ux(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof xe&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let c=s>i.depth?i.nodeAfter:i.node(s);if(xe.isSelectable(c)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(ri(t,xe.create(t.state.doc,o)),!0):!1}function Hx(t,e,n,r,o){return Nu(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?Ux(t,n):zx(t,n))}function jx(t,e,n,r){return Nu(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function Wx(t,e,n,r){return Nu(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||Kx(t,n,r)}function Kx(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(ri(t,Le.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),c=o.before(i);if(s.inlineContent)ri(t,Le.create(r,c+1,c+1+s.content.size));else if(xe.isSelectable(s))ri(t,xe.create(r,c));else continue;return!0}}function Ou(t){return nl(t)}const qg=sn?"metaKey":"ctrlKey";Bt.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=Ou(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&Fx(n,t.input.lastClick)&&!n[qg]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=t.posAtCoords(tl(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Yx(t,s,n,!!r)):(i=="doubleClick"?jx:Wx)(t,s.pos,s.inside,n)?n.preventDefault():Or(t,"pointer"))};class Yx{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[qg],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,s=u.depth?u.before():0}const c=o?null:r.target,a=c?e.docView.nearestDesc(c,!0):null;this.target=a&&a.nodeDOM.nodeType==1?a.nodeDOM:null;let{selection:d}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||d instanceof xe&&d.from<=s&&d.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&on&&!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()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Or(e,"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(()=>er(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(tl(e))),this.updateAllowDefault(e),this.allowDefault||!n?Or(this.view,"pointer"):Hx(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Mt&&this.mightDrag&&!this.mightDrag.node.isAtom||At&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(ri(this.view,Be.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Or(this.view,"pointer")}move(e){this.updateAllowDefault(e),Or(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Bt.touchstart=t=>{t.input.lastTouch=Date.now(),Ou(t),Or(t,"pointer")},Bt.touchmove=t=>{t.input.lastTouch=Date.now(),Or(t,"pointer")},Bt.contextmenu=t=>Ou(t);function Vg(t,e){return t.composing?!0:Mt&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Gx=qn?5e3:-1;Rt.compositionstart=Rt.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Le&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||At&&dg&&Qx(t)))t.markCursor=t.state.storedMarks||n.marks(),nl(t,!0),t.markCursor=null;else if(nl(t,!e.selection.empty),on&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let c=t.domSelection();c&&c.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}ev(t,Gx)};function Qx(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Rt.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,ev(t,20))};function ev(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>nl(t),e))}function tv(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Jx());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Zx(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=UA(e.focusNode,e.focusOffset),r=HA(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Jx(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function nl(t,e=!1){if(!(qn&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),tv(t),e||t.docView&&t.docView.dirty){let n=Cu(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Xx(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const vs=Kt&&Tr<15||ei&&YA<604;Bt.copy=Rt.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=vs?null:n.clipboardData,s=r.content(),{dom:c,text:a}=Au(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",c.innerHTML),i.setData("text/plain",a)):Xx(t,c),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function qx(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Vx(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?ys(t,r.value,null,o,e):ys(t,r.textContent,r.innerHTML,o,e)},50)}function ys(t,e,n,r,o){let i=Wg(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",a=>a(t,o,i||ye.empty)))return!0;if(!i)return!1;let s=qx(i),c=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(c.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function nv(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Rt.paste=(t,e)=>{let n=e;if(t.composing&&!qn)return;let r=vs?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&ys(t,nv(r),r.getData("text/html"),o,n)?n.preventDefault():Vx(t,n)};class rv{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const eT=sn?"altKey":"ctrlKey";function ov(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[eT]}Bt.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(tl(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof xe?o.to-1:o.to))){if(r&&r.mightDrag)s=xe.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=xe.create(t.state.doc,f.posBefore))}}let c=(s||t.state.selection).content(),{dom:a,text:d,slice:u}=Au(t,c);(!n.dataTransfer.files.length||!At||cg>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(vs?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",vs||n.dataTransfer.setData("text/plain",d),t.dragging=new rv(u,ov(t,n),s)},Bt.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)},Rt.dragover=Rt.dragenter=(t,e)=>e.preventDefault(),Rt.drop=(t,e)=>{try{tT(t,e,t.dragging)}finally{t.dragging=null}};function tT(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(tl(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",p=>{i=p(i,t,!1)}):i=Wg(t,nv(e.dataTransfer),vs?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&ov(t,e));if(t.someProp("handleDrop",p=>p(t,e,i||ye.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let c=i?L0(t.state.doc,o.pos,i):o.pos;c==null&&(c=o.pos);let a=t.state.tr;if(s){let{node:p}=n;p?p.replace(a):a.deleteSelection()}let d=a.mapping.map(c),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=a.doc;if(u?a.replaceRangeWith(d,d,i.content.firstChild):a.replaceRange(d,d,i),a.doc.eq(f))return;let h=a.doc.resolve(d);if(u&&xe.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))a.setSelection(new xe(h));else{let p=a.mapping.map(c);a.mapping.maps[a.mapping.maps.length-1].forEach((m,g,v,y)=>p=y),a.setSelection(ku(t,h,a.doc.resolve(p)))}t.focus(),t.dispatch(a.setMeta("uiEvent","drop"))}Bt.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&er(t)},20))},Bt.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)},Bt.beforeinput=(t,e)=>{if(At&&qn&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,po(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Rt)Bt[t]=Rt[t];function bs(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class rl{constructor(e,n){this.toDOM=e,this.spec=n||yo,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new $t(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof rl&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&bs(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Mr{constructor(e,n){this.attrs=e,this.spec=n||yo}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new $t(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof Mr&&bs(this.attrs,e.attrs)&&bs(this.spec,e.spec)}static is(e){return e.type instanceof Mr}destroy(){}}class Mu{constructor(e,n){this.attrs=e,this.spec=n||yo}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new $t(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof Mu&&bs(this.attrs,e.attrs)&&bs(this.spec,e.spec)}destroy(){}}class $t{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new $t(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new $t(e,e,new rl(n,r))}static inline(e,n,r,o){return new $t(e,n,new Mr(r,o))}static node(e,n,r,o){return new $t(e,n,new Mu(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof Mr}get widget(){return this.type instanceof rl}}const oi=[],yo={};class qe{constructor(e,n){this.local=e.length?e:oi,this.children=n.length?n:oi}static create(e,n){return n.length?ol(n,e,0,yo):Lt}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let c=this.local[s];c.from<=n&&c.to>=e&&(!i||i(c.spec))&&r.push(c.copy(c.from+o,c.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let c=this.children[s]+1;this.children[s+2].findInner(e-c,n-c,r,o+c,i)}}map(e,n,r){return this==Lt||e.maps.length==0?this:this.mapInner(e,n,0,0,r||yo)}mapInner(e,n,r,o,i){let s;for(let c=0;c<this.local.length;c++){let a=this.local[c].map(e,r,o);a&&a.type.valid(n,a)?(s||(s=[])).push(a):i.onRemove&&i.onRemove(this.local[c].spec)}return this.children.length?nT(this.children,s||[],e,n,r,o,i):s?new qe(s.sort(bo),oi):Lt}add(e,n){return n.length?this==Lt?qe.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((c,a)=>{let d=a+r,u;if(u=sv(n,c,d)){for(o||(o=this.children.slice());i<o.length&&o[i]<a;)i+=3;o[i]==a?o[i+2]=o[i+2].addInner(c,u,d+1):o.splice(i,0,a,a+c.nodeSize,ol(u,c,d+1,yo)),i+=3}});let s=iv(i?av(n):n,-r);for(let c=0;c<s.length;c++)s[c].type.valid(e,s[c])||s.splice(c--,1);return new qe(s.length?this.local.concat(s).sort(bo):this.local,o||this.children)}remove(e){return e.length==0||this==Lt?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,c=r[i]+n,a=r[i+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>c&&f.to<a&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[i+2].removeInner(s,c+1);d!=Lt?r[i+2]=d:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let c=0;c<o.length;c++)o[c].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(c--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new qe(o,r):Lt}forChild(e,n){if(this==Lt)return this;if(n.isLeaf)return qe.empty;let r,o;for(let c=0;c<this.children.length;c+=3)if(this.children[c]>=e){this.children[c]==e&&(r=this.children[c+2]);break}let i=e+1,s=i+n.content.size;for(let c=0;c<this.local.length;c++){let a=this.local[c];if(a.from<s&&a.to>i&&a.type instanceof Mr){let d=Math.max(i,a.from)-i,u=Math.min(s,a.to)-i;d<u&&(o||(o=[])).push(a.copy(d,u))}}if(o){let c=new qe(o.sort(bo),oi);return r?new Lr([c,r]):c}return r||Lt}eq(e){if(this==e)return!0;if(!(e instanceof qe)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return Lu(this.localsInner(e))}localsInner(e){if(this==Lt)return oi;if(e.inlineContent||!this.local.some(Mr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Mr||n.push(this.local[r]);return n}forEachSet(e){e(this)}}qe.empty=new qe([],[]),qe.removeOverlap=Lu;const Lt=qe.empty;class Lr{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,yo));return Lr.from(r)}forChild(e,n){if(n.isLeaf)return qe.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=Lt&&(i instanceof Lr?r=r.concat(i.members):r.push(i))}return Lr.from(r)}eq(e){if(!(e instanceof Lr)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?Lu(r?n:n.sort(bo)):oi}static from(e){switch(e.length){case 0:return Lt;case 1:return e[0];default:return new Lr(e.every(n=>n instanceof qe)?e:e.reduce((n,r)=>n.concat(r instanceof qe?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function nT(t,e,n,r,o,i,s){let c=t.slice();for(let d=0,u=i;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,g)=>{let v=g-m-(p-h);for(let y=0;y<c.length;y+=3){let b=c[y+1];if(b<0||h>b+u-f)continue;let E=c[y]+u-f;p>=E?c[y+1]=h<=E?-2:-1:h>=u&&v&&(c[y]+=v,c[y+1]+=v)}f+=v}),u=n.maps[d].map(u,-1)}let a=!1;for(let d=0;d<c.length;d+=3)if(c[d+1]<0){if(c[d+1]==-2){a=!0,c[d+1]=-1;continue}let u=n.map(t[d]+i),f=u-o;if(f<0||f>=r.content.size){a=!0;continue}let h=n.map(t[d+1]+i,-1),p=h-o,{index:m,offset:g}=r.content.findIndex(f),v=r.maybeChild(m);if(v&&g==f&&g+v.nodeSize==p){let y=c[d+2].mapInner(n,v,u+1,t[d]+i+1,s);y!=Lt?(c[d]=f,c[d+1]=p,c[d+2]=y):(c[d+1]=-2,a=!0)}else a=!0}if(a){let d=rT(c,t,e,n,o,i,s),u=ol(d,r,0,s);e=u.local;for(let f=0;f<c.length;f+=3)c[f+1]<0&&(c.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<c.length&&c[h]<p;)h+=3;c.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new qe(e.sort(bo),c)}function iv(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new $t(o.from+e,o.to+e,o.type))}return n}function rT(t,e,n,r,o,i,s){function c(a,d){for(let u=0;u<a.local.length;u++){let f=a.local[u].map(r,o,d);f?n.push(f):s.onRemove&&s.onRemove(a.local[u].spec)}for(let u=0;u<a.children.length;u+=3)c(a.children[u+2],a.children[u]+d+1)}for(let a=0;a<t.length;a+=3)t[a+1]==-1&&c(t[a+2],e[a]+i+1);return n}function sv(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function av(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function ol(t,e,n,r){let o=[],i=!1;e.forEach((c,a)=>{let d=sv(t,c,a+n);if(d){i=!0;let u=ol(d,c,n+a+1,r);u!=Lt&&o.push(a,a+c.nodeSize,u)}});let s=iv(i?av(t):t,-n).sort(bo);for(let c=0;c<s.length;c++)s[c].type.valid(e,s[c])||(r.onRemove&&r.onRemove(s[c].spec),s.splice(c--,1));return s.length||o.length?new qe(s,o):Lt}function bo(t,e){return t.from-e.from||t.to-e.to}function Lu(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),lv(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),lv(e,o,r.copy(i.from,r.to)));break}}}return e}function lv(t,e,n){for(;e<t.length&&bo(n,t[e])>0;)e++;t.splice(e,0,n)}function Du(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Lt&&e.push(r)}),t.cursorWrapper&&e.push(qe.create(t.state.doc,[t.cursorWrapper.deco])),Lr.from(e)}const oT={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},iT=Kt&&Tr<=11;class sT{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class aT{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new sT,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Kt&&Tr<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():Mt&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),iT&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,oT)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Bg(this.view)){if(this.suppressingSelectionUpdates)return er(this.view);if(Kt&&Tr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&ho(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Vo(i))n.add(i);for(let i=e.anchorNode;i;i=Vo(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Bg(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,c=!1,a=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],a);f&&(i=i<0?f.from:Math.min(f.from,i),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(c=!0))}if(a.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of a)if(u.nodeName=="BR"&&u.parentNode){let f=u.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(on&&a.length){let u=a.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||dT(e,f)!=p)&&h.remove()}}}let d=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Xa(r)&&(d=Cu(e))&&d.eq(Be.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,er(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),lT(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,uT(e,a)),this.handleDOMChange(i,s,c,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||er(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Kt&&Tr<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(i=h)}let s=o&&o.parentNode==e.target?St(o)+1:0,c=r.localPosFromDOM(e.target,s,-1),a=i&&i.parentNode==e.target?St(i):e.target.childNodes.length,d=r.localPosFromDOM(e.target,a,1);return{from:c,to:d}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let cv=new WeakMap,dv=!1;function lT(t){if(!cv.has(t)&&(cv.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=on,dv)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),dv=!0}}function uv(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return ho(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function cT(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return uv(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?uv(t,n):null}function dT(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function uT(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=i.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let c=s;for(;;){let a=c.firstChild;if(!a||a.nodeType!=1||a.contentEditable=="false"||/^(BR|IMG)$/.test(a.nodeName))break;c=a}c.insertBefore(i,c.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}function fT(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:c}=t.docView.parseRange(e,n),a=t.domSelectionRange(),d,u=a.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:a.anchorOffset}],Xa(a)||d.push({node:a.focusNode,offset:a.focusOffset})),At&&t.input.lastKeyCode===8)for(let v=i;v>o;v--){let y=r.childNodes[v-1],b=y.pmViewDesc;if(y.nodeName=="BR"&&!b){i=v;break}if(!b||b.size)break}let f=t.state.doc,h=t.someProp("domParser")||kr.fromSchema(t.state.schema),p=f.resolve(s),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:hT,context:p});if(d&&d[0].pos!=null){let v=d[0].pos,y=d[1]&&d[1].pos;y==null&&(y=v),m={anchor:v+s,head:y+s}}return{doc:g,sel:m,from:s,to:c}}function hT(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Mt&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Mt&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const pT=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function mT(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let T=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,D=Cu(t,T);if(D&&!t.state.selection.eq(D)){if(At&&qn&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",$=>$(t,po(13,"Enter"))))return;let G=t.state.tr.setSelection(D);T=="pointer"?G.setMeta("pointer",!0):T=="key"&&G.scrollIntoView(),i&&G.setMeta("composition",i),t.dispatch(G)}return}let s=t.state.doc.resolve(e),c=s.sharedDepth(n);e=s.before(c+1),n=t.state.doc.resolve(n).after(c+1);let a=t.state.selection,d=fT(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=yT(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(ei&&t.input.lastIOSEnter>Date.now()-225||qn)&&o.some(T=>T.nodeType==1&&!pT.test(T.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",T=>T(t,po(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&a instanceof Le&&!a.empty&&a.$head.sameParent(a.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:a.from,endA:a.to,endB:a.to};else{if(d.sel){let T=fv(t,t.state.doc,d.sel);if(T&&!T.eq(t.state.selection)){let D=t.state.tr.setSelection(T);i&&D.setMeta("composition",i),t.dispatch(D)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof Le&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Kt&&Tr<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=d.doc.resolveNoCache(m.start-d.from),v=d.doc.resolveNoCache(m.endB-d.from),y=u.resolve(m.start),b=g.sameParent(v)&&g.parent.inlineContent&&y.end()>=m.endA;if((ei&&t.input.lastIOSEnter>Date.now()-225&&(!b||o.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!b&&g.pos<d.doc.content.size&&(!g.sameParent(v)||!g.parent.inlineContent)&&g.pos<v.pos&&!/\S/.test(d.doc.textBetween(g.pos,v.pos,"","")))&&t.someProp("handleKeyDown",T=>T(t,po(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&vT(u,m.start,m.endA,g,v)&&t.someProp("handleKeyDown",T=>T(t,po(8,"Backspace")))){qn&&At&&t.domObserver.suppressSelectionUpdates();return}At&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),qn&&!b&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,v=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(T){return T(t,po(13,"Enter"))})},20));let E=m.start,C=m.endA,S=T=>{let D=T||t.state.tr.replace(E,C,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let G=fv(t,D.doc,d.sel);G&&!(At&&t.composing&&G.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(G.head==E||G.head==D.mapping.map(C)-1)||Kt&&G.empty&&G.head==E)&&D.setSelection(G)}return i&&D.setMeta("composition",i),D.scrollIntoView()},_;if(b)if(g.pos==v.pos){Kt&&Tr<=11&&g.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>er(t),20));let T=S(t.state.tr.delete(E,C)),D=u.resolve(m.start).marksAcross(u.resolve(m.endA));D&&T.ensureMarks(D),t.dispatch(T)}else if(m.endA==m.endB&&(_=gT(g.parent.content.cut(g.parentOffset,v.parentOffset),y.parent.content.cut(y.parentOffset,m.endA-y.start())))){let T=S(t.state.tr);_.type=="add"?T.addMark(E,C,_.mark):T.removeMark(E,C,_.mark),t.dispatch(T)}else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let T=g.parent.textBetween(g.parentOffset,v.parentOffset),D=()=>S(t.state.tr.insertText(T,E,C));t.someProp("handleTextInput",G=>G(t,E,C,T,D))||t.dispatch(D())}else t.dispatch(S());else t.dispatch(S())}function fv(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ku(t,e.resolve(n.anchor),e.resolve(n.head))}function gT(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,c,a;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)c=o[0],s="add",a=u=>u.mark(c.addToSet(u.marks));else if(o.length==0&&i.length==1)c=i[0],s="remove",a=u=>u.mark(c.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(a(e.child(u)));if(ce.from(d).eq(t))return{mark:c,type:s}}function vT(t,e,n,r,o){if(n-e<=o.pos-r.pos||Pu(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let c=i.nodeAfter;return c!=null&&n==e+c.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Pu(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Pu(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Pu(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function yT(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:c}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let a=Math.max(0,i-Math.min(s,c));r-=s+a-i}if(s<i&&t.size<e.size){let a=r<=i&&r>=s?i-r:0;i-=a,i&&i<e.size&&hv(e.textBetween(i-1,i+1))&&(i+=a?1:-1),c=i+(c-s),s=i}else if(c<i){let a=r<=i&&r>=c?i-r:0;i-=a,i&&i<t.size&&hv(t.textBetween(i-1,i+1))&&(i+=a?1:-1),s=i+(s-c),c=i}return{start:i,endA:s,endB:c}}function hv(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class pv{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new Dx,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(bv),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=vv(this),gv(this),this.nodeViews=yv(this),this.docView=Sg(this.state.doc,mv(this),Du(this),this.dom,this),this.domObserver=new aT(this,(r,o,i,s)=>mT(this,r,o,i,s)),this.domObserver.start(),Px(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Iu(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(bv),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(tv(this),s=!0),this.state=e;let c=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(c||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=yv(this);CT(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(c||n.handleDOMEvents!=this._props.handleDOMEvents)&&Iu(this),this.editable=vv(this),gv(this);let a=Du(this),d=mv(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,d,a);(f||!e.selection.eq(o.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&ZA(this);if(s){this.domObserver.stop();let p=f&&(Kt||At)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&bT(o.selection,e.selection);if(f){let m=At?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Zx(this)),(i||!this.docView.update(e.doc,d,a,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Sg(e.doc,d,a,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&bx(this))?er(this,p):(Dg(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&JA(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof xe){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&ug(this,n.getBoundingClientRect(),e)}else ug(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new rv(e.slice,e.move,o<0?void 0:xe.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let c=this.directPlugins[s].props[e];if(c!=null&&(o=n?n(c):c))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let c=i[s].props[e];if(c!=null&&(o=n?n(c):c))return o}}hasFocus(){if(Kt){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&XA(this.dom),er(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return nx(this,e)}coordsAtPos(e,n=1){return vg(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return ax(this,n||this.state,e)}pasteHTML(e,n){return ys(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return ys(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return Au(this,e)}destroy(){this.docView&&(Bx(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Du(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,FA())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return $x(this,e)}domSelectionRange(){let e=this.domSelection();return e?Mt&&this.root.nodeType===11&&WA(this.dom.ownerDocument)==this.dom&&cT(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}pv.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function mv(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[$t.node(0,t.state.doc.content.size,e)]}function gv(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:$t.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function vv(t){return!t.someProp("editable",e=>e(t.state)===!1)}function bT(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function yv(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function CT(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function bv(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var Dr={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:"'"},il={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ET=typeof navigator<"u"&&/Mac/.test(navigator.platform),kT=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),xt=0;xt<10;xt++)Dr[48+xt]=Dr[96+xt]=String(xt);for(var xt=1;xt<=24;xt++)Dr[xt+111]="F"+xt;for(var xt=65;xt<=90;xt++)Dr[xt]=String.fromCharCode(xt+32),il[xt]=String.fromCharCode(xt);for(var Bu in Dr)il.hasOwnProperty(Bu)||(il[Bu]=Dr[Bu]);function wT(t){var e=ET&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||kT&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?il:Dr)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const ST=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),AT=typeof navigator<"u"&&/Win/.test(navigator.platform);function xT(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let c=0;c<e.length-1;c++){let a=e[c];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))ST?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function TT(t){let e=Object.create(null);for(let n in t)e[xT(n)]=t[n];return e}function Ru(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function IT(t){return new Ve({props:{handleKeyDown:Cv(t)}})}function Cv(t){let e=TT(t);return function(n,r){let o=wT(r),i,s=e[Ru(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let c=e[Ru(o,r,!1)];if(c&&c(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(AT&&r.ctrlKey&&r.altKey)&&(i=Dr[r.keyCode])&&i!=o){let c=e[Ru(i,r)];if(c&&c(n.state,n.dispatch,n))return!0}}return!1}}var _T=Object.defineProperty,$u=(t,e)=>{for(var n in e)_T(t,n,{get:e[n],enumerable:!0})};function sl(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var al=class{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:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,c])=>[s,(...d)=>{const u=c(...d)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],c=!!t,a=t||o.tr,d=()=>(!c&&e&&!a.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(a),s.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...m)=>{const g=this.buildProps(a,e),v=h(...m)(g);return s.push(v),u}])),run:d};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([c,a])=>[c,(...d)=>a(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:sl({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([c,a])=>[c,(...d)=>a(...d)(s)]))}};return s}},Ev={};$u(Ev,{blur:()=>NT,clearContent:()=>OT,clearNodes:()=>MT,command:()=>LT,createParagraphNear:()=>DT,cut:()=>PT,deleteCurrentNode:()=>BT,deleteNode:()=>RT,deleteRange:()=>$T,deleteSelection:()=>FT,enter:()=>zT,exitCode:()=>UT,extendMarkRange:()=>HT,first:()=>jT,focus:()=>KT,forEach:()=>YT,insertContent:()=>GT,insertContentAt:()=>JT,joinBackward:()=>VT,joinDown:()=>qT,joinForward:()=>eI,joinItemBackward:()=>tI,joinItemForward:()=>nI,joinTextblockBackward:()=>rI,joinTextblockForward:()=>oI,joinUp:()=>XT,keyboardShortcut:()=>sI,lift:()=>aI,liftEmptyBlock:()=>lI,liftListItem:()=>cI,newlineInCode:()=>dI,resetAttributes:()=>uI,scrollIntoView:()=>fI,selectAll:()=>hI,selectNodeBackward:()=>pI,selectNodeForward:()=>mI,selectParentNode:()=>gI,selectTextblockEnd:()=>vI,selectTextblockStart:()=>yI,setContent:()=>bI,setMark:()=>zI,setMeta:()=>UI,setNode:()=>HI,setNodeSelection:()=>jI,setTextDirection:()=>WI,setTextSelection:()=>KI,sinkListItem:()=>YI,splitBlock:()=>GI,splitListItem:()=>QI,toggleList:()=>ZI,toggleMark:()=>JI,toggleNode:()=>XI,toggleWrap:()=>qI,undoInputRule:()=>VI,unsetAllMarks:()=>e_,unsetMark:()=>t_,unsetTextDirection:()=>n_,updateAttributes:()=>r_,wrapIn:()=>o_,wrapInList:()=>i_});var NT=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window?.getSelection())==null||n.removeAllRanges())}),!0),OT=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),MT=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(c,a)=>{if(c.type.isText)return;const{doc:d,mapping:u}=e,f=d.resolve(u.map(a)),h=d.resolve(u.map(a+c.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Go(p);if(c.type.isTextblock){const{defaultType:g}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,g)}(m||m===0)&&e.lift(p,m)})}),!0},LT=t=>e=>t(e),DT=()=>({state:t,dispatch:e})=>tg(t,e),PT=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new Le(r.doc.resolve(Math.max(s-1,0)))),!0},BT=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const c=o.before(i),a=o.after(i);t.delete(c,a).scrollIntoView()}return!0}return!1};function dt(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var RT=t=>({tr:e,state:n,dispatch:r})=>{const o=dt(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const a=i.before(s),d=i.after(s);e.delete(a,d).scrollIntoView()}return!0}return!1},$T=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},FT=()=>({state:t,dispatch:e})=>au(t,e),zT=()=>({commands:t})=>t.keyboardShortcut("Enter"),UT=()=>({state:t,dispatch:e})=>SA(t,e);function Fu(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function ll(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:Fu(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function kv(t,e,n={}){return t.find(r=>r.type===e&&ll(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function wv(t,e,n={}){return!!kv(t,e,n)}function zu(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!kv([...o.node.marks],e,n)))return;let s=o.index,c=t.start()+o.offset,a=s+1,d=c+o.node.nodeSize;for(;s>0&&wv([...t.parent.child(s-1).marks],e,n);)s-=1,c-=t.parent.child(s).nodeSize;for(;a<t.parent.childCount&&wv([...t.parent.child(a).marks],e,n);)d+=t.parent.child(a).nodeSize,a+=1;return{from:c,to:d}}function tr(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var HT=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=tr(t,r.schema),{doc:s,selection:c}=n,{$from:a,from:d,to:u}=c;if(o){const f=zu(a,i,e);if(f&&f.from<=d&&f.to>=u){const h=Le.create(s,f.from,f.to);n.setSelection(h)}}return!0},jT=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function Sv(t){return t instanceof Le}function Co(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Av(t,e=null){if(!e)return null;const n=Be.atStart(t),r=Be.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?Le.create(t,Co(0,o,i),Co(t.content.size,o,i)):Le.create(t,Co(e,o,i),Co(e,o,i))}function xv(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function cl(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function WT(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var KT=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(cl()||xv())&&r.dom.focus(),WT()&&!cl()&&!xv()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!Sv(n.state.selection))return s(),!0;const c=Av(o.doc,t)||n.state.selection,a=n.state.selection.eq(c);return i&&(a||o.setSelection(c),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},YT=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),GT=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),Tv=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&Tv(r)}return t};function dl(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return Tv(n)}function Cs(t,e,n){if(t instanceof Er||t instanceof ce)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return ce.fromArray(t.map(c=>e.nodeFromJSON(c)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),Cs("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,c="";const a=new h0({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:d=>(s=!0,c=typeof d=="string"?d:d.outerHTML,null)}]}})});if(n.slice?kr.fromSchema(a).parseSlice(dl(t),n.parseOptions):kr.fromSchema(a).parse(dl(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${c}`)})}const i=kr.fromSchema(e);return n.slice?i.parseSlice(dl(t),n.parseOptions).content:i.parse(dl(t),n.parseOptions)}return Cs("",e,n)}function QT(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof vt||o instanceof yt))return;const i=t.mapping.maps[r];let s=0;i.forEach((c,a,d,u)=>{s===0&&(s=u)}),t.setSelection(Be.near(t.doc.resolve(s),n))}var ZT=t=>!("type"in t),JT=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let c;const a=v=>{i.emit("contentError",{editor:i,error:v,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{Cs(e,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(v){a(v)}try{c=Cs(e,i.schema,{parseOptions:d,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(v){return a(v),!1}let{from:u,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,p=!0;if((ZT(c)?c:[c]).forEach(v=>{v.check(),h=h?v.isText&&v.marks.length===0:!1,p=p?v.isBlock:!1}),u===f&&p){const{parent:v}=r.doc.resolve(u);v.isTextblock&&!v.type.spec.code&&!v.childCount&&(u-=1,f+=1)}let g;if(h){if(Array.isArray(e))g=e.map(v=>v.text||"").join("");else if(e instanceof ce){let v="";e.forEach(y=>{y.text&&(v+=y.text)}),g=v}else typeof e=="object"&&e&&e.text?g=e.text:g=e;r.insertText(g,u,f)}else{g=c;const v=r.doc.resolve(u),y=v.node(),b=v.parentOffset===0,E=y.isText||y.isTextblock,C=y.content.size>0;b&&E&&C&&(u=Math.max(0,u-1)),r.replaceWith(u,f,g)}n.updateSelection&&QT(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:g}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:g})}return!0},XT=()=>({state:t,dispatch:e})=>EA(t,e),qT=()=>({state:t,dispatch:e})=>kA(t,e),VT=()=>({state:t,dispatch:e})=>Q0(t,e),eI=()=>({state:t,dispatch:e})=>q0(t,e),tI=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ga(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},nI=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Ga(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},rI=()=>({state:t,dispatch:e})=>bA(t,e),oI=()=>({state:t,dispatch:e})=>CA(t,e);function Iv(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function iI(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let c=0;c<e.length-1;c+=1){const a=e[c];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))i=!0;else if(/^mod$/i.test(a))cl()||Iv()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var sI=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=iI(t).split(/-(?!$)/),s=i.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),c=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{n.someProp("handleKeyDown",d=>d(n,c))});return a?.steps.forEach(d=>{const u=d.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Pr(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?dt(e,t.schema):null,c=[];t.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);c.push({node:f,from:p,to:m})});const a=o-r,d=c.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>ll(f.node.attrs,n,{strict:!1}));return i?!!d.length:d.reduce((f,h)=>f+h.to-h.from,0)>=a}var aI=(t,e={})=>({state:n,dispatch:r})=>{const o=dt(t,n.schema);return Pr(n,o,e)?wA(n,r):!1},lI=()=>({state:t,dispatch:e})=>ng(t,e),cI=t=>({state:e,dispatch:n})=>{const r=dt(t,e.schema);return PA(r)(e,n)},dI=()=>({state:t,dispatch:e})=>eg(t,e);function ul(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function _v(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var uI=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const c=ul(typeof t=="string"?t:t.name,r.schema);if(!c)return!1;c==="node"&&(i=dt(t,r.schema)),c==="mark"&&(s=tr(t,r.schema));let a=!1;return n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(u,f)=>{i&&i===u.type&&(a=!0,o&&n.setNodeMarkup(f,void 0,_v(u.attrs,e))),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&(a=!0,o&&n.addMark(f,f+u.nodeSize,s.create(_v(h.attrs,e))))})})}),a},fI=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),hI=()=>({tr:t,dispatch:e})=>{if(e){const n=new Xt(t.doc);t.setSelection(n)}return!0},pI=()=>({state:t,dispatch:e})=>J0(t,e),mI=()=>({state:t,dispatch:e})=>V0(t,e),gI=()=>({state:t,dispatch:e})=>TA(t,e),vI=()=>({state:t,dispatch:e})=>NA(t,e),yI=()=>({state:t,dispatch:e})=>_A(t,e);function Uu(t,e,n={},r={}){return Cs(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var bI=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:c})=>{const{doc:a}=i;if(r.preserveWhitespace!=="full"){const d=Uu(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return s&&i.replaceWith(0,a.content.size,d).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),c.insertContentAt({from:0,to:a.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function Nv(t,e){const n=tr(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,a=>{s.push(...a.marks)});const c=s.find(a=>a.type.name===n.name);return c?{...c.attrs}:{}}function Ov(t,e){const n=new $0(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function CI(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function EI(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function kI(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function fl(t){return e=>kI(e.$from,t)}function we(t,e,n){return t.config[e]===void 0&&t.parent?we(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?we(t.parent,e,n):null}):t.config[e]}function Hu(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=we(e,"addExtensions",n);return r?[e,...Hu(r())]:e}).flat(10)}function ju(t,e){const n=uo.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function Mv(t){return typeof t=="function"}function Ge(t,e=void 0,...n){return Mv(t)?e?t.bind(e)(...n):t(...n):t}function wI(t={}){return Object.keys(t).length===0&&t.constructor===Object}function ii(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function Lv(t){const e=[],{nodeExtensions:n,markExtensions:r}=ii(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(d=>d.name!=="text").map(d=>d.name),c=r.map(d=>d.name),a=[...s,...c];return t.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage,extensions:o},f=we(d,"addGlobalAttributes",u);if(!f)return;f().forEach(p=>{let m;Array.isArray(p.types)?m=p.types:p.types==="*"?m=a:p.types==="nodes"?m=s:p.types==="marks"?m=c:m=[],m.forEach(g=>{Object.entries(p.attributes).forEach(([v,y])=>{e.push({type:g,name:v,attribute:{...i,...y}})})})})}),o.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage},f=we(d,"addAttributes",u);if(!f)return;const h=f();Object.entries(h).forEach(([p,m])=>{const g={...i,...m};typeof g?.default=="function"&&(g.default=g.default()),g?.isRequired&&g?.default===void 0&&delete g.default,e.push({type:d.name,name:p,attribute:g})})}),e}function Yt(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const c=i?String(i).split(" "):[],a=r[o]?r[o].split(" "):[],d=c.filter(u=>!a.includes(u));r[o]=[...a,...d].join(" ")}else if(o==="style"){const c=i?i.split(";").map(u=>u.trim()).filter(Boolean):[],a=r[o]?r[o].split(";").map(u=>u.trim()).filter(Boolean):[],d=new Map;a.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),c.forEach(u=>{const[f,h]=u.split(":").map(p=>p.trim());d.set(f,h)}),r[o]=Array.from(d.entries()).map(([u,f])=>`${u}: ${f}`).join("; ")}else r[o]=i}),r},{})}function Es(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>Yt(n,r),{})}function SI(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function Dv(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const c=s.attribute.parseHTML?s.attribute.parseHTML(n):SI(n.getAttribute(s.name));return c==null?i:{...i,[s.name]:c}},{});return{...r,...o}}}}function Pv(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&wI(n)?!1:n!=null))}function Bv(t){var e,n;const r={};return!((e=t?.attribute)!=null&&e.isRequired)&&"default"in(t?.attribute||{})&&(r.default=t.attribute.default),((n=t?.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function AI(t,e){var n;const r=Lv(t),{nodeExtensions:o,markExtensions:i}=ii(t),s=(n=o.find(d=>we(d,"topNode")))==null?void 0:n.name,c=Object.fromEntries(o.map(d=>{const u=r.filter(y=>y.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((y,b)=>{const E=we(b,"extendNodeSchema",f);return{...y,...E?E(d):{}}},{}),p=Pv({...h,content:Ge(we(d,"content",f)),marks:Ge(we(d,"marks",f)),group:Ge(we(d,"group",f)),inline:Ge(we(d,"inline",f)),atom:Ge(we(d,"atom",f)),selectable:Ge(we(d,"selectable",f)),draggable:Ge(we(d,"draggable",f)),code:Ge(we(d,"code",f)),whitespace:Ge(we(d,"whitespace",f)),linebreakReplacement:Ge(we(d,"linebreakReplacement",f)),defining:Ge(we(d,"defining",f)),isolating:Ge(we(d,"isolating",f)),attrs:Object.fromEntries(u.map(Bv))}),m=Ge(we(d,"parseHTML",f));m&&(p.parseDOM=m.map(y=>Dv(y,u)));const g=we(d,"renderHTML",f);g&&(p.toDOM=y=>g({node:y,HTMLAttributes:Es(y,u)}));const v=we(d,"renderText",f);return v&&(p.toText=v),[d.name,p]})),a=Object.fromEntries(i.map(d=>{const u=r.filter(v=>v.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((v,y)=>{const b=we(y,"extendMarkSchema",f);return{...v,...b?b(d):{}}},{}),p=Pv({...h,inclusive:Ge(we(d,"inclusive",f)),excludes:Ge(we(d,"excludes",f)),group:Ge(we(d,"group",f)),spanning:Ge(we(d,"spanning",f)),code:Ge(we(d,"code",f)),attrs:Object.fromEntries(u.map(Bv))}),m=Ge(we(d,"parseHTML",f));m&&(p.parseDOM=m.map(v=>Dv(v,u)));const g=we(d,"renderHTML",f);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:Es(v,u)})),[d.name,p]}));return new h0({topNode:s,nodes:c,marks:a})}function xI(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function ks(t){return t.sort((n,r)=>{const o=we(n,"priority")||100,i=we(r,"priority")||100;return o>i?-1:o<i?1:0})}function Rv(t){const e=ks(Hu(t)),n=xI(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function $v(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
1191
1191
 
1192
1192
  `,textSerializers:s={}}=n||{};let c="";return t.nodesBetween(r,o,(a,d,u,f)=>{var h;a.isBlock&&d>r&&(c+=i);const p=s?.[a.type.name];if(p)return u&&(c+=p({node:a,pos:d,parent:u,index:f,range:e})),!1;a.isText&&(c+=(h=a?.text)==null?void 0:h.slice(Math.max(r,d)-d,o-d))}),c}function TI(t,e){const n={from:0,to:t.content.size};return $v(t,n,e)}function Fv(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function II(t,e){const n=dt(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,c=>{i.push(c)});const s=i.reverse().find(c=>c.type.name===n.name);return s?{...s.attrs}:{}}function zv(t,e){const n=ul(typeof e=="string"?e:e.name,t.schema);return n==="node"?II(t,e):n==="mark"?Nv(t,e):{}}function _I(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function NI(t){const e=_I(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Uv(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((c,a)=>{s.push({from:c,to:a})});else{const{from:c,to:a}=n[i];if(c===void 0||a===void 0)return;s.push({from:c,to:a})}s.forEach(({from:c,to:a})=>{const d=e.slice(i).map(c,-1),u=e.slice(i).map(a),f=e.invert().map(d,-1),h=e.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:d,to:u}})})}),NI(r)}function Wu(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=zu(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||o?.nodeSize===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var OI=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&s===null;){const c=o.node(i);c?.type.name===e?s=c:i-=1}return[s,i]};function ws(t,e){return e.nodes[t]||e.marks[t]||null}function hl(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var MI=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,c)=>{var a,d;const u=((d=(a=o.type.spec).toText)==null?void 0:d.call(a,{node:o,pos:i,parent:s,index:c}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function Ku(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?tr(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>i?i.name===f.type.name:!0).find(f=>ll(f.attrs,n,{strict:!1}));let s=0;const c=[];if(o.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;t.doc.nodesBetween(p,m,(g,v)=>{if(i&&g.inlineContent&&!g.type.allowsMarkType(i))return!1;if(!g.isText&&!g.marks.length)return;const y=Math.max(p,v),b=Math.min(m,v+g.nodeSize),E=b-y;s+=E,c.push(...g.marks.map(C=>({mark:C,from:y,to:b})))})}),s===0)return!1;const a=c.filter(f=>i?i.name===f.mark.type.name:!0).filter(f=>ll(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),d=c.filter(f=>i?f.mark.type!==i&&f.mark.type.excludes(i):!0).reduce((f,h)=>f+h.to-h.from,0);return(a>0?a+d:a)>=s}function LI(t,e,n={}){if(!e)return Pr(t,null,n)||Ku(t,null,n);const r=ul(e,t.schema);return r==="node"?Pr(t,e,n):r==="mark"?Ku(t,e,n):!1}var DI=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const i=fl(c=>c.type.name===e)(t.selection);if(!i)return!1;const s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},PI=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function Hv(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function jv(t,e){const{nodeExtensions:n}=ii(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Ge(we(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function pl(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(pl(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function BI(t){return t instanceof xe}var Wv=class O3{constructor(e){this.position=e}static fromJSON(e){return new O3(e.position)}toJSON(){return{position:this.position}}};function RI(t,e){const n=e.mapping.mapResult(t.position);return{position:new Wv(n.pos),mapResult:n}}function $I(t){return new Wv(t)}function FI(t,e,n){var r;const{selection:o}=e;let i=null;if(Sv(o)&&(i=o.$cursor),i){const c=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(c)||!c.some(d=>d.type.excludes(n)))}const{ranges:s}=o;return s.some(({$from:c,$to:a})=>{let d=c.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(c.pos,a.pos,(u,f,h)=>{if(d)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(g=>g.type.excludes(n));d=p&&m}return!d}),d})}var zI=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:c}=i,a=tr(t,r.schema);if(o)if(s){const d=Nv(r,a);n.addStoredMark(a.create({...d,...e}))}else c.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;r.doc.nodesBetween(u,f,(h,p)=>{const m=Math.max(p,u),g=Math.min(p+h.nodeSize,f);h.marks.find(y=>y.type===a)?h.marks.forEach(y=>{a===y.type&&n.addMark(m,g,a.create({...y.attrs,...e}))}):n.addMark(m,g,a.create(e))})});return FI(r,n,a)},UI=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),HI=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=dt(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:c})=>ig(i,{...s,...e})(n)?!0:c.clearNodes()).command(({state:c})=>ig(i,{...s,...e})(c,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},jI=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Co(t,0,r.content.size),i=xe.create(r,o);e.setSelection(i)}return!0},WI=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=r;let s,c;return typeof e=="number"?(s=e,c=e):e&&"from"in e&&"to"in e?(s=e.from,c=e.to):(s=i.from,c=i.to),o&&n.doc.nodesBetween(s,c,(a,d)=>{a.isText||n.setNodeMarkup(d,void 0,{...a.attrs,dir:t})}),!0},KI=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=Le.atStart(r).from,c=Le.atEnd(r).to,a=Co(o,s,c),d=Co(i,s,c),u=Le.create(r,a,d);e.setSelection(u)}return!0},YI=t=>({state:e,dispatch:n})=>{const r=dt(t,e.schema);return $A(r)(e,n)};function Kv(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e?.includes(o.type.name));t.tr.ensureMarks(r)}}var GI=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:c,$to:a}=i,d=o.extensionManager.attributes,u=hl(d,c.node().type.name,c.node().attrs);if(i instanceof xe&&i.node.isBlock)return!c.parentOffset||!Jn(s,c.pos)?!1:(r&&(t&&Kv(n,o.extensionManager.splittableMarks),e.split(c.pos).scrollIntoView()),!0);if(!c.parent.isBlock)return!1;const f=a.parentOffset===a.parent.content.size,h=c.depth===0?void 0:CI(c.node(-1).contentMatchAt(c.indexAfter(-1)));let p=f&&h?[{type:h,attrs:u}]:void 0,m=Jn(e.doc,e.mapping.map(c.pos),1,p);if(!p&&!m&&Jn(e.doc,e.mapping.map(c.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:u}]:void 0),r){if(m&&(i instanceof Le&&e.deleteSelection(),e.split(e.mapping.map(c.pos),1,p),h&&!f&&!c.parentOffset&&c.parent.type!==h)){const g=e.mapping.map(c.before()),v=e.doc.resolve(g);c.node(-1).canReplaceWith(v.index(),v.index()+1,h)&&e.setNodeMarkup(e.mapping.map(c.before()),h)}t&&Kv(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},QI=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const c=dt(t,r.schema),{$from:a,$to:d}=r.selection,u=r.selection.node;if(u&&u.isBlock||a.depth<2||!a.sameParent(d))return!1;const f=a.node(-1);if(f.type!==c)return!1;const h=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==c||a.index(-2)!==a.node(-2).childCount-1)return!1;if(o){let y=ce.empty;const b=a.index(-1)?1:a.index(-2)?2:3;for(let D=a.depth-b;D>=a.depth-3;D-=1)y=ce.from(a.node(D).copy(y));const E=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,C={...hl(h,a.node().type.name,a.node().attrs),...e},S=((s=c.contentMatch.defaultType)==null?void 0:s.createAndFill(C))||void 0;y=y.append(ce.from(c.createAndFill(null,S)||void 0));const _=a.before(a.depth-(b-1));n.replace(_,a.after(-E),new ye(y,4-b,0));let T=-1;n.doc.nodesBetween(_,n.doc.content.size,(D,G)=>{if(T>-1)return!1;D.isTextblock&&D.content.size===0&&(T=G+1)}),T>-1&&n.setSelection(Le.near(n.doc.resolve(T))),n.scrollIntoView()}return!0}const p=d.pos===a.end()?f.contentMatchAt(0).defaultType:null,m={...hl(h,f.type.name,f.attrs),...e},g={...hl(h,a.node().type.name,a.node().attrs),...e};n.delete(a.pos,d.pos);const v=p?[{type:c,attrs:m},{type:p,attrs:g}]:[{type:c,attrs:m}];if(!Jn(n.doc,a.pos,2))return!1;if(o){const{selection:y,storedMarks:b}=r,{splittableMarks:E}=i.extensionManager,C=b||y.$to.parentOffset&&y.$from.marks();if(n.split(a.pos,2,v).scrollIntoView(),!C||!o)return!0;const S=C.filter(_=>E.includes(_.type.name));n.ensureMarks(S)}return!0},Yu=(t,e)=>{const n=fl(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Ar(t.doc,n.pos)&&t.join(n.pos),!0},Gu=(t,e)=>{const n=fl(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===o?.type&&Ar(t.doc,r)&&t.join(r),!0},ZI=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:c,chain:a,commands:d,can:u})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,p=dt(t,s.schema),m=dt(e,s.schema),{selection:g,storedMarks:v}=s,{$from:y,$to:b}=g,E=y.blockRange(b),C=v||g.$to.parentOffset&&g.$from.marks();if(!E)return!1;const S=fl(_=>jv(_.type.name,f))(g);if(E.depth>=1&&S&&E.depth-S.depth<=1){if(S.node.type===p)return d.liftListItem(m);if(jv(S.node.type.name,f)&&p.validContent(S.node.content)&&c)return a().command(()=>(i.setNodeMarkup(S.pos,p),!0)).command(()=>Yu(i,p)).command(()=>Gu(i,p)).run()}return!n||!C||!c?a().command(()=>u().wrapInList(p,r)?!0:d.clearNodes()).wrapInList(p,r).command(()=>Yu(i,p)).command(()=>Gu(i,p)).run():a().command(()=>{const _=u().wrapInList(p,r),T=C.filter(D=>h.includes(D.type.name));return i.ensureMarks(T),_?!0:d.clearNodes()}).wrapInList(p,r).command(()=>Yu(i,p)).command(()=>Gu(i,p)).run()},JI=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=tr(t,r.schema);return Ku(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},XI=(t,e,n={})=>({state:r,commands:o})=>{const i=dt(t,r.schema),s=dt(e,r.schema),c=Pr(r,i,n);let a;return r.selection.$anchor.sameParent(r.selection.$head)&&(a=r.selection.$anchor.parent.attrs),c?o.setNode(s,a):o.setNode(i,{...a,...n})},qI=(t,e={})=>({state:n,commands:r})=>{const o=dt(t,n.schema);return Pr(n,o,e)?r.lift(o):r.wrapIn(o,e)},VI=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,c=i.transform;for(let a=c.steps.length-1;a>=0;a-=1)s.step(c.steps[a].invert(c.docs[a]));if(i.text){const a=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,a))}else s.delete(i.from,i.to)}return!0}}return!1},e_=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},t_=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:c}=n,a=tr(t,r.schema),{$from:d,empty:u,ranges:f}=c;if(!o)return!0;if(u&&s){let{from:h,to:p}=c;const m=(i=d.marks().find(v=>v.type===a))==null?void 0:i.attrs,g=zu(d,a,m);g&&(h=g.from,p=g.to),n.removeMark(h,p,a)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,a)});return n.removeStoredMark(a),!0},n_=t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=n;let i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=o.from,s=o.to),r&&e.doc.nodesBetween(i,s,(c,a)=>{if(c.isText)return;const d={...c.attrs};delete d.dir,e.setNodeMarkup(a,void 0,d)}),!0},r_=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const c=ul(typeof t=="string"?t:t.name,r.schema);if(!c)return!1;c==="node"&&(i=dt(t,r.schema)),c==="mark"&&(s=tr(t,r.schema));let a=!1;return n.selection.ranges.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;let h,p,m,g;n.selection.empty?r.doc.nodesBetween(u,f,(v,y)=>{i&&i===v.type&&(a=!0,m=Math.max(y,u),g=Math.min(y+v.nodeSize,f),h=y,p=v)}):r.doc.nodesBetween(u,f,(v,y)=>{y<u&&i&&i===v.type&&(a=!0,m=Math.max(y,u),g=Math.min(y+v.nodeSize,f),h=y,p=v),y>=u&&y<=f&&(i&&i===v.type&&(a=!0,o&&n.setNodeMarkup(y,void 0,{...v.attrs,...e})),s&&v.marks.length&&v.marks.forEach(b=>{if(s===b.type&&(a=!0,o)){const E=Math.max(y,u),C=Math.min(y+v.nodeSize,f);n.addMark(E,C,s.create({...b.attrs,...e}))}}))}),p&&(h!==void 0&&o&&n.setNodeMarkup(h,void 0,{...p.attrs,...e}),s&&p.marks.length&&p.marks.forEach(v=>{s===v.type&&o&&n.addMark(m,g,s.create({...v.attrs,...e}))}))}),a},o_=(t,e={})=>({state:n,dispatch:r})=>{const o=dt(t,n.schema);return OA(o,e)(n,r)},i_=(t,e={})=>({state:n,dispatch:r})=>{const o=dt(t,n.schema);return MA(o,e)(n,r)},s_=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},Yv=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},a_=(t,e)=>{if(Fu(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function ml(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:c}=t,{view:a}=n;if(a.composing)return!1;const d=a.state.doc.resolve(r);if(d.parent.type.spec.code||(e=d.nodeBefore||d.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const f=MI(d)+i;return s.forEach(h=>{if(u)return;const p=a_(f,h.find);if(!p)return;const m=a.state.tr,g=sl({state:a.state,transaction:m}),v={from:r-(p[0].length-i.length),to:o},{commands:y,chain:b,can:E}=new al({editor:n,state:g});h.handler({state:g,range:v,match:p,commands:y,chain:b,can:E})===null||!m.steps.length||(h.undoable&&m.setMeta(c,{transform:m,from:r,to:o,text:i}),a.dispatch(m),u=!0)}),u}function l_(t){const{editor:e,rules:n}=t,r=new Ve({state:{init(){return null},apply(o,i,s){const c=o.getMeta(r);if(c)return c;const a=o.getMeta("applyInputRules");return a&&setTimeout(()=>{let{text:u}=a;typeof u=="string"?u=u:u=ju(ce.from(u),s.schema);const{from:f}=a,h=f+u.length;ml({editor:e,from:f,to:h,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,c){return ml({editor:e,from:i,to:s,text:c,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&ml({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?ml({editor:e,from:s.pos,to:s.pos,text:`
1193
1193
  `,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function c_(t){return Object.prototype.toString.call(t).slice(8,-1)}function gl(t){return c_(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function Gv(t,e){const n={...t};return gl(t)&&gl(e)&&Object.keys(e).forEach(r=>{gl(e[r])&&gl(t[r])?n[r]=Gv(t[r],e[r]):n[r]=e[r]}),n}var Qu=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Ge(we(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Ge(we(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>Gv(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},Ss=class M3 extends Qu{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new M3(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(d=>d?.type.name===n.name))return!1;const a=s.find(d=>d?.type.name===n.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function d_(t){return typeof t=="number"}var u_=class{constructor(t){this.find=t.find,this.handler=t.handler}},f_=(t,e,n)=>{if(Fu(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function h_(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:c}=t,{commands:a,chain:d,can:u}=new al({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,o,(p,m)=>{var g,v,y,b,E;if((v=(g=p.type)==null?void 0:g.spec)!=null&&v.code||!(p.isText||p.isTextblock||p.isInline))return;const C=(E=(b=(y=p.content)==null?void 0:y.size)!=null?b:p.nodeSize)!=null?E:0,S=Math.max(r,m),_=Math.min(o,m+C);if(S>=_)return;const T=p.isText?p.text||"":p.textBetween(S-m,_-m,void 0,"");f_(T,i.find,s).forEach(G=>{if(G.index===void 0)return;const $=S+G.index+1,j=$+G[0].length,W={from:n.tr.mapping.map($),to:n.tr.mapping.map(j)},Y=i.handler({state:n,range:W,match:G,commands:a,chain:d,can:u,pasteEvent:s,dropEvent:c});f.push(Y)})}),f.every(p=>p!==null)}var vl=null,p_=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function m_(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,c;try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}const a=({state:u,from:f,to:h,rule:p,pasteEvt:m})=>{const g=u.tr,v=sl({state:u,transaction:g});if(!(!h_({editor:e,state:v,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:m,dropEvent:c})||!g.steps.length)){try{c=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{c=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,g}};return n.map(u=>new Ve({view(f){const h=m=>{var g;r=(g=f.dom.parentElement)!=null&&g.contains(m.target)?f.dom.parentElement:null,r&&(vl=e)},p=()=>{vl&&(vl=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(i=r===f.dom.parentElement,c=h,!i){const p=vl;p?.isEditable&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(f,h)=>{var p;const m=(p=h.clipboardData)==null?void 0:p.getData("text/html");return s=h,o=!!m?.includes("data-pm-slice"),!1}}},appendTransaction:(f,h,p)=>{const m=f[0],g=m.getMeta("uiEvent")==="paste"&&!o,v=m.getMeta("uiEvent")==="drop"&&!i,y=m.getMeta("applyPasteRules"),b=!!y;if(!g&&!v&&!b)return;if(b){let{text:S}=y;typeof S=="string"?S=S:S=ju(ce.from(S),p.schema);const{from:_}=y,T=_+S.length,D=p_(S);return a({rule:u,state:p,from:_,to:{b:T},pasteEvt:D})}const E=h.doc.content.findDiffStart(p.doc.content),C=h.doc.content.findDiffEnd(p.doc.content);if(!(!d_(E)||!C||E===C.b))return a({rule:u,state:p,from:E,to:C,pasteEvt:s})}}))}var yl=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=Rv(t),this.schema=AI(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ws(e.name,this.schema)},r=we(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return ks([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:ws(r.name,this.schema)},i=[],s=we(r,"addKeyboardShortcuts",o);let c={};if(r.type==="mark"&&we(r,"exitable",o)&&(c.ArrowRight=()=>Ss.handleExit({editor:t,mark:r})),s){const h=Object.fromEntries(Object.entries(s()).map(([p,m])=>[p,()=>m({editor:t})]));c={...c,...h}}const a=IT(c);i.push(a);const d=we(r,"addInputRules",o);if(Hv(r,t.options.enableInputRules)&&d){const h=d();if(h&&h.length){const p=l_({editor:t,rules:h}),m=Array.isArray(p)?p:[p];i.push(...m)}}const u=we(r,"addPasteRules",o);if(Hv(r,t.options.enablePasteRules)&&u){const h=u();if(h&&h.length){const p=m_({editor:t,rules:h});i.push(...p)}}const f=we(r,"addProseMirrorPlugins",o);if(f){const h=f();i.push(...h)}return i})}get attributes(){return Lv(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=ii(this.extensions);return Object.fromEntries(e.filter(n=>!!we(n,"addNodeView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:dt(n.name,this.schema)},i=we(n,"addNodeView",o);if(!i)return[];const s=i();if(!s)return[];const c=(a,d,u,f,h)=>{const p=Es(a,r);return s({node:a,view:d,getPos:u,decorations:f,innerDecorations:h,editor:t,extension:n,HTMLAttributes:p})};return[n.name,c]}))}dispatchTransaction(t){const{editor:e}=this;return ks([...this.extensions].reverse()).reduceRight((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:ws(o.name,this.schema)},s=we(o,"dispatchTransaction",i);return s?c=>{s.call(i,{transaction:c,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return ks([...this.extensions]).reduce((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:ws(o.name,this.schema)},s=we(o,"transformPastedHTML",i);return s?(c,a)=>{const d=r(c,a);return s.call(i,d)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=ii(this.extensions);return Object.fromEntries(e.filter(n=>!!we(n,"addMarkView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:tr(n.name,this.schema)},i=we(n,"addMarkView",o);if(!i)return[];const s=(c,a,d)=>{const u=Es(c,r);return i()({mark:c,view:a,inline:d,editor:t,extension:n,HTMLAttributes:u,updateAttributes:f=>{T_(c,t,f)}})};return[n.name,s]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:ws(e.name,this.schema)};e.type==="mark"&&((n=Ge(we(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const o=we(e,"onBeforeCreate",r),i=we(e,"onCreate",r),s=we(e,"onUpdate",r),c=we(e,"onSelectionUpdate",r),a=we(e,"onTransaction",r),d=we(e,"onFocus",r),u=we(e,"onBlur",r),f=we(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),c&&this.editor.on("selectionUpdate",c),a&&this.editor.on("transaction",a),d&&this.editor.on("focus",d),u&&this.editor.on("blur",u),f&&this.editor.on("destroy",f)})}};yl.resolve=Rv,yl.sort=ks,yl.flatten=Hu;var g_={};$u(g_,{ClipboardTextSerializer:()=>Qv,Commands:()=>Zv,Delete:()=>Jv,Drop:()=>Xv,Editable:()=>qv,FocusEvents:()=>e2,Keymap:()=>t2,Paste:()=>n2,Tabindex:()=>r2,TextDirection:()=>o2,focusEventsPluginKey:()=>Vv});var ut=class L3 extends Qu{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new L3(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},Qv=ut.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Ve({key:new bt("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),c=Math.max(...i.map(u=>u.$to.pos)),a=Fv(n);return $v(r,{from:s,to:c},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:a})}}})]}}),Zv=ut.create({name:"commands",addCommands(){return{...Ev}}}),Jv=ut.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const i=()=>{var s,c,a,d;if((d=(a=(c=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:c.filterTransaction)==null?void 0:a.call(c,t))!=null?d:t.getMeta("y-sync$"))return;const u=Ov(t.before,[t,...e]);Uv(u).forEach(p=>{u.mapping.mapResult(p.oldRange.from).deletedAfter&&u.mapping.mapResult(p.oldRange.to).deletedBefore&&u.before.nodesBetween(p.oldRange.from,p.oldRange.to,(m,g)=>{const v=g+m.nodeSize-2,y=p.oldRange.from<=g&&v<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:g,to:v,newFrom:u.mapping.map(g),newTo:u.mapping.map(v),deletedRange:p.oldRange,newRange:p.newRange,partial:!y,editor:this.editor,transaction:t,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((p,m)=>{var g,v;if(p instanceof wn){const y=h.slice(m).map(p.from,-1),b=h.slice(m).map(p.to),E=h.invert().map(y,-1),C=h.invert().map(b),S=(g=u.doc.nodeAt(y-1))==null?void 0:g.marks.some(T=>T.eq(p.mark)),_=(v=u.doc.nodeAt(b))==null?void 0:v.marks.some(T=>T.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:E,to:C},newRange:{from:y,to:b},partial:!!(_||S),editor:this.editor,transaction:t,combinedTransform:u})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),Xv=ut.create({name:"drop",addProseMirrorPlugins(){return[new Ve({key:new bt("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),qv=ut.create({name:"editable",addProseMirrorPlugins(){return[new Ve({key:new bt("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Vv=new bt("focusEvents"),e2=ut.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new Ve({key:Vv,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),t2=ut.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:c})=>{const{selection:a,doc:d}=c,{empty:u,$anchor:f}=a,{pos:h,parent:p}=f,m=f.parent.isTextblock&&h>0?c.doc.resolve(h-1):f,g=m.parent.type.spec.isolating,v=f.pos-f.parentOffset,y=g&&m.parent.childCount===1?v===f.pos:Be.atStart(d).from===h;return!u||!p.type.isTextblock||p.textContent.length||!y||y&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return cl()||Iv()?i:o},addProseMirrorPlugins(){return[new Ve({key:new bt("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(g=>g.getMeta("composition")))return;const r=t.some(g=>g.docChanged)&&!e.doc.eq(n.doc),o=t.some(g=>g.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:c}=e.selection,a=Be.atStart(e.doc).from,d=Be.atEnd(e.doc).to;if(i||!(s===a&&c===d)||!pl(n.doc))return;const h=n.tr,p=sl({state:n,transaction:h}),{commands:m}=new al({editor:this.editor,state:p});if(m.clearNodes(),!!h.steps.length)return h}})]}}),n2=ut.create({name:"paste",addProseMirrorPlugins(){return[new Ve({key:new bt("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),r2=ut.create({name:"tabindex",addProseMirrorPlugins(){return[new Ve({key:new bt("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),o2=ut.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=ii(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Ve({key:new bt("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),v_=class Xs{constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Xs(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Xs(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Xs(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=n.isInline,c=this.pos+r+(i?0:1);if(c<0||c>this.resolvedPos.doc.nodeSize-2)return;const a=this.resolvedPos.doc.resolve(c);if(!o&&!s&&a.depth<=this.depth)return;const d=new Xs(a,this.editor,o,o||s?n:null);o&&(d.actualDepth=this.depth+1),e.push(d)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let c=0;c<s.length;c+=1){const a=s[c];if(i[a]!==n[a])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(a=>n[a]===s.node.attrs[a])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},y_=`.ProseMirror {
@@ -1296,13 +1296,13 @@ ${p.slice(d+2)}`,f+=1;else break}e.push({indent:d,number:parseInt(c,10),content:
1296
1296
  `)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(tO,this.editor.getAttributes(j2)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=As({find:W2,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=As({find:W2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(j2)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),nO=/^\s*(\[([( |x])?\])\s$/,rO=nr.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",Yt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return qu(t,e,o)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),c=document.createElement("input"),a=document.createElement("div"),d=f=>{var h,p;c.ariaLabel=((p=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:p.call(h,f,c.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};d(t),i.contentEditable="false",c.type="checkbox",c.addEventListener("mousedown",f=>f.preventDefault()),c.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){c.checked=!c.checked;return}const{checked:h}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const m=n();if(typeof m!="number")return!1;const g=p.doc.nodeAt(m);return p.setNodeMarkup(m,void 0,{...g?.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(c.checked=!c.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,h])=>{o.setAttribute(f,h)}),o.dataset.checked=t.attrs.checked,c.checked=t.attrs.checked,i.append(c,s),o.append(i,a),Object.entries(e).forEach(([f,h])=>{o.setAttribute(f,h)});let u=new Set(Object.keys(e));return{dom:o,contentDOM:a,update:f=>{if(f.type!==this.type)return!1;o.dataset.checked=f.attrs.checked,c.checked=f.attrs.checked,d(f);const h=r.extensionManager.attributes,p=Es(f,h),m=new Set(Object.keys(p)),g=this.options.HTMLAttributes;return u.forEach(v=>{m.has(v)||(v in g?o.setAttribute(v,g[v]):o.removeAttribute(v))}),Object.entries(p).forEach(([v,y])=>{y==null?v in g?o.setAttribute(v,g[v]):o.removeAttribute(v):o.setAttribute(v,y)}),u=m,!0}}}},addInputRules(){return[As({find:nO,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),oO=nr.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",Yt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
1297
1297
  `):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=Xu(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:c=>({indentLevel:c[1].length,mainContent:c[4],checked:c[3].toLowerCase()==="x"}),createToken:(c,a)=>({type:"taskItem",raw:"",mainContent:c.mainContent,indentLevel:c.indentLevel,checked:c.checked,text:c.mainContent,tokens:n.inlineTokens(c.mainContent),nestedTokens:a}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=Xu(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});ut.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(D2.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(P2.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(XN.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(K2.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(rO.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(oO.configure(this.options.taskList)),t}});var iO=P2,sO=D2,aO=K2,lO=nr.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Yt(this.options.HTMLAttributes,t)]},renderText(){return`
1298
1298
  `},renderMarkdown:()=>`
1299
- `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:c}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&a&&s){const f=a.filter(h=>c.includes(h.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),cO=lO;const dO={class:"popover bd-link-input-popover show bd-link-input-bottom"},uO={class:"popover-body"},fO={class:"form-label"},hO=l.defineComponent({__name:"BDLinkInput",props:{previousUrl:{}},emits:["submit","cancel"],setup(t,{emit:e}){const n=t,r=e,o=l.ref(n.previousUrl??""),i=()=>r("submit",o.value),s=()=>r("cancel");return(c,a)=>(l.openBlock(),l.createElementBlock("div",dO,[a[2]||(a[2]=l.createElementVNode("div",{class:"popover-header"},"Voeg een link toe",-1)),l.createElementVNode("div",uO,[l.createElementVNode("label",fO,[a[1]||(a[1]=l.createTextVNode(" URL: ",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>o.value=d),type:"text",class:"form-control",placeholder:"https://www.example.com"},null,512),[[l.vModelText,o.value]])]),l.createElementVNode("div",{class:"d-flex gap-2 mt-2"},[l.createElementVNode("button",{type:"button",class:"btn btn-primary btn-sm",onClick:i}," Toevoegen "),l.createElementVNode("button",{type:"button",class:"btn btn-secondary btn-sm",onClick:s}," Annuleren ")])])]))}}),_f={BASIC:"basic",FULL:"full"},pO={class:"attachment-list"},mO={class:"attachment-link"},gO={key:1,class:"attachment-no-download"},vO=["href"],$s=l.defineComponent({__name:"BDAttachmentPreviewList",props:{files:{default:[]},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete"],setup(t,{emit:e}){const n=e,r=o=>{n("delete",o)};return(o,i)=>(l.openBlock(),l.createElementBlock("ul",pO,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.files,s=>(l.openBlock(),l.createElementBlock("li",{class:"attachment-list__item",key:s.CorrelationId},[l.createElementVNode("div",mO,[t.showDelete?(l.openBlock(),l.createBlock(Re,{key:0,variant:"remove",onClick:c=>r(s),"aria-label":"verwijder"},{default:l.withCtx(()=>[l.createVNode(l.unref(Ii))]),_:1},8,["onClick"])):l.createCommentVNode("",!0),t.noDownload?(l.openBlock(),l.createElementBlock("div",gO,[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(s.Naam.trim()),1)])):(l.openBlock(),l.createElementBlock("a",{key:2,href:s.downloadUrl},[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(s.Naam.trim()),1)],8,vO))])]))),128))]))}}),yO={class:"attachment-list"},bO={class:"attachment"},CO=["onClick"],EO=["src","alt"],kO=["onClick"],wO=["href"],SO={class:"btn btn-light download-button-image"},AO=["src","alt"],Fs=l.defineComponent({__name:"BDImageAttachmentPreviewList",props:{fastDownload:{type:Boolean,default:!1},files:{default:void 0},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete","show"],setup(t,{emit:e}){const n=t,r=e,o=s=>{r("delete",s)},i=(s,c)=>{s.target&&s.target.className==="img-preview"&&r("show",c)};return(s,c)=>(l.openBlock(),l.createElementBlock("ul",yO,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.files,a=>(l.openBlock(),l.createElementBlock("li",{class:"attachment-list__item",key:a.CorrelationId},[l.createElementVNode("div",bO,[t.showDelete?(l.openBlock(),l.createBlock(Re,{key:0,variant:"remove","aria-label":"verwijder",onClick:l.withModifiers(d=>o(a),["prevent"])},{default:l.withCtx(()=>[l.createVNode(l.unref(Ii))]),_:1},8,["onClick"])):l.createCommentVNode("",!0),n.noDownload?(l.openBlock(),l.createElementBlock("div",{key:1,onClick:d=>i(d,a)},[l.createElementVNode("img",{src:a.previewUrl,class:"img-preview",alt:a.altName,loading:"lazy"},null,8,EO)],8,CO)):(l.openBlock(),l.createElementBlock("div",{key:2,onClick:d=>i(d,a)},[n.fastDownload?(l.openBlock(),l.createElementBlock("a",{key:0,href:a.downloadUrl,class:"download-link"},[l.createElementVNode("button",SO,[l.createVNode(l.unref(Dc))])],8,wO)):l.createCommentVNode("",!0),l.createElementVNode("img",{src:a.previewUrl,alt:a.altName,class:"img-preview",loading:"lazy"},null,8,AO)],8,kO))])]))),128))]))}}),xO=t=>t?.map(e=>e.CorrelationId),Y2=t=>t.Naam.toLowerCase().endsWith(".png")||t.Naam.toLowerCase().endsWith(".jpg")||t.Naam.toLowerCase().endsWith(".jpeg")||t.Naam.toLowerCase().endsWith(".gif"),TO=(t,e)=>e.DownloadUrl?e.DownloadUrl:e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachment?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:e.url?e.url:e.Id?`${t}/Portaal/DownloadBerichtBijlage/${e.Id}`:e.FileId?`${t}/Portaal/DownloadStandardMessageAttachment/${e.StandardAttachmentId}/${e.FileId}`:`${t}/Portaal/DownloadBerichtStagingBijlage/${e.CorrelationId}`,G2=(t,e)=>e.ThumbnailUrl?e.ThumbnailUrl:e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachmentThumbnail?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:e.url?e.url:e.Id?`${t}/Portaal/DownloadBerichtBijlageThumbnail/${e.Id}`:e.StandardAttachmentId||e.standardAttachmentId?`${t}/Portaal/DownloadStandardMessageAttachmentThumbnail/${e.StandardAttachmentId}/${e.FileId}`:`${t}/Portaal/DownloadBerichtStagingBijlageThumbnail/${e.CorrelationId}`,IO=(t,e)=>e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachment?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:null,_O=(t,e)=>e?Y2(t):!Y2(t),So=(t="",e,n)=>e===void 0?void 0:e.filter(o=>_O(o,n)).map(o=>{const i=typeof o.CorrelationId=="string"?o.CorrelationId:o.CorrelationId!=null?o.CorrelationId.toString():"";return{downloadUrl:TO(t,o),previewUrl:G2(t,o),fullImageUrl:IO(t,o),altName:`${o.Naam}`,...o,CorrelationId:i}});var Ft="top",qt="bottom",Vt="right",zt="left",tc="auto",ai=[Ft,qt,Vt,zt],Ao="start",li="end",Q2="clippingParents",Nf="viewport",ci="popper",Z2="reference",Of=ai.reduce(function(t,e){return t.concat([e+"-"+Ao,e+"-"+li])},[]),Mf=[].concat(ai,[tc]).reduce(function(t,e){return t.concat([e,e+"-"+Ao,e+"-"+li])},[]),J2="beforeRead",X2="read",q2="afterRead",V2="beforeMain",e5="main",t5="afterMain",n5="beforeWrite",r5="write",o5="afterWrite",i5=[J2,X2,q2,V2,e5,t5,n5,r5,o5];function Fn(t){return t?(t.nodeName||"").toLowerCase():null}function en(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function xo(t){var e=en(t).Element;return t instanceof e||t instanceof Element}function dn(t){var e=en(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Lf(t){if(typeof ShadowRoot>"u")return!1;var e=en(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function NO(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!dn(i)||!Fn(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var c=o[s];c===!1?i.removeAttribute(s):i.setAttribute(s,c===!0?"":c)}))})}function OO(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),c=s.reduce(function(a,d){return a[d]="",a},{});!dn(o)||!Fn(o)||(Object.assign(o.style,c),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const s5={name:"applyStyles",enabled:!0,phase:"write",fn:NO,effect:OO,requires:["computeStyles"]};function zn(t){return t.split("-")[0]}var To=Math.max,nc=Math.min,di=Math.round;function Df(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function a5(){return!/^((?!chrome|android).)*safari/i.test(Df())}function ui(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&dn(t)&&(o=t.offsetWidth>0&&di(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&di(r.height)/t.offsetHeight||1);var s=xo(t)?en(t):window,c=s.visualViewport,a=!a5()&&n,d=(r.left+(a&&c?c.offsetLeft:0))/o,u=(r.top+(a&&c?c.offsetTop:0))/i,f=r.width/o,h=r.height/i;return{width:f,height:h,top:u,right:d+f,bottom:u+h,left:d,x:d,y:u}}function Pf(t){var e=ui(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function l5(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Lf(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function sr(t){return en(t).getComputedStyle(t)}function MO(t){return["table","td","th"].indexOf(Fn(t))>=0}function zr(t){return((xo(t)?t.ownerDocument:t.document)||window.document).documentElement}function rc(t){return Fn(t)==="html"?t:t.assignedSlot||t.parentNode||(Lf(t)?t.host:null)||zr(t)}function c5(t){return!dn(t)||sr(t).position==="fixed"?null:t.offsetParent}function LO(t){var e=/firefox/i.test(Df()),n=/Trident/i.test(Df());if(n&&dn(t)){var r=sr(t);if(r.position==="fixed")return null}var o=rc(t);for(Lf(o)&&(o=o.host);dn(o)&&["html","body"].indexOf(Fn(o))<0;){var i=sr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function zs(t){for(var e=en(t),n=c5(t);n&&MO(n)&&sr(n).position==="static";)n=c5(n);return n&&(Fn(n)==="html"||Fn(n)==="body"&&sr(n).position==="static")?e:n||LO(t)||e}function Bf(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Us(t,e,n){return To(t,nc(e,n))}function DO(t,e,n){var r=Us(t,e,n);return r>n?n:r}function d5(){return{top:0,right:0,bottom:0,left:0}}function u5(t){return Object.assign({},d5(),t)}function f5(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var PO=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,u5(typeof e!="number"?e:f5(e,ai))};function BO(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,c=zn(n.placement),a=Bf(c),d=[zt,Vt].indexOf(c)>=0,u=d?"height":"width";if(!(!i||!s)){var f=PO(o.padding,n),h=Pf(i),p=a==="y"?Ft:zt,m=a==="y"?qt:Vt,g=n.rects.reference[u]+n.rects.reference[a]-s[a]-n.rects.popper[u],v=s[a]-n.rects.reference[a],y=zs(i),b=y?a==="y"?y.clientHeight||0:y.clientWidth||0:0,E=g/2-v/2,C=f[p],S=b-h[u]-f[m],_=b/2-h[u]/2+E,T=Us(C,_,S),D=a;n.modifiersData[r]=(e={},e[D]=T,e.centerOffset=T-_,e)}}function RO(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||l5(e.elements.popper,o)&&(e.elements.arrow=o))}const h5={name:"arrow",enabled:!0,phase:"main",fn:BO,effect:RO,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fi(t){return t.split("-")[1]}var $O={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FO(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:di(n*o)/o||0,y:di(r*o)/o||0}}function p5(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,c=t.position,a=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),E=zt,C=Ft,S=window;if(d){var _=zs(n),T="clientHeight",D="clientWidth";if(_===en(n)&&(_=zr(n),sr(_).position!=="static"&&c==="absolute"&&(T="scrollHeight",D="scrollWidth")),_=_,o===Ft||(o===zt||o===Vt)&&i===li){C=qt;var G=f&&_===S&&S.visualViewport?S.visualViewport.height:_[T];g-=G-r.height,g*=a?1:-1}if(o===zt||(o===Ft||o===qt)&&i===li){E=Vt;var $=f&&_===S&&S.visualViewport?S.visualViewport.width:_[D];p-=$-r.width,p*=a?1:-1}}var j=Object.assign({position:c},d&&$O),W=u===!0?FO({x:p,y:g},en(n)):{x:p,y:g};if(p=W.x,g=W.y,a){var Y;return Object.assign({},j,(Y={},Y[C]=b?"0":"",Y[E]=y?"0":"",Y.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",Y))}return Object.assign({},j,(e={},e[C]=b?g+"px":"",e[E]=y?p+"px":"",e.transform="",e))}function zO(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,c=n.roundOffsets,a=c===void 0?!0:c,d={placement:zn(e.placement),variation:fi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,p5(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,p5(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const m5={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zO,data:{}};var oc={passive:!0};function UO(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,c=s===void 0?!0:s,a=en(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&d.forEach(function(u){u.addEventListener("scroll",n.update,oc)}),c&&a.addEventListener("resize",n.update,oc),function(){i&&d.forEach(function(u){u.removeEventListener("scroll",n.update,oc)}),c&&a.removeEventListener("resize",n.update,oc)}}const g5={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:UO,data:{}};var HO={left:"right",right:"left",bottom:"top",top:"bottom"};function ic(t){return t.replace(/left|right|bottom|top/g,function(e){return HO[e]})}var jO={start:"end",end:"start"};function v5(t){return t.replace(/start|end/g,function(e){return jO[e]})}function Rf(t){var e=en(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $f(t){return ui(zr(t)).left+Rf(t).scrollLeft}function WO(t,e){var n=en(t),r=zr(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,c=0,a=0;if(o){i=o.width,s=o.height;var d=a5();(d||!d&&e==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:c+$f(t),y:a}}function KO(t){var e,n=zr(t),r=Rf(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=To(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=To(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+$f(t),a=-r.scrollTop;return sr(o||n).direction==="rtl"&&(c+=To(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:c,y:a}}function Ff(t){var e=sr(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y5(t){return["html","body","#document"].indexOf(Fn(t))>=0?t.ownerDocument.body:dn(t)&&Ff(t)?t:y5(rc(t))}function Hs(t,e){var n;e===void 0&&(e=[]);var r=y5(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=en(r),s=o?[i].concat(i.visualViewport||[],Ff(r)?r:[]):r,c=e.concat(s);return o?c:c.concat(Hs(rc(s)))}function zf(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function YO(t,e){var n=ui(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function b5(t,e,n){return e===Nf?zf(WO(t,n)):xo(e)?YO(e,n):zf(KO(zr(t)))}function GO(t){var e=Hs(rc(t)),n=["absolute","fixed"].indexOf(sr(t).position)>=0,r=n&&dn(t)?zs(t):t;return xo(r)?e.filter(function(o){return xo(o)&&l5(o,r)&&Fn(o)!=="body"}):[]}function QO(t,e,n,r){var o=e==="clippingParents"?GO(t):[].concat(e),i=[].concat(o,[n]),s=i[0],c=i.reduce(function(a,d){var u=b5(t,d,r);return a.top=To(u.top,a.top),a.right=nc(u.right,a.right),a.bottom=nc(u.bottom,a.bottom),a.left=To(u.left,a.left),a},b5(t,s,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function C5(t){var e=t.reference,n=t.element,r=t.placement,o=r?zn(r):null,i=r?fi(r):null,s=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,a;switch(o){case Ft:a={x:s,y:e.y-n.height};break;case qt:a={x:s,y:e.y+e.height};break;case Vt:a={x:e.x+e.width,y:c};break;case zt:a={x:e.x-n.width,y:c};break;default:a={x:e.x,y:e.y}}var d=o?Bf(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(i){case Ao:a[d]=a[d]-(e[u]/2-n[u]/2);break;case li:a[d]=a[d]+(e[u]/2-n[u]/2);break}}return a}function hi(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,c=n.boundary,a=c===void 0?Q2:c,d=n.rootBoundary,u=d===void 0?Nf:d,f=n.elementContext,h=f===void 0?ci:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,y=u5(typeof v!="number"?v:f5(v,ai)),b=h===ci?Z2:ci,E=t.rects.popper,C=t.elements[m?b:h],S=QO(xo(C)?C:C.contextElement||zr(t.elements.popper),a,u,s),_=ui(t.elements.reference),T=C5({reference:_,element:E,placement:o}),D=zf(Object.assign({},E,T)),G=h===ci?D:_,$={top:S.top-G.top+y.top,bottom:G.bottom-S.bottom+y.bottom,left:S.left-G.left+y.left,right:G.right-S.right+y.right},j=t.modifiersData.offset;if(h===ci&&j){var W=j[o];Object.keys($).forEach(function(Y){var z=[Vt,qt].indexOf(Y)>=0?1:-1,U=[Ft,qt].indexOf(Y)>=0?"y":"x";$[Y]+=W[U]*z})}return $}function ZO(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,c=n.flipVariations,a=n.allowedAutoPlacements,d=a===void 0?Mf:a,u=fi(r),f=u?c?Of:Of.filter(function(m){return fi(m)===u}):ai,h=f.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,g){return m[g]=hi(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[zn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function JO(t){if(zn(t)===tc)return[];var e=ic(t);return[v5(t),e,v5(e)]}function XO(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!0:s,a=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=e.options.placement,y=zn(v),b=y===v,E=a||(b||!m?[ic(v)]:JO(v)),C=[v].concat(E).reduce(function(be,Ee){return be.concat(zn(Ee)===tc?ZO(e,{placement:Ee,boundary:u,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:g}):Ee)},[]),S=e.rects.reference,_=e.rects.popper,T=new Map,D=!0,G=C[0],$=0;$<C.length;$++){var j=C[$],W=zn(j),Y=fi(j)===Ao,z=[Ft,qt].indexOf(W)>=0,U=z?"width":"height",F=hi(e,{placement:j,boundary:u,rootBoundary:f,altBoundary:h,padding:d}),X=z?Y?Vt:zt:Y?qt:Ft;S[U]>_[U]&&(X=ic(X));var H=ic(X),ee=[];if(i&&ee.push(F[W]<=0),c&&ee.push(F[X]<=0,F[H]<=0),ee.every(function(be){return be})){G=j,D=!1;break}T.set(j,ee)}if(D)for(var ne=m?3:1,ae=function(Ee){var Te=C.find(function(ve){var N=T.get(ve);if(N)return N.slice(0,Ee).every(function(M){return M})});if(Te)return G=Te,"break"},pe=ne;pe>0;pe--){var me=ae(pe);if(me==="break")break}e.placement!==G&&(e.modifiersData[r]._skip=!0,e.placement=G,e.reset=!0)}}const E5={name:"flip",enabled:!0,phase:"main",fn:XO,requiresIfExists:["offset"],data:{_skip:!1}};function k5(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function w5(t){return[Ft,Vt,qt,zt].some(function(e){return t[e]>=0})}function qO(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=hi(e,{elementContext:"reference"}),c=hi(e,{altBoundary:!0}),a=k5(s,r),d=k5(c,o,i),u=w5(a),f=w5(d);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const S5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qO};function VO(t,e,n){var r=zn(t),o=[zt,Ft].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],c=i[1];return s=s||0,c=(c||0)*o,[zt,Vt].indexOf(r)>=0?{x:c,y:s}:{x:s,y:c}}function eM(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=Mf.reduce(function(u,f){return u[f]=VO(f,e.rects,i),u},{}),c=s[e.placement],a=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=s}const A5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eM};function tM(t){var e=t.state,n=t.name;e.modifiersData[n]=C5({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const x5={name:"popperOffsets",enabled:!0,phase:"read",fn:tM,data:{}};function nM(t){return t==="x"?"y":"x"}function rM(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!1:s,a=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,v=hi(e,{boundary:a,rootBoundary:d,padding:f,altBoundary:u}),y=zn(e.placement),b=fi(e.placement),E=!b,C=Bf(y),S=nM(C),_=e.modifiersData.popperOffsets,T=e.rects.reference,D=e.rects.popper,G=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,$=typeof G=="number"?{mainAxis:G,altAxis:G}:Object.assign({mainAxis:0,altAxis:0},G),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,W={x:0,y:0};if(_){if(i){var Y,z=C==="y"?Ft:zt,U=C==="y"?qt:Vt,F=C==="y"?"height":"width",X=_[C],H=X+v[z],ee=X-v[U],ne=p?-D[F]/2:0,ae=b===Ao?T[F]:D[F],pe=b===Ao?-D[F]:-T[F],me=e.elements.arrow,be=p&&me?Pf(me):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:d5(),Te=Ee[z],ve=Ee[U],N=Us(0,T[F],be[F]),M=E?T[F]/2-ne-N-Te-$.mainAxis:ae-N-Te-$.mainAxis,I=E?-T[F]/2+ne+N+ve+$.mainAxis:pe+N+ve+$.mainAxis,O=e.elements.arrow&&zs(e.elements.arrow),k=O?C==="y"?O.clientTop||0:O.clientLeft||0:0,w=(Y=j?.[C])!=null?Y:0,P=X+M-w-k,R=X+I-w,K=Us(p?nc(H,P):H,X,p?To(ee,R):ee);_[C]=K,W[C]=K-X}if(c){var Q,A=C==="x"?Ft:zt,x=C==="x"?qt:Vt,B=_[S],Z=S==="y"?"height":"width",q=B+v[A],te=B-v[x],se=[Ft,zt].indexOf(y)!==-1,J=(Q=j?.[S])!=null?Q:0,re=se?q:B-T[Z]-D[Z]-J+$.altAxis,Se=se?B+T[Z]+D[Z]-J-$.altAxis:te,_e=p&&se?DO(re,B,Se):Us(p?re:q,B,p?Se:te);_[S]=_e,W[S]=_e-B}e.modifiersData[r]=W}}const T5={name:"preventOverflow",enabled:!0,phase:"main",fn:rM,requiresIfExists:["offset"]};function oM(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function iM(t){return t===en(t)||!dn(t)?Rf(t):oM(t)}function sM(t){var e=t.getBoundingClientRect(),n=di(e.width)/t.offsetWidth||1,r=di(e.height)/t.offsetHeight||1;return n!==1||r!==1}function aM(t,e,n){n===void 0&&(n=!1);var r=dn(e),o=dn(e)&&sM(e),i=zr(e),s=ui(t,o,n),c={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((Fn(e)!=="body"||Ff(i))&&(c=iM(e)),dn(e)?(a=ui(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=$f(i))),{x:s.left+c.scrollLeft-a.x,y:s.top+c.scrollTop-a.y,width:s.width,height:s.height}}function lM(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(c){if(!n.has(c)){var a=e.get(c);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function cM(t){var e=lM(t);return i5.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function dM(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function uM(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var I5={placement:"bottom",modifiers:[],strategy:"absolute"};function _5(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function N5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?I5:o;return function(c,a,d){d===void 0&&(d=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},I5,i),modifiersData:{},elements:{reference:c,popper:a},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(y){var b=typeof y=="function"?y(u.options):y;g(),u.options=Object.assign({},i,u.options,b),u.scrollParents={reference:xo(c)?Hs(c):c.contextElement?Hs(c.contextElement):[],popper:Hs(a)};var E=cM(uM([].concat(r,u.options.modifiers)));return u.orderedModifiers=E.filter(function(C){return C.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var y=u.elements,b=y.reference,E=y.popper;if(_5(b,E)){u.rects={reference:aM(b,zs(E),u.options.strategy==="fixed"),popper:Pf(E)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function($){return u.modifiersData[$.name]=Object.assign({},$.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var S=u.orderedModifiers[C],_=S.fn,T=S.options,D=T===void 0?{}:T,G=S.name;typeof _=="function"&&(u=_({state:u,options:D,name:G,instance:p})||u)}}}},update:dM(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){g(),h=!0}};if(!_5(c,a))return p;p.setOptions(d).then(function(v){!h&&d.onFirstUpdate&&d.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var y=v.name,b=v.options,E=b===void 0?{}:b,C=v.effect;if(typeof C=="function"){var S=C({state:u,name:y,instance:p,options:E}),_=function(){};f.push(S||_)}})}function g(){f.forEach(function(v){return v()}),f=[]}return p}}var fM=[g5,x5,m5,s5,A5,E5,T5,h5,S5],Uf=N5({defaultModifiers:fM});const O5=Object.freeze(Object.defineProperty({__proto__:null,afterMain:t5,afterRead:q2,afterWrite:o5,applyStyles:s5,arrow:h5,auto:tc,basePlacements:ai,beforeMain:V2,beforeRead:J2,beforeWrite:n5,bottom:qt,clippingParents:Q2,computeStyles:m5,createPopper:Uf,detectOverflow:hi,end:li,eventListeners:g5,flip:E5,hide:S5,left:zt,main:e5,modifierPhases:i5,offset:A5,placements:Mf,popper:ci,popperGenerator:N5,popperOffsets:x5,preventOverflow:T5,read:X2,reference:Z2,right:Vt,start:Ao,top:Ft,variationPlacements:Of,viewport:Nf,write:r5},Symbol.toStringTag,{value:"Module"}));const Ur=new Map,Hf={set(t,e,n){Ur.has(t)||Ur.set(t,new Map);const r=Ur.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,n)},get(t,e){return Ur.has(t)&&Ur.get(t).get(e)||null},remove(t,e){if(!Ur.has(t))return;const n=Ur.get(t);n.delete(e),n.size===0&&Ur.delete(t)}},hM=1e6,pM=1e3,jf="transitionend",M5=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,n)=>`#${CSS.escape(n)}`)),t),mM=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),gM=t=>{do t+=Math.floor(Math.random()*hM);while(document.getElementById(t));return t},vM=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),o=Number.parseFloat(n);return!r&&!o?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*pM)},L5=t=>{t.dispatchEvent(new Event(jf))},ar=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),Hr=t=>ar(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(M5(t)):null,pi=t=>{if(!ar(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const r=t.closest("summary");if(r&&r.parentNode!==n||r===null)return!1}return e},jr=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",D5=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?D5(t.parentNode):null},sc=()=>{},js=t=>{t.offsetHeight},P5=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Wf=[],yM=t=>{document.readyState==="loading"?(Wf.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Wf)e()}),Wf.push(t)):t()},un=()=>document.documentElement.dir==="rtl",fn=t=>{yM(()=>{const e=P5();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},Qt=(t,e=[],n=t)=>typeof t=="function"?t.call(...e):n,B5=(t,e,n=!0)=>{if(!n){Qt(t);return}const o=vM(e)+5;let i=!1;const s=({target:c})=>{c===e&&(i=!0,e.removeEventListener(jf,s),Qt(t))};e.addEventListener(jf,s),setTimeout(()=>{i||L5(e)},o)},Kf=(t,e,n,r)=>{const o=t.length;let i=t.indexOf(e);return i===-1?!n&&r?t[o-1]:t[0]:(i+=n?1:-1,r&&(i=(i+o)%o),t[Math.max(0,Math.min(i,o-1))])},bM=/[^.]*(?=\..*)\.|.*/,CM=/\..*/,EM=/::\d+$/,Yf={};let R5=1;const $5={mouseenter:"mouseover",mouseleave:"mouseout"},kM=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function F5(t,e){return e&&`${e}::${R5++}`||t.uidEvent||R5++}function z5(t){const e=F5(t);return t.uidEvent=e,Yf[e]=Yf[e]||{},Yf[e]}function wM(t,e){return function n(r){return Qf(r,{delegateTarget:t}),n.oneOff&&de.off(t,r.type,e),e.apply(t,[r])}}function SM(t,e,n){return function r(o){const i=t.querySelectorAll(e);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(const c of i)if(c===s)return Qf(o,{delegateTarget:s}),r.oneOff&&de.off(t,o.type,e,n),n.apply(s,[o])}}function U5(t,e,n=null){return Object.values(t).find(r=>r.callable===e&&r.delegationSelector===n)}function H5(t,e,n){const r=typeof e=="string",o=r?n:e||n;let i=W5(t);return kM.has(i)||(i=t),[r,o,i]}function j5(t,e,n,r,o){if(typeof e!="string"||!t)return;let[i,s,c]=H5(e,n,r);e in $5&&(s=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(s));const a=z5(t),d=a[c]||(a[c]={}),u=U5(d,s,i?n:null);if(u){u.oneOff=u.oneOff&&o;return}const f=F5(s,e.replace(bM,"")),h=i?SM(t,n,s):wM(t,s);h.delegationSelector=i?n:null,h.callable=s,h.oneOff=o,h.uidEvent=f,d[f]=h,t.addEventListener(c,h,i)}function Gf(t,e,n,r,o){const i=U5(e[n],r,o);i&&(t.removeEventListener(n,i,!!o),delete e[n][i.uidEvent])}function AM(t,e,n,r){const o=e[n]||{};for(const[i,s]of Object.entries(o))i.includes(r)&&Gf(t,e,n,s.callable,s.delegationSelector)}function W5(t){return t=t.replace(CM,""),$5[t]||t}const de={on(t,e,n,r){j5(t,e,n,r,!1)},one(t,e,n,r){j5(t,e,n,r,!0)},off(t,e,n,r){if(typeof e!="string"||!t)return;const[o,i,s]=H5(e,n,r),c=s!==e,a=z5(t),d=a[s]||{},u=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(d).length)return;Gf(t,a,s,i,o?n:null);return}if(u)for(const f of Object.keys(a))AM(t,a,f,e.slice(1));for(const[f,h]of Object.entries(d)){const p=f.replace(EM,"");(!c||e.includes(p))&&Gf(t,a,s,h.callable,h.delegationSelector)}},trigger(t,e,n){if(typeof e!="string"||!t)return null;const r=P5(),o=W5(e),i=e!==o;let s=null,c=!0,a=!0,d=!1;i&&r&&(s=r.Event(e,n),r(t).trigger(s),c=!s.isPropagationStopped(),a=!s.isImmediatePropagationStopped(),d=s.isDefaultPrevented());const u=Qf(new Event(e,{bubbles:c,cancelable:!0}),n);return d&&u.preventDefault(),a&&t.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function Qf(t,e={}){for(const[n,r]of Object.entries(e))try{t[n]=r}catch{Object.defineProperty(t,n,{configurable:!0,get(){return r}})}return t}function K5(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function Zf(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const lr={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${Zf(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Zf(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of n){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),e[o]=K5(t.dataset[r])}return e},getDataAttribute(t,e){return K5(t.getAttribute(`data-bs-${Zf(e)}`))}};class Ws{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,n){const r=ar(n)?lr.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...ar(n)?lr.getDataAttributes(n):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,n=this.constructor.DefaultType){for(const[r,o]of Object.entries(n)){const i=e[r],s=ar(i)?"element":mM(i);if(!new RegExp(o).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`)}}}const xM="5.3.8";class An extends Ws{constructor(e,n){super(),e=Hr(e),e&&(this._element=e,this._config=this._getConfig(n),Hf.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Hf.remove(this._element,this.constructor.DATA_KEY),de.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,n,r=!0){B5(e,n,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Hf.get(Hr(e),this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return xM}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Jf=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e?e.split(",").map(n=>M5(n)).join(","):null},Ae={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(n=>n.matches(e))},parents(t,e){const n=[];let r=t.parentNode.closest(e);for(;r;)n.push(r),r=r.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(n=>!jr(n)&&pi(n))},getSelectorFromElement(t){const e=Jf(t);return e&&Ae.findOne(e)?e:null},getElementFromSelector(t){const e=Jf(t);return e?Ae.findOne(e):null},getMultipleElementsFromSelector(t){const e=Jf(t);return e?Ae.find(e):[]}},ac=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;de.on(document,n,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),jr(this))return;const i=Ae.getElementFromSelector(this)||this.closest(`.${r}`);t.getOrCreateInstance(i)[e]()})},TM="alert",Y5=".bs.alert",IM=`close${Y5}`,_M=`closed${Y5}`,NM="fade",OM="show";class lc extends An{static get NAME(){return TM}close(){if(de.trigger(this._element,IM).defaultPrevented)return;this._element.classList.remove(OM);const n=this._element.classList.contains(NM);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),de.trigger(this._element,_M),this.dispose()}static jQueryInterface(e){return this.each(function(){const n=lc.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}ac(lc,"close"),fn(lc);const MM="button",LM=".bs.button",DM=".data-api",PM="active",G5='[data-bs-toggle="button"]',BM=`click${LM}${DM}`;class cc extends An{static get NAME(){return MM}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(PM))}static jQueryInterface(e){return this.each(function(){const n=cc.getOrCreateInstance(this);e==="toggle"&&n[e]()})}}de.on(document,BM,G5,t=>{t.preventDefault();const e=t.target.closest(G5);cc.getOrCreateInstance(e).toggle()}),fn(cc);const RM="swipe",mi=".bs.swipe",$M=`touchstart${mi}`,FM=`touchmove${mi}`,zM=`touchend${mi}`,UM=`pointerdown${mi}`,HM=`pointerup${mi}`,jM="touch",WM="pen",KM="pointer-event",YM=40,GM={endCallback:null,leftCallback:null,rightCallback:null},QM={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class dc extends Ws{constructor(e,n){super(),this._element=e,!(!e||!dc.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return GM}static get DefaultType(){return QM}static get NAME(){return RM}dispose(){de.off(this._element,mi)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Qt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=YM)return;const n=e/this._deltaX;this._deltaX=0,n&&Qt(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(de.on(this._element,UM,e=>this._start(e)),de.on(this._element,HM,e=>this._end(e)),this._element.classList.add(KM)):(de.on(this._element,$M,e=>this._start(e)),de.on(this._element,FM,e=>this._move(e)),de.on(this._element,zM,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===WM||e.pointerType===jM)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ZM="carousel",Wr=".bs.carousel",Q5=".data-api",JM="ArrowLeft",XM="ArrowRight",qM=500,Ks="next",gi="prev",vi="left",uc="right",VM=`slide${Wr}`,Xf=`slid${Wr}`,eL=`keydown${Wr}`,tL=`mouseenter${Wr}`,nL=`mouseleave${Wr}`,rL=`dragstart${Wr}`,oL=`load${Wr}${Q5}`,iL=`click${Wr}${Q5}`,Z5="carousel",fc="active",sL="slide",aL="carousel-item-end",lL="carousel-item-start",cL="carousel-item-next",dL="carousel-item-prev",J5=".active",X5=".carousel-item",uL=J5+X5,fL=".carousel-item img",hL=".carousel-indicators",pL="[data-bs-slide], [data-bs-slide-to]",mL='[data-bs-ride="carousel"]',gL={[JM]:uc,[XM]:vi},vL={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},yL={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ys extends An{constructor(e,n){super(e,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ae.findOne(hL,this._element),this._addEventListeners(),this._config.ride===Z5&&this.cycle()}static get Default(){return vL}static get DefaultType(){return yL}static get NAME(){return ZM}next(){this._slide(Ks)}nextWhenVisible(){!document.hidden&&pi(this._element)&&this.next()}prev(){this._slide(gi)}pause(){this._isSliding&&L5(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){de.one(this._element,Xf,()=>this.cycle());return}this.cycle()}}to(e){const n=this._getItems();if(e>n.length-1||e<0)return;if(this._isSliding){de.one(this._element,Xf,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?Ks:gi;this._slide(o,n[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&de.on(this._element,eL,e=>this._keydown(e)),this._config.pause==="hover"&&(de.on(this._element,tL,()=>this.pause()),de.on(this._element,nL,()=>this._maybeEnableCycle())),this._config.touch&&dc.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ae.find(fL,this._element))de.on(r,rL,o=>o.preventDefault());const n={leftCallback:()=>this._slide(this._directionToOrder(vi)),rightCallback:()=>this._slide(this._directionToOrder(uc)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),qM+this._config.interval))}};this._swipeHelper=new dc(this._element,n)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const n=gL[e.key];n&&(e.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const n=Ae.findOne(J5,this._indicatorsElement);n.classList.remove(fc),n.removeAttribute("aria-current");const r=Ae.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(fc),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const n=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(e,n=null){if(this._isSliding)return;const r=this._getActive(),o=e===Ks,i=n||Kf(this._getItems(),r,o,this._config.wrap);if(i===r)return;const s=this._getItemIndex(i),c=p=>de.trigger(this._element,p,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:s});if(c(VM).defaultPrevented||!r||!i)return;const d=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=i;const u=o?lL:aL,f=o?cL:dL;i.classList.add(f),js(i),r.classList.add(u),i.classList.add(u);const h=()=>{i.classList.remove(u,f),i.classList.add(fc),r.classList.remove(fc,f,u),this._isSliding=!1,c(Xf)};this._queueCallback(h,r,this._isAnimated()),d&&this.cycle()}_isAnimated(){return this._element.classList.contains(sL)}_getActive(){return Ae.findOne(uL,this._element)}_getItems(){return Ae.find(X5,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return un()?e===vi?gi:Ks:e===vi?Ks:gi}_orderToDirection(e){return un()?e===gi?vi:uc:e===gi?uc:vi}static jQueryInterface(e){return this.each(function(){const n=Ys.getOrCreateInstance(this,e);if(typeof e=="number"){n.to(e);return}if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,iL,pL,function(t){const e=Ae.getElementFromSelector(this);if(!e||!e.classList.contains(Z5))return;t.preventDefault();const n=Ys.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){n.to(r),n._maybeEnableCycle();return}if(lr.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()}),de.on(window,oL,()=>{const t=Ae.find(mL);for(const e of t)Ys.getOrCreateInstance(e)}),fn(Ys);const bL="collapse",Gs=".bs.collapse",CL=".data-api",EL=`show${Gs}`,kL=`shown${Gs}`,wL=`hide${Gs}`,SL=`hidden${Gs}`,AL=`click${Gs}${CL}`,qf="show",yi="collapse",hc="collapsing",xL="collapsed",TL=`:scope .${yi} .${yi}`,IL="collapse-horizontal",_L="width",NL="height",OL=".collapse.show, .collapse.collapsing",Vf='[data-bs-toggle="collapse"]',ML={parent:null,toggle:!0},LL={parent:"(null|element)",toggle:"boolean"};class Qs extends An{constructor(e,n){super(e,n),this._isTransitioning=!1,this._triggerArray=[];const r=Ae.find(Vf);for(const o of r){const i=Ae.getSelectorFromElement(o),s=Ae.find(i).filter(c=>c===this._element);i!==null&&s.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ML}static get DefaultType(){return LL}static get NAME(){return bL}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(OL).filter(c=>c!==this._element).map(c=>Qs.getOrCreateInstance(c,{toggle:!1}))),e.length&&e[0]._isTransitioning||de.trigger(this._element,EL).defaultPrevented)return;for(const c of e)c.hide();const r=this._getDimension();this._element.classList.remove(yi),this._element.classList.add(hc),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(hc),this._element.classList.add(yi,qf),this._element.style[r]="",de.trigger(this._element,kL)},s=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||de.trigger(this._element,wL).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,js(this._element),this._element.classList.add(hc),this._element.classList.remove(yi,qf);for(const o of this._triggerArray){const i=Ae.getElementFromSelector(o);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(hc),this._element.classList.add(yi),de.trigger(this._element,SL)};this._element.style[n]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(qf)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Hr(e.parent),e}_getDimension(){return this._element.classList.contains(IL)?_L:NL}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Vf);for(const n of e){const r=Ae.getElementFromSelector(n);r&&this._addAriaAndCollapsedClass([n],this._isShown(r))}}_getFirstLevelChildren(e){const n=Ae.find(TL,this._config.parent);return Ae.find(e,this._config.parent).filter(r=>!n.includes(r))}_addAriaAndCollapsedClass(e,n){if(e.length)for(const r of e)r.classList.toggle(xL,!n),r.setAttribute("aria-expanded",n)}static jQueryInterface(e){const n={};return typeof e=="string"&&/show|hide/.test(e)&&(n.toggle=!1),this.each(function(){const r=Qs.getOrCreateInstance(this,n);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}de.on(document,AL,Vf,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of Ae.getMultipleElementsFromSelector(this))Qs.getOrCreateInstance(e,{toggle:!1}).toggle()}),fn(Qs);const q5="dropdown",Io=".bs.dropdown",eh=".data-api",DL="Escape",V5="Tab",PL="ArrowUp",ey="ArrowDown",BL=2,RL=`hide${Io}`,$L=`hidden${Io}`,FL=`show${Io}`,zL=`shown${Io}`,ty=`click${Io}${eh}`,ny=`keydown${Io}${eh}`,UL=`keyup${Io}${eh}`,bi="show",HL="dropup",jL="dropend",WL="dropstart",KL="dropup-center",YL="dropdown-center",_o='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',GL=`${_o}.${bi}`,pc=".dropdown-menu",QL=".navbar",ZL=".navbar-nav",JL=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",XL=un()?"top-end":"top-start",qL=un()?"top-start":"top-end",VL=un()?"bottom-end":"bottom-start",eD=un()?"bottom-start":"bottom-end",tD=un()?"left-start":"right-start",nD=un()?"right-start":"left-start",rD="top",oD="bottom",iD={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},sD={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Un extends An{constructor(e,n){super(e,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Ae.next(this._element,pc)[0]||Ae.prev(this._element,pc)[0]||Ae.findOne(pc,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return iD}static get DefaultType(){return sD}static get NAME(){return q5}toggle(){return this._isShown()?this.hide():this.show()}show(){if(jr(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!de.trigger(this._element,FL,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(ZL))for(const r of[].concat(...document.body.children))de.on(r,"mouseover",sc);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(bi),this._element.classList.add(bi),de.trigger(this._element,zL,e)}}hide(){if(jr(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!de.trigger(this._element,RL,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))de.off(r,"mouseover",sc);this._popper&&this._popper.destroy(),this._menu.classList.remove(bi),this._element.classList.remove(bi),this._element.setAttribute("aria-expanded","false"),lr.removeDataAttribute(this._menu,"popper"),de.trigger(this._element,$L,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!ar(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${q5.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof O5>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:ar(this._config.reference)?e=Hr(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=Uf(e,this._menu,n)}_isShown(){return this._menu.classList.contains(bi)}_getPlacement(){const e=this._parent;if(e.classList.contains(jL))return tD;if(e.classList.contains(WL))return nD;if(e.classList.contains(KL))return rD;if(e.classList.contains(YL))return oD;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(HL)?n?qL:XL:n?eD:VL}_detectNavbar(){return this._element.closest(QL)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(lr.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Qt(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:n}){const r=Ae.find(JL,this._menu).filter(o=>pi(o));r.length&&Kf(r,n,e===ey,!r.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const n=Un.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}static clearMenus(e){if(e.button===BL||e.type==="keyup"&&e.key!==V5)return;const n=Ae.find(GL);for(const r of n){const o=Un.getInstance(r);if(!o||o._config.autoClose===!1)continue;const i=e.composedPath(),s=i.includes(o._menu);if(i.includes(o._element)||o._config.autoClose==="inside"&&!s||o._config.autoClose==="outside"&&s||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===V5||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const c={relatedTarget:o._element};e.type==="click"&&(c.clickEvent=e),o._completeHide(c)}}static dataApiKeydownHandler(e){const n=/input|textarea/i.test(e.target.tagName),r=e.key===DL,o=[PL,ey].includes(e.key);if(!o&&!r||n&&!r)return;e.preventDefault();const i=this.matches(_o)?this:Ae.prev(this,_o)[0]||Ae.next(this,_o)[0]||Ae.findOne(_o,e.delegateTarget.parentNode),s=Un.getOrCreateInstance(i);if(o){e.stopPropagation(),s.show(),s._selectMenuItem(e);return}s._isShown()&&(e.stopPropagation(),s.hide(),i.focus())}}de.on(document,ny,_o,Un.dataApiKeydownHandler),de.on(document,ny,pc,Un.dataApiKeydownHandler),de.on(document,ty,Un.clearMenus),de.on(document,UL,Un.clearMenus),de.on(document,ty,_o,function(t){t.preventDefault(),Un.getOrCreateInstance(this).toggle()}),fn(Un);const ry="backdrop",aD="fade",oy="show",iy=`mousedown.bs.${ry}`,lD={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},cD={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class sy extends Ws{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return lD}static get DefaultType(){return cD}static get NAME(){return ry}show(e){if(!this._config.isVisible){Qt(e);return}this._append();const n=this._getElement();this._config.isAnimated&&js(n),n.classList.add(oy),this._emulateAnimation(()=>{Qt(e)})}hide(e){if(!this._config.isVisible){Qt(e);return}this._getElement().classList.remove(oy),this._emulateAnimation(()=>{this.dispose(),Qt(e)})}dispose(){this._isAppended&&(de.off(this._element,iy),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(aD),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Hr(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),de.on(e,iy,()=>{Qt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){B5(e,this._getElement(),this._config.isAnimated)}}const dD="focustrap",mc=".bs.focustrap",uD=`focusin${mc}`,fD=`keydown.tab${mc}`,hD="Tab",pD="forward",ay="backward",mD={autofocus:!0,trapElement:null},gD={autofocus:"boolean",trapElement:"element"};class ly extends Ws{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return mD}static get DefaultType(){return gD}static get NAME(){return dD}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),de.off(document,mc),de.on(document,uD,e=>this._handleFocusin(e)),de.on(document,fD,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,de.off(document,mc))}_handleFocusin(e){const{trapElement:n}=this._config;if(e.target===document||e.target===n||n.contains(e.target))return;const r=Ae.focusableChildren(n);r.length===0?n.focus():this._lastTabNavDirection===ay?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===hD&&(this._lastTabNavDirection=e.shiftKey?ay:pD)}}const cy=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dy=".sticky-top",gc="padding-right",uy="margin-right";class th{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,gc,n=>n+e),this._setElementAttributes(cy,gc,n=>n+e),this._setElementAttributes(dy,uy,n=>n-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,gc),this._resetElementAttributes(cy,gc),this._resetElementAttributes(dy,uy)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,r){const o=this.getWidth(),i=s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+o)return;this._saveInitialAttribute(s,n);const c=window.getComputedStyle(s).getPropertyValue(n);s.style.setProperty(n,`${r(Number.parseFloat(c))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,n){const r=e.style.getPropertyValue(n);r&&lr.setDataAttribute(e,n,r)}_resetElementAttributes(e,n){const r=o=>{const i=lr.getDataAttribute(o,n);if(i===null){o.style.removeProperty(n);return}lr.removeDataAttribute(o,n),o.style.setProperty(n,i)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,n){if(ar(e)){n(e);return}for(const r of Ae.find(e,this._element))n(r)}}const vD="modal",hn=".bs.modal",yD=".data-api",bD="Escape",CD=`hide${hn}`,ED=`hidePrevented${hn}`,fy=`hidden${hn}`,hy=`show${hn}`,kD=`shown${hn}`,wD=`resize${hn}`,SD=`click.dismiss${hn}`,AD=`mousedown.dismiss${hn}`,xD=`keydown.dismiss${hn}`,TD=`click${hn}${yD}`,py="modal-open",ID="fade",my="show",nh="modal-static",_D=".modal.show",ND=".modal-dialog",OD=".modal-body",MD='[data-bs-toggle="modal"]',LD={backdrop:!0,focus:!0,keyboard:!0},DD={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Kr extends An{constructor(e,n){super(e,n),this._dialog=Ae.findOne(ND,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new th,this._addEventListeners()}static get Default(){return LD}static get DefaultType(){return DD}static get NAME(){return vD}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||de.trigger(this._element,hy,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(py),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||de.trigger(this._element,CD).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(my),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){de.off(window,hn),de.off(this._dialog,hn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new sy({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ly({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Ae.findOne(OD,this._dialog);n&&(n.scrollTop=0),js(this._element),this._element.classList.add(my);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,de.trigger(this._element,kD,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){de.on(this._element,xD,e=>{if(e.key===bD){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),de.on(window,wD,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),de.on(this._element,AD,e=>{de.one(this._element,SD,n=>{if(!(this._element!==e.target||this._element!==n.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(py),this._resetAdjustments(),this._scrollBar.reset(),de.trigger(this._element,fy)})}_isAnimated(){return this._element.classList.contains(ID)}_triggerBackdropTransition(){if(de.trigger(this._element,ED).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(nh)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(nh),this._queueCallback(()=>{this._element.classList.remove(nh),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),r=n>0;if(r&&!e){const o=un()?"paddingLeft":"paddingRight";this._element.style[o]=`${n}px`}if(!r&&e){const o=un()?"paddingRight":"paddingLeft";this._element.style[o]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){const r=Kr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](n)}})}}de.on(document,TD,MD,function(t){const e=Ae.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),de.one(e,hy,o=>{o.defaultPrevented||de.one(e,fy,()=>{pi(this)&&this.focus()})});const n=Ae.findOne(_D);n&&Kr.getInstance(n).hide(),Kr.getOrCreateInstance(e).toggle(this)}),ac(Kr),fn(Kr);const PD="offcanvas",cr=".bs.offcanvas",gy=".data-api",BD=`load${cr}${gy}`,RD="Escape",vy="show",yy="showing",by="hiding",$D="offcanvas-backdrop",Cy=".offcanvas.show",FD=`show${cr}`,zD=`shown${cr}`,UD=`hide${cr}`,Ey=`hidePrevented${cr}`,ky=`hidden${cr}`,HD=`resize${cr}`,jD=`click${cr}${gy}`,WD=`keydown.dismiss${cr}`,KD='[data-bs-toggle="offcanvas"]',YD={backdrop:!0,keyboard:!0,scroll:!1},GD={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Yr extends An{constructor(e,n){super(e,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return YD}static get DefaultType(){return GD}static get NAME(){return PD}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||de.trigger(this._element,FD,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new th().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(yy);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(vy),this._element.classList.remove(yy),de.trigger(this._element,zD,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||de.trigger(this._element,UD).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(by),this._backdrop.hide();const n=()=>{this._element.classList.remove(vy,by),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new th().reset(),de.trigger(this._element,ky)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){de.trigger(this._element,Ey);return}this.hide()},n=!!this._config.backdrop;return new sy({className:$D,isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?e:null})}_initializeFocusTrap(){return new ly({trapElement:this._element})}_addEventListeners(){de.on(this._element,WD,e=>{if(e.key===RD){if(this._config.keyboard){this.hide();return}de.trigger(this._element,Ey)}})}static jQueryInterface(e){return this.each(function(){const n=Yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}de.on(document,jD,KD,function(t){const e=Ae.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),jr(this))return;de.one(e,ky,()=>{pi(this)&&this.focus()});const n=Ae.findOne(Cy);n&&n!==e&&Yr.getInstance(n).hide(),Yr.getOrCreateInstance(e).toggle(this)}),de.on(window,BD,()=>{for(const t of Ae.find(Cy))Yr.getOrCreateInstance(t).show()}),de.on(window,HD,()=>{for(const t of Ae.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Yr.getOrCreateInstance(t).hide()}),ac(Yr),fn(Yr);const wy={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},QD=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ZD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,JD=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?QD.has(n)?!!ZD.test(t.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(n))};function XD(t,e,n){if(!t.length)return t;if(n&&typeof n=="function")return n(t);const o=new window.DOMParser().parseFromString(t,"text/html"),i=[].concat(...o.body.querySelectorAll("*"));for(const s of i){const c=s.nodeName.toLowerCase();if(!Object.keys(e).includes(c)){s.remove();continue}const a=[].concat(...s.attributes),d=[].concat(e["*"]||[],e[c]||[]);for(const u of a)JD(u,d)||s.removeAttribute(u.nodeName)}return o.body.innerHTML}const qD="TemplateFactory",VD={allowList:wy,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},eP={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},tP={entry:"(string|element|function|null)",selector:"(string|element)"};class nP extends Ws{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return VD}static get DefaultType(){return eP}static get NAME(){return qD}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[o,i]of Object.entries(this._config.content))this._setContent(e,i,o);const n=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&n.classList.add(...r.split(" ")),n}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[n,r]of Object.entries(e))super._typeCheckConfig({selector:n,entry:r},tP)}_setContent(e,n,r){const o=Ae.findOne(r,e);if(o){if(n=this._resolvePossibleFunction(n),!n){o.remove();return}if(ar(n)){this._putElementInTemplate(Hr(n),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(n);return}o.textContent=n}}_maybeSanitize(e){return this._config.sanitize?XD(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Qt(e,[void 0,this])}_putElementInTemplate(e,n){if(this._config.html){n.innerHTML="",n.append(e);return}n.textContent=e.textContent}}const rP="tooltip",oP=new Set(["sanitize","allowList","sanitizeFn"]),rh="fade",iP="modal",vc="show",sP=".tooltip-inner",Sy=`.${iP}`,Ay="hide.bs.modal",Zs="hover",oh="focus",ih="click",aP="manual",lP="hide",cP="hidden",dP="show",uP="shown",fP="inserted",hP="click",pP="focusin",mP="focusout",gP="mouseenter",vP="mouseleave",yP={AUTO:"auto",TOP:"top",RIGHT:un()?"left":"right",BOTTOM:"bottom",LEFT:un()?"right":"left"},bP={allowList:wy,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},CP={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Hn extends An{constructor(e,n){if(typeof O5>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return bP}static get DefaultType(){return CP}static get NAME(){return rP}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),de.off(this._element.closest(Sy),Ay,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=de.trigger(this._element,this.constructor.eventName(dP)),r=(D5(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(o),de.trigger(this._element,this.constructor.eventName(fP))),this._popper=this._createPopper(o),o.classList.add(vc),"ontouchstart"in document.documentElement)for(const c of[].concat(...document.body.children))de.on(c,"mouseover",sc);const s=()=>{de.trigger(this._element,this.constructor.eventName(uP)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown()||de.trigger(this._element,this.constructor.eventName(lP)).defaultPrevented)return;if(this._getTipElement().classList.remove(vc),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))de.off(o,"mouseover",sc);this._activeTrigger[ih]=!1,this._activeTrigger[oh]=!1,this._activeTrigger[Zs]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),de.trigger(this._element,this.constructor.eventName(cP)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const n=this._getTemplateFactory(e).toHtml();if(!n)return null;n.classList.remove(rh,vc),n.classList.add(`bs-${this.constructor.NAME}-auto`);const r=gM(this.constructor.NAME).toString();return n.setAttribute("id",r),this._isAnimated()&&n.classList.add(rh),n}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new nP({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[sP]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(rh)}_isShown(){return this.tip&&this.tip.classList.contains(vc)}_createPopper(e){const n=Qt(this._config.placement,[this,e,this._element]),r=yP[n.toUpperCase()];return Uf(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_resolvePossibleFunction(e){return Qt(e,[this._element,this._element])}_getPopperConfig(e){const n={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...n,...Qt(this._config.popperConfig,[void 0,n])}}_setListeners(){const e=this._config.trigger.split(" ");for(const n of e)if(n==="click")de.on(this._element,this.constructor.eventName(hP),this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[ih]=!(o._isShown()&&o._activeTrigger[ih]),o.toggle()});else if(n!==aP){const r=n===Zs?this.constructor.eventName(gP):this.constructor.eventName(pP),o=n===Zs?this.constructor.eventName(vP):this.constructor.eventName(mP);de.on(this._element,r,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusin"?oh:Zs]=!0,s._enter()}),de.on(this._element,o,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusout"?oh:Zs]=s._element.contains(i.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},de.on(this._element.closest(Sy),Ay,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,n){clearTimeout(this._timeout),this._timeout=setTimeout(e,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const n=lr.getDataAttributes(this._element);for(const r of Object.keys(n))oP.has(r)&&delete n[r];return e={...n,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Hr(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[n,r]of Object.entries(this._config))this.constructor.Default[n]!==r&&(e[n]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const n=Hn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}fn(Hn);const EP="popover",kP=".popover-header",wP=".popover-body",SP={...Hn.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},AP={...Hn.DefaultType,content:"(null|string|element|function)"};class No extends Hn{static get Default(){return SP}static get DefaultType(){return AP}static get NAME(){return EP}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kP]:this._getTitle(),[wP]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const n=No.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}fn(No);const xP="scrollspy",sh=".bs.scrollspy",TP=".data-api",IP=`activate${sh}`,xy=`click${sh}`,_P=`load${sh}${TP}`,NP="dropdown-item",Ci="active",OP='[data-bs-spy="scroll"]',ah="[href]",MP=".nav, .list-group",Ty=".nav-link",LP=`${Ty}, .nav-item > ${Ty}, .list-group-item`,DP=".dropdown",PP=".dropdown-toggle",BP={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},RP={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yc extends An{constructor(e,n){super(e,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return BP}static get DefaultType(){return RP}static get NAME(){return xP}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Hr(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(n=>Number.parseFloat(n))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(de.off(this._config.target,xy),de.on(this._config.target,xy,ah,e=>{const n=this._observableSections.get(e.target.hash);if(n){e.preventDefault();const r=this._rootElement||window,o=n.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:o,behavior:"smooth"});return}r.scrollTop=o}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),e)}_observerCallback(e){const n=s=>this._targetLinks.get(`#${s.target.id}`),r=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(n(s))},o=(this._rootElement||document.documentElement).scrollTop,i=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(s));continue}const c=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&c){if(r(s),!o)return;continue}!i&&!c&&r(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ae.find(ah,this._config.target);for(const n of e){if(!n.hash||jr(n))continue;const r=Ae.findOne(decodeURI(n.hash),this._element);pi(r)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Ci),this._activateParents(e),de.trigger(this._element,IP,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(NP)){Ae.findOne(PP,e.closest(DP)).classList.add(Ci);return}for(const n of Ae.parents(e,MP))for(const r of Ae.prev(n,LP))r.classList.add(Ci)}_clearActiveClass(e){e.classList.remove(Ci);const n=Ae.find(`${ah}.${Ci}`,e);for(const r of n)r.classList.remove(Ci)}static jQueryInterface(e){return this.each(function(){const n=yc.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(window,_P,()=>{for(const t of Ae.find(OP))yc.getOrCreateInstance(t)}),fn(yc);const $P="tab",Oo=".bs.tab",FP=`hide${Oo}`,zP=`hidden${Oo}`,UP=`show${Oo}`,HP=`shown${Oo}`,jP=`click${Oo}`,WP=`keydown${Oo}`,KP=`load${Oo}`,YP="ArrowLeft",Iy="ArrowRight",GP="ArrowUp",_y="ArrowDown",lh="Home",Ny="End",Mo="active",Oy="fade",ch="show",QP="dropdown",My=".dropdown-toggle",ZP=".dropdown-menu",dh=`:not(${My})`,JP='.list-group, .nav, [role="tablist"]',XP=".nav-item, .list-group-item",qP=`.nav-link${dh}, .list-group-item${dh}, [role="tab"]${dh}`,Ly='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',uh=`${qP}, ${Ly}`,VP=`.${Mo}[data-bs-toggle="tab"], .${Mo}[data-bs-toggle="pill"], .${Mo}[data-bs-toggle="list"]`;class Ei extends An{constructor(e){super(e),this._parent=this._element.closest(JP),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),de.on(this._element,WP,n=>this._keydown(n)))}static get NAME(){return $P}show(){const e=this._element;if(this._elemIsActive(e))return;const n=this._getActiveElem(),r=n?de.trigger(n,FP,{relatedTarget:e}):null;de.trigger(e,UP,{relatedTarget:n}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(n,e),this._activate(e,n))}_activate(e,n){if(!e)return;e.classList.add(Mo),this._activate(Ae.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(ch);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),de.trigger(e,HP,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(Oy))}_deactivate(e,n){if(!e)return;e.classList.remove(Mo),e.blur(),this._deactivate(Ae.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(ch);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),de.trigger(e,zP,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(Oy))}_keydown(e){if(![YP,Iy,GP,_y,lh,Ny].includes(e.key))return;e.stopPropagation(),e.preventDefault();const n=this._getChildren().filter(o=>!jr(o));let r;if([lh,Ny].includes(e.key))r=n[e.key===lh?0:n.length-1];else{const o=[Iy,_y].includes(e.key);r=Kf(n,e.target,o,!0)}r&&(r.focus({preventScroll:!0}),Ei.getOrCreateInstance(r).show())}_getChildren(){return Ae.find(uh,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,n){this._setAttributeIfNotExists(e,"role","tablist");for(const r of n)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const n=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",n),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),n||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const n=Ae.getElementFromSelector(e);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,n){const r=this._getOuterElement(e);if(!r.classList.contains(QP))return;const o=(i,s)=>{const c=Ae.findOne(i,r);c&&c.classList.toggle(s,n)};o(My,Mo),o(ZP,ch),r.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(e,n,r){e.hasAttribute(n)||e.setAttribute(n,r)}_elemIsActive(e){return e.classList.contains(Mo)}_getInnerElement(e){return e.matches(uh)?e:Ae.findOne(uh,e)}_getOuterElement(e){return e.closest(XP)||e}static jQueryInterface(e){return this.each(function(){const n=Ei.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,jP,Ly,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!jr(this)&&Ei.getOrCreateInstance(this).show()}),de.on(window,KP,()=>{for(const t of Ae.find(VP))Ei.getOrCreateInstance(t)}),fn(Ei);const eB="toast",Gr=".bs.toast",tB=`mouseover${Gr}`,nB=`mouseout${Gr}`,rB=`focusin${Gr}`,oB=`focusout${Gr}`,iB=`hide${Gr}`,sB=`hidden${Gr}`,aB=`show${Gr}`,lB=`shown${Gr}`,cB="fade",Dy="hide",bc="show",Cc="showing",dB={animation:"boolean",autohide:"boolean",delay:"number"},uB={animation:!0,autohide:!0,delay:5e3};class ki extends An{constructor(e,n){super(e,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return uB}static get DefaultType(){return dB}static get NAME(){return eB}show(){if(de.trigger(this._element,aB).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(cB);const n=()=>{this._element.classList.remove(Cc),de.trigger(this._element,lB),this._maybeScheduleHide()};this._element.classList.remove(Dy),js(this._element),this._element.classList.add(bc,Cc),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown()||de.trigger(this._element,iB).defaultPrevented)return;const n=()=>{this._element.classList.add(Dy),this._element.classList.remove(Cc,bc),de.trigger(this._element,sB)};this._element.classList.add(Cc),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(bc),super.dispose()}isShown(){return this._element.classList.contains(bc)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=n;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=n;break}}if(n){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){de.on(this._element,tB,e=>this._onInteraction(e,!0)),de.on(this._element,nB,e=>this._onInteraction(e,!1)),de.on(this._element,rB,e=>this._onInteraction(e,!0)),de.on(this._element,oB,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const n=ki.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}ac(ki),fn(ki);function Py(t,e){return e.value||t.getAttribute("title")||""}const Lo={mounted:(t,e)=>{const n=Py(t,e);n&&t.setAttribute("title",n),new Hn(t)},updated:(t,e)=>{const n=Hn.getInstance(t);n&&n.dispose();const r=Py(t,e);r&&t.setAttribute("title",r),new Hn(t)},unmounted:t=>{const e=Hn.getInstance(t);e&&e.dispose()}},fB={key:0,class:"pills-list__wrapper"},hB={class:"pills-list__ul"},pB={class:"bd-markdown-editor__menu-bottom"},mB={key:0,class:"vr"},By=l.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:[Boolean,null],default:null},variant:{default:_f.BASIC},files:{default:void 0},pills:{default:void 0},apiUrl:{default:""},modelValue:{}},emits:["update:modelValue","upload","action"],setup(t,{emit:e}){const n=t,r=e,o=()=>{r("upload")},i=Vr(n,"modelValue",r),s=[M_,P_,R_,ON.configure({placeholder:n.placeholder}),cO,dN.configure({openOnClick:!1,validate:Y=>/^(https?:\/\/|www\.)/i.test(Y)})];n.variant===_f.FULL&&s.push(RN,jN,KN,iO,sO,aO);const c=N_({content:i.value,extensions:s,onUpdate:({editor:Y})=>{const{view:z,state:U}=Y,{from:F,to:X}=z.state.selection;if(U.doc.textBetween(F-1,X,"")==" "&&Y.getAttributes("link").href!=null&&Y.chain().setTextSelection({from:F-1,to:X}).toggleLink({href:Y.getAttributes("link").href}).setTextSelection({from:X,to:X}).run(),Y.getText().trim()===""){r("update:modelValue","");return}r("update:modelValue",Y.getHTML())}});l.watch(()=>n.modelValue,Y=>{c.value.getHTML()!==Y&&c.value.commands.setContent(Y,!0,{preserveWhitespace:"full"})});const a=l.computed(()=>n.state===!1?"is-invalid":null),d=l.computed(()=>v("bold")),u=l.computed(()=>v("italic")),f=l.computed(()=>v("underline")),h=l.computed(()=>v("bulletList")),p=l.computed(()=>v("orderedList")),m=l.computed(()=>v("link")),g=l.computed(()=>n.variant===_f.FULL),v=Y=>c.value&&c.value.isActive(Y)?"active":null,y=l.computed(()=>n.files&&n.files.length>0?So(n.apiUrl,n.files,!1):null),b=l.computed(()=>n.files&&n.files.length>0?So(n.apiUrl,n.files,!0):null),E=Y=>{r("action",{name:"delete-attachment",obj:Y})},C=Y=>{r("action",{name:"image-attachment",obj:Y})},S=l.computed(()=>{if(!c.value)return!1;const{from:Y,to:z}=c.value.state.selection;return Y!==z}),_=l.computed(()=>S.value?"Voeg een link toe":"Selecteer eerst tekst"),T=l.ref(!1),D=l.ref(""),G=l.ref(null),$=()=>{D.value=c.value.getAttributes("link").href||"",T.value=!0},j=Y=>{if(T.value=!1,!Y){c.value.chain().focus().unsetLink().run();return}/^www\./i.test(Y)&&(Y=`https://${Y}`),c.value.chain().focus().toggleLink({href:Y}).run()},W=()=>{T.value=!1};return(Y,z)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:l.normalizeClass(["bd-markdown-editor",a.value])},[l.createVNode(l.unref(__),{editor:l.unref(c)},null,8,["editor"]),t.pills?(l.openBlock(),l.createElementBlock("div",fB,[l.createElementVNode("ul",hB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.pills,(U,F)=>(l.openBlock(),l.createElementBlock("li",{key:F,class:"pills-list__li"},[l.createVNode(_a,l.mergeProps({ref_for:!0},U),null,16)]))),128))])])):l.createCommentVNode("",!0),l.renderSlot(Y.$slots,"default"),y.value?(l.openBlock(),l.createBlock($s,{key:1,files:y.value,"no-download":!0,"show-delete":!0,onDelete:E},null,8,["files"])):l.createCommentVNode("",!0),b.value?(l.openBlock(),l.createBlock(Fs,{key:2,files:b.value,"no-download":!0,"show-delete":!0,"fast-download":!1,onDelete:E,onShow:C},null,8,["files"])):l.createCommentVNode("",!0),l.createElementVNode("div",pB,[l.createVNode(Re,{variant:"light",type:"button",onClick:o},{default:l.withCtx(()=>[l.createVNode(l.unref(hr))]),_:1}),g.value?(l.openBlock(),l.createElementBlock("div",mB)):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:1,variant:"light",type:"button",class:l.normalizeClass(d.value),onClick:z[0]||(z[0]=U=>l.unref(c).chain().focus().toggleBold().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Tc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:2,variant:"light",type:"button",class:l.normalizeClass(u.value),onClick:z[1]||(z[1]=U=>l.unref(c).chain().focus().toggleItalic().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Fc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:3,variant:"light",type:"button",class:l.normalizeClass(f.value),onClick:z[2]||(z[2]=U=>l.unref(c).chain().focus().toggleUnderline().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Yc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:4,variant:"light",type:"button",class:l.normalizeClass(h.value),onClick:z[3]||(z[3]=U=>l.unref(c).chain().focus().toggleBulletList().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Ic))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:5,variant:"light",type:"button",class:l.normalizeClass(p.value),onClick:z[4]||(z[4]=U=>l.unref(c).chain().focus().toggleOrderedList().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Uc))]),_:1},8,["class"])):l.createCommentVNode("",!0),l.withDirectives((l.openBlock(),l.createElementBlock("span",null,[g.value?(l.openBlock(),l.createBlock(Re,{key:0,ref_key:"linkButton",ref:G,variant:"light",type:"button",class:l.normalizeClass(m.value),onClick:$,disabled:!S.value},{default:l.withCtx(()=>[l.createVNode(l.unref(ra))]),_:1},8,["class","disabled"])):l.createCommentVNode("",!0)])),[[l.unref(Lo),_.value]])]),T.value?(l.openBlock(),l.createBlock(hO,{key:3,previousUrl:D.value,onSubmit:j,onCancel:W},null,8,["previousUrl"])):l.createCommentVNode("",!0)],2),l.createVNode(xa,{text:n.errorText,state:n.state},null,8,["text","state"])],64))}}),gB={class:"header"},vB={class:"icon-close-wrapper"},yB={class:"navbar"},bB={class:"nav navbar-nav w-100"},CB={class:"nav-item"},EB={class:"nav-item"},fh=l.defineComponent({__name:"BDMobileMenu",props:{active:{type:Boolean,default:void 0},options:{}},emits:["hide","signout"],setup(t,{emit:e}){const n=e,r=t,o=l.computed(()=>({active:r.active===!0,inactive:r.active===!1})),i=()=>n("hide"),s=()=>n("signout");return(c,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-mobile-menu",o.value])},[l.createElementVNode("div",gB,[a[0]||(a[0]=l.createElementVNode("div",null,"Menu",-1)),l.createElementVNode("div",vB,[l.createVNode(ta,{onClick:i})])]),l.createElementVNode("nav",yB,[l.createElementVNode("ul",bB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.options,d=>(l.openBlock(),l.createElementBlock("li",CB,[l.createVNode(Xr,l.mergeProps({class:"nav-link"},{ref_for:!0},d,{onClick:i}),null,16)]))),256)),l.renderSlot(c.$slots,"special-options"),l.createElementVNode("li",EB,[l.createVNode(Xr,{class:"nav-link",text:"Uitloggen",onClick:s})])])])],2))}}),kB={class:"bd-user"},wB={class:"bd-user__information"},SB={class:"text-break"},AB={class:"overflow-x-hidden"},Ry=l.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(t){const e=t,n=l.computed(()=>typeof e.details=="string"?e.details:e.details?.join(" • "));return(r,o)=>(l.openBlock(),l.createElementBlock("div",kB,[e.hideImage?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_i,l.mergeProps({key:0},e.img,{size:"sm"}),null,16)),l.createElementVNode("div",wB,[l.createElementVNode("header",null,[l.createElementVNode("h5",SB,l.toDisplayString(e.name),1),l.renderSlot(r.$slots,"header-extra")]),l.createElementVNode("span",AB,l.toDisplayString(n.value),1)])]))}}),xB={class:"bd-chat-cloud-card"},TB={class:"bd-chat-cloud-card__header"},IB={class:"bd-chat-cloud-card__body"},_B=["innerHTML"],NB={class:"bd-chat-cloud-card__footer"},OB={key:0,class:"pills-list__wrapper"},MB={class:"pills-list__ul"},$y=l.defineComponent({__name:"BDChatCloud",props:{headerTitle:{default:""},src:{default:void 0},username:{default:null},message:{default:""},isSender:{type:Boolean,default:!1},files:{default:void 0},pills:{default:void 0},apiUrl:{default:""}},emits:["show-attachment","action"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>n.isSender?"sender":Ne),i=l.computed(()=>So(n.apiUrl,n.files,!1)),s=l.computed(()=>So(n.apiUrl,n.files,!0)),c=()=>{r("action","copy-message")},a=d=>{r("show-attachment",d)};return(d,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-chat-cloud",o.value])},[l.createVNode(_i,{src:n.src,username:n.username,size:"sm"},null,8,["src","username"]),l.createElementVNode("div",xB,[l.createElementVNode("div",TB,[l.renderSlot(d.$slots,"header",{},()=>[l.createTextVNode(l.toDisplayString(t.headerTitle),1)]),l.createVNode(Re,{variant:"outline-primary-dark",size:"sm",onClick:c},{default:l.withCtx(()=>[...u[0]||(u[0]=[l.createTextVNode(" kopieer ",-1)])]),_:1})]),l.createElementVNode("div",IB,[l.renderSlot(d.$slots,"body",{},()=>[l.createElementVNode("div",{class:"bd-chat-cloud-card__message",innerHTML:n.message},null,8,_B)])]),l.createElementVNode("div",NB,[l.renderSlot(d.$slots,"footer",{},()=>[t.pills?(l.openBlock(),l.createElementBlock("div",OB,[l.createElementVNode("ul",MB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.pills,(f,h)=>(l.openBlock(),l.createElementBlock("li",{key:h,class:"pills-list__li"},[l.createVNode(_a,l.mergeProps({ref_for:!0},f),null,16)]))),128))])])):l.createCommentVNode("",!0),i.value&&i.value.length>0?(l.openBlock(),l.createBlock($s,{key:1,files:i.value},null,8,["files"])):l.createCommentVNode("",!0),s.value&&s.value.length>0?(l.openBlock(),l.createBlock(Fs,{key:2,"fast-download":!0,files:s.value,onShow:a},null,8,["files"])):l.createCommentVNode("",!0)])])])],2))}}),LB=l.defineComponent({__name:"BDTableSortHeader",props:["active","label","sortDesc"],emits:["sortAsc","sortDesc"],setup(t,{emit:e}){const n=t,r=e,o=l.ref(n.sortDesc),i=()=>{n.active&&(o.value=!o.value)},s=()=>{if(!n.active)return;const a=o.value?"sortDesc":"sortAsc";r(a)},c=l.computed(()=>({"bd-table-sort":!0,active:n.active}));return l.watch(()=>n.active,(a,d)=>{a&&!d&&(o.value=!1,r("sortAsc"))}),s(),(a,d)=>(l.openBlock(),l.createElementBlock("th",{class:l.normalizeClass(c.value),onClick:d[0]||(d[0]=u=>{i(),s()})},[l.createElementVNode("span",null,l.toDisplayString(n.label),1),n.active&&!o.value?(l.openBlock(),l.createBlock(l.unref(Hc),{key:0})):n.active&&o.value?(l.openBlock(),l.createBlock(l.unref(jc),{key:1})):(l.openBlock(),l.createBlock(l.unref(Wc),{key:2}))],2))}}),DB={class:"bd-table"},PB={key:0,class:"table"},BB={key:1},RB=["onClick"],$B={key:0},FB={key:1,class:"empty-text"},Fy=l.defineComponent({__name:"BDTable",props:["fields","items","sortBy","sortDesc","tbodyTrClass","emptyText"],emits:["row-click","sort-changed"],setup(t,{expose:e,emit:n}){const r=t,o=n,i=l.ref(r.items),s=l.ref(r.sortBy),c=h=>s.value=h,a=(h,p,m)=>{const g=p[h],v=m[h];if(g==null)return 1;if(v==null)return-1;const y=g.toString(),b=v.toString();return y.localeCompare(b,void 0,{numeric:!0})},d=h=>{i.value=i.value.sort((m,g)=>a(h,m,g)),o("sort-changed",{sortBy:h,sortDesc:!1})},u=h=>{i.value=i.value.sort((m,g)=>a(h,g,m)),o("sort-changed",{sortBy:h,sortDesc:!0})},f=()=>{i.value=r.items};return l.watch(()=>r.items,h=>{i.value=h}),e({Refresh:f}),(h,p)=>(l.openBlock(),l.createElementBlock("div",DB,[r.items&&r.items.length>0?(l.openBlock(),l.createElementBlock("table",PB,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.fields,m=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[m.isVisible?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[m.sortable?(l.openBlock(),l.createBlock(LB,{key:0,label:m.label,active:m.key==s.value,sortDesc:r.sortDesc,onClick:g=>c(m.key),onSortAsc:g=>d(m.key),onSortDesc:g=>u(m.key)},null,8,["label","active","sortDesc","onClick","onSortAsc","onSortDesc"])):(l.openBlock(),l.createElementBlock("th",BB,l.toDisplayString(m.label),1))],64)):l.createCommentVNode("",!0)],64))),256))])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,m=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(r.tbodyTrClass&&r.tbodyTrClass(m)),onClick:g=>o("row-click",m)},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.fields,g=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[g.isVisible?(l.openBlock(),l.createElementBlock("td",$B,[h.$slots.hasOwnProperty(g.key)?l.renderSlot(h.$slots,g.key,{key:0,row:m,item:m,value:m[g.key]}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(m[g.key]),1)],64))])):l.createCommentVNode("",!0)],64))),256))],10,RB))),256))])])):(l.openBlock(),l.createElementBlock("p",FB,l.toDisplayString(r.emptyText),1))]))}}),zB=["id"],UB={key:0,class:"toast-body__title"},HB={class:"actions"},jB=["textContent"],WB=["textContent"],KB={class:"icon-wrapper"},YB=["textContent"],GB=["textContent"],zy=3e4,Uy=5e3,Hy=l.defineComponent({__name:"BDVideoCallToast",props:{id:{},contactInfoReceiver:{},isSender:{type:Boolean},firstNameSender:{},canceled:{type:Boolean},disabled:{type:Boolean},localization:{}},emits:["reject-video-call","accept-video-call"],setup(t,{emit:e}){const n=t,r=e;let o=l.ref(!1),i=l.ref(!1),s=null,c=null;const a=l.computed(()=>{let E="video-call-toast";return n.id&&(E+=`-${n.id}`),E}),d=l.computed(()=>o.value?[o.value?"is-handled":Ne,i.value?"is-handled--success":Ne,n.canceled?"is-handled--canceled":Ne].join(" "):Ne),u=l.computed(()=>n.canceled?n.localization.videoCallCanceled:i.value?n.localization.videoCallAccepted:n.localization.videoCallRejected),f=l.computed(()=>n.canceled?`${n.firstNameSender}${n.localization.notifyCallerWhenCanceled}`:n.isSender?n.contactInfoReceiver?`${n.contactInfoReceiver.name}${n.localization.notifyCallerWhenRejected}`:n.localization.notifyCallerWhenRejected:i.value?n.localization.openNewTabWhenAccepted:`${n.localization.notifyReceiverWhenRejected.start}${n.firstNameSender}${n.localization.notifyReceiverWhenRejected.end}`.replace(/\s\s+/g," "));l.watch(()=>n.canceled,()=>{o.value=!0});const h=()=>{const E=a.value,C=document.querySelector(`#${E}`);if(C){C.addEventListener("hide.bs.toast",b);var S={autohide:!0,delay:zy+Uy};c=ki.getOrCreateInstance(C,S),c.show(),s=window.setTimeout(p,zy)}};l.onMounted(h);const p=()=>{o.value||g()},m=()=>{g(),y()},g=()=>{o.value||(o.value=!0,r("reject-video-call",n.id))},v=()=>{o.value=!0,i.value=!0,r("accept-video-call",n.id),y()},y=()=>{window.clearTimeout(s),window.setTimeout(()=>c.hide(),Uy)},b=()=>{o.value=!1,i.value=!1};return(E,C)=>(l.openBlock(),l.createElementBlock("div",{id:a.value,class:"toast bd-video-call-toast",role:"alert","aria-live":"assertive","aria-atomic":"true"},[l.unref(o)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",UB,l.toDisplayString(n.localization.incomingVideoCall),1)),l.createElementVNode("div",{class:l.normalizeClass(["toast-body__main",d.value])},[l.unref(o)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",KB,[l.createVNode(Vs)]),l.createElementVNode("div",null,[l.createElementVNode("p",{textContent:l.toDisplayString(u.value),class:"title"},null,8,YB),l.createElementVNode("p",{textContent:l.toDisplayString(f.value)},null,8,GB)])],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Fd,{value:t.contactInfoReceiver},null,8,["value"]),l.createElementVNode("div",HB,[l.createVNode(Re,{variant:"danger",class:"text-center",onClick:m},{default:l.withCtx(()=>[l.createVNode(_c),l.createElementVNode("span",{textContent:l.toDisplayString(n.localization.rejectVideoCall)},null,8,jB)]),_:1}),l.createVNode(Re,{variant:"success",class:"text-center",onClick:v},{default:l.withCtx(()=>[l.createVNode(Vs),l.createElementVNode("span",{textContent:l.toDisplayString(n.localization.acceptVideoCall)},null,8,WB)]),_:1})])],64))],2)],8,zB))}}),hh=l.defineComponent({__name:"BDDropdown",props:{size:{default:at.MD},variant:{default:ia.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(t){const e=t,{uniqueIdentifier:n}=Fo(),r=`__BD__DROPDOWN__${n.value}`,o=l.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=l.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=l.computed(()=>({"aria-labelledby":r})),c=l.ref(),a=l.ref(),d=()=>{c.value.classList.remove("show"),a.value.classList.remove("show"),a.value.removeAttribute("aria-expanded")};return(u,f)=>(l.openBlock(),l.createElementBlock("div",{class:"bd-dropdown dropdown",onClick:f[0]||(f[0]=l.withModifiers(()=>{},["stop"]))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.toggleTag),l.mergeProps({ref_key:"dropdownToggle",ref:a,class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(e.text),1)]),_:1},16)),l.createElementVNode("ul",l.mergeProps({ref_key:"dropdownMenu",ref:c,class:["dropdown-menu",i.value]},s.value,{onClick:d}),[l.renderSlot(u.$slots,"default")],16)]))}}),QB={class:"row bd-header"},ZB={class:"col logo-mix"},JB=["src"],XB={key:1,class:"col header-options"},qB={class:"col bd-btn-settings"},VB={key:2},ph=l.defineComponent({__name:"BDHeader",props:{isEmbedded:{type:Boolean},dropdownMenuTitle:{},dropdownOptions:{},headerOptions:{},profileImageSrc:{},profileImageAlt:{},organizationLogoSrc:{},hasLogoutOption:{type:Boolean,default:!0}},emits:["click-logo","signout"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>{let f=[];return n.isEmbedded||(n.headerOptions&&(f=f.concat(n.headerOptions)),n.dropdownOptions&&(f=f.concat(n.dropdownOptions))),f}),i=l.computed(()=>!n.isEmbedded&&n.headerOptions&&n.headerOptions.length!==0),s=l.ref(void 0),c=()=>{n.isEmbedded||r("click-logo")},a=()=>r("signout"),d=()=>s.value=!0,u=()=>s.value=!1;return(f,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("nav",QB,[l.createElementVNode("div",ZB,[l.createVNode(Sc,{viewBox:"0 0 351 61",class:"logo bd-logo",onClick:c}),n.organizationLogoSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"logo organization-logo",src:n.organizationLogoSrc,alt:""},null,8,JB)):l.createCommentVNode("",!0)]),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"col bd-hamburger",onClick:d},[h[0]||(h[0]=l.createElementVNode("div",null,"Menu",-1)),l.createVNode(zc)])),i.value?(l.openBlock(),l.createElementBlock("div",XB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.headerOptions,p=>(l.openBlock(),l.createBlock(Re,{class:"btn-header",to:p.to,variant:"neutral"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(p.text),1)]),_:2},1032,["to"]))),256))])):l.createCommentVNode("",!0),l.createElementVNode("div",qB,[n.isEmbedded?l.createCommentVNode("",!0):l.renderSlot(f.$slots,"profile-side",{key:0}),n.profileImageSrc?(l.openBlock(),l.createBlock(_i,{key:1,src:n.profileImageSrc,alt:n.profileImageAlt,size:"sm"},null,8,["src","alt"])):l.createCommentVNode("",!0),n.isEmbedded?(l.openBlock(),l.createElementBlock("span",VB,l.toDisplayString(n.dropdownMenuTitle),1)):l.createCommentVNode("",!0),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(hh,{key:3,text:n.dropdownMenuTitle,variant:"primary",toggleTag:"a",right:!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.dropdownOptions,(p,m)=>(l.openBlock(),l.createBlock(Ba,l.mergeProps({key:m},{ref_for:!0},p),null,16))),128)),n.hasLogoutOption?(l.openBlock(),l.createBlock(Ba,{key:0,text:"Uitloggen",onClick:a})):l.createCommentVNode("",!0)]),_:1},8,["text"]))])]),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(fh,{key:0,active:s.value,options:o.value,onHide:u,onSignout:a},{"special-options":l.withCtx(()=>[l.renderSlot(f.$slots,"mobile-menu-special-options")]),_:3},8,["active","options"]))],64))}}),eR="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20height='800px'%20width='800px'%20viewBox='0%200%20800%20800'%20fill='none'%20version='1.1'%20id='svg2'%20sodipodi:docname='bell-icon.svg'%20inkscape:version='1.4.2%20(ebf0e94,%202025-05-08)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs2'%20/%3e%3csodipodi:namedview%20id='namedview2'%20pagecolor='%23ffffff'%20bordercolor='%23000000'%20borderopacity='0.25'%20inkscape:showpageshadow='2'%20inkscape:pageopacity='0.0'%20inkscape:pagecheckerboard='0'%20inkscape:deskcolor='%23d1d1d1'%20inkscape:zoom='0.93902601'%20inkscape:cx='361.01236'%20inkscape:cy='425.44082'%20inkscape:window-width='2323'%20inkscape:window-height='1321'%20inkscape:window-x='69'%20inkscape:window-y='-9'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg2'%20inkscape:lockguides='false'%20/%3e%3cpath%20fill='%23394156'%20d='m%20574.7134,517.70839%20c%20-43.02343,-19.42958%20-40.33991,-92.03173%20-40.37166,-94.13603%20l%20-0.86403,-55.08622%20c%20-0.84452,-53.84263%20-32.76289,-101.01787%20-79.52261,-120.73389%20-0.10055,-27.68538%20-26.24787,-50.17713%20-53.95375,-50.17713%20-27.70655,0%20-53.8532,22.49307%20-53.95442,50.17581%20-46.75774,19.71601%20-77.67395,68.62166%20-78.65724,122.46193%20l%20-0.86403,47.31%20c%20-0.0304,2.1043%201.78773,80.75463%20-41.23703,100.1842%20-4.90122,2.21412%20-7.59494,12.9473%20-6.46175,18.20508%201.13187,5.25843%203.98237,14.4119%209.36122,14.4119%20h%20110.87115%20c%202.23595,12.30035%208.05205,23.74336%2016.94754,33.01196%2011.8148,12.30961%2027.4393,19.08888%2043.99257,19.08888%2016.5546,0%2032.1791,-6.77927%2043.99258,-19.08888%208.89681,-9.26925%2014.71291,-20.71294%2016.94754,-33.01196%20h%20110.87115%20c%205.37885,0%208.22869,-9.1528%209.36189,-14.4119%201.13449,-5.25778%20-1.55789,-15.9903%20-6.45912,-18.20375%20z%20m%20-65.45742,-27.74178%20c%204.52282,13.71204%207.25707,16.20673%2016.33845,27.66562%20l%20-250.39475,-0.79275%20c%209.08005,-11.45756%2010.3714,-13.15885%2014.89422,-26.87287%20z%20M%20400.00135,224.00622%20c%2012.53255,0%2019.53015,4.82252%2022.8457,16.30126%20-8.54159,-1.77156%20-13.78747,-2.70563%20-22.8457,-2.70563%20-9.05823,0%20-14.30412,0.93341%20-22.84569,2.70563%203.3162,-11.47808%2010.31381,-16.30126%2022.84569,-16.30126%20z%20m%20-103.58848,199.63494%201.79933,-54.2217%20c%201.96022,-59.06989%2042.68543,-96.67497%20101.78915,-96.67497%2059.10373,0%2099.89499,35.80359%20101.78916,94.87564%20l%201.79933,56.1143%20c%200.0152,1.71731%201.47422,12.5683%201.23243,34.7862%20H%20295.17778%20c%200.71894,-22.23906%201.22119,-33.1218%201.23509,-34.87947%20z%20m%20103.58848,148.96978%20c%20-17.42517,0%20-25.43558,-5.58015%20-30.31694,-22.28624%20h%2060.63257%20c%20-4.88138,16.70609%20-12.88914,22.28624%20-30.31563,22.28624%20z'%20id='path1'%20style='stroke-width:0.899666;stroke-dasharray:none'%20sodipodi:nodetypes='ccscscscccsccsccscccccccscscscsssccccsccs'%20/%3e%3cpath%20fill='%23394156'%20d='m%20397.96944,283.33669%20c%20-49.41855,0%20-89.62361,40.20373%20-89.62361,89.62161%200,6.34354%205.14286,11.4864%2011.48639,11.4864%206.34355,0%2011.48641,-5.14286%2011.48641,-11.4864%200,-36.75076%2029.89938,-66.64948%2066.65148,-66.64948%206.34353,0%2011.48639,-5.14285%2011.48639,-11.4864%20-6.6e-4,-6.3442%20-5.14353,-11.48573%20-11.48706,-11.48573%20z'%20id='path2'%20style='stroke-width:0.904712;stroke-dasharray:none'%20sodipodi:nodetypes='ssssscs'%20/%3e%3c/svg%3e",jy=async(t,e)=>{const n=t+e,o=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(i)).map(c=>c.toString(16).padStart(2,"0")).join("")};function mh(){const t=()=>new Promise(n=>{if(document.readyState==="complete")return n();window.addEventListener("load",()=>n(),{once:!0})});return{OnWindowLoaded:n=>{l.onMounted(()=>t().then(n))}}}const tR=(t,e,n)=>{const{OnWindowLoaded:r}=mh(),o="lkj298fhGGJihge",i=l.ref(!1),s=()=>e+"|"+n();return r(async()=>{if(e==null||n==null||n()==null){i.value=!1;return}const d=s(),u=localStorage.getItem(t),f=JSON.parse(u)||[],h=await jy(d,o);i.value=!f.includes(h)}),{hasUnfulfilledInteraction:i,MarkInteractionPerformed:async()=>{const d=s(),u=await jy(d,o),f=localStorage.getItem(t),h=JSON.parse(f)||[];h.includes(u)||(h.push(u),localStorage.setItem(t,JSON.stringify(h))),i.value=!1}}};function Wy(t){const{OnWindowLoaded:e}=mh();let n;const r=()=>{n=document.addEventListener("click",i=>{if(!i||!i.target)return;let s=null;if(i.target instanceof Element&&(s=i.target.closest(".popover")),s)return;const c=No.getInstance(t.value);c&&c.hide()})};l.onMounted(r);const o=()=>{if(t?.value==null)return;No.getInstance(t.value)||new No(t.value)};e(o),l.watch(t,o),l.onUnmounted(()=>{if(t?.value!=null){const i=No.getInstance(t.value);i&&i.dispose()}n&&document.removeEventListener("click",n)})}const nR=["data-bs-title","data-bs-content"],rR=["title"],oR={key:0,class:"number-circle",textContent:1},iR=l.defineComponent({__name:"BDNotificationButton",props:{userId:{},getNotification:{}},setup(t){const e=t,n=()=>e.getNotification?.linkUrl,{hasUnfulfilledInteraction:r,MarkInteractionPerformed:o}=tR("notificationsRead",e.userId,n),i=l.ref();Wy(i);const s=l.computed(()=>{const u=e.getNotification;if(!u)return!1;const{isActive:f,startDate:h,endDate:p}=u;if(!f)return!1;const m=new Date(h),g=new Date(p),v=new Date;return v>=m&&v<=g}),c=l.computed(()=>e.getNotification?.tooltip),a=l.computed(()=>e.getNotification?.title),d=l.computed(()=>{const u=e.getNotification;if(!u)return"";const{text:f,linkUrl:h,linkText:p}=u;return`
1299
+ `,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:c}=r.extensionManager,a=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&a&&s){const f=a.filter(h=>c.includes(h.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),cO=lO;const dO={class:"popover bd-link-input-popover show bd-link-input-bottom"},uO={class:"popover-body"},fO={class:"form-label"},hO=l.defineComponent({__name:"BDLinkInput",props:{previousUrl:{}},emits:["submit","cancel"],setup(t,{emit:e}){const n=t,r=e,o=l.ref(n.previousUrl??""),i=()=>r("submit",o.value),s=()=>r("cancel");return(c,a)=>(l.openBlock(),l.createElementBlock("div",dO,[a[2]||(a[2]=l.createElementVNode("div",{class:"popover-header"},"Voeg een link toe",-1)),l.createElementVNode("div",uO,[l.createElementVNode("label",fO,[a[1]||(a[1]=l.createTextVNode(" URL: ",-1)),l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=d=>o.value=d),type:"text",class:"form-control",placeholder:"https://www.example.com"},null,512),[[l.vModelText,o.value]])]),l.createElementVNode("div",{class:"d-flex gap-2 mt-2"},[l.createElementVNode("button",{type:"button",class:"btn btn-primary btn-sm",onClick:i}," Toevoegen "),l.createElementVNode("button",{type:"button",class:"btn btn-secondary btn-sm",onClick:s}," Annuleren ")])])]))}}),_f={BASIC:"basic",FULL:"full"},pO={class:"attachment-list"},mO={class:"attachment-link"},gO={key:1,class:"attachment-no-download"},vO=["href"],$s=l.defineComponent({__name:"BDAttachmentPreviewList",props:{files:{default:[]},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete"],setup(t,{emit:e}){const n=e,r=o=>{n("delete",o)};return(o,i)=>(l.openBlock(),l.createElementBlock("ul",pO,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.files,s=>(l.openBlock(),l.createElementBlock("li",{class:"attachment-list__item",key:s.CorrelationId},[l.createElementVNode("div",mO,[t.showDelete?(l.openBlock(),l.createBlock(Re,{key:0,variant:"remove",onClick:c=>r(s),"aria-label":"verwijder"},{default:l.withCtx(()=>[l.createVNode(l.unref(Ii))]),_:1},8,["onClick"])):l.createCommentVNode("",!0),t.noDownload?(l.openBlock(),l.createElementBlock("div",gO,[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(s.Naam.trim()),1)])):(l.openBlock(),l.createElementBlock("a",{key:2,href:s.downloadUrl},[l.createVNode(l.unref(hr)),l.createTextVNode(" "+l.toDisplayString(s.Naam.trim()),1)],8,vO))])]))),128))]))}}),yO={class:"attachment-list"},bO={class:"attachment"},CO=["onClick"],EO=["src","alt"],kO=["onClick"],wO=["href"],SO={class:"btn btn-light download-button-image"},AO=["src","alt"],Fs=l.defineComponent({__name:"BDImageAttachmentPreviewList",props:{fastDownload:{type:Boolean,default:!1},files:{default:void 0},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete","show"],setup(t,{emit:e}){const n=t,r=e,o=s=>{r("delete",s)},i=(s,c)=>{s.target&&s.target.className==="img-preview"&&r("show",c)};return(s,c)=>(l.openBlock(),l.createElementBlock("ul",yO,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.files,a=>(l.openBlock(),l.createElementBlock("li",{class:"attachment-list__item",key:a.CorrelationId},[l.createElementVNode("div",bO,[t.showDelete?(l.openBlock(),l.createBlock(Re,{key:0,variant:"remove","aria-label":"verwijder",onClick:l.withModifiers(d=>o(a),["prevent"])},{default:l.withCtx(()=>[l.createVNode(l.unref(Ii))]),_:1},8,["onClick"])):l.createCommentVNode("",!0),n.noDownload?(l.openBlock(),l.createElementBlock("div",{key:1,onClick:d=>i(d,a)},[l.createElementVNode("img",{src:a.previewUrl,class:"img-preview",alt:a.altName,loading:"lazy"},null,8,EO)],8,CO)):(l.openBlock(),l.createElementBlock("div",{key:2,onClick:d=>i(d,a)},[n.fastDownload?(l.openBlock(),l.createElementBlock("a",{key:0,href:a.downloadUrl,class:"download-link"},[l.createElementVNode("button",SO,[l.createVNode(l.unref(Dc))])],8,wO)):l.createCommentVNode("",!0),l.createElementVNode("img",{src:a.previewUrl,alt:a.altName,class:"img-preview",loading:"lazy"},null,8,AO)],8,kO))])]))),128))]))}}),xO=t=>t?.map(e=>e.CorrelationId),Y2=t=>t.Naam.toLowerCase().endsWith(".png")||t.Naam.toLowerCase().endsWith(".jpg")||t.Naam.toLowerCase().endsWith(".jpeg")||t.Naam.toLowerCase().endsWith(".gif"),TO=(t,e)=>e.DownloadUrl?e.DownloadUrl:e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachment?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:e.url?e.url:e.Id?`${t}/Portaal/DownloadBerichtBijlage/${e.Id}`:e.FileId?`${t}/Portaal/DownloadStandardMessageAttachment/${e.StandardAttachmentId}/${e.FileId}`:`${t}/Portaal/DownloadBerichtStagingBijlage/${e.CorrelationId}`,G2=(t,e)=>e.ThumbnailUrl?e.ThumbnailUrl:e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachmentThumbnail?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:e.url?e.url:e.Id?`${t}/Portaal/DownloadBerichtBijlageThumbnail/${e.Id}`:e.StandardAttachmentId||e.standardAttachmentId?`${t}/Portaal/DownloadStandardMessageAttachmentThumbnail/${e.StandardAttachmentId}/${e.FileId}`:`${t}/Portaal/DownloadBerichtStagingBijlageThumbnail/${e.CorrelationId}`,IO=(t,e)=>e.identifier?`${t}/Collega/api/Conversation/GetConversationAttachment?conversationId=${e.conversationId}&fileMetadataId=${e.identifier}`:null,_O=(t,e)=>e?Y2(t):!Y2(t),So=(t="",e,n)=>e===void 0?void 0:e.filter(o=>_O(o,n)).map(o=>{const i=typeof o.CorrelationId=="string"?o.CorrelationId:o.CorrelationId!=null?o.CorrelationId.toString():"";return{downloadUrl:TO(t,o),previewUrl:G2(t,o),fullImageUrl:IO(t,o),altName:`${o.Naam}`,...o,CorrelationId:i}});var Ft="top",qt="bottom",Vt="right",zt="left",tc="auto",ai=[Ft,qt,Vt,zt],Ao="start",li="end",Q2="clippingParents",Nf="viewport",ci="popper",Z2="reference",Of=ai.reduce(function(t,e){return t.concat([e+"-"+Ao,e+"-"+li])},[]),Mf=[].concat(ai,[tc]).reduce(function(t,e){return t.concat([e,e+"-"+Ao,e+"-"+li])},[]),J2="beforeRead",X2="read",q2="afterRead",V2="beforeMain",e5="main",t5="afterMain",n5="beforeWrite",r5="write",o5="afterWrite",i5=[J2,X2,q2,V2,e5,t5,n5,r5,o5];function Fn(t){return t?(t.nodeName||"").toLowerCase():null}function en(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function xo(t){var e=en(t).Element;return t instanceof e||t instanceof Element}function dn(t){var e=en(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Lf(t){if(typeof ShadowRoot>"u")return!1;var e=en(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function NO(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},o=e.attributes[n]||{},i=e.elements[n];!dn(i)||!Fn(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(s){var c=o[s];c===!1?i.removeAttribute(s):i.setAttribute(s,c===!0?"":c)}))})}function OO(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],i=e.attributes[r]||{},s=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),c=s.reduce(function(a,d){return a[d]="",a},{});!dn(o)||!Fn(o)||(Object.assign(o.style,c),Object.keys(i).forEach(function(a){o.removeAttribute(a)}))})}}const s5={name:"applyStyles",enabled:!0,phase:"write",fn:NO,effect:OO,requires:["computeStyles"]};function zn(t){return t.split("-")[0]}var To=Math.max,nc=Math.min,di=Math.round;function Df(){var t=navigator.userAgentData;return t!=null&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function a5(){return!/^((?!chrome|android).)*safari/i.test(Df())}function ui(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!1);var r=t.getBoundingClientRect(),o=1,i=1;e&&dn(t)&&(o=t.offsetWidth>0&&di(r.width)/t.offsetWidth||1,i=t.offsetHeight>0&&di(r.height)/t.offsetHeight||1);var s=xo(t)?en(t):window,c=s.visualViewport,a=!a5()&&n,d=(r.left+(a&&c?c.offsetLeft:0))/o,u=(r.top+(a&&c?c.offsetTop:0))/i,f=r.width/o,h=r.height/i;return{width:f,height:h,top:u,right:d+f,bottom:u+h,left:d,x:d,y:u}}function Pf(t){var e=ui(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function l5(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Lf(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function sr(t){return en(t).getComputedStyle(t)}function MO(t){return["table","td","th"].indexOf(Fn(t))>=0}function zr(t){return((xo(t)?t.ownerDocument:t.document)||window.document).documentElement}function rc(t){return Fn(t)==="html"?t:t.assignedSlot||t.parentNode||(Lf(t)?t.host:null)||zr(t)}function c5(t){return!dn(t)||sr(t).position==="fixed"?null:t.offsetParent}function LO(t){var e=/firefox/i.test(Df()),n=/Trident/i.test(Df());if(n&&dn(t)){var r=sr(t);if(r.position==="fixed")return null}var o=rc(t);for(Lf(o)&&(o=o.host);dn(o)&&["html","body"].indexOf(Fn(o))<0;){var i=sr(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||e&&i.willChange==="filter"||e&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function zs(t){for(var e=en(t),n=c5(t);n&&MO(n)&&sr(n).position==="static";)n=c5(n);return n&&(Fn(n)==="html"||Fn(n)==="body"&&sr(n).position==="static")?e:n||LO(t)||e}function Bf(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Us(t,e,n){return To(t,nc(e,n))}function DO(t,e,n){var r=Us(t,e,n);return r>n?n:r}function d5(){return{top:0,right:0,bottom:0,left:0}}function u5(t){return Object.assign({},d5(),t)}function f5(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var PO=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,u5(typeof e!="number"?e:f5(e,ai))};function BO(t){var e,n=t.state,r=t.name,o=t.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,c=zn(n.placement),a=Bf(c),d=[zt,Vt].indexOf(c)>=0,u=d?"height":"width";if(!(!i||!s)){var f=PO(o.padding,n),h=Pf(i),p=a==="y"?Ft:zt,m=a==="y"?qt:Vt,g=n.rects.reference[u]+n.rects.reference[a]-s[a]-n.rects.popper[u],v=s[a]-n.rects.reference[a],y=zs(i),b=y?a==="y"?y.clientHeight||0:y.clientWidth||0:0,E=g/2-v/2,C=f[p],S=b-h[u]-f[m],_=b/2-h[u]/2+E,T=Us(C,_,S),D=a;n.modifiersData[r]=(e={},e[D]=T,e.centerOffset=T-_,e)}}function RO(t){var e=t.state,n=t.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||l5(e.elements.popper,o)&&(e.elements.arrow=o))}const h5={name:"arrow",enabled:!0,phase:"main",fn:BO,effect:RO,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fi(t){return t.split("-")[1]}var $O={top:"auto",right:"auto",bottom:"auto",left:"auto"};function FO(t,e){var n=t.x,r=t.y,o=e.devicePixelRatio||1;return{x:di(n*o)/o||0,y:di(r*o)/o||0}}function p5(t){var e,n=t.popper,r=t.popperRect,o=t.placement,i=t.variation,s=t.offsets,c=t.position,a=t.gpuAcceleration,d=t.adaptive,u=t.roundOffsets,f=t.isFixed,h=s.x,p=h===void 0?0:h,m=s.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var y=s.hasOwnProperty("x"),b=s.hasOwnProperty("y"),E=zt,C=Ft,S=window;if(d){var _=zs(n),T="clientHeight",D="clientWidth";if(_===en(n)&&(_=zr(n),sr(_).position!=="static"&&c==="absolute"&&(T="scrollHeight",D="scrollWidth")),_=_,o===Ft||(o===zt||o===Vt)&&i===li){C=qt;var G=f&&_===S&&S.visualViewport?S.visualViewport.height:_[T];g-=G-r.height,g*=a?1:-1}if(o===zt||(o===Ft||o===qt)&&i===li){E=Vt;var $=f&&_===S&&S.visualViewport?S.visualViewport.width:_[D];p-=$-r.width,p*=a?1:-1}}var j=Object.assign({position:c},d&&$O),W=u===!0?FO({x:p,y:g},en(n)):{x:p,y:g};if(p=W.x,g=W.y,a){var Y;return Object.assign({},j,(Y={},Y[C]=b?"0":"",Y[E]=y?"0":"",Y.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",Y))}return Object.assign({},j,(e={},e[C]=b?g+"px":"",e[E]=y?p+"px":"",e.transform="",e))}function zO(t){var e=t.state,n=t.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,s=i===void 0?!0:i,c=n.roundOffsets,a=c===void 0?!0:c,d={placement:zn(e.placement),variation:fi(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,p5(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,p5(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const m5={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:zO,data:{}};var oc={passive:!0};function UO(t){var e=t.state,n=t.instance,r=t.options,o=r.scroll,i=o===void 0?!0:o,s=r.resize,c=s===void 0?!0:s,a=en(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return i&&d.forEach(function(u){u.addEventListener("scroll",n.update,oc)}),c&&a.addEventListener("resize",n.update,oc),function(){i&&d.forEach(function(u){u.removeEventListener("scroll",n.update,oc)}),c&&a.removeEventListener("resize",n.update,oc)}}const g5={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:UO,data:{}};var HO={left:"right",right:"left",bottom:"top",top:"bottom"};function ic(t){return t.replace(/left|right|bottom|top/g,function(e){return HO[e]})}var jO={start:"end",end:"start"};function v5(t){return t.replace(/start|end/g,function(e){return jO[e]})}function Rf(t){var e=en(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function $f(t){return ui(zr(t)).left+Rf(t).scrollLeft}function WO(t,e){var n=en(t),r=zr(t),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,c=0,a=0;if(o){i=o.width,s=o.height;var d=a5();(d||!d&&e==="fixed")&&(c=o.offsetLeft,a=o.offsetTop)}return{width:i,height:s,x:c+$f(t),y:a}}function KO(t){var e,n=zr(t),r=Rf(t),o=(e=t.ownerDocument)==null?void 0:e.body,i=To(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=To(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-r.scrollLeft+$f(t),a=-r.scrollTop;return sr(o||n).direction==="rtl"&&(c+=To(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:c,y:a}}function Ff(t){var e=sr(t),n=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function y5(t){return["html","body","#document"].indexOf(Fn(t))>=0?t.ownerDocument.body:dn(t)&&Ff(t)?t:y5(rc(t))}function Hs(t,e){var n;e===void 0&&(e=[]);var r=y5(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=en(r),s=o?[i].concat(i.visualViewport||[],Ff(r)?r:[]):r,c=e.concat(s);return o?c:c.concat(Hs(rc(s)))}function zf(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function YO(t,e){var n=ui(t,!1,e==="fixed");return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}function b5(t,e,n){return e===Nf?zf(WO(t,n)):xo(e)?YO(e,n):zf(KO(zr(t)))}function GO(t){var e=Hs(rc(t)),n=["absolute","fixed"].indexOf(sr(t).position)>=0,r=n&&dn(t)?zs(t):t;return xo(r)?e.filter(function(o){return xo(o)&&l5(o,r)&&Fn(o)!=="body"}):[]}function QO(t,e,n,r){var o=e==="clippingParents"?GO(t):[].concat(e),i=[].concat(o,[n]),s=i[0],c=i.reduce(function(a,d){var u=b5(t,d,r);return a.top=To(u.top,a.top),a.right=nc(u.right,a.right),a.bottom=nc(u.bottom,a.bottom),a.left=To(u.left,a.left),a},b5(t,s,r));return c.width=c.right-c.left,c.height=c.bottom-c.top,c.x=c.left,c.y=c.top,c}function C5(t){var e=t.reference,n=t.element,r=t.placement,o=r?zn(r):null,i=r?fi(r):null,s=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,a;switch(o){case Ft:a={x:s,y:e.y-n.height};break;case qt:a={x:s,y:e.y+e.height};break;case Vt:a={x:e.x+e.width,y:c};break;case zt:a={x:e.x-n.width,y:c};break;default:a={x:e.x,y:e.y}}var d=o?Bf(o):null;if(d!=null){var u=d==="y"?"height":"width";switch(i){case Ao:a[d]=a[d]-(e[u]/2-n[u]/2);break;case li:a[d]=a[d]+(e[u]/2-n[u]/2);break}}return a}function hi(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=r===void 0?t.placement:r,i=n.strategy,s=i===void 0?t.strategy:i,c=n.boundary,a=c===void 0?Q2:c,d=n.rootBoundary,u=d===void 0?Nf:d,f=n.elementContext,h=f===void 0?ci:f,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,y=u5(typeof v!="number"?v:f5(v,ai)),b=h===ci?Z2:ci,E=t.rects.popper,C=t.elements[m?b:h],S=QO(xo(C)?C:C.contextElement||zr(t.elements.popper),a,u,s),_=ui(t.elements.reference),T=C5({reference:_,element:E,placement:o}),D=zf(Object.assign({},E,T)),G=h===ci?D:_,$={top:S.top-G.top+y.top,bottom:G.bottom-S.bottom+y.bottom,left:S.left-G.left+y.left,right:G.right-S.right+y.right},j=t.modifiersData.offset;if(h===ci&&j){var W=j[o];Object.keys($).forEach(function(Y){var z=[Vt,qt].indexOf(Y)>=0?1:-1,U=[Ft,qt].indexOf(Y)>=0?"y":"x";$[Y]+=W[U]*z})}return $}function ZO(t,e){e===void 0&&(e={});var n=e,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,c=n.flipVariations,a=n.allowedAutoPlacements,d=a===void 0?Mf:a,u=fi(r),f=u?c?Of:Of.filter(function(m){return fi(m)===u}):ai,h=f.filter(function(m){return d.indexOf(m)>=0});h.length===0&&(h=f);var p=h.reduce(function(m,g){return m[g]=hi(t,{placement:g,boundary:o,rootBoundary:i,padding:s})[zn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function JO(t){if(zn(t)===tc)return[];var e=ic(t);return[v5(t),e,v5(e)]}function XO(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!0:s,a=n.fallbackPlacements,d=n.padding,u=n.boundary,f=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=e.options.placement,y=zn(v),b=y===v,E=a||(b||!m?[ic(v)]:JO(v)),C=[v].concat(E).reduce(function(be,Ee){return be.concat(zn(Ee)===tc?ZO(e,{placement:Ee,boundary:u,rootBoundary:f,padding:d,flipVariations:m,allowedAutoPlacements:g}):Ee)},[]),S=e.rects.reference,_=e.rects.popper,T=new Map,D=!0,G=C[0],$=0;$<C.length;$++){var j=C[$],W=zn(j),Y=fi(j)===Ao,z=[Ft,qt].indexOf(W)>=0,U=z?"width":"height",F=hi(e,{placement:j,boundary:u,rootBoundary:f,altBoundary:h,padding:d}),X=z?Y?Vt:zt:Y?qt:Ft;S[U]>_[U]&&(X=ic(X));var H=ic(X),ee=[];if(i&&ee.push(F[W]<=0),c&&ee.push(F[X]<=0,F[H]<=0),ee.every(function(be){return be})){G=j,D=!1;break}T.set(j,ee)}if(D)for(var ne=m?3:1,ae=function(Ee){var Te=C.find(function(ve){var N=T.get(ve);if(N)return N.slice(0,Ee).every(function(M){return M})});if(Te)return G=Te,"break"},pe=ne;pe>0;pe--){var me=ae(pe);if(me==="break")break}e.placement!==G&&(e.modifiersData[r]._skip=!0,e.placement=G,e.reset=!0)}}const E5={name:"flip",enabled:!0,phase:"main",fn:XO,requiresIfExists:["offset"],data:{_skip:!1}};function k5(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function w5(t){return[Ft,Vt,qt,zt].some(function(e){return t[e]>=0})}function qO(t){var e=t.state,n=t.name,r=e.rects.reference,o=e.rects.popper,i=e.modifiersData.preventOverflow,s=hi(e,{elementContext:"reference"}),c=hi(e,{altBoundary:!0}),a=k5(s,r),d=k5(c,o,i),u=w5(a),f=w5(d);e.modifiersData[n]={referenceClippingOffsets:a,popperEscapeOffsets:d,isReferenceHidden:u,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const S5={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:qO};function VO(t,e,n){var r=zn(t),o=[zt,Ft].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,s=i[0],c=i[1];return s=s||0,c=(c||0)*o,[zt,Vt].indexOf(r)>=0?{x:c,y:s}:{x:s,y:c}}function eM(t){var e=t.state,n=t.options,r=t.name,o=n.offset,i=o===void 0?[0,0]:o,s=Mf.reduce(function(u,f){return u[f]=VO(f,e.rects,i),u},{}),c=s[e.placement],a=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=s}const A5={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eM};function tM(t){var e=t.state,n=t.name;e.modifiersData[n]=C5({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const x5={name:"popperOffsets",enabled:!0,phase:"read",fn:tM,data:{}};function nM(t){return t==="x"?"y":"x"}function rM(t){var e=t.state,n=t.options,r=t.name,o=n.mainAxis,i=o===void 0?!0:o,s=n.altAxis,c=s===void 0?!1:s,a=n.boundary,d=n.rootBoundary,u=n.altBoundary,f=n.padding,h=n.tether,p=h===void 0?!0:h,m=n.tetherOffset,g=m===void 0?0:m,v=hi(e,{boundary:a,rootBoundary:d,padding:f,altBoundary:u}),y=zn(e.placement),b=fi(e.placement),E=!b,C=Bf(y),S=nM(C),_=e.modifiersData.popperOffsets,T=e.rects.reference,D=e.rects.popper,G=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,$=typeof G=="number"?{mainAxis:G,altAxis:G}:Object.assign({mainAxis:0,altAxis:0},G),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,W={x:0,y:0};if(_){if(i){var Y,z=C==="y"?Ft:zt,U=C==="y"?qt:Vt,F=C==="y"?"height":"width",X=_[C],H=X+v[z],ee=X-v[U],ne=p?-D[F]/2:0,ae=b===Ao?T[F]:D[F],pe=b===Ao?-D[F]:-T[F],me=e.elements.arrow,be=p&&me?Pf(me):{width:0,height:0},Ee=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:d5(),Te=Ee[z],ve=Ee[U],N=Us(0,T[F],be[F]),M=E?T[F]/2-ne-N-Te-$.mainAxis:ae-N-Te-$.mainAxis,I=E?-T[F]/2+ne+N+ve+$.mainAxis:pe+N+ve+$.mainAxis,O=e.elements.arrow&&zs(e.elements.arrow),k=O?C==="y"?O.clientTop||0:O.clientLeft||0:0,w=(Y=j?.[C])!=null?Y:0,P=X+M-w-k,R=X+I-w,K=Us(p?nc(H,P):H,X,p?To(ee,R):ee);_[C]=K,W[C]=K-X}if(c){var Q,A=C==="x"?Ft:zt,x=C==="x"?qt:Vt,B=_[S],Z=S==="y"?"height":"width",q=B+v[A],te=B-v[x],se=[Ft,zt].indexOf(y)!==-1,J=(Q=j?.[S])!=null?Q:0,re=se?q:B-T[Z]-D[Z]-J+$.altAxis,Se=se?B+T[Z]+D[Z]-J-$.altAxis:te,Ne=p&&se?DO(re,B,Se):Us(p?re:q,B,p?Se:te);_[S]=Ne,W[S]=Ne-B}e.modifiersData[r]=W}}const T5={name:"preventOverflow",enabled:!0,phase:"main",fn:rM,requiresIfExists:["offset"]};function oM(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function iM(t){return t===en(t)||!dn(t)?Rf(t):oM(t)}function sM(t){var e=t.getBoundingClientRect(),n=di(e.width)/t.offsetWidth||1,r=di(e.height)/t.offsetHeight||1;return n!==1||r!==1}function aM(t,e,n){n===void 0&&(n=!1);var r=dn(e),o=dn(e)&&sM(e),i=zr(e),s=ui(t,o,n),c={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!n)&&((Fn(e)!=="body"||Ff(i))&&(c=iM(e)),dn(e)?(a=ui(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):i&&(a.x=$f(i))),{x:s.left+c.scrollLeft-a.x,y:s.top+c.scrollTop-a.y,width:s.width,height:s.height}}function lM(t){var e=new Map,n=new Set,r=[];t.forEach(function(i){e.set(i.name,i)});function o(i){n.add(i.name);var s=[].concat(i.requires||[],i.requiresIfExists||[]);s.forEach(function(c){if(!n.has(c)){var a=e.get(c);a&&o(a)}}),r.push(i)}return t.forEach(function(i){n.has(i.name)||o(i)}),r}function cM(t){var e=lM(t);return i5.reduce(function(n,r){return n.concat(e.filter(function(o){return o.phase===r}))},[])}function dM(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function uM(t){var e=t.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var I5={placement:"bottom",modifiers:[],strategy:"absolute"};function _5(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function N5(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,r=n===void 0?[]:n,o=e.defaultOptions,i=o===void 0?I5:o;return function(c,a,d){d===void 0&&(d=i);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},I5,i),modifiersData:{},elements:{reference:c,popper:a},attributes:{},styles:{}},f=[],h=!1,p={state:u,setOptions:function(y){var b=typeof y=="function"?y(u.options):y;g(),u.options=Object.assign({},i,u.options,b),u.scrollParents={reference:xo(c)?Hs(c):c.contextElement?Hs(c.contextElement):[],popper:Hs(a)};var E=cM(uM([].concat(r,u.options.modifiers)));return u.orderedModifiers=E.filter(function(C){return C.enabled}),m(),p.update()},forceUpdate:function(){if(!h){var y=u.elements,b=y.reference,E=y.popper;if(_5(b,E)){u.rects={reference:aM(b,zs(E),u.options.strategy==="fixed"),popper:Pf(E)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function($){return u.modifiersData[$.name]=Object.assign({},$.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var S=u.orderedModifiers[C],_=S.fn,T=S.options,D=T===void 0?{}:T,G=S.name;typeof _=="function"&&(u=_({state:u,options:D,name:G,instance:p})||u)}}}},update:dM(function(){return new Promise(function(v){p.forceUpdate(),v(u)})}),destroy:function(){g(),h=!0}};if(!_5(c,a))return p;p.setOptions(d).then(function(v){!h&&d.onFirstUpdate&&d.onFirstUpdate(v)});function m(){u.orderedModifiers.forEach(function(v){var y=v.name,b=v.options,E=b===void 0?{}:b,C=v.effect;if(typeof C=="function"){var S=C({state:u,name:y,instance:p,options:E}),_=function(){};f.push(S||_)}})}function g(){f.forEach(function(v){return v()}),f=[]}return p}}var fM=[g5,x5,m5,s5,A5,E5,T5,h5,S5],Uf=N5({defaultModifiers:fM});const O5=Object.freeze(Object.defineProperty({__proto__:null,afterMain:t5,afterRead:q2,afterWrite:o5,applyStyles:s5,arrow:h5,auto:tc,basePlacements:ai,beforeMain:V2,beforeRead:J2,beforeWrite:n5,bottom:qt,clippingParents:Q2,computeStyles:m5,createPopper:Uf,detectOverflow:hi,end:li,eventListeners:g5,flip:E5,hide:S5,left:zt,main:e5,modifierPhases:i5,offset:A5,placements:Mf,popper:ci,popperGenerator:N5,popperOffsets:x5,preventOverflow:T5,read:X2,reference:Z2,right:Vt,start:Ao,top:Ft,variationPlacements:Of,viewport:Nf,write:r5},Symbol.toStringTag,{value:"Module"}));const Ur=new Map,Hf={set(t,e,n){Ur.has(t)||Ur.set(t,new Map);const r=Ur.get(t);if(!r.has(e)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(e,n)},get(t,e){return Ur.has(t)&&Ur.get(t).get(e)||null},remove(t,e){if(!Ur.has(t))return;const n=Ur.get(t);n.delete(e),n.size===0&&Ur.delete(t)}},hM=1e6,pM=1e3,jf="transitionend",M5=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(e,n)=>`#${CSS.escape(n)}`)),t),mM=t=>t==null?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),gM=t=>{do t+=Math.floor(Math.random()*hM);while(document.getElementById(t));return t},vM=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t);const r=Number.parseFloat(e),o=Number.parseFloat(n);return!r&&!o?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*pM)},L5=t=>{t.dispatchEvent(new Event(jf))},ar=t=>!t||typeof t!="object"?!1:(typeof t.jquery<"u"&&(t=t[0]),typeof t.nodeType<"u"),Hr=t=>ar(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?document.querySelector(M5(t)):null,pi=t=>{if(!ar(t)||t.getClientRects().length===0)return!1;const e=getComputedStyle(t).getPropertyValue("visibility")==="visible",n=t.closest("details:not([open])");if(!n)return e;if(n!==t){const r=t.closest("summary");if(r&&r.parentNode!==n||r===null)return!1}return e},jr=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled<"u"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",D5=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?D5(t.parentNode):null},sc=()=>{},js=t=>{t.offsetHeight},P5=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Wf=[],yM=t=>{document.readyState==="loading"?(Wf.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Wf)e()}),Wf.push(t)):t()},un=()=>document.documentElement.dir==="rtl",fn=t=>{yM(()=>{const e=P5();if(e){const n=t.NAME,r=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=r,t.jQueryInterface)}})},Qt=(t,e=[],n=t)=>typeof t=="function"?t.call(...e):n,B5=(t,e,n=!0)=>{if(!n){Qt(t);return}const o=vM(e)+5;let i=!1;const s=({target:c})=>{c===e&&(i=!0,e.removeEventListener(jf,s),Qt(t))};e.addEventListener(jf,s),setTimeout(()=>{i||L5(e)},o)},Kf=(t,e,n,r)=>{const o=t.length;let i=t.indexOf(e);return i===-1?!n&&r?t[o-1]:t[0]:(i+=n?1:-1,r&&(i=(i+o)%o),t[Math.max(0,Math.min(i,o-1))])},bM=/[^.]*(?=\..*)\.|.*/,CM=/\..*/,EM=/::\d+$/,Yf={};let R5=1;const $5={mouseenter:"mouseover",mouseleave:"mouseout"},kM=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function F5(t,e){return e&&`${e}::${R5++}`||t.uidEvent||R5++}function z5(t){const e=F5(t);return t.uidEvent=e,Yf[e]=Yf[e]||{},Yf[e]}function wM(t,e){return function n(r){return Qf(r,{delegateTarget:t}),n.oneOff&&de.off(t,r.type,e),e.apply(t,[r])}}function SM(t,e,n){return function r(o){const i=t.querySelectorAll(e);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(const c of i)if(c===s)return Qf(o,{delegateTarget:s}),r.oneOff&&de.off(t,o.type,e,n),n.apply(s,[o])}}function U5(t,e,n=null){return Object.values(t).find(r=>r.callable===e&&r.delegationSelector===n)}function H5(t,e,n){const r=typeof e=="string",o=r?n:e||n;let i=W5(t);return kM.has(i)||(i=t),[r,o,i]}function j5(t,e,n,r,o){if(typeof e!="string"||!t)return;let[i,s,c]=H5(e,n,r);e in $5&&(s=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(s));const a=z5(t),d=a[c]||(a[c]={}),u=U5(d,s,i?n:null);if(u){u.oneOff=u.oneOff&&o;return}const f=F5(s,e.replace(bM,"")),h=i?SM(t,n,s):wM(t,s);h.delegationSelector=i?n:null,h.callable=s,h.oneOff=o,h.uidEvent=f,d[f]=h,t.addEventListener(c,h,i)}function Gf(t,e,n,r,o){const i=U5(e[n],r,o);i&&(t.removeEventListener(n,i,!!o),delete e[n][i.uidEvent])}function AM(t,e,n,r){const o=e[n]||{};for(const[i,s]of Object.entries(o))i.includes(r)&&Gf(t,e,n,s.callable,s.delegationSelector)}function W5(t){return t=t.replace(CM,""),$5[t]||t}const de={on(t,e,n,r){j5(t,e,n,r,!1)},one(t,e,n,r){j5(t,e,n,r,!0)},off(t,e,n,r){if(typeof e!="string"||!t)return;const[o,i,s]=H5(e,n,r),c=s!==e,a=z5(t),d=a[s]||{},u=e.startsWith(".");if(typeof i<"u"){if(!Object.keys(d).length)return;Gf(t,a,s,i,o?n:null);return}if(u)for(const f of Object.keys(a))AM(t,a,f,e.slice(1));for(const[f,h]of Object.entries(d)){const p=f.replace(EM,"");(!c||e.includes(p))&&Gf(t,a,s,h.callable,h.delegationSelector)}},trigger(t,e,n){if(typeof e!="string"||!t)return null;const r=P5(),o=W5(e),i=e!==o;let s=null,c=!0,a=!0,d=!1;i&&r&&(s=r.Event(e,n),r(t).trigger(s),c=!s.isPropagationStopped(),a=!s.isImmediatePropagationStopped(),d=s.isDefaultPrevented());const u=Qf(new Event(e,{bubbles:c,cancelable:!0}),n);return d&&u.preventDefault(),a&&t.dispatchEvent(u),u.defaultPrevented&&s&&s.preventDefault(),u}};function Qf(t,e={}){for(const[n,r]of Object.entries(e))try{t[n]=r}catch{Object.defineProperty(t,n,{configurable:!0,get(){return r}})}return t}function K5(t){if(t==="true")return!0;if(t==="false")return!1;if(t===Number(t).toString())return Number(t);if(t===""||t==="null")return null;if(typeof t!="string")return t;try{return JSON.parse(decodeURIComponent(t))}catch{return t}}function Zf(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const lr={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${Zf(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${Zf(e)}`)},getDataAttributes(t){if(!t)return{};const e={},n=Object.keys(t.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of n){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1),e[o]=K5(t.dataset[r])}return e},getDataAttribute(t,e){return K5(t.getAttribute(`data-bs-${Zf(e)}`))}};class Ws{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,n){const r=ar(n)?lr.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...ar(n)?lr.getDataAttributes(n):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,n=this.constructor.DefaultType){for(const[r,o]of Object.entries(n)){const i=e[r],s=ar(i)?"element":mM(i);if(!new RegExp(o).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`)}}}const xM="5.3.8";class An extends Ws{constructor(e,n){super(),e=Hr(e),e&&(this._element=e,this._config=this._getConfig(n),Hf.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Hf.remove(this._element,this.constructor.DATA_KEY),de.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,n,r=!0){B5(e,n,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Hf.get(Hr(e),this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return xM}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const Jf=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e?e.split(",").map(n=>M5(n)).join(","):null},Ae={find(t,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,t))},findOne(t,e=document.documentElement){return Element.prototype.querySelector.call(e,t)},children(t,e){return[].concat(...t.children).filter(n=>n.matches(e))},parents(t,e){const n=[];let r=t.parentNode.closest(e);for(;r;)n.push(r),r=r.parentNode.closest(e);return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(n=>!jr(n)&&pi(n))},getSelectorFromElement(t){const e=Jf(t);return e&&Ae.findOne(e)?e:null},getElementFromSelector(t){const e=Jf(t);return e?Ae.findOne(e):null},getMultipleElementsFromSelector(t){const e=Jf(t);return e?Ae.find(e):[]}},ac=(t,e="hide")=>{const n=`click.dismiss${t.EVENT_KEY}`,r=t.NAME;de.on(document,n,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),jr(this))return;const i=Ae.getElementFromSelector(this)||this.closest(`.${r}`);t.getOrCreateInstance(i)[e]()})},TM="alert",Y5=".bs.alert",IM=`close${Y5}`,_M=`closed${Y5}`,NM="fade",OM="show";class lc extends An{static get NAME(){return TM}close(){if(de.trigger(this._element,IM).defaultPrevented)return;this._element.classList.remove(OM);const n=this._element.classList.contains(NM);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),de.trigger(this._element,_M),this.dispose()}static jQueryInterface(e){return this.each(function(){const n=lc.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}ac(lc,"close"),fn(lc);const MM="button",LM=".bs.button",DM=".data-api",PM="active",G5='[data-bs-toggle="button"]',BM=`click${LM}${DM}`;class cc extends An{static get NAME(){return MM}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(PM))}static jQueryInterface(e){return this.each(function(){const n=cc.getOrCreateInstance(this);e==="toggle"&&n[e]()})}}de.on(document,BM,G5,t=>{t.preventDefault();const e=t.target.closest(G5);cc.getOrCreateInstance(e).toggle()}),fn(cc);const RM="swipe",mi=".bs.swipe",$M=`touchstart${mi}`,FM=`touchmove${mi}`,zM=`touchend${mi}`,UM=`pointerdown${mi}`,HM=`pointerup${mi}`,jM="touch",WM="pen",KM="pointer-event",YM=40,GM={endCallback:null,leftCallback:null,rightCallback:null},QM={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class dc extends Ws{constructor(e,n){super(),this._element=e,!(!e||!dc.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return GM}static get DefaultType(){return QM}static get NAME(){return RM}dispose(){de.off(this._element,mi)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),Qt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){const e=Math.abs(this._deltaX);if(e<=YM)return;const n=e/this._deltaX;this._deltaX=0,n&&Qt(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(de.on(this._element,UM,e=>this._start(e)),de.on(this._element,HM,e=>this._end(e)),this._element.classList.add(KM)):(de.on(this._element,$M,e=>this._start(e)),de.on(this._element,FM,e=>this._move(e)),de.on(this._element,zM,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===WM||e.pointerType===jM)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const ZM="carousel",Wr=".bs.carousel",Q5=".data-api",JM="ArrowLeft",XM="ArrowRight",qM=500,Ks="next",gi="prev",vi="left",uc="right",VM=`slide${Wr}`,Xf=`slid${Wr}`,eL=`keydown${Wr}`,tL=`mouseenter${Wr}`,nL=`mouseleave${Wr}`,rL=`dragstart${Wr}`,oL=`load${Wr}${Q5}`,iL=`click${Wr}${Q5}`,Z5="carousel",fc="active",sL="slide",aL="carousel-item-end",lL="carousel-item-start",cL="carousel-item-next",dL="carousel-item-prev",J5=".active",X5=".carousel-item",uL=J5+X5,fL=".carousel-item img",hL=".carousel-indicators",pL="[data-bs-slide], [data-bs-slide-to]",mL='[data-bs-ride="carousel"]',gL={[JM]:uc,[XM]:vi},vL={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},yL={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Ys extends An{constructor(e,n){super(e,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ae.findOne(hL,this._element),this._addEventListeners(),this._config.ride===Z5&&this.cycle()}static get Default(){return vL}static get DefaultType(){return yL}static get NAME(){return ZM}next(){this._slide(Ks)}nextWhenVisible(){!document.hidden&&pi(this._element)&&this.next()}prev(){this._slide(gi)}pause(){this._isSliding&&L5(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){de.one(this._element,Xf,()=>this.cycle());return}this.cycle()}}to(e){const n=this._getItems();if(e>n.length-1||e<0)return;if(this._isSliding){de.one(this._element,Xf,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?Ks:gi;this._slide(o,n[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&de.on(this._element,eL,e=>this._keydown(e)),this._config.pause==="hover"&&(de.on(this._element,tL,()=>this.pause()),de.on(this._element,nL,()=>this._maybeEnableCycle())),this._config.touch&&dc.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ae.find(fL,this._element))de.on(r,rL,o=>o.preventDefault());const n={leftCallback:()=>this._slide(this._directionToOrder(vi)),rightCallback:()=>this._slide(this._directionToOrder(uc)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),qM+this._config.interval))}};this._swipeHelper=new dc(this._element,n)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const n=gL[e.key];n&&(e.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const n=Ae.findOne(J5,this._indicatorsElement);n.classList.remove(fc),n.removeAttribute("aria-current");const r=Ae.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(fc),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const n=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(e,n=null){if(this._isSliding)return;const r=this._getActive(),o=e===Ks,i=n||Kf(this._getItems(),r,o,this._config.wrap);if(i===r)return;const s=this._getItemIndex(i),c=p=>de.trigger(this._element,p,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:s});if(c(VM).defaultPrevented||!r||!i)return;const d=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(s),this._activeElement=i;const u=o?lL:aL,f=o?cL:dL;i.classList.add(f),js(i),r.classList.add(u),i.classList.add(u);const h=()=>{i.classList.remove(u,f),i.classList.add(fc),r.classList.remove(fc,f,u),this._isSliding=!1,c(Xf)};this._queueCallback(h,r,this._isAnimated()),d&&this.cycle()}_isAnimated(){return this._element.classList.contains(sL)}_getActive(){return Ae.findOne(uL,this._element)}_getItems(){return Ae.find(X5,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return un()?e===vi?gi:Ks:e===vi?Ks:gi}_orderToDirection(e){return un()?e===gi?vi:uc:e===gi?uc:vi}static jQueryInterface(e){return this.each(function(){const n=Ys.getOrCreateInstance(this,e);if(typeof e=="number"){n.to(e);return}if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,iL,pL,function(t){const e=Ae.getElementFromSelector(this);if(!e||!e.classList.contains(Z5))return;t.preventDefault();const n=Ys.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){n.to(r),n._maybeEnableCycle();return}if(lr.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()}),de.on(window,oL,()=>{const t=Ae.find(mL);for(const e of t)Ys.getOrCreateInstance(e)}),fn(Ys);const bL="collapse",Gs=".bs.collapse",CL=".data-api",EL=`show${Gs}`,kL=`shown${Gs}`,wL=`hide${Gs}`,SL=`hidden${Gs}`,AL=`click${Gs}${CL}`,qf="show",yi="collapse",hc="collapsing",xL="collapsed",TL=`:scope .${yi} .${yi}`,IL="collapse-horizontal",_L="width",NL="height",OL=".collapse.show, .collapse.collapsing",Vf='[data-bs-toggle="collapse"]',ML={parent:null,toggle:!0},LL={parent:"(null|element)",toggle:"boolean"};class Qs extends An{constructor(e,n){super(e,n),this._isTransitioning=!1,this._triggerArray=[];const r=Ae.find(Vf);for(const o of r){const i=Ae.getSelectorFromElement(o),s=Ae.find(i).filter(c=>c===this._element);i!==null&&s.length&&this._triggerArray.push(o)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ML}static get DefaultType(){return LL}static get NAME(){return bL}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(OL).filter(c=>c!==this._element).map(c=>Qs.getOrCreateInstance(c,{toggle:!1}))),e.length&&e[0]._isTransitioning||de.trigger(this._element,EL).defaultPrevented)return;for(const c of e)c.hide();const r=this._getDimension();this._element.classList.remove(yi),this._element.classList.add(hc),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(hc),this._element.classList.add(yi,qf),this._element.style[r]="",de.trigger(this._element,kL)},s=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[s]}px`}hide(){if(this._isTransitioning||!this._isShown()||de.trigger(this._element,wL).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,js(this._element),this._element.classList.add(hc),this._element.classList.remove(yi,qf);for(const o of this._triggerArray){const i=Ae.getElementFromSelector(o);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(hc),this._element.classList.add(yi),de.trigger(this._element,SL)};this._element.style[n]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(qf)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Hr(e.parent),e}_getDimension(){return this._element.classList.contains(IL)?_L:NL}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Vf);for(const n of e){const r=Ae.getElementFromSelector(n);r&&this._addAriaAndCollapsedClass([n],this._isShown(r))}}_getFirstLevelChildren(e){const n=Ae.find(TL,this._config.parent);return Ae.find(e,this._config.parent).filter(r=>!n.includes(r))}_addAriaAndCollapsedClass(e,n){if(e.length)for(const r of e)r.classList.toggle(xL,!n),r.setAttribute("aria-expanded",n)}static jQueryInterface(e){const n={};return typeof e=="string"&&/show|hide/.test(e)&&(n.toggle=!1),this.each(function(){const r=Qs.getOrCreateInstance(this,n);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}de.on(document,AL,Vf,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();for(const e of Ae.getMultipleElementsFromSelector(this))Qs.getOrCreateInstance(e,{toggle:!1}).toggle()}),fn(Qs);const q5="dropdown",Io=".bs.dropdown",eh=".data-api",DL="Escape",V5="Tab",PL="ArrowUp",ey="ArrowDown",BL=2,RL=`hide${Io}`,$L=`hidden${Io}`,FL=`show${Io}`,zL=`shown${Io}`,ty=`click${Io}${eh}`,ny=`keydown${Io}${eh}`,UL=`keyup${Io}${eh}`,bi="show",HL="dropup",jL="dropend",WL="dropstart",KL="dropup-center",YL="dropdown-center",_o='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',GL=`${_o}.${bi}`,pc=".dropdown-menu",QL=".navbar",ZL=".navbar-nav",JL=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",XL=un()?"top-end":"top-start",qL=un()?"top-start":"top-end",VL=un()?"bottom-end":"bottom-start",eD=un()?"bottom-start":"bottom-end",tD=un()?"left-start":"right-start",nD=un()?"right-start":"left-start",rD="top",oD="bottom",iD={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},sD={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Un extends An{constructor(e,n){super(e,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Ae.next(this._element,pc)[0]||Ae.prev(this._element,pc)[0]||Ae.findOne(pc,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return iD}static get DefaultType(){return sD}static get NAME(){return q5}toggle(){return this._isShown()?this.hide():this.show()}show(){if(jr(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!de.trigger(this._element,FL,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(ZL))for(const r of[].concat(...document.body.children))de.on(r,"mouseover",sc);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(bi),this._element.classList.add(bi),de.trigger(this._element,zL,e)}}hide(){if(jr(this._element)||!this._isShown())return;const e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(e){if(!de.trigger(this._element,RL,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))de.off(r,"mouseover",sc);this._popper&&this._popper.destroy(),this._menu.classList.remove(bi),this._element.classList.remove(bi),this._element.setAttribute("aria-expanded","false"),lr.removeDataAttribute(this._menu,"popper"),de.trigger(this._element,$L,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!ar(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${q5.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof O5>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)");let e=this._element;this._config.reference==="parent"?e=this._parent:ar(this._config.reference)?e=Hr(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const n=this._getPopperConfig();this._popper=Uf(e,this._menu,n)}_isShown(){return this._menu.classList.contains(bi)}_getPlacement(){const e=this._parent;if(e.classList.contains(jL))return tD;if(e.classList.contains(WL))return nD;if(e.classList.contains(KL))return rD;if(e.classList.contains(YL))return oD;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(HL)?n?qL:XL:n?eD:VL}_detectNavbar(){return this._element.closest(QL)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){const e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(lr.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Qt(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:n}){const r=Ae.find(JL,this._menu).filter(o=>pi(o));r.length&&Kf(r,n,e===ey,!r.includes(n)).focus()}static jQueryInterface(e){return this.each(function(){const n=Un.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}static clearMenus(e){if(e.button===BL||e.type==="keyup"&&e.key!==V5)return;const n=Ae.find(GL);for(const r of n){const o=Un.getInstance(r);if(!o||o._config.autoClose===!1)continue;const i=e.composedPath(),s=i.includes(o._menu);if(i.includes(o._element)||o._config.autoClose==="inside"&&!s||o._config.autoClose==="outside"&&s||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===V5||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const c={relatedTarget:o._element};e.type==="click"&&(c.clickEvent=e),o._completeHide(c)}}static dataApiKeydownHandler(e){const n=/input|textarea/i.test(e.target.tagName),r=e.key===DL,o=[PL,ey].includes(e.key);if(!o&&!r||n&&!r)return;e.preventDefault();const i=this.matches(_o)?this:Ae.prev(this,_o)[0]||Ae.next(this,_o)[0]||Ae.findOne(_o,e.delegateTarget.parentNode),s=Un.getOrCreateInstance(i);if(o){e.stopPropagation(),s.show(),s._selectMenuItem(e);return}s._isShown()&&(e.stopPropagation(),s.hide(),i.focus())}}de.on(document,ny,_o,Un.dataApiKeydownHandler),de.on(document,ny,pc,Un.dataApiKeydownHandler),de.on(document,ty,Un.clearMenus),de.on(document,UL,Un.clearMenus),de.on(document,ty,_o,function(t){t.preventDefault(),Un.getOrCreateInstance(this).toggle()}),fn(Un);const ry="backdrop",aD="fade",oy="show",iy=`mousedown.bs.${ry}`,lD={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},cD={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class sy extends Ws{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return lD}static get DefaultType(){return cD}static get NAME(){return ry}show(e){if(!this._config.isVisible){Qt(e);return}this._append();const n=this._getElement();this._config.isAnimated&&js(n),n.classList.add(oy),this._emulateAnimation(()=>{Qt(e)})}hide(e){if(!this._config.isVisible){Qt(e);return}this._getElement().classList.remove(oy),this._emulateAnimation(()=>{this.dispose(),Qt(e)})}dispose(){this._isAppended&&(de.off(this._element,iy),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add(aD),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Hr(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),de.on(e,iy,()=>{Qt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){B5(e,this._getElement(),this._config.isAnimated)}}const dD="focustrap",mc=".bs.focustrap",uD=`focusin${mc}`,fD=`keydown.tab${mc}`,hD="Tab",pD="forward",ay="backward",mD={autofocus:!0,trapElement:null},gD={autofocus:"boolean",trapElement:"element"};class ly extends Ws{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return mD}static get DefaultType(){return gD}static get NAME(){return dD}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),de.off(document,mc),de.on(document,uD,e=>this._handleFocusin(e)),de.on(document,fD,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,de.off(document,mc))}_handleFocusin(e){const{trapElement:n}=this._config;if(e.target===document||e.target===n||n.contains(e.target))return;const r=Ae.focusableChildren(n);r.length===0?n.focus():this._lastTabNavDirection===ay?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===hD&&(this._lastTabNavDirection=e.shiftKey?ay:pD)}}const cy=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",dy=".sticky-top",gc="padding-right",uy="margin-right";class th{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,gc,n=>n+e),this._setElementAttributes(cy,gc,n=>n+e),this._setElementAttributes(dy,uy,n=>n-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,gc),this._resetElementAttributes(cy,gc),this._resetElementAttributes(dy,uy)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,r){const o=this.getWidth(),i=s=>{if(s!==this._element&&window.innerWidth>s.clientWidth+o)return;this._saveInitialAttribute(s,n);const c=window.getComputedStyle(s).getPropertyValue(n);s.style.setProperty(n,`${r(Number.parseFloat(c))}px`)};this._applyManipulationCallback(e,i)}_saveInitialAttribute(e,n){const r=e.style.getPropertyValue(n);r&&lr.setDataAttribute(e,n,r)}_resetElementAttributes(e,n){const r=o=>{const i=lr.getDataAttribute(o,n);if(i===null){o.style.removeProperty(n);return}lr.removeDataAttribute(o,n),o.style.setProperty(n,i)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,n){if(ar(e)){n(e);return}for(const r of Ae.find(e,this._element))n(r)}}const vD="modal",hn=".bs.modal",yD=".data-api",bD="Escape",CD=`hide${hn}`,ED=`hidePrevented${hn}`,fy=`hidden${hn}`,hy=`show${hn}`,kD=`shown${hn}`,wD=`resize${hn}`,SD=`click.dismiss${hn}`,AD=`mousedown.dismiss${hn}`,xD=`keydown.dismiss${hn}`,TD=`click${hn}${yD}`,py="modal-open",ID="fade",my="show",nh="modal-static",_D=".modal.show",ND=".modal-dialog",OD=".modal-body",MD='[data-bs-toggle="modal"]',LD={backdrop:!0,focus:!0,keyboard:!0},DD={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Kr extends An{constructor(e,n){super(e,n),this._dialog=Ae.findOne(ND,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new th,this._addEventListeners()}static get Default(){return LD}static get DefaultType(){return DD}static get NAME(){return vD}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||de.trigger(this._element,hy,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(py),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||de.trigger(this._element,CD).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(my),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){de.off(window,hn),de.off(this._dialog,hn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new sy({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ly({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Ae.findOne(OD,this._dialog);n&&(n.scrollTop=0),js(this._element),this._element.classList.add(my);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,de.trigger(this._element,kD,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){de.on(this._element,xD,e=>{if(e.key===bD){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),de.on(window,wD,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),de.on(this._element,AD,e=>{de.one(this._element,SD,n=>{if(!(this._element!==e.target||this._element!==n.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(py),this._resetAdjustments(),this._scrollBar.reset(),de.trigger(this._element,fy)})}_isAnimated(){return this._element.classList.contains(ID)}_triggerBackdropTransition(){if(de.trigger(this._element,ED).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(nh)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(nh),this._queueCallback(()=>{this._element.classList.remove(nh),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),r=n>0;if(r&&!e){const o=un()?"paddingLeft":"paddingRight";this._element.style[o]=`${n}px`}if(!r&&e){const o=un()?"paddingRight":"paddingLeft";this._element.style[o]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){const r=Kr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](n)}})}}de.on(document,TD,MD,function(t){const e=Ae.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),de.one(e,hy,o=>{o.defaultPrevented||de.one(e,fy,()=>{pi(this)&&this.focus()})});const n=Ae.findOne(_D);n&&Kr.getInstance(n).hide(),Kr.getOrCreateInstance(e).toggle(this)}),ac(Kr),fn(Kr);const PD="offcanvas",cr=".bs.offcanvas",gy=".data-api",BD=`load${cr}${gy}`,RD="Escape",vy="show",yy="showing",by="hiding",$D="offcanvas-backdrop",Cy=".offcanvas.show",FD=`show${cr}`,zD=`shown${cr}`,UD=`hide${cr}`,Ey=`hidePrevented${cr}`,ky=`hidden${cr}`,HD=`resize${cr}`,jD=`click${cr}${gy}`,WD=`keydown.dismiss${cr}`,KD='[data-bs-toggle="offcanvas"]',YD={backdrop:!0,keyboard:!0,scroll:!1},GD={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Yr extends An{constructor(e,n){super(e,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return YD}static get DefaultType(){return GD}static get NAME(){return PD}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||de.trigger(this._element,FD,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new th().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(yy);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(vy),this._element.classList.remove(yy),de.trigger(this._element,zD,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||de.trigger(this._element,UD).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(by),this._backdrop.hide();const n=()=>{this._element.classList.remove(vy,by),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new th().reset(),de.trigger(this._element,ky)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){de.trigger(this._element,Ey);return}this.hide()},n=!!this._config.backdrop;return new sy({className:$D,isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?e:null})}_initializeFocusTrap(){return new ly({trapElement:this._element})}_addEventListeners(){de.on(this._element,WD,e=>{if(e.key===RD){if(this._config.keyboard){this.hide();return}de.trigger(this._element,Ey)}})}static jQueryInterface(e){return this.each(function(){const n=Yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}de.on(document,jD,KD,function(t){const e=Ae.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),jr(this))return;de.one(e,ky,()=>{pi(this)&&this.focus()});const n=Ae.findOne(Cy);n&&n!==e&&Yr.getInstance(n).hide(),Yr.getOrCreateInstance(e).toggle(this)}),de.on(window,BD,()=>{for(const t of Ae.find(Cy))Yr.getOrCreateInstance(t).show()}),de.on(window,HD,()=>{for(const t of Ae.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(t).position!=="fixed"&&Yr.getOrCreateInstance(t).hide()}),ac(Yr),fn(Yr);const wy={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},QD=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ZD=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,JD=(t,e)=>{const n=t.nodeName.toLowerCase();return e.includes(n)?QD.has(n)?!!ZD.test(t.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(n))};function XD(t,e,n){if(!t.length)return t;if(n&&typeof n=="function")return n(t);const o=new window.DOMParser().parseFromString(t,"text/html"),i=[].concat(...o.body.querySelectorAll("*"));for(const s of i){const c=s.nodeName.toLowerCase();if(!Object.keys(e).includes(c)){s.remove();continue}const a=[].concat(...s.attributes),d=[].concat(e["*"]||[],e[c]||[]);for(const u of a)JD(u,d)||s.removeAttribute(u.nodeName)}return o.body.innerHTML}const qD="TemplateFactory",VD={allowList:wy,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},eP={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},tP={entry:"(string|element|function|null)",selector:"(string|element)"};class nP extends Ws{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return VD}static get DefaultType(){return eP}static get NAME(){return qD}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[o,i]of Object.entries(this._config.content))this._setContent(e,i,o);const n=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&n.classList.add(...r.split(" ")),n}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[n,r]of Object.entries(e))super._typeCheckConfig({selector:n,entry:r},tP)}_setContent(e,n,r){const o=Ae.findOne(r,e);if(o){if(n=this._resolvePossibleFunction(n),!n){o.remove();return}if(ar(n)){this._putElementInTemplate(Hr(n),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(n);return}o.textContent=n}}_maybeSanitize(e){return this._config.sanitize?XD(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Qt(e,[void 0,this])}_putElementInTemplate(e,n){if(this._config.html){n.innerHTML="",n.append(e);return}n.textContent=e.textContent}}const rP="tooltip",oP=new Set(["sanitize","allowList","sanitizeFn"]),rh="fade",iP="modal",vc="show",sP=".tooltip-inner",Sy=`.${iP}`,Ay="hide.bs.modal",Zs="hover",oh="focus",ih="click",aP="manual",lP="hide",cP="hidden",dP="show",uP="shown",fP="inserted",hP="click",pP="focusin",mP="focusout",gP="mouseenter",vP="mouseleave",yP={AUTO:"auto",TOP:"top",RIGHT:un()?"left":"right",BOTTOM:"bottom",LEFT:un()?"right":"left"},bP={allowList:wy,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},CP={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Hn extends An{constructor(e,n){if(typeof O5>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)");super(e,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return bP}static get DefaultType(){return CP}static get NAME(){return rP}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),de.off(this._element.closest(Sy),Ay,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const e=de.trigger(this._element,this.constructor.eventName(dP)),r=(D5(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!r)return;this._disposePopper();const o=this._getTipElement();this._element.setAttribute("aria-describedby",o.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(o),de.trigger(this._element,this.constructor.eventName(fP))),this._popper=this._createPopper(o),o.classList.add(vc),"ontouchstart"in document.documentElement)for(const c of[].concat(...document.body.children))de.on(c,"mouseover",sc);const s=()=>{de.trigger(this._element,this.constructor.eventName(uP)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(s,this.tip,this._isAnimated())}hide(){if(!this._isShown()||de.trigger(this._element,this.constructor.eventName(lP)).defaultPrevented)return;if(this._getTipElement().classList.remove(vc),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))de.off(o,"mouseover",sc);this._activeTrigger[ih]=!1,this._activeTrigger[oh]=!1,this._activeTrigger[Zs]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),de.trigger(this._element,this.constructor.eventName(cP)))};this._queueCallback(r,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const n=this._getTemplateFactory(e).toHtml();if(!n)return null;n.classList.remove(rh,vc),n.classList.add(`bs-${this.constructor.NAME}-auto`);const r=gM(this.constructor.NAME).toString();return n.setAttribute("id",r),this._isAnimated()&&n.classList.add(rh),n}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new nP({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[sP]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(rh)}_isShown(){return this.tip&&this.tip.classList.contains(vc)}_createPopper(e){const n=Qt(this._config.placement,[this,e,this._element]),r=yP[n.toUpperCase()];return Uf(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_resolvePossibleFunction(e){return Qt(e,[this._element,this._element])}_getPopperConfig(e){const n={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:r=>{this._getTipElement().setAttribute("data-popper-placement",r.state.placement)}}]};return{...n,...Qt(this._config.popperConfig,[void 0,n])}}_setListeners(){const e=this._config.trigger.split(" ");for(const n of e)if(n==="click")de.on(this._element,this.constructor.eventName(hP),this._config.selector,r=>{const o=this._initializeOnDelegatedTarget(r);o._activeTrigger[ih]=!(o._isShown()&&o._activeTrigger[ih]),o.toggle()});else if(n!==aP){const r=n===Zs?this.constructor.eventName(gP):this.constructor.eventName(pP),o=n===Zs?this.constructor.eventName(vP):this.constructor.eventName(mP);de.on(this._element,r,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusin"?oh:Zs]=!0,s._enter()}),de.on(this._element,o,this._config.selector,i=>{const s=this._initializeOnDelegatedTarget(i);s._activeTrigger[i.type==="focusout"?oh:Zs]=s._element.contains(i.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},de.on(this._element.closest(Sy),Ay,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,n){clearTimeout(this._timeout),this._timeout=setTimeout(e,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const n=lr.getDataAttributes(this._element);for(const r of Object.keys(n))oP.has(r)&&delete n[r];return e={...n,...typeof e=="object"&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Hr(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[n,r]of Object.entries(this._config))this.constructor.Default[n]!==r&&(e[n]=r);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const n=Hn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}fn(Hn);const EP="popover",kP=".popover-header",wP=".popover-body",SP={...Hn.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},AP={...Hn.DefaultType,content:"(null|string|element|function)"};class No extends Hn{static get Default(){return SP}static get DefaultType(){return AP}static get NAME(){return EP}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[kP]:this._getTitle(),[wP]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const n=No.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e]()}})}}fn(No);const xP="scrollspy",sh=".bs.scrollspy",TP=".data-api",IP=`activate${sh}`,xy=`click${sh}`,_P=`load${sh}${TP}`,NP="dropdown-item",Ci="active",OP='[data-bs-spy="scroll"]',ah="[href]",MP=".nav, .list-group",Ty=".nav-link",LP=`${Ty}, .nav-item > ${Ty}, .list-group-item`,DP=".dropdown",PP=".dropdown-toggle",BP={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},RP={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class yc extends An{constructor(e,n){super(e,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return BP}static get DefaultType(){return RP}static get NAME(){return xP}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Hr(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold=="string"&&(e.threshold=e.threshold.split(",").map(n=>Number.parseFloat(n))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(de.off(this._config.target,xy),de.on(this._config.target,xy,ah,e=>{const n=this._observableSections.get(e.target.hash);if(n){e.preventDefault();const r=this._rootElement||window,o=n.offsetTop-this._element.offsetTop;if(r.scrollTo){r.scrollTo({top:o,behavior:"smooth"});return}r.scrollTop=o}}))}_getNewObserver(){const e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),e)}_observerCallback(e){const n=s=>this._targetLinks.get(`#${s.target.id}`),r=s=>{this._previousScrollData.visibleEntryTop=s.target.offsetTop,this._process(n(s))},o=(this._rootElement||document.documentElement).scrollTop,i=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const s of e){if(!s.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(s));continue}const c=s.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&c){if(r(s),!o)return;continue}!i&&!c&&r(s)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ae.find(ah,this._config.target);for(const n of e){if(!n.hash||jr(n))continue;const r=Ae.findOne(decodeURI(n.hash),this._element);pi(r)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Ci),this._activateParents(e),de.trigger(this._element,IP,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(NP)){Ae.findOne(PP,e.closest(DP)).classList.add(Ci);return}for(const n of Ae.parents(e,MP))for(const r of Ae.prev(n,LP))r.classList.add(Ci)}_clearActiveClass(e){e.classList.remove(Ci);const n=Ae.find(`${ah}.${Ci}`,e);for(const r of n)r.classList.remove(Ci)}static jQueryInterface(e){return this.each(function(){const n=yc.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(window,_P,()=>{for(const t of Ae.find(OP))yc.getOrCreateInstance(t)}),fn(yc);const $P="tab",Oo=".bs.tab",FP=`hide${Oo}`,zP=`hidden${Oo}`,UP=`show${Oo}`,HP=`shown${Oo}`,jP=`click${Oo}`,WP=`keydown${Oo}`,KP=`load${Oo}`,YP="ArrowLeft",Iy="ArrowRight",GP="ArrowUp",_y="ArrowDown",lh="Home",Ny="End",Mo="active",Oy="fade",ch="show",QP="dropdown",My=".dropdown-toggle",ZP=".dropdown-menu",dh=`:not(${My})`,JP='.list-group, .nav, [role="tablist"]',XP=".nav-item, .list-group-item",qP=`.nav-link${dh}, .list-group-item${dh}, [role="tab"]${dh}`,Ly='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',uh=`${qP}, ${Ly}`,VP=`.${Mo}[data-bs-toggle="tab"], .${Mo}[data-bs-toggle="pill"], .${Mo}[data-bs-toggle="list"]`;class Ei extends An{constructor(e){super(e),this._parent=this._element.closest(JP),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),de.on(this._element,WP,n=>this._keydown(n)))}static get NAME(){return $P}show(){const e=this._element;if(this._elemIsActive(e))return;const n=this._getActiveElem(),r=n?de.trigger(n,FP,{relatedTarget:e}):null;de.trigger(e,UP,{relatedTarget:n}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(n,e),this._activate(e,n))}_activate(e,n){if(!e)return;e.classList.add(Mo),this._activate(Ae.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(ch);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),de.trigger(e,HP,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(Oy))}_deactivate(e,n){if(!e)return;e.classList.remove(Mo),e.blur(),this._deactivate(Ae.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(ch);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),de.trigger(e,zP,{relatedTarget:n})};this._queueCallback(r,e,e.classList.contains(Oy))}_keydown(e){if(![YP,Iy,GP,_y,lh,Ny].includes(e.key))return;e.stopPropagation(),e.preventDefault();const n=this._getChildren().filter(o=>!jr(o));let r;if([lh,Ny].includes(e.key))r=n[e.key===lh?0:n.length-1];else{const o=[Iy,_y].includes(e.key);r=Kf(n,e.target,o,!0)}r&&(r.focus({preventScroll:!0}),Ei.getOrCreateInstance(r).show())}_getChildren(){return Ae.find(uh,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,n){this._setAttributeIfNotExists(e,"role","tablist");for(const r of n)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const n=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",n),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),n||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const n=Ae.getElementFromSelector(e);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,n){const r=this._getOuterElement(e);if(!r.classList.contains(QP))return;const o=(i,s)=>{const c=Ae.findOne(i,r);c&&c.classList.toggle(s,n)};o(My,Mo),o(ZP,ch),r.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(e,n,r){e.hasAttribute(n)||e.setAttribute(n,r)}_elemIsActive(e){return e.classList.contains(Mo)}_getInnerElement(e){return e.matches(uh)?e:Ae.findOne(uh,e)}_getOuterElement(e){return e.closest(XP)||e}static jQueryInterface(e){return this.each(function(){const n=Ei.getOrCreateInstance(this);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e]()}})}}de.on(document,jP,Ly,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),!jr(this)&&Ei.getOrCreateInstance(this).show()}),de.on(window,KP,()=>{for(const t of Ae.find(VP))Ei.getOrCreateInstance(t)}),fn(Ei);const eB="toast",Gr=".bs.toast",tB=`mouseover${Gr}`,nB=`mouseout${Gr}`,rB=`focusin${Gr}`,oB=`focusout${Gr}`,iB=`hide${Gr}`,sB=`hidden${Gr}`,aB=`show${Gr}`,lB=`shown${Gr}`,cB="fade",Dy="hide",bc="show",Cc="showing",dB={animation:"boolean",autohide:"boolean",delay:"number"},uB={animation:!0,autohide:!0,delay:5e3};class ki extends An{constructor(e,n){super(e,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return uB}static get DefaultType(){return dB}static get NAME(){return eB}show(){if(de.trigger(this._element,aB).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(cB);const n=()=>{this._element.classList.remove(Cc),de.trigger(this._element,lB),this._maybeScheduleHide()};this._element.classList.remove(Dy),js(this._element),this._element.classList.add(bc,Cc),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown()||de.trigger(this._element,iB).defaultPrevented)return;const n=()=>{this._element.classList.add(Dy),this._element.classList.remove(Cc,bc),de.trigger(this._element,sB)};this._element.classList.add(Cc),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(bc),super.dispose()}isShown(){return this._element.classList.contains(bc)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=n;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=n;break}}if(n){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){de.on(this._element,tB,e=>this._onInteraction(e,!0)),de.on(this._element,nB,e=>this._onInteraction(e,!1)),de.on(this._element,rB,e=>this._onInteraction(e,!0)),de.on(this._element,oB,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const n=ki.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]>"u")throw new TypeError(`No method named "${e}"`);n[e](this)}})}}ac(ki),fn(ki);function Py(t,e){return e.value||t.getAttribute("title")||""}const Lo={mounted:(t,e)=>{const n=Py(t,e);n&&t.setAttribute("title",n),new Hn(t)},updated:(t,e)=>{const n=Hn.getInstance(t);n&&n.dispose();const r=Py(t,e);r&&t.setAttribute("title",r),new Hn(t)},unmounted:t=>{const e=Hn.getInstance(t);e&&e.dispose()}},fB={key:0,class:"pills-list__wrapper"},hB={class:"pills-list__ul"},pB={class:"bd-markdown-editor__menu-bottom"},mB={key:0,class:"vr"},By=l.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:[Boolean,null],default:null},variant:{default:_f.BASIC},files:{default:void 0},pills:{default:void 0},apiUrl:{default:""},modelValue:{}},emits:["update:modelValue","upload","action"],setup(t,{emit:e}){const n=t,r=e,o=()=>{r("upload")},i=Vr(n,"modelValue",r),s=[M_,P_,R_,ON.configure({placeholder:n.placeholder}),cO,dN.configure({openOnClick:!1,validate:Y=>/^(https?:\/\/|www\.)/i.test(Y)})];n.variant===_f.FULL&&s.push(RN,jN,KN,iO,sO,aO);const c=N_({content:i.value,extensions:s,onUpdate:({editor:Y})=>{const{view:z,state:U}=Y,{from:F,to:X}=z.state.selection;if(U.doc.textBetween(F-1,X,"")==" "&&Y.getAttributes("link").href!=null&&Y.chain().setTextSelection({from:F-1,to:X}).toggleLink({href:Y.getAttributes("link").href}).setTextSelection({from:X,to:X}).run(),Y.getText().trim()===""){r("update:modelValue","");return}r("update:modelValue",Y.getHTML())}});l.watch(()=>n.modelValue,Y=>{c.value.getHTML()!==Y&&c.value.commands.setContent(Y,!0,{preserveWhitespace:"full"})});const a=l.computed(()=>n.state===!1?"is-invalid":null),d=l.computed(()=>v("bold")),u=l.computed(()=>v("italic")),f=l.computed(()=>v("underline")),h=l.computed(()=>v("bulletList")),p=l.computed(()=>v("orderedList")),m=l.computed(()=>v("link")),g=l.computed(()=>n.variant===_f.FULL),v=Y=>c.value&&c.value.isActive(Y)?"active":null,y=l.computed(()=>n.files&&n.files.length>0?So(n.apiUrl,n.files,!1):null),b=l.computed(()=>n.files&&n.files.length>0?So(n.apiUrl,n.files,!0):null),E=Y=>{r("action",{name:"delete-attachment",obj:Y})},C=Y=>{r("action",{name:"image-attachment",obj:Y})},S=l.computed(()=>{if(!c.value)return!1;const{from:Y,to:z}=c.value.state.selection;return Y!==z}),_=l.computed(()=>S.value?"Voeg een link toe":"Selecteer eerst tekst"),T=l.ref(!1),D=l.ref(""),G=l.ref(null),$=()=>{D.value=c.value.getAttributes("link").href||"",T.value=!0},j=Y=>{if(T.value=!1,!Y){c.value.chain().focus().unsetLink().run();return}/^www\./i.test(Y)&&(Y=`https://${Y}`),c.value.chain().focus().toggleLink({href:Y}).run()},W=()=>{T.value=!1};return(Y,z)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:l.normalizeClass(["bd-markdown-editor",a.value])},[l.createVNode(l.unref(__),{editor:l.unref(c)},null,8,["editor"]),t.pills?(l.openBlock(),l.createElementBlock("div",fB,[l.createElementVNode("ul",hB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.pills,(U,F)=>(l.openBlock(),l.createElementBlock("li",{key:F,class:"pills-list__li"},[l.createVNode(_a,l.mergeProps({ref_for:!0},U),null,16)]))),128))])])):l.createCommentVNode("",!0),l.renderSlot(Y.$slots,"default"),y.value?(l.openBlock(),l.createBlock($s,{key:1,files:y.value,"no-download":!0,"show-delete":!0,onDelete:E},null,8,["files"])):l.createCommentVNode("",!0),b.value?(l.openBlock(),l.createBlock(Fs,{key:2,files:b.value,"no-download":!0,"show-delete":!0,"fast-download":!1,onDelete:E,onShow:C},null,8,["files"])):l.createCommentVNode("",!0),l.createElementVNode("div",pB,[l.createVNode(Re,{variant:"light",type:"button",onClick:o},{default:l.withCtx(()=>[l.createVNode(l.unref(hr))]),_:1}),g.value?(l.openBlock(),l.createElementBlock("div",mB)):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:1,variant:"light",type:"button",class:l.normalizeClass(d.value),onClick:z[0]||(z[0]=U=>l.unref(c).chain().focus().toggleBold().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Tc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:2,variant:"light",type:"button",class:l.normalizeClass(u.value),onClick:z[1]||(z[1]=U=>l.unref(c).chain().focus().toggleItalic().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Fc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:3,variant:"light",type:"button",class:l.normalizeClass(f.value),onClick:z[2]||(z[2]=U=>l.unref(c).chain().focus().toggleUnderline().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Yc))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:4,variant:"light",type:"button",class:l.normalizeClass(h.value),onClick:z[3]||(z[3]=U=>l.unref(c).chain().focus().toggleBulletList().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Ic))]),_:1},8,["class"])):l.createCommentVNode("",!0),g.value?(l.openBlock(),l.createBlock(Re,{key:5,variant:"light",type:"button",class:l.normalizeClass(p.value),onClick:z[4]||(z[4]=U=>l.unref(c).chain().focus().toggleOrderedList().run())},{default:l.withCtx(()=>[l.createVNode(l.unref(Uc))]),_:1},8,["class"])):l.createCommentVNode("",!0),l.withDirectives((l.openBlock(),l.createElementBlock("span",null,[g.value?(l.openBlock(),l.createBlock(Re,{key:0,ref_key:"linkButton",ref:G,variant:"light",type:"button",class:l.normalizeClass(m.value),onClick:$,disabled:!S.value},{default:l.withCtx(()=>[l.createVNode(l.unref(ra))]),_:1},8,["class","disabled"])):l.createCommentVNode("",!0)])),[[l.unref(Lo),_.value]])]),T.value?(l.openBlock(),l.createBlock(hO,{key:3,previousUrl:D.value,onSubmit:j,onCancel:W},null,8,["previousUrl"])):l.createCommentVNode("",!0)],2),l.createVNode(xa,{text:n.errorText,state:n.state},null,8,["text","state"])],64))}}),gB={class:"header"},vB={class:"icon-close-wrapper"},yB={class:"navbar"},bB={class:"nav navbar-nav w-100"},CB={class:"nav-item"},EB={class:"nav-item"},fh=l.defineComponent({__name:"BDMobileMenu",props:{active:{type:Boolean,default:void 0},options:{}},emits:["hide","signout"],setup(t,{emit:e}){const n=e,r=t,o=l.computed(()=>({active:r.active===!0,inactive:r.active===!1})),i=()=>n("hide"),s=()=>n("signout");return(c,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-mobile-menu",o.value])},[l.createElementVNode("div",gB,[a[0]||(a[0]=l.createElementVNode("div",null,"Menu",-1)),l.createElementVNode("div",vB,[l.createVNode(ta,{onClick:i})])]),l.createElementVNode("nav",yB,[l.createElementVNode("ul",bB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.options,d=>(l.openBlock(),l.createElementBlock("li",CB,[l.createVNode(Xr,l.mergeProps({class:"nav-link"},{ref_for:!0},d,{onClick:i}),null,16)]))),256)),l.renderSlot(c.$slots,"special-options"),l.createElementVNode("li",EB,[l.createVNode(Xr,{class:"nav-link",text:"Uitloggen",onClick:s})])])])],2))}}),kB={class:"bd-user"},wB={class:"bd-user__information"},SB={class:"text-break"},AB={class:"overflow-x-hidden"},Ry=l.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(t){const e=t,n=l.computed(()=>typeof e.details=="string"?e.details:e.details?.join(" • "));return(r,o)=>(l.openBlock(),l.createElementBlock("div",kB,[e.hideImage?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(_i,l.mergeProps({key:0},e.img,{size:"sm"}),null,16)),l.createElementVNode("div",wB,[l.createElementVNode("header",null,[l.createElementVNode("h5",SB,l.toDisplayString(e.name),1),l.renderSlot(r.$slots,"header-extra")]),l.createElementVNode("span",AB,l.toDisplayString(n.value),1)])]))}}),xB={class:"bd-chat-cloud-card"},TB={class:"bd-chat-cloud-card__header"},IB={class:"bd-chat-cloud-card__body"},_B=["innerHTML"],NB={class:"bd-chat-cloud-card__footer"},OB={key:0,class:"pills-list__wrapper"},MB={class:"pills-list__ul"},$y=l.defineComponent({__name:"BDChatCloud",props:{headerTitle:{default:""},src:{default:void 0},username:{default:null},message:{default:""},isSender:{type:Boolean,default:!1},files:{default:void 0},pills:{default:void 0},apiUrl:{default:""}},emits:["show-attachment","action"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>n.isSender?"sender":_e),i=l.computed(()=>So(n.apiUrl,n.files,!1)),s=l.computed(()=>So(n.apiUrl,n.files,!0)),c=()=>{r("action","copy-message")},a=d=>{r("show-attachment",d)};return(d,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["bd-chat-cloud",o.value])},[l.createVNode(_i,{src:n.src,username:n.username,size:"sm"},null,8,["src","username"]),l.createElementVNode("div",xB,[l.createElementVNode("div",TB,[l.renderSlot(d.$slots,"header",{},()=>[l.createTextVNode(l.toDisplayString(t.headerTitle),1)]),l.createVNode(Re,{variant:"outline-primary-dark",size:"sm",onClick:c},{default:l.withCtx(()=>[...u[0]||(u[0]=[l.createTextVNode(" kopieer ",-1)])]),_:1})]),l.createElementVNode("div",IB,[l.renderSlot(d.$slots,"body",{},()=>[l.createElementVNode("div",{class:"bd-chat-cloud-card__message",innerHTML:n.message},null,8,_B)])]),l.createElementVNode("div",NB,[l.renderSlot(d.$slots,"footer",{},()=>[t.pills?(l.openBlock(),l.createElementBlock("div",OB,[l.createElementVNode("ul",MB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.pills,(f,h)=>(l.openBlock(),l.createElementBlock("li",{key:h,class:"pills-list__li"},[l.createVNode(_a,l.mergeProps({ref_for:!0},f),null,16)]))),128))])])):l.createCommentVNode("",!0),i.value&&i.value.length>0?(l.openBlock(),l.createBlock($s,{key:1,files:i.value},null,8,["files"])):l.createCommentVNode("",!0),s.value&&s.value.length>0?(l.openBlock(),l.createBlock(Fs,{key:2,"fast-download":!0,files:s.value,onShow:a},null,8,["files"])):l.createCommentVNode("",!0)])])])],2))}}),LB=l.defineComponent({__name:"BDTableSortHeader",props:["active","label","sortDesc"],emits:["sortAsc","sortDesc"],setup(t,{emit:e}){const n=t,r=e,o=l.ref(n.sortDesc),i=()=>{n.active&&(o.value=!o.value)},s=()=>{if(!n.active)return;const a=o.value?"sortDesc":"sortAsc";r(a)},c=l.computed(()=>({"bd-table-sort":!0,active:n.active}));return l.watch(()=>n.active,(a,d)=>{a&&!d&&(o.value=!1,r("sortAsc"))}),s(),(a,d)=>(l.openBlock(),l.createElementBlock("th",{class:l.normalizeClass(c.value),onClick:d[0]||(d[0]=u=>{i(),s()})},[l.createElementVNode("span",null,l.toDisplayString(n.label),1),n.active&&!o.value?(l.openBlock(),l.createBlock(l.unref(Hc),{key:0})):n.active&&o.value?(l.openBlock(),l.createBlock(l.unref(jc),{key:1})):(l.openBlock(),l.createBlock(l.unref(Wc),{key:2}))],2))}}),DB={class:"bd-table"},PB={key:0,class:"table"},BB={key:1},RB=["onClick"],$B={key:0},FB={key:1,class:"empty-text"},Fy=l.defineComponent({__name:"BDTable",props:["fields","items","sortBy","sortDesc","tbodyTrClass","emptyText"],emits:["row-click","sort-changed"],setup(t,{expose:e,emit:n}){const r=t,o=n,i=l.ref(r.items),s=l.ref(r.sortBy),c=h=>s.value=h,a=(h,p,m)=>{const g=p[h],v=m[h];if(g==null)return 1;if(v==null)return-1;const y=g.toString(),b=v.toString();return y.localeCompare(b,void 0,{numeric:!0})},d=h=>{i.value=i.value.sort((m,g)=>a(h,m,g)),o("sort-changed",{sortBy:h,sortDesc:!1})},u=h=>{i.value=i.value.sort((m,g)=>a(h,g,m)),o("sort-changed",{sortBy:h,sortDesc:!0})},f=()=>{i.value=r.items};return l.watch(()=>r.items,h=>{i.value=h}),e({Refresh:f}),(h,p)=>(l.openBlock(),l.createElementBlock("div",DB,[r.items&&r.items.length>0?(l.openBlock(),l.createElementBlock("table",PB,[l.createElementVNode("thead",null,[l.createElementVNode("tr",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.fields,m=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[m.isVisible?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[m.sortable?(l.openBlock(),l.createBlock(LB,{key:0,label:m.label,active:m.key==s.value,sortDesc:r.sortDesc,onClick:g=>c(m.key),onSortAsc:g=>d(m.key),onSortDesc:g=>u(m.key)},null,8,["label","active","sortDesc","onClick","onSortAsc","onSortDesc"])):(l.openBlock(),l.createElementBlock("th",BB,l.toDisplayString(m.label),1))],64)):l.createCommentVNode("",!0)],64))),256))])]),l.createElementVNode("tbody",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,m=>(l.openBlock(),l.createElementBlock("tr",{class:l.normalizeClass(r.tbodyTrClass&&r.tbodyTrClass(m)),onClick:g=>o("row-click",m)},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.fields,g=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[g.isVisible?(l.openBlock(),l.createElementBlock("td",$B,[h.$slots.hasOwnProperty(g.key)?l.renderSlot(h.$slots,g.key,{key:0,row:m,item:m,value:m[g.key]}):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createTextVNode(l.toDisplayString(m[g.key]),1)],64))])):l.createCommentVNode("",!0)],64))),256))],10,RB))),256))])])):(l.openBlock(),l.createElementBlock("p",FB,l.toDisplayString(r.emptyText),1))]))}}),zB=["id"],UB={key:0,class:"toast-body__title"},HB={class:"actions"},jB=["textContent"],WB=["textContent"],KB={class:"icon-wrapper"},YB=["textContent"],GB=["textContent"],zy=3e4,Uy=5e3,Hy=l.defineComponent({__name:"BDVideoCallToast",props:{id:{},contactInfoReceiver:{},isSender:{type:Boolean},firstNameSender:{},canceled:{type:Boolean},disabled:{type:Boolean},localization:{}},emits:["reject-video-call","accept-video-call"],setup(t,{emit:e}){const n=t,r=e;let o=l.ref(!1),i=l.ref(!1),s=null,c=null;const a=l.computed(()=>{let E="video-call-toast";return n.id&&(E+=`-${n.id}`),E}),d=l.computed(()=>o.value?[o.value?"is-handled":_e,i.value?"is-handled--success":_e,n.canceled?"is-handled--canceled":_e].join(" "):_e),u=l.computed(()=>n.canceled?n.localization.videoCallCanceled:i.value?n.localization.videoCallAccepted:n.localization.videoCallRejected),f=l.computed(()=>n.canceled?`${n.firstNameSender}${n.localization.notifyCallerWhenCanceled}`:n.isSender?n.contactInfoReceiver?`${n.contactInfoReceiver.name}${n.localization.notifyCallerWhenRejected}`:n.localization.notifyCallerWhenRejected:i.value?n.localization.openNewTabWhenAccepted:`${n.localization.notifyReceiverWhenRejected.start}${n.firstNameSender}${n.localization.notifyReceiverWhenRejected.end}`.replace(/\s\s+/g," "));l.watch(()=>n.canceled,()=>{o.value=!0});const h=()=>{const E=a.value,C=document.querySelector(`#${E}`);if(C){C.addEventListener("hide.bs.toast",b);var S={autohide:!0,delay:zy+Uy};c=ki.getOrCreateInstance(C,S),c.show(),s=window.setTimeout(p,zy)}};l.onMounted(h);const p=()=>{o.value||g()},m=()=>{g(),y()},g=()=>{o.value||(o.value=!0,r("reject-video-call",n.id))},v=()=>{o.value=!0,i.value=!0,r("accept-video-call",n.id),y()},y=()=>{window.clearTimeout(s),window.setTimeout(()=>c.hide(),Uy)},b=()=>{o.value=!1,i.value=!1};return(E,C)=>(l.openBlock(),l.createElementBlock("div",{id:a.value,class:"toast bd-video-call-toast",role:"alert","aria-live":"assertive","aria-atomic":"true"},[l.unref(o)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",UB,l.toDisplayString(n.localization.incomingVideoCall),1)),l.createElementVNode("div",{class:l.normalizeClass(["toast-body__main",d.value])},[l.unref(o)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[l.createElementVNode("div",KB,[l.createVNode(Vs)]),l.createElementVNode("div",null,[l.createElementVNode("p",{textContent:l.toDisplayString(u.value),class:"title"},null,8,YB),l.createElementVNode("p",{textContent:l.toDisplayString(f.value)},null,8,GB)])],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Fd,{value:t.contactInfoReceiver},null,8,["value"]),l.createElementVNode("div",HB,[l.createVNode(Re,{variant:"danger",class:"text-center",onClick:m},{default:l.withCtx(()=>[l.createVNode(_c),l.createElementVNode("span",{textContent:l.toDisplayString(n.localization.rejectVideoCall)},null,8,jB)]),_:1}),l.createVNode(Re,{variant:"success",class:"text-center",onClick:v},{default:l.withCtx(()=>[l.createVNode(Vs),l.createElementVNode("span",{textContent:l.toDisplayString(n.localization.acceptVideoCall)},null,8,WB)]),_:1})])],64))],2)],8,zB))}}),hh=l.defineComponent({__name:"BDDropdown",props:{size:{default:at.MD},variant:{default:ia.PRIMARY},right:{type:Boolean,default:void 0},noFlip:{type:Boolean,default:void 0},toggleTag:{default:"button"},toggleClass:{},actionToggle:{type:Boolean,default:void 0},text:{default:""},offset:{default:void 0}},setup(t){const e=t,{uniqueIdentifier:n}=Fo(),r=`__BD__DROPDOWN__${n.value}`,o=l.computed(()=>({class:{btn:e.toggleTag==="button",[`btn-${e.variant}`]:e.toggleTag==="button"&&e.variant,[`btn-${e.size}`]:e.toggleTag==="button"&&e.size,[`${e.toggleClass}`]:e.toggleClass!==void 0,"dropdown-toggle-action":e.actionToggle},"data-bs-display":e.noFlip?"static":null,"data-bs-offset":e.offset?e.offset:null,id:r})),i=l.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),s=l.computed(()=>({"aria-labelledby":r})),c=l.ref(),a=l.ref(),d=()=>{c.value.classList.remove("show"),a.value.classList.remove("show"),a.value.removeAttribute("aria-expanded")};return(u,f)=>(l.openBlock(),l.createElementBlock("div",{class:"bd-dropdown dropdown",onClick:f[0]||(f[0]=l.withModifiers(()=>{},["stop"]))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(e.toggleTag),l.mergeProps({ref_key:"dropdownToggle",ref:a,class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(e.text),1)]),_:1},16)),l.createElementVNode("ul",l.mergeProps({ref_key:"dropdownMenu",ref:c,class:["dropdown-menu",i.value]},s.value,{onClick:d}),[l.renderSlot(u.$slots,"default")],16)]))}}),QB={class:"row bd-header"},ZB={class:"col logo-mix"},JB=["src"],XB={key:1,class:"col header-options"},qB={class:"col bd-btn-settings"},VB={key:2},ph=l.defineComponent({__name:"BDHeader",props:{isEmbedded:{type:Boolean},dropdownMenuTitle:{},dropdownOptions:{},headerOptions:{},profileImageSrc:{},profileImageAlt:{},organizationLogoSrc:{},hasLogoutOption:{type:Boolean,default:!0}},emits:["click-logo","signout"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>{let f=[];return n.isEmbedded||(n.headerOptions&&(f=f.concat(n.headerOptions)),n.dropdownOptions&&(f=f.concat(n.dropdownOptions))),f}),i=l.computed(()=>!n.isEmbedded&&n.headerOptions&&n.headerOptions.length!==0),s=l.ref(void 0),c=()=>{n.isEmbedded||r("click-logo")},a=()=>r("signout"),d=()=>s.value=!0,u=()=>s.value=!1;return(f,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("nav",QB,[l.createElementVNode("div",ZB,[l.createVNode(Sc,{viewBox:"0 0 351 61",class:"logo bd-logo",onClick:c}),n.organizationLogoSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"logo organization-logo",src:n.organizationLogoSrc,alt:""},null,8,JB)):l.createCommentVNode("",!0)]),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:"col bd-hamburger",onClick:d},[h[0]||(h[0]=l.createElementVNode("div",null,"Menu",-1)),l.createVNode(zc)])),i.value?(l.openBlock(),l.createElementBlock("div",XB,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.headerOptions,p=>(l.openBlock(),l.createBlock(Re,{class:"btn-header",to:p.to,variant:"neutral"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(p.text),1)]),_:2},1032,["to"]))),256))])):l.createCommentVNode("",!0),l.createElementVNode("div",qB,[n.isEmbedded?l.createCommentVNode("",!0):l.renderSlot(f.$slots,"profile-side",{key:0}),n.profileImageSrc?(l.openBlock(),l.createBlock(_i,{key:1,src:n.profileImageSrc,alt:n.profileImageAlt,size:"sm"},null,8,["src","alt"])):l.createCommentVNode("",!0),n.isEmbedded?(l.openBlock(),l.createElementBlock("span",VB,l.toDisplayString(n.dropdownMenuTitle),1)):l.createCommentVNode("",!0),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(hh,{key:3,text:n.dropdownMenuTitle,variant:"primary",toggleTag:"a",right:!0},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.dropdownOptions,(p,m)=>(l.openBlock(),l.createBlock(Ba,l.mergeProps({key:m},{ref_for:!0},p),null,16))),128)),n.hasLogoutOption?(l.openBlock(),l.createBlock(Ba,{key:0,text:"Uitloggen",onClick:a})):l.createCommentVNode("",!0)]),_:1},8,["text"]))])]),n.isEmbedded?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(fh,{key:0,active:s.value,options:o.value,onHide:u,onSignout:a},{"special-options":l.withCtx(()=>[l.renderSlot(f.$slots,"mobile-menu-special-options")]),_:3},8,["active","options"]))],64))}}),eR="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3csvg%20height='800px'%20width='800px'%20viewBox='0%200%20800%20800'%20fill='none'%20version='1.1'%20id='svg2'%20sodipodi:docname='bell-icon.svg'%20inkscape:version='1.4.2%20(ebf0e94,%202025-05-08)'%20xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape'%20xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:svg='http://www.w3.org/2000/svg'%3e%3cdefs%20id='defs2'%20/%3e%3csodipodi:namedview%20id='namedview2'%20pagecolor='%23ffffff'%20bordercolor='%23000000'%20borderopacity='0.25'%20inkscape:showpageshadow='2'%20inkscape:pageopacity='0.0'%20inkscape:pagecheckerboard='0'%20inkscape:deskcolor='%23d1d1d1'%20inkscape:zoom='0.93902601'%20inkscape:cx='361.01236'%20inkscape:cy='425.44082'%20inkscape:window-width='2323'%20inkscape:window-height='1321'%20inkscape:window-x='69'%20inkscape:window-y='-9'%20inkscape:window-maximized='1'%20inkscape:current-layer='svg2'%20inkscape:lockguides='false'%20/%3e%3cpath%20fill='%23394156'%20d='m%20574.7134,517.70839%20c%20-43.02343,-19.42958%20-40.33991,-92.03173%20-40.37166,-94.13603%20l%20-0.86403,-55.08622%20c%20-0.84452,-53.84263%20-32.76289,-101.01787%20-79.52261,-120.73389%20-0.10055,-27.68538%20-26.24787,-50.17713%20-53.95375,-50.17713%20-27.70655,0%20-53.8532,22.49307%20-53.95442,50.17581%20-46.75774,19.71601%20-77.67395,68.62166%20-78.65724,122.46193%20l%20-0.86403,47.31%20c%20-0.0304,2.1043%201.78773,80.75463%20-41.23703,100.1842%20-4.90122,2.21412%20-7.59494,12.9473%20-6.46175,18.20508%201.13187,5.25843%203.98237,14.4119%209.36122,14.4119%20h%20110.87115%20c%202.23595,12.30035%208.05205,23.74336%2016.94754,33.01196%2011.8148,12.30961%2027.4393,19.08888%2043.99257,19.08888%2016.5546,0%2032.1791,-6.77927%2043.99258,-19.08888%208.89681,-9.26925%2014.71291,-20.71294%2016.94754,-33.01196%20h%20110.87115%20c%205.37885,0%208.22869,-9.1528%209.36189,-14.4119%201.13449,-5.25778%20-1.55789,-15.9903%20-6.45912,-18.20375%20z%20m%20-65.45742,-27.74178%20c%204.52282,13.71204%207.25707,16.20673%2016.33845,27.66562%20l%20-250.39475,-0.79275%20c%209.08005,-11.45756%2010.3714,-13.15885%2014.89422,-26.87287%20z%20M%20400.00135,224.00622%20c%2012.53255,0%2019.53015,4.82252%2022.8457,16.30126%20-8.54159,-1.77156%20-13.78747,-2.70563%20-22.8457,-2.70563%20-9.05823,0%20-14.30412,0.93341%20-22.84569,2.70563%203.3162,-11.47808%2010.31381,-16.30126%2022.84569,-16.30126%20z%20m%20-103.58848,199.63494%201.79933,-54.2217%20c%201.96022,-59.06989%2042.68543,-96.67497%20101.78915,-96.67497%2059.10373,0%2099.89499,35.80359%20101.78916,94.87564%20l%201.79933,56.1143%20c%200.0152,1.71731%201.47422,12.5683%201.23243,34.7862%20H%20295.17778%20c%200.71894,-22.23906%201.22119,-33.1218%201.23509,-34.87947%20z%20m%20103.58848,148.96978%20c%20-17.42517,0%20-25.43558,-5.58015%20-30.31694,-22.28624%20h%2060.63257%20c%20-4.88138,16.70609%20-12.88914,22.28624%20-30.31563,22.28624%20z'%20id='path1'%20style='stroke-width:0.899666;stroke-dasharray:none'%20sodipodi:nodetypes='ccscscscccsccsccscccccccscscscsssccccsccs'%20/%3e%3cpath%20fill='%23394156'%20d='m%20397.96944,283.33669%20c%20-49.41855,0%20-89.62361,40.20373%20-89.62361,89.62161%200,6.34354%205.14286,11.4864%2011.48639,11.4864%206.34355,0%2011.48641,-5.14286%2011.48641,-11.4864%200,-36.75076%2029.89938,-66.64948%2066.65148,-66.64948%206.34353,0%2011.48639,-5.14285%2011.48639,-11.4864%20-6.6e-4,-6.3442%20-5.14353,-11.48573%20-11.48706,-11.48573%20z'%20id='path2'%20style='stroke-width:0.904712;stroke-dasharray:none'%20sodipodi:nodetypes='ssssscs'%20/%3e%3c/svg%3e",jy=async(t,e)=>{const n=t+e,o=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(i)).map(c=>c.toString(16).padStart(2,"0")).join("")};function mh(){const t=()=>new Promise(n=>{if(document.readyState==="complete")return n();window.addEventListener("load",()=>n(),{once:!0})});return{OnWindowLoaded:n=>{l.onMounted(()=>t().then(n))}}}const tR=(t,e,n)=>{const{OnWindowLoaded:r}=mh(),o="lkj298fhGGJihge",i=l.ref(!1),s=()=>e+"|"+n();return r(async()=>{if(e==null||n==null||n()==null){i.value=!1;return}const d=s(),u=localStorage.getItem(t),f=JSON.parse(u)||[],h=await jy(d,o);i.value=!f.includes(h)}),{hasUnfulfilledInteraction:i,MarkInteractionPerformed:async()=>{const d=s(),u=await jy(d,o),f=localStorage.getItem(t),h=JSON.parse(f)||[];h.includes(u)||(h.push(u),localStorage.setItem(t,JSON.stringify(h))),i.value=!1}}};function Wy(t){const{OnWindowLoaded:e}=mh();let n;const r=()=>{n=document.addEventListener("click",i=>{if(!i||!i.target)return;let s=null;if(i.target instanceof Element&&(s=i.target.closest(".popover")),s)return;const c=No.getInstance(t.value);c&&c.hide()})};l.onMounted(r);const o=()=>{if(t?.value==null)return;No.getInstance(t.value)||new No(t.value)};e(o),l.watch(t,o),l.onUnmounted(()=>{if(t?.value!=null){const i=No.getInstance(t.value);i&&i.dispose()}n&&document.removeEventListener("click",n)})}const nR=["data-bs-title","data-bs-content"],rR=["title"],oR={key:0,class:"number-circle",textContent:1},iR=l.defineComponent({__name:"BDNotificationButton",props:{userId:{},getNotification:{}},setup(t){const e=t,n=()=>e.getNotification?.linkUrl,{hasUnfulfilledInteraction:r,MarkInteractionPerformed:o}=tR("notificationsRead",e.userId,n),i=l.ref();Wy(i);const s=l.computed(()=>{const u=e.getNotification;if(!u)return!1;const{isActive:f,startDate:h,endDate:p}=u;if(!f)return!1;const m=new Date(h),g=new Date(p),v=new Date;return v>=m&&v<=g}),c=l.computed(()=>e.getNotification?.tooltip),a=l.computed(()=>e.getNotification?.title),d=l.computed(()=>{const u=e.getNotification;if(!u)return"";const{text:f,linkUrl:h,linkText:p}=u;return`
1300
1300
  <p>${f}</p>
1301
1301
  <a href='${h}' target='_blank'>${p}</a>
1302
- `});return(u,f)=>s.value?(l.openBlock(),l.createElementBlock("a",{key:0,ref_key:"notificationButton",ref:i,tabindex:"0",class:"bd-notification-button",role:"button","data-bs-toggle":"popover","data-bs-placement":"bottom","data-bs-title":a.value,"data-bs-content":d.value,"data-bs-html":!0,onClick:f[0]||(f[0]=(...h)=>l.unref(o)&&l.unref(o)(...h))},[l.withDirectives(l.createElementVNode("img",{src:eR,alt:"BeterDichtbij nieuws notificatie bel.",title:c.value},null,8,rR),[[l.unref(Lo)]]),l.unref(r)?(l.openBlock(),l.createElementBlock("div",oR)):l.createCommentVNode("",!0)],8,nR)):l.createCommentVNode("",!0)}}),sR={class:"profile-side"},aR=["href"],lR={class:"nav-item"},cR=["textContent"],Ky=l.defineComponent({__name:"BDPractitionerHeader",props:{academyUrl:{},userId:{},getNotification:{}},setup(t){const{t:e}=Lt(),n=t,r=l.computed(()=>e("practitionerHeader.academyTooltip")),o=l.computed(()=>e("practitionerHeader.academyMenuItem"));return(i,s)=>(l.openBlock(),l.createBlock(ph,null,l.createSlots({"profile-side":l.withCtx(()=>[l.createElementVNode("div",sR,[l.createVNode(iR,{"user-id":n.userId,"get-notification":n.getNotification},null,8,["user-id","get-notification"]),n.academyUrl?(l.openBlock(),l.createElementBlock("a",{key:0,href:n.academyUrl,target:"_blank",rel:"noopener,noreferrer"},[l.withDirectives(l.createVNode(l.unref(qs),{title:r.value},null,8,["title"]),[[l.unref(Lo)]])],8,aR)):l.createCommentVNode("",!0)])]),_:2},[n.academyUrl?{name:"mobile-menu-special-options",fn:l.withCtx(()=>[l.createElementVNode("li",lR,[l.createVNode(Xr,{class:"nav-link",to:n.academyUrl},{default:l.withCtx(()=>[l.createVNode(l.unref(qs)),l.createElementVNode("span",{textContent:l.toDisplayString(o.value)},null,8,cR)]),_:1},8,["to"])])]),key:"0"}:void 0]),1024))}}),dR={class:"modal-dialog"},uR={class:"modal-content"},fR={class:"modal-header"},hR={class:"modal-title"},pR=["src"],mR={class:"modal-body"},gR={key:0,class:"modal-footer"},vR=["disabled"],xn=l.defineComponent({__name:"BDModal",props:{title:{default:""},titleImage:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1},hideFooterSubmitButton:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideCloseButton:{type:Boolean,default:!1},disableSubmitButton:{type:Boolean,default:!1},size:{default:"lg"}},emits:["submit","cancel"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>`modal bd-modal modal-${n.size}`),i=()=>r("submit"),s=()=>r("cancel");return(c,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(o.value),tabindex:"-1"},[l.createElementVNode("div",dR,[l.createElementVNode("div",uR,[l.createElementVNode("div",fR,[l.createElementVNode("h2",hR,[n.titleImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:n.titleImage,class:"title-image",alt:""},null,8,pR)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(n.title),1)]),l.renderSlot(c.$slots,"modal-header-space-between"),n.hideCloseButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:s},[a[0]||(a[0]=l.createElementVNode("span",null,"Sluiten",-1)),l.createVNode(l.unref(ta))]))]),l.createElementVNode("div",mR,[l.renderSlot(c.$slots,"default")]),t.hideFooter?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",gR,[n.hideFooterSubmitButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-primary",disabled:n.disableSubmitButton,onClick:i},l.toDisplayString(n.submitButtonTitle),9,vR)),l.renderSlot(c.$slots,"buttons"),n.hideFooterCancelButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:s,"aria-label":"Annuleren"},l.toDisplayString(n.closeButtonTitle),1))]))])])],2))}}),Do=t=>{const e=l.ref(null);return{showModal:()=>{const o=document.getElementById(t);o instanceof HTMLElement?(e.value=Kr.getOrCreateInstance(o),e.value.show()):console.error(`Modal '${t}' niet gevonden.`)},closeModal:()=>{if(e.value){e.value.hide();return}const o=document.getElementById(t);if(o instanceof HTMLElement){const i=Kr.getInstance(o);i&&i.hide()}}}};function Js(t=void 0){const e=c=>i("Succesvol",c,Ko.SUCCESS),n=c=>i("Waarschuwing",c,Ko.WARNING),r=c=>i("Informatie",c,Ko.INFO),o=c=>i("Mislukt",c,Ko.DANGER);function i(c,a,d){const u=`toast-${Ep()}`,f={id:u,variant:d,title:c,text:a},h=document.querySelector(".toast-container");if(!h){console.error("There was no element with class 'toast-container' found, which is required for useToaster.");return}const p=l.h(Rd,f),g=l.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const v=document.querySelector(`#${u}`);v&&(ki.getOrCreateInstance(v,t).show(),s(v))}function s(c){function a(f,h){f.forEach(p=>{if(p.attributeName!="class")return;const m=p.target;if(m.classList.contains("hide")){m.remove(),h.disconnect();return}})}const d=new MutationObserver(a),u={attributes:!0};d.observe(c,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:n,showDangerToast:o}}const{showDangerToast:yR}=Js();function gh(t){const e=l.ref(null),n=(a,d="serverErrors")=>{let u=[];if(Array.isArray(a?.response?.data)?u=a.response.data.filter(f=>Ia(f.ErrorMessage)&&f.ErrorMessage!==Ne):a.response.data.ErrorMessage?u=[a.response.data.ErrorMessage]:u=null,Ia(d))e.value=u;else if(Array.isArray(d)){let f=e.value;for(let h=0;h<d.length;h++)h===d.length-1?f[d[h]]=u:f=f[d[h]]}r(a),s(e)},r=a=>{if(t==null)return;const u=new URL(a.request.responseURL).pathname;if(u in t.error){const f=t.error[u];f&&yR(f)}},o=l.ref(null),i=l.ref(""),s=a=>{Kw(a.value)?o.value=a.value.map(d=>Ia(d)?d:d.ErrorMessage):Ia(a.value)&&(i.value=a.value)};function c(){e.value=null,o.value=null,i.value=Ne}return{serverErrors:e,errorMessages:o,errorMessageText:i,MapErrors:s,MapServerErrors:n,ResetServerErrors:c}}const bR={key:0},CR={key:1},ER={class:"bd-form-field"},kR={class:"bd-form-field"},Yy=l.defineComponent({__name:"BDPhoneNumberEditModal",props:["modalTitle","submitButtonTitle","phoneNumberLabel","phoneNumberUnchangedText","confirmationCodeLabel","confirmationCodeRequiredText","confirmationCodeSentText","editSuccessText","editCanceledText","sendConfirmationCodeText","startPhoneNumberUpdate","confirmPhoneNumberUpdate"],emits:["startPhoneNumberUpdate","confirmPhoneNumberUpdate","setPhoneNumber"],setup(t,{expose:e,emit:n}){const{showSuccessToast:r,showWarningToast:o}=Js(),{serverErrors:i,errorMessages:s,errorMessageText:c,MapServerErrors:a,ResetServerErrors:d}=gh(null),{closeModal:u}=Do("phone-number-edit-modal"),f=t,h=n;let p=Ne;const m=l.ref(),g=l.ref(null),v=l.ref(),y=l.ref(),b=l.ref(null),E=l.computed(()=>y.value==null||y.value==""),C=()=>{if(g.value=null,d(),!m.value||m.value==p){g.value=!1;return}const $={newPhonenumber:m.value};f.startPhoneNumberUpdate($).then(_).catch(a)},S=()=>{if(!y.value){b.value=!1;return}const $={requestIdentifier:v.value,token:y.value};f.confirmPhoneNumberUpdate($).then(T).catch(a)},_=$=>{g.value=null,r(f.confirmationCodeSentText),v.value=$.data.RequestIdentifier},T=()=>{h("setPhoneNumber",m.value),r(f.editSuccessText),u(),g.value=null,b.value=null},D=$=>{p=$,m.value=p,g.value=null,v.value=void 0,y.value=void 0,b.value=null},G=()=>{D(p),d(),o(f.editCanceledText)};return e({Reset:D}),($,j)=>(l.openBlock(),l.createBlock(xn,{id:"phone-number-edit-modal",class:l.normalizeClass(l.unref(Ne)),title:f.modalTitle,submitButtonTitle:f.submitButtonTitle,hideFooterCancelButton:!1,"disable-submit-button":E.value,serverErrors:l.unref(i),errorMessages:l.unref(s),errorMessageText:l.unref(c),onSubmit:S,onCancel:G},{default:l.withCtx(()=>[l.unref(c)||l.unref(s)?(l.openBlock(),l.createBlock(qr,{key:0,variant:"danger"},{default:l.withCtx(()=>[l.unref(s)?(l.openBlock(),l.createElementBlock("div",bR,[l.createElementVNode("ul",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(s),(W,Y)=>(l.openBlock(),l.createElementBlock("li",{key:Y},[l.createVNode(pr),l.createElementVNode("span",null,l.toDisplayString(W),1)]))),128))])])):(l.openBlock(),l.createElementBlock("div",CR,l.toDisplayString(l.unref(c)),1))]),_:1})):l.createCommentVNode("",!0),l.createElementVNode("div",ER,[l.createVNode(br,{id:"form-input-phone-number",label:f.phoneNumberLabel,modelValue:m.value,"onUpdate:modelValue":j[0]||(j[0]=W=>m.value=W),state:g.value,type:"text","form-field-class":"form-input-with-button","invalid-feedback-text":f.phoneNumberUnchangedText},{default:l.withCtx(()=>[l.createVNode(Re,{textContent:l.toDisplayString(f.sendConfirmationCodeText),class:"tablet-device-up",type:"button",onClick:C},null,8,["textContent"])]),_:1},8,["label","modelValue","state","invalid-feedback-text"]),l.createVNode(Re,{textContent:l.toDisplayString(f.sendConfirmationCodeText),class:"mobile-device",type:"button",onClick:C},null,8,["textContent"])]),l.createElementVNode("div",kR,[v.value?(l.openBlock(),l.createBlock(br,{key:0,label:f.confirmationCodeLabel,modelValue:y.value,"onUpdate:modelValue":j[1]||(j[1]=W=>y.value=W),state:b.value,"invalid-feedback-text":f.confirmationCodeRequiredText},null,8,["label","modelValue","state","invalid-feedback-text"])):l.createCommentVNode("",!0)])]),_:1},8,["class","title","submitButtonTitle","disable-submit-button","serverErrors","errorMessages","errorMessageText"]))}}),Gy=(t,e,n,r,o,i)=>{const s=l.ref(null),c=l.ref(null),a=l.ref(!1),d=l.ref(null),{showModal:u,closeModal:f}=Do("session-time-out-modal"),h=l.computed(()=>s.value&&t?t-(s.value+1):0),p=l.computed(()=>c.value?60-c.value:0),m=l.computed(()=>a.value),g=()=>{d.value=setInterval(y,1e3),r(d.value)},v=()=>{d.value&&clearInterval(d.value)},y=()=>{s.value=Wt().diff(n(),"m"),c.value=Wt().subtract(s.value,"m").diff(n(),"s");const D=t??Number.MAX_SAFE_INTEGER,G=e??0;s.value>=D?(a.value=!0,u(),localStorage.setItem("session-timeout","true"),window.onbeforeunload=b):s.value>=D-G?u():f()},b=D=>{D.stopPropagation(),C()},E=()=>{o(),v(),s.value=null,c.value=null,g()},C=()=>{v(),s.value=null,c.value=null,localStorage.removeItem("session-timeout"),i()},S=()=>{a.value?C():E()},_=()=>{C()},T=()=>{a.value?C():f()};return l.onMounted(()=>{const D=document.getElementById("session-time-out-modal");D&&D.addEventListener("hidden.bs.modal",S),v(),g()}),{IsExpired:m,Minutes:h,Seconds:p,OnLogOut:_,OnSubmit:T}},Qy=l.defineComponent({__name:"BDSessionTimeOutModal",props:["expiredTitle","expiredMessage","expiredButtonText","almostExpiredTitle","almostExpiredMessage","almostExpiredButtonText","almostExpiredCancelButtonText","threshold","warningThreshold","getTime","setTaskId","setNewTime","logout","hideCancelButton"],setup(t){const e=t,{IsExpired:n,Minutes:r,Seconds:o,OnLogOut:i,OnSubmit:s}=Gy(e.threshold,e.warningThreshold,e.getTime,e.setTaskId,e.setNewTime,e.logout),c=l.computed(()=>n.value?e.expiredTitle:e.almostExpiredTitle),a=l.computed(()=>n.value?e.expiredMessage:`${e.almostExpiredMessage} ${r.value}:${o.value<10?"0"+o.value:o.value}`),d=l.computed(()=>e.hideCancelButton||n.value),u=l.computed(()=>n.value?e.expiredButtonText:e.almostExpiredButtonText);return(f,h)=>(l.openBlock(),l.createBlock(xn,{id:"session-time-out-modal",title:c.value,"hide-close-button":!0,"hide-footer-cancel-button":d.value,"close-button-title":e.almostExpiredCancelButtonText,"submit-button-title":u.value,size:"md",onSubmit:l.unref(s),onCancel:l.unref(i)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value),1)]),_:1},8,["title","hide-footer-cancel-button","close-button-title","submit-button-title","onSubmit","onCancel"]))}}),Zy={__name:"BDConfirmationModal",props:["modalId","modalTitle","description","submitButtonText","cancelButtonText"],setup(t,{expose:e}){const n=t,{closeModal:r,showModal:o}=Do(n.modalId);let i=l.ref(null);e({Confirm:()=>Ww(this,void 0,void 0,function*(){return o(),new Promise(d=>i.value=d)})});const c=()=>{r(),i.value(!0)},a=()=>i.value(!1);return(d,u)=>(l.openBlock(),l.createBlock(xn,{id:n.modalId,title:n.modalTitle,"submit-button-title":n.submitButtonText,"close-button-title":n.cancelButtonText,"hide-close-button":!0,size:"md",onSubmit:c,onCancel:a},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(n.description),1)]),_:1},8,["id","title","submit-button-title","close-button-title"]))}},Jy={__name:"BDAssignConversationModal",emits:["update:isConcluded","update:isUnread"],setup(t,{emit:e}){const{t:n}=Lt(),r=l.ref(!1),o=l.ref(!1),i=e,s=()=>i("update:isConcluded",r.value),c=()=>i("update:isUnread",o.value);return(a,d)=>(l.openBlock(),l.createBlock(xn,{id:"assign-conversation-modal",title:l.unref(n)("assignConversationModal.title"),submitButtonTitle:l.unref(n)("assignConversationModal.submitButton")},{default:l.withCtx(()=>[l.renderSlot(a.$slots,"body"),l.createVNode(es,null,{default:l.withCtx(()=>[l.createVNode(Cr,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=u=>r.value=u),onChange:s},{default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(l.unref(n)("assignConversationModal.conclude")),1),l.withDirectives((l.openBlock(),l.createBlock(Re,{variant:"placeholder",class:"btn-tooltip",title:l.unref(n)("assignConversationModal.concludeTooltip")},{default:l.withCtx(()=>[l.createVNode(pr)]),_:1},8,["title"])),[[l.unref(Lo)]])]),_:1},8,["modelValue"])]),_:1}),l.createVNode(es,null,{default:l.withCtx(()=>[l.createVNode(Cr,{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),onChange:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("assignConversationModal.makeUnread")),1)]),_:1},8,["modelValue"])]),_:1}),l.renderSlot(a.$slots,"footer")]),_:3},8,["title","submitButtonTitle"]))}},Xy=l.defineComponent({__name:"BDAttachmentUploadModal",props:{dropzoneUrl:{},token:{}},emits:["cancel","on-submit"],setup(t,{emit:e}){const{closeModal:n}=Do("attachment-upload-modal"),{t:r}=Lt(),o=t,i=e,s=()=>{i("on-submit",a.value),a.value=[],n()},c=()=>{i("cancel"),a.value=[]},a=l.ref([]),d=l.computed(()=>r("attachmentUploadModal.title")),u=l.computed(()=>r("attachmentUploadModal.submitButton")),f=l.computed(()=>r("attachmentUploadModal.infoMessage")),h=l.computed(()=>r("attachmentUploadModal.addAttachmentButton")),p=l.computed(()=>r("attachmentUploadModal.errorMessage")),m=l.computed(()=>r("attachmentUploadModal.fileTooBigErrorMessage")),g=l.computed(()=>r("attachmentUploadModal.fileSizeExceededMessage"));return(v,y)=>(l.openBlock(),l.createBlock(xn,{id:"attachment-upload-modal",title:d.value,"submit-button-title":u.value,onSubmit:s,onCancel:c},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(f.value),1),l.createVNode(Wd,{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=b=>a.value=b),"button-text":h.value,"error-message":p.value,multiple:!0,"file-size-exceeded-message":m.value,"accepted-files":".png,.jpg,.jpeg,.gif,.docx,.doc,.xls,.xlsx,.txt,.csv,.pdf,.wav,.mp3,.m4a,.aiff,.flac,.mp4,.avi,.mov",url:o.dropzoneUrl,tag:"div",token:o.token},null,8,["modelValue","button-text","error-message","file-size-exceeded-message","url","token"]),l.createElementVNode("p",null,l.toDisplayString(g.value),1),l.renderSlot(v.$slots,"default")]),_:3},8,["title","submit-button-title"]))}});var wR=Object.defineProperty,SR=Object.defineProperties,AR=Object.getOwnPropertyDescriptors,qy=Object.getOwnPropertySymbols,xR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,Vy=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wi=(t,e)=>{for(var n in e||(e={}))xR.call(e,n)&&Vy(t,n,e[n]);if(qy)for(var n of qy(e))TR.call(e,n)&&Vy(t,n,e[n]);return t},e3=(t,e)=>SR(t,AR(e));const IR={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(t){this.autoscroll&&t&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var t;const e=((t=this.$refs.dropdownMenu)==null?void 0:t.children[this.typeAheadPointer])||!1;if(e){const n=this.getDropdownViewport(),{top:r,bottom:o,height:i}=e.getBoundingClientRect();if(r<n.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(o>n.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(n.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},_R={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let t=0;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},open(t){t&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let t=this.typeAheadPointer-1;t>=0;t--)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadDown(){for(let t=this.typeAheadPointer+1;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadSelect(){const t=this.filteredOptions[this.typeAheadPointer];t&&this.selectable(t)&&this.select(t)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},NR={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(t){this.mutableLoading=t}},methods:{toggleLoading(t=null){return t==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=t}}},vh=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},OR={},MR={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},LR=l.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),DR=[LR];function PR(t,e){return l.openBlock(),l.createElementBlock("svg",MR,DR)}const BR=vh(OR,[["render",PR]]),RR={},$R={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},FR=l.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),zR=[FR];function UR(t,e){return l.openBlock(),l.createElementBlock("svg",$R,zR)}const HR=vh(RR,[["render",UR]]),t3={Deselect:BR,OpenIndicator:HR},jR={mounted(t,{instance:e}){if(e.appendToBody){const{height:n,top:r,left:o,width:i}=e.$refs.toggle.getBoundingClientRect();let s=window.scrollX||window.pageXOffset,c=window.scrollY||window.pageYOffset;t.unbindPosition=e.calculatePosition(t,e,{width:i+"px",left:s+o+"px",top:c+r+n+"px"}),document.body.appendChild(t)}},unmounted(t,{instance:e}){e.appendToBody&&(t.unbindPosition&&typeof t.unbindPosition=="function"&&t.unbindPosition(),t.parentNode&&t.parentNode.removeChild(t))}};function WR(t){const e={};return Object.keys(t).sort().forEach(n=>{e[n]=t[n]}),JSON.stringify(e)}let KR=0;function YR(){return++KR}const GR={components:wi({},t3),directives:{appendToBody:jR},mixins:[IR,_R,NR],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:t=>t},selectable:{type:Function,default:t=>!0},getOptionLabel:{type:Function,default(t){return typeof t=="object"?t.hasOwnProperty(this.label)?t[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(t)}.
1302
+ `});return(u,f)=>s.value?(l.openBlock(),l.createElementBlock("a",{key:0,ref_key:"notificationButton",ref:i,tabindex:"0",class:"bd-notification-button",role:"button","data-bs-toggle":"popover","data-bs-placement":"bottom","data-bs-title":a.value,"data-bs-content":d.value,"data-bs-html":!0,onClick:f[0]||(f[0]=(...h)=>l.unref(o)&&l.unref(o)(...h))},[l.withDirectives(l.createElementVNode("img",{src:eR,alt:"BeterDichtbij nieuws notificatie bel.",title:c.value},null,8,rR),[[l.unref(Lo)]]),l.unref(r)?(l.openBlock(),l.createElementBlock("div",oR)):l.createCommentVNode("",!0)],8,nR)):l.createCommentVNode("",!0)}}),sR={class:"profile-side"},aR=["href"],lR={class:"nav-item"},cR=["textContent"],Ky=l.defineComponent({__name:"BDPractitionerHeader",props:{academyUrl:{},userId:{},getNotification:{}},setup(t){const{t:e}=Nt(),n=t,r=l.computed(()=>e("practitionerHeader.academyTooltip")),o=l.computed(()=>e("practitionerHeader.academyMenuItem"));return(i,s)=>(l.openBlock(),l.createBlock(ph,null,l.createSlots({"profile-side":l.withCtx(()=>[l.createElementVNode("div",sR,[l.createVNode(iR,{"user-id":n.userId,"get-notification":n.getNotification},null,8,["user-id","get-notification"]),n.academyUrl?(l.openBlock(),l.createElementBlock("a",{key:0,href:n.academyUrl,target:"_blank",rel:"noopener,noreferrer"},[l.withDirectives(l.createVNode(l.unref(qs),{title:r.value},null,8,["title"]),[[l.unref(Lo)]])],8,aR)):l.createCommentVNode("",!0)])]),_:2},[n.academyUrl?{name:"mobile-menu-special-options",fn:l.withCtx(()=>[l.createElementVNode("li",lR,[l.createVNode(Xr,{class:"nav-link",to:n.academyUrl},{default:l.withCtx(()=>[l.createVNode(l.unref(qs)),l.createElementVNode("span",{textContent:l.toDisplayString(o.value)},null,8,cR)]),_:1},8,["to"])])]),key:"0"}:void 0]),1024))}}),dR={class:"modal-dialog"},uR={class:"modal-content"},fR={class:"modal-header"},hR={class:"modal-title"},pR=["src"],mR={class:"modal-body"},gR={key:0,class:"modal-footer"},vR=["disabled"],xn=l.defineComponent({__name:"BDModal",props:{title:{default:""},titleImage:{default:""},submitButtonTitle:{default:"Opslaan"},closeButtonTitle:{default:"Annuleren"},hideFooterCancelButton:{type:Boolean,default:!1},hideFooterSubmitButton:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideCloseButton:{type:Boolean,default:!1},disableSubmitButton:{type:Boolean,default:!1},size:{default:"lg"}},emits:["submit","cancel"],setup(t,{emit:e}){const n=t,r=e,o=l.computed(()=>`modal bd-modal modal-${n.size}`),i=()=>r("submit"),s=()=>r("cancel");return(c,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(o.value),tabindex:"-1"},[l.createElementVNode("div",dR,[l.createElementVNode("div",uR,[l.createElementVNode("div",fR,[l.createElementVNode("h2",hR,[n.titleImage?(l.openBlock(),l.createElementBlock("img",{key:0,src:n.titleImage,class:"title-image",alt:""},null,8,pR)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(n.title),1)]),l.renderSlot(c.$slots,"modal-header-space-between"),n.hideCloseButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:s},[a[0]||(a[0]=l.createElementVNode("span",null,"Sluiten",-1)),l.createVNode(l.unref(ta))]))]),l.createElementVNode("div",mR,[l.renderSlot(c.$slots,"default")]),t.hideFooter?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",gR,[n.hideFooterSubmitButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-primary",disabled:n.disableSubmitButton,onClick:i},l.toDisplayString(n.submitButtonTitle),9,vR)),l.renderSlot(c.$slots,"buttons"),n.hideFooterCancelButton?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:s,"aria-label":"Annuleren"},l.toDisplayString(n.closeButtonTitle),1))]))])])],2))}}),Do=t=>{const e=l.ref(null);return{showModal:()=>{const o=document.getElementById(t);o instanceof HTMLElement?(e.value=Kr.getOrCreateInstance(o),e.value.show()):console.error(`Modal '${t}' niet gevonden.`)},closeModal:()=>{if(e.value){e.value.hide();return}const o=document.getElementById(t);if(o instanceof HTMLElement){const i=Kr.getInstance(o);i&&i.hide()}}}};function Js(t=void 0){const e=c=>i("Succesvol",c,Ko.SUCCESS),n=c=>i("Waarschuwing",c,Ko.WARNING),r=c=>i("Informatie",c,Ko.INFO),o=c=>i("Mislukt",c,Ko.DANGER);function i(c,a,d){const u=`toast-${Ep()}`,f={id:u,variant:d,title:c,text:a},h=document.querySelector(".toast-container");if(!h){console.error("There was no element with class 'toast-container' found, which is required for useToaster.");return}const p=l.h(Rd,f),g=l.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const v=document.querySelector(`#${u}`);v&&(ki.getOrCreateInstance(v,t).show(),s(v))}function s(c){function a(f,h){f.forEach(p=>{if(p.attributeName!="class")return;const m=p.target;if(m.classList.contains("hide")){m.remove(),h.disconnect();return}})}const d=new MutationObserver(a),u={attributes:!0};d.observe(c,u)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:n,showDangerToast:o}}const{showDangerToast:yR}=Js();function gh(t){const e=l.ref(null),n=(a,d="serverErrors")=>{let u=[];if(Array.isArray(a?.response?.data)?u=a.response.data.filter(f=>Ia(f.ErrorMessage)&&f.ErrorMessage!==_e):a.response.data.ErrorMessage?u=[a.response.data.ErrorMessage]:u=null,Ia(d))e.value=u;else if(Array.isArray(d)){let f=e.value;for(let h=0;h<d.length;h++)h===d.length-1?f[d[h]]=u:f=f[d[h]]}r(a),s(e)},r=a=>{if(t==null)return;const u=new URL(a.request.responseURL).pathname;if(u in t.error){const f=t.error[u];f&&yR(f)}},o=l.ref(null),i=l.ref(""),s=a=>{Kw(a.value)?o.value=a.value.map(d=>Ia(d)?d:d.ErrorMessage):Ia(a.value)&&(i.value=a.value)};function c(){e.value=null,o.value=null,i.value=_e}return{serverErrors:e,errorMessages:o,errorMessageText:i,MapErrors:s,MapServerErrors:n,ResetServerErrors:c}}const bR={key:0},CR={key:1},ER={class:"bd-form-field"},kR={class:"bd-form-field"},Yy=l.defineComponent({__name:"BDPhoneNumberEditModal",props:["modalTitle","submitButtonTitle","phoneNumberLabel","phoneNumberUnchangedText","confirmationCodeLabel","confirmationCodeRequiredText","confirmationCodeSentText","editSuccessText","editCanceledText","sendConfirmationCodeText","startPhoneNumberUpdate","confirmPhoneNumberUpdate"],emits:["startPhoneNumberUpdate","confirmPhoneNumberUpdate","setPhoneNumber"],setup(t,{expose:e,emit:n}){const{showSuccessToast:r,showWarningToast:o}=Js(),{serverErrors:i,errorMessages:s,errorMessageText:c,MapServerErrors:a,ResetServerErrors:d}=gh(null),{closeModal:u}=Do("phone-number-edit-modal"),f=t,h=n;let p=_e;const m=l.ref(),g=l.ref(null),v=l.ref(),y=l.ref(),b=l.ref(null),E=l.computed(()=>y.value==null||y.value==""),C=()=>{if(g.value=null,d(),!m.value||m.value==p){g.value=!1;return}const $={newPhonenumber:m.value};f.startPhoneNumberUpdate($).then(_).catch(a)},S=()=>{if(!y.value){b.value=!1;return}const $={requestIdentifier:v.value,token:y.value};f.confirmPhoneNumberUpdate($).then(T).catch(a)},_=$=>{g.value=null,r(f.confirmationCodeSentText),v.value=$.data.RequestIdentifier},T=()=>{h("setPhoneNumber",m.value),r(f.editSuccessText),u(),g.value=null,b.value=null},D=$=>{p=$,m.value=p,g.value=null,v.value=void 0,y.value=void 0,b.value=null},G=()=>{D(p),d(),o(f.editCanceledText)};return e({Reset:D}),($,j)=>(l.openBlock(),l.createBlock(xn,{id:"phone-number-edit-modal",class:l.normalizeClass(l.unref(_e)),title:f.modalTitle,submitButtonTitle:f.submitButtonTitle,hideFooterCancelButton:!1,"disable-submit-button":E.value,serverErrors:l.unref(i),errorMessages:l.unref(s),errorMessageText:l.unref(c),onSubmit:S,onCancel:G},{default:l.withCtx(()=>[l.unref(c)||l.unref(s)?(l.openBlock(),l.createBlock(qr,{key:0,variant:"danger"},{default:l.withCtx(()=>[l.unref(s)?(l.openBlock(),l.createElementBlock("div",bR,[l.createElementVNode("ul",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(s),(W,Y)=>(l.openBlock(),l.createElementBlock("li",{key:Y},[l.createVNode(pr),l.createElementVNode("span",null,l.toDisplayString(W),1)]))),128))])])):(l.openBlock(),l.createElementBlock("div",CR,l.toDisplayString(l.unref(c)),1))]),_:1})):l.createCommentVNode("",!0),l.createElementVNode("div",ER,[l.createVNode(br,{id:"form-input-phone-number",label:f.phoneNumberLabel,modelValue:m.value,"onUpdate:modelValue":j[0]||(j[0]=W=>m.value=W),state:g.value,type:"text","form-field-class":"form-input-with-button","invalid-feedback-text":f.phoneNumberUnchangedText},{default:l.withCtx(()=>[l.createVNode(Re,{textContent:l.toDisplayString(f.sendConfirmationCodeText),class:"tablet-device-up",type:"button",onClick:C},null,8,["textContent"])]),_:1},8,["label","modelValue","state","invalid-feedback-text"]),l.createVNode(Re,{textContent:l.toDisplayString(f.sendConfirmationCodeText),class:"mobile-device",type:"button",onClick:C},null,8,["textContent"])]),l.createElementVNode("div",kR,[v.value?(l.openBlock(),l.createBlock(br,{key:0,label:f.confirmationCodeLabel,modelValue:y.value,"onUpdate:modelValue":j[1]||(j[1]=W=>y.value=W),state:b.value,"invalid-feedback-text":f.confirmationCodeRequiredText},null,8,["label","modelValue","state","invalid-feedback-text"])):l.createCommentVNode("",!0)])]),_:1},8,["class","title","submitButtonTitle","disable-submit-button","serverErrors","errorMessages","errorMessageText"]))}}),Gy=(t,e,n,r,o,i)=>{const s=l.ref(null),c=l.ref(null),a=l.ref(!1),d=l.ref(null),{showModal:u,closeModal:f}=Do("session-time-out-modal"),h=l.computed(()=>s.value&&t?t-(s.value+1):0),p=l.computed(()=>c.value?60-c.value:0),m=l.computed(()=>a.value),g=()=>{d.value=setInterval(y,1e3),r(d.value)},v=()=>{d.value&&clearInterval(d.value)},y=()=>{s.value=Wt().diff(n(),"m"),c.value=Wt().subtract(s.value,"m").diff(n(),"s");const D=t??Number.MAX_SAFE_INTEGER,G=e??0;s.value>=D?(a.value=!0,u(),localStorage.setItem("session-timeout","true"),window.onbeforeunload=b):s.value>=D-G?u():f()},b=D=>{D.stopPropagation(),C()},E=()=>{o(),v(),s.value=null,c.value=null,g()},C=()=>{v(),s.value=null,c.value=null,localStorage.removeItem("session-timeout"),i()},S=()=>{a.value?C():E()},_=()=>{C()},T=()=>{a.value?C():f()};return l.onMounted(()=>{const D=document.getElementById("session-time-out-modal");D&&D.addEventListener("hidden.bs.modal",S),v(),g()}),{IsExpired:m,Minutes:h,Seconds:p,OnLogOut:_,OnSubmit:T}},Qy=l.defineComponent({__name:"BDSessionTimeOutModal",props:["expiredTitle","expiredMessage","expiredButtonText","almostExpiredTitle","almostExpiredMessage","almostExpiredButtonText","almostExpiredCancelButtonText","threshold","warningThreshold","getTime","setTaskId","setNewTime","logout","hideCancelButton"],setup(t){const e=t,{IsExpired:n,Minutes:r,Seconds:o,OnLogOut:i,OnSubmit:s}=Gy(e.threshold,e.warningThreshold,e.getTime,e.setTaskId,e.setNewTime,e.logout),c=l.computed(()=>n.value?e.expiredTitle:e.almostExpiredTitle),a=l.computed(()=>n.value?e.expiredMessage:`${e.almostExpiredMessage} ${r.value}:${o.value<10?"0"+o.value:o.value}`),d=l.computed(()=>e.hideCancelButton||n.value),u=l.computed(()=>n.value?e.expiredButtonText:e.almostExpiredButtonText);return(f,h)=>(l.openBlock(),l.createBlock(xn,{id:"session-time-out-modal",title:c.value,"hide-close-button":!0,"hide-footer-cancel-button":d.value,"close-button-title":e.almostExpiredCancelButtonText,"submit-button-title":u.value,size:"md",onSubmit:l.unref(s),onCancel:l.unref(i)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.value),1)]),_:1},8,["title","hide-footer-cancel-button","close-button-title","submit-button-title","onSubmit","onCancel"]))}}),Zy={__name:"BDConfirmationModal",props:["modalId","modalTitle","description","submitButtonText","cancelButtonText"],setup(t,{expose:e}){const n=t,{closeModal:r,showModal:o}=Do(n.modalId);let i=l.ref(null);e({Confirm:()=>Ww(this,void 0,void 0,function*(){return o(),new Promise(d=>i.value=d)})});const c=()=>{r(),i.value(!0)},a=()=>i.value(!1);return(d,u)=>(l.openBlock(),l.createBlock(xn,{id:n.modalId,title:n.modalTitle,"submit-button-title":n.submitButtonText,"close-button-title":n.cancelButtonText,"hide-close-button":!0,size:"md",onSubmit:c,onCancel:a},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(n.description),1)]),_:1},8,["id","title","submit-button-title","close-button-title"]))}},Jy={__name:"BDAssignConversationModal",emits:["update:isConcluded","update:isUnread"],setup(t,{emit:e}){const{t:n}=Nt(),r=l.ref(!1),o=l.ref(!1),i=e,s=()=>i("update:isConcluded",r.value),c=()=>i("update:isUnread",o.value);return(a,d)=>(l.openBlock(),l.createBlock(xn,{id:"assign-conversation-modal",title:l.unref(n)("assignConversationModal.title"),submitButtonTitle:l.unref(n)("assignConversationModal.submitButton")},{default:l.withCtx(()=>[l.renderSlot(a.$slots,"body"),l.createVNode(es,null,{default:l.withCtx(()=>[l.createVNode(Cr,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=u=>r.value=u),onChange:s},{default:l.withCtx(()=>[l.createElementVNode("span",null,l.toDisplayString(l.unref(n)("assignConversationModal.conclude")),1),l.withDirectives((l.openBlock(),l.createBlock(Re,{variant:"placeholder",class:"btn-tooltip",title:l.unref(n)("assignConversationModal.concludeTooltip")},{default:l.withCtx(()=>[l.createVNode(pr)]),_:1},8,["title"])),[[l.unref(Lo)]])]),_:1},8,["modelValue"])]),_:1}),l.createVNode(es,null,{default:l.withCtx(()=>[l.createVNode(Cr,{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),onChange:c},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("assignConversationModal.makeUnread")),1)]),_:1},8,["modelValue"])]),_:1}),l.renderSlot(a.$slots,"footer")]),_:3},8,["title","submitButtonTitle"]))}},Xy=l.defineComponent({__name:"BDAttachmentUploadModal",props:{dropzoneUrl:{},token:{}},emits:["cancel","on-submit"],setup(t,{emit:e}){const{closeModal:n}=Do("attachment-upload-modal"),{t:r}=Nt(),o=t,i=e,s=()=>{i("on-submit",a.value),a.value=[],n()},c=()=>{i("cancel"),a.value=[]},a=l.ref([]),d=l.computed(()=>r("attachmentUploadModal.title")),u=l.computed(()=>r("attachmentUploadModal.submitButton")),f=l.computed(()=>r("attachmentUploadModal.infoMessage")),h=l.computed(()=>r("attachmentUploadModal.addAttachmentButton")),p=l.computed(()=>r("attachmentUploadModal.errorMessage")),m=l.computed(()=>r("attachmentUploadModal.fileTooBigErrorMessage")),g=l.computed(()=>r("attachmentUploadModal.fileSizeExceededMessage"));return(v,y)=>(l.openBlock(),l.createBlock(xn,{id:"attachment-upload-modal",title:d.value,"submit-button-title":u.value,onSubmit:s,onCancel:c},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(f.value),1),l.createVNode(Wd,{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=b=>a.value=b),"button-text":h.value,"error-message":p.value,multiple:!0,"file-size-exceeded-message":m.value,"accepted-files":".png,.jpg,.jpeg,.gif,.docx,.doc,.xls,.xlsx,.txt,.csv,.pdf,.wav,.mp3,.m4a,.aiff,.flac,.mp4,.avi,.mov",url:o.dropzoneUrl,tag:"div",token:o.token},null,8,["modelValue","button-text","error-message","file-size-exceeded-message","url","token"]),l.createElementVNode("p",null,l.toDisplayString(g.value),1),l.renderSlot(v.$slots,"default")]),_:3},8,["title","submit-button-title"]))}});var wR=Object.defineProperty,SR=Object.defineProperties,AR=Object.getOwnPropertyDescriptors,qy=Object.getOwnPropertySymbols,xR=Object.prototype.hasOwnProperty,TR=Object.prototype.propertyIsEnumerable,Vy=(t,e,n)=>e in t?wR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,wi=(t,e)=>{for(var n in e||(e={}))xR.call(e,n)&&Vy(t,n,e[n]);if(qy)for(var n of qy(e))TR.call(e,n)&&Vy(t,n,e[n]);return t},e3=(t,e)=>SR(t,AR(e));const IR={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(t){this.autoscroll&&t&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var t;const e=((t=this.$refs.dropdownMenu)==null?void 0:t.children[this.typeAheadPointer])||!1;if(e){const n=this.getDropdownViewport(),{top:r,bottom:o,height:i}=e.getBoundingClientRect();if(r<n.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(o>n.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(n.height-i)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},_R={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let t=0;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},open(t){t&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let t=this.typeAheadPointer-1;t>=0;t--)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadDown(){for(let t=this.typeAheadPointer+1;t<this.filteredOptions.length;t++)if(this.selectable(this.filteredOptions[t])){this.typeAheadPointer=t;break}},typeAheadSelect(){const t=this.filteredOptions[this.typeAheadPointer];t&&this.selectable(t)&&this.select(t)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},NR={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(t){this.mutableLoading=t}},methods:{toggleLoading(t=null){return t==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=t}}},vh=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},OR={},MR={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},LR=l.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),DR=[LR];function PR(t,e){return l.openBlock(),l.createElementBlock("svg",MR,DR)}const BR=vh(OR,[["render",PR]]),RR={},$R={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},FR=l.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),zR=[FR];function UR(t,e){return l.openBlock(),l.createElementBlock("svg",$R,zR)}const HR=vh(RR,[["render",UR]]),t3={Deselect:BR,OpenIndicator:HR},jR={mounted(t,{instance:e}){if(e.appendToBody){const{height:n,top:r,left:o,width:i}=e.$refs.toggle.getBoundingClientRect();let s=window.scrollX||window.pageXOffset,c=window.scrollY||window.pageYOffset;t.unbindPosition=e.calculatePosition(t,e,{width:i+"px",left:s+o+"px",top:c+r+n+"px"}),document.body.appendChild(t)}},unmounted(t,{instance:e}){e.appendToBody&&(t.unbindPosition&&typeof t.unbindPosition=="function"&&t.unbindPosition(),t.parentNode&&t.parentNode.removeChild(t))}};function WR(t){const e={};return Object.keys(t).sort().forEach(n=>{e[n]=t[n]}),JSON.stringify(e)}let KR=0;function YR(){return++KR}const GR={components:wi({},t3),directives:{appendToBody:jR},mixins:[IR,_R,NR],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:t=>t},selectable:{type:Function,default:t=>!0},getOptionLabel:{type:Function,default(t){return typeof t=="object"?t.hasOwnProperty(this.label)?t[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(t)}.
1303
1303
  https://vue-select.org/api/props.html#getoptionlabel`):t}},getOptionKey:{type:Function,default(t){if(typeof t!="object")return t;try{return t.hasOwnProperty("id")?t.id:WR(t)}catch(e){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
1304
- https://vue-select.org/api/props.html#getoptionkey`,t,e)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(t,e,n){return(e||"").toLocaleLowerCase().indexOf(n.toLocaleLowerCase())>-1}},filter:{type:Function,default(t,e){return t.filter(n=>{let r=this.getOptionLabel(n);return typeof r=="number"&&(r=r.toString()),this.filterBy(n,r,e)})}},createOption:{type:Function,default(t){return typeof this.optionList[0]=="object"?{[this.label]:t}:t}},resetOnOptionsChange:{default:!1,validator:t=>["function","boolean"].includes(typeof t)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:t,multiple:e}){return t&&!e}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(t,e)=>t},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(t,e,{width:n,top:r,left:o}){t.style.top=r,t.style.left=o,t.style.width=n}},dropdownShouldOpen:{type:Function,default({noDrop:t,open:e,mutableLoading:n}){return t?!1:e&&!n}},uid:{type:[String,Number],default:()=>YR()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let t=this.modelValue;return this.isTrackingValues&&(t=this.$data._value),t!=null&&t!==""?[].concat(t):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const t={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:wi({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:e=>this.search=e.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:t,listFooter:t,header:e3(wi({},t),{deselect:this.deselect}),footer:e3(wi({},t),{deselect:this.deselect})}},childComponents(){return wi(wi({},t3),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t;const e=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length){const n=this.createOption(this.search);this.optionExists(n)||e.unshift(n)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(t,e){const n=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(t,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&n()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(t){this.isTrackingValues&&this.setInternalValueFromOptions(t)}},multiple(){this.clearSelection()},open(t){this.$emit(t?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(t){Array.isArray(t)?this.$data._value=t.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(t)},select(t){this.$emit("option:selecting",t),this.isOptionSelected(t)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(t):(this.taggable&&!this.optionExists(t)&&(this.$emit("option:created",t),this.pushTag(t)),this.multiple&&(t=this.selectedValue.concat(t)),this.updateValue(t),this.$emit("option:selected",t)),this.onAfterSelect(t)},deselect(t){this.$emit("option:deselecting",t),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,t))),this.$emit("option:deselected",t)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(t){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(t){typeof this.modelValue>"u"&&(this.$data._value=t),t!==null&&(Array.isArray(t)?t=t.map(e=>this.reduce(e)):t=this.reduce(t)),this.$emit("update:modelValue",t)},toggleDropdown(t){const e=t.target!==this.searchEl;e&&t.preventDefault();const n=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||n.filter(Boolean).some(r=>r.contains(t.target)||r===t.target)){t.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(t){return this.selectedValue.some(e=>this.optionComparator(e,t))},isOptionDeselectable(t){return this.isOptionSelected(t)&&this.deselectFromDropdown},optionComparator(t,e){return this.getOptionKey(t)===this.getOptionKey(e)},findOptionFromReducedValue(t){const e=r=>JSON.stringify(this.reduce(r))===JSON.stringify(t),n=[...this.options,...this.pushedTags].filter(e);return n.length===1?n[0]:n.find(r=>this.optionComparator(r,this.$data._value))||t},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let t=null;this.multiple&&(t=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(t)}},optionExists(t){return this.optionList.some(e=>this.optionComparator(e,t))},normalizeOptionForSlot(t){return typeof t=="object"?t:{[this.label]:t}},pushTag(t){this.pushedTags.push(t)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:t,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:t,multiple:e})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(t){const e=o=>(o.preventDefault(),!this.isComposing&&this.typeAheadSelect()),n={8:o=>this.maybeDeleteValue(),9:o=>this.onTab(),27:o=>this.onEscape(),38:o=>(o.preventDefault(),this.typeAheadUp()),40:o=>(o.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(o=>n[o]=e);const r=this.mapKeydown(n,this);if(typeof r[t.keyCode]=="function")return r[t.keyCode](t)}}},QR=["dir"],ZR=["id","aria-expanded","aria-owns"],JR={ref:"selectedOptions",class:"vs__selected-options"},XR=["disabled","title","aria-label","onClick"],qR={ref:"actions",class:"vs__actions"},VR=["disabled"],e$={class:"vs__spinner"},t$=["id"],n$=["id","aria-selected","onMouseover","onClick"],r$={key:0,class:"vs__no-options"},o$=l.createTextVNode(" Sorry, no matching options. "),i$=["id"];function s$(t,e,n,r,o,i){const s=l.resolveDirective("append-to-body");return l.openBlock(),l.createElementBlock("div",{dir:n.dir,class:l.normalizeClass(["v-select",i.stateClasses])},[l.renderSlot(t.$slots,"header",l.normalizeProps(l.guardReactiveProps(i.scope.header))),l.createElementVNode("div",{id:`vs${n.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${n.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=c=>i.toggleDropdown(c))},[l.createElementVNode("div",JR,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.selectedValue,(c,a)=>l.renderSlot(t.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(c),deselect:i.deselect,multiple:n.multiple,disabled:n.disabled},()=>[(l.openBlock(),l.createElementBlock("span",{key:n.getOptionKey(c),class:"vs__selected"},[l.renderSlot(t.$slots,"selected-option",l.normalizeProps(l.guardReactiveProps(i.normalizeOptionForSlot(c))),()=>[l.createTextVNode(l.toDisplayString(n.getOptionLabel(c)),1)]),n.multiple?(l.openBlock(),l.createElementBlock("button",{key:0,ref_for:!0,ref:d=>o.deselectButtons[a]=d,disabled:n.disabled,type:"button",class:"vs__deselect",title:`Deselect ${n.getOptionLabel(c)}`,"aria-label":`Deselect ${n.getOptionLabel(c)}`,onClick:d=>i.deselect(c)},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.Deselect)))],8,XR)):l.createCommentVNode("",!0)]))])),256)),l.renderSlot(t.$slots,"search",l.normalizeProps(l.guardReactiveProps(i.scope.search)),()=>[l.createElementVNode("input",l.mergeProps({class:"vs__search"},i.scope.search.attributes,l.toHandlers(i.scope.search.events)),null,16)])],512),l.createElementVNode("div",qR,[l.withDirectives(l.createElementVNode("button",{ref:"clearButton",disabled:n.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...c)=>i.clearSelection&&i.clearSelection(...c))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.Deselect)))],8,VR),[[l.vShow,i.showClearButton]]),l.renderSlot(t.$slots,"open-indicator",l.normalizeProps(l.guardReactiveProps(i.scope.openIndicator)),()=>[n.noDrop?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.OpenIndicator),l.normalizeProps(l.mergeProps({key:0},i.scope.openIndicator.attributes)),null,16))]),l.renderSlot(t.$slots,"spinner",l.normalizeProps(l.guardReactiveProps(i.scope.spinner)),()=>[l.withDirectives(l.createElementVNode("div",e$,"Loading...",512),[[l.vShow,t.mutableLoading]])])],512)],40,ZR),l.createVNode(l.Transition,{name:n.transition},{default:l.withCtx(()=>[i.dropdownOpen?l.withDirectives((l.openBlock(),l.createElementBlock("ul",{id:`vs${n.uid}__listbox`,ref:"dropdownMenu",key:`vs${n.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=l.withModifiers((...c)=>i.onMousedown&&i.onMousedown(...c),["prevent"])),onMouseup:e[3]||(e[3]=(...c)=>i.onMouseUp&&i.onMouseUp(...c))},[l.renderSlot(t.$slots,"list-header",l.normalizeProps(l.guardReactiveProps(i.scope.listHeader))),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.filteredOptions,(c,a)=>(l.openBlock(),l.createElementBlock("li",{id:`vs${n.uid}__option-${a}`,key:n.getOptionKey(c),role:"option",class:l.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(c)&&a===t.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(c),"vs__dropdown-option--highlight":a===t.typeAheadPointer,"vs__dropdown-option--disabled":!n.selectable(c)}]),"aria-selected":a===t.typeAheadPointer?!0:null,onMouseover:d=>n.selectable(c)?t.typeAheadPointer=a:null,onClick:l.withModifiers(d=>n.selectable(c)?i.select(c):null,["prevent","stop"])},[l.renderSlot(t.$slots,"option",l.normalizeProps(l.guardReactiveProps(i.normalizeOptionForSlot(c))),()=>[l.createTextVNode(l.toDisplayString(n.getOptionLabel(c)),1)])],42,n$))),128)),i.filteredOptions.length===0?(l.openBlock(),l.createElementBlock("li",r$,[l.renderSlot(t.$slots,"no-options",l.normalizeProps(l.guardReactiveProps(i.scope.noOptions)),()=>[o$])])):l.createCommentVNode("",!0),l.renderSlot(t.$slots,"list-footer",l.normalizeProps(l.guardReactiveProps(i.scope.listFooter)))],40,t$)),[[s]]):(l.openBlock(),l.createElementBlock("ul",{key:1,id:`vs${n.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,i$))]),_:3},8,["name"]),l.renderSlot(t.$slots,"footer",l.normalizeProps(l.guardReactiveProps(i.scope.footer)))],10,QR)}const a$=vh(GR,[["render",s$]]),l$=t=>typeof t=="number",c$=12,d$=["textContent"],u$=["textContent"],f$={key:0,class:"content-library-card__body"},h$=["textContent"],p$={key:1},Ec=l.defineComponent({__name:"BDContentLibraryCard",props:{itemId:{type:[String,Number],required:!0},title:{type:String},subtitle:{type:String},description:{type:String},uri:{type:String},showFooter:{type:Boolean,default:!0},showBody:{type:Boolean,default:!0},cardClass:{type:String},provider:{type:String}},emits:["on-insert"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=l.computed(()=>`Open ${r.provider} in nieuw venster`),s=()=>{o("on-insert",r.itemId)},c=()=>{window.open(r.uri,"_blank","noopener,noreferrer")};return(a,d)=>(l.openBlock(),l.createElementBlock("article",{class:l.normalizeClass(["content-library-card",r.cardClass])},[l.createElementVNode("header",null,[l.renderSlot(a.$slots,"header",{},()=>[l.createElementVNode("h6",{textContent:l.toDisplayString(r.title)},null,8,d$),r.subtitle?(l.openBlock(),l.createElementBlock("small",{key:0,textContent:l.toDisplayString(r.subtitle)},null,8,u$)):l.createCommentVNode("",!0)])]),r.showBody?(l.openBlock(),l.createElementBlock("div",f$,[l.renderSlot(a.$slots,"default",{},()=>[l.createElementVNode("p",{textContent:l.toDisplayString(r.description),class:"content-library-card__description"},null,8,h$)])])):l.createCommentVNode("",!0),r.showFooter?(l.openBlock(),l.createElementBlock("footer",p$,[l.renderSlot(a.$slots,"footer",{},()=>[l.createVNode(Re,{variant:"secondary",onClick:s},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryCard.insert")),1)]),_:1}),l.createVNode(Re,{title:i.value,variant:"icon",onClick:c},{default:l.withCtx(()=>[l.createVNode(Bc)]),_:1},8,["title"])])])):l.createCommentVNode("",!0)],2))}}),m$=l.defineComponent({__name:"BDContentLibraryCardBasic",props:{item:{type:Object,required:!0}},setup(t){return(e,n)=>(l.openBlock(),l.createBlock(Ec,l.normalizeProps(l.guardReactiveProps(t.item)),null,16))}}),g$={class:"content-library-card-image__titles"},v$=["textContent"],y$=["textContent"],b$=["src"],C$=l.defineComponent({__name:"BDContentLibraryCardImage",props:{item:{type:Object,required:!0}},setup(t){const e=t,n=l.computed(()=>{const{itemId:r,uri:o,title:i,provider:s}=e.item;return{itemId:r,uri:o,title:i,provider:s}});return(r,o)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(n.value,{"card-class":"content-library-card-image","show-body":!1}),{header:l.withCtx(()=>[l.createElementVNode("div",g$,[l.createElementVNode("h6",{textContent:l.toDisplayString(t.item.title)},null,8,v$),l.createElementVNode("small",{textContent:l.toDisplayString(t.item.subtitle)},null,8,y$)]),l.createElementVNode("img",{src:t.item.imageUri,class:"content-library-card-image__figure"},null,8,b$)]),_:1},16))}}),E$=l.defineComponent({__name:"BDContentLibraryCardTitle",props:{item:{type:Object,required:!0}},setup(t){const e=t,n=l.computed(()=>{const{itemId:r,title:o,subtitle:i,uri:s,provider:c}=e.item;return{itemId:r,title:o,subtitle:i,uri:s,provider:c}});return(r,o)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(n.value,{"show-body":!1,"card-class":"content-library-card-title"}),null,16))}}),n3=t=>t.replace(/<\/?[^>]+(>|$)/g,Ne),r3=t=>t.replace(/<li>/g," ").replace(/<(br|\/p)>/g," \r"),k$=t=>t.replace(/(?:\r\n|\r|\n)/g,"<br>"),w$={class:"content-library-card-message-template__tag"},S$=["textContent"],A$=["textContent"],x$=["textContent"],T$=["id"],I$=["innerHTML"],_$={class:"collapsed-hide"},N$={class:"collapsed-show"},O$={key:2,class:"edit-btn-group"},M$={key:3,class:"attachment-occurence"},L$={class:"number-icon"},D$=l.defineComponent({__name:"BDContentLibraryCardMessageTemplate",props:{item:{type:Object,required:!0},variant:{type:String,default:"insert",validator(t){return["insert","edit","shared"].includes(t)}},apiUrl:{type:String,default:""}},emits:["on-insert","show-attachment","on-change","delete"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=l.ref(null),s=l.ref(!1),c=l.ref(!1),a=l.computed(()=>`collapse-preview-${r.item.itemId}`),d=l.computed(()=>Pm(r.item.files)?null:r.item.files.length),u=l.computed(()=>r.variant==="insert"),f=l.computed(()=>r.variant==="edit"),h=l.computed(()=>r.variant==="shared"),p=l.computed(()=>c.value?Ne:"content-library-card-not-collapsable"),m=l.computed(()=>r.item.text?k$(r.item.text):Ne),g=l.computed(()=>So(r.apiUrl,r.item.files,!1)),v=l.computed(()=>So(r.apiUrl,r.item.files,!0)),y=()=>{i.value&&(c.value=s.value||i.value.scrollHeight>i.value.clientHeight||r.item.files&&r.item.files.length>0)},b=()=>{o("on-insert",r.item.itemId)},E=_=>{o("show-attachment",_)},C=()=>{o("on-change",r.item.itemId)},S=()=>{o("delete",r.item.itemId)};return l.watch(()=>r.item,()=>{i.value&&l.nextTick().then(()=>{y()})},{immediate:!0,deep:!0}),l.onMounted(()=>{l.nextTick(()=>{y()})}),(_,T)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(t.item,{cardClass:`content-library-card-message-template ${p.value}`,onOnInsert:b}),{header:l.withCtx(()=>[l.createElementVNode("div",w$,[l.createElementVNode("span",{textContent:l.toDisplayString(t.item.category)},null,8,S$)]),l.createElementVNode("h6",{textContent:l.toDisplayString(t.item.title)},null,8,A$),l.createElementVNode("small",{textContent:l.toDisplayString(t.item.practitionerName)},null,8,x$)]),footer:l.withCtx(()=>[u.value?(l.openBlock(),l.createBlock(Re,{key:0,variant:"secondary",onClick:b},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.insert")),1)]),_:1})):l.createCommentVNode("",!0),h.value?l.withDirectives((l.openBlock(),l.createBlock(Re,{key:1,variant:"icon",title:l.unref(n)("contentLibraryCardMessageTemplate.popoverIsSharedByOtherUser")},{default:l.withCtx(()=>[l.createVNode($c)]),_:1},8,["title"])),[[l.unref(Lo)]]):l.createCommentVNode("",!0),f.value?(l.openBlock(),l.createElementBlock("div",O$,[l.createVNode(Re,{title:l.unref(n)("contentLibraryCardMessageTemplate.edit"),variant:"icon",onClick:C},{default:l.withCtx(()=>[l.createVNode(Pc)]),_:1},8,["title"]),l.createVNode(Re,{title:l.unref(n)("contentLibraryCardMessageTemplate.delete"),variant:"icon",onClick:S},{default:l.withCtx(()=>[l.createVNode(Lc)]),_:1},8,["title"])])):l.createCommentVNode("",!0),d.value?(l.openBlock(),l.createElementBlock("div",M$,[l.createVNode(hr),l.createElementVNode("div",L$,l.toDisplayString(d.value),1)])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createElementVNode("div",{id:a.value,class:"content-library-card-message-template__collapse collapse",ref_key:"content",ref:i},[l.createElementVNode("p",{class:"message-text",innerHTML:m.value},null,8,I$),t.item.files?(l.openBlock(),l.createBlock($s,{key:0,"no-download":!0,files:g.value},null,8,["files"])):l.createCommentVNode("",!0),t.item.files?(l.openBlock(),l.createBlock(Fs,{key:1,"no-download":!0,files:v.value,onShow:E},null,8,["files"])):l.createCommentVNode("",!0)],8,T$),c.value?(l.openBlock(),l.createBlock(Re,{key:0,class:"content-library-card-message-template__link-button collapse-button collapsed",variant:"link","data-bs-toggle":"collapse","data-bs-target":`#${a.value}`},{default:l.withCtx(()=>[l.createElementVNode("span",_$,l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.collapseOpen")),1),l.createElementVNode("span",N$,l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.collapseClosed")),1)]),_:1},8,["data-bs-target"])):l.createCommentVNode("",!0)]),_:1},16,["cardClass"]))}}),P$={class:"content-library-overview"},B$=ge({__name:"BDContentLibraryOverview",props:{items:{type:Array,default:null},cols:{type:Number,default:2}},emits:["on-insert","on-change","delete","show-attachment"],setup(t,{emit:e}){const{t:n}=Lt(),r={BDContentLibraryCardBasic:m$,BDContentLibraryCardImage:C$,BDContentLibraryCardTitle:E$,BDContentLibraryCardMessageTemplate:D$},o=t,i=e,s=l.computed(()=>Pm(o.items)),c=l.computed(()=>Math.floor(c$/o.cols)),a=h=>{i("on-insert",h)},d=h=>{i("on-change",h)},u=h=>{i("delete",h)},f=h=>{i("show-attachment",h)};return(h,p)=>(l.openBlock(),l.createElementBlock("div",P$,[l.createVNode(vn,null,{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createBlock(Tt,{key:0,sm:12},{default:l.withCtx(()=>[l.createVNode(qr,{show:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryOverview.noResults")),1)]),_:1})]),_:1})):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.items,m=>(l.openBlock(),l.createBlock(Tt,{class:"card-container",key:m.itemId,sm:12,md:6,lg:c.value},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r[m.componentToRender]),l.mergeProps({ref_for:!0},m,{item:m,onOnInsert:a,onOnChange:d,onDelete:u,onShowAttachment:f}),null,16,["item"]))]),_:2},1032,["lg"]))),128))]),_:1})]))}},[["__scopeId","data-v-de8a1bfb"]]),R$={class:"content-library-template"},$$={class:"number-of-messages"},F$=["src"],z$=["src"],U$=["id"],H$={class:"collapse-button-container"},j$={class:"collapsed-show"},W$={class:"collapsed-hide"},yh=l.defineComponent({__name:"BDContentLibraryTemplate",props:{modelValue:{},showAddButton:{type:Boolean,default:!1},providerSelectOptions:{default:()=>[]},provider:{},editCategory:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["create","on-insert","on-change","delete","update","on-input","show-attachment","provider-changed"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=l.ref(r.modelValue);l.watch(()=>r.modelValue,z=>{i.value=z},{immediate:!0,deep:!0});const s=l.computed(()=>r.modelValue?.provider?.SupportsSearch?n("contentLibraryTemplate.searchPlaceholderSearch"):n("contentLibraryTemplate.searchPlaceholder")),c=l.computed(()=>$d(r.providerSelectOptions)&&r.providerSelectOptions.length>1),a=l.computed(()=>r.provider&&$d(r.provider.items)?r.provider.items:[]),d=l.computed(()=>r.provider&&$d(r.provider.filters)),u=l.computed(()=>{let z=0;return r.provider&&l$(r.provider.totalNumber)&&(z=r.provider.totalNumber),z===1?`${z} ${n("contentLibraryTemplate.message")}`:`${z} ${n("contentLibraryTemplate.messages")}`}),f=l.computed(()=>r.provider&&r.provider.pageSize&&r.provider.totalNumber&&r.provider.pageSize<=r.provider.totalNumber),h=l.computed(()=>r.provider&&r.provider.totalNumber?r.provider.totalNumber:0),p=l.computed(()=>d.value?9:12),m=l.computed(()=>r.provider&&!d.value?3:2),g=l.computed(()=>r.showAddButton||c.value),v=l.computed(()=>({md:3,lg:3})),y=l.computed(()=>({md:9,lg:9})),b=l.computed(()=>({sm:12,md:12,lg:c.value?7:8,"offset-lg":g.value?0:3,"offset-md":g.value?0:3})),E=l.computed(()=>({sm:12,md:g.value?6:3,lg:c.value?5:4})),C=z=>z.replace(/\s/g,"-"),S=()=>{o("create")},_=z=>{o("on-insert",z)},T=z=>{o("on-change",z)},D=z=>{o("delete",z)},G=()=>{o("update","category")},$=()=>{i.value.currentPage=1,o("on-input",i.value)},j=()=>{o("on-input",i.value)},W=z=>{o("show-attachment",z)},Y=z=>{o("provider-changed",z.value)};return(z,U)=>(l.openBlock(),l.createElementBlock("div",R$,[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,l.mergeProps(v.value,{class:"content-library-header content-library-header__messages"}),{default:l.withCtx(()=>[l.createElementVNode("span",$$,l.toDisplayString(u.value),1),t.showAddButton?(l.openBlock(),l.createBlock(Re,{key:0,class:"d-md-none",onClick:S},{default:l.withCtx(()=>[l.createVNode(oa),l.createTextVNode(" "+l.toDisplayString(l.unref(n)("contentLibraryTemplate.newMessageText")),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},16),l.createVNode(Tt,l.mergeProps(y.value,{class:"content-library-header"}),{default:l.withCtx(()=>[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,l.mergeProps(b.value,{class:"search-block"}),{default:l.withCtx(()=>[l.createVNode(br,{type:"text",modelValue:i.value.searchTerm,"onUpdate:modelValue":U[0]||(U[0]=F=>i.value.searchTerm=F),placeholder:s.value,delayTimeMs:500,class:"search-input",onInput:$,autofocus:""},null,8,["modelValue","placeholder"])]),_:1},16),t.showAddButton?(l.openBlock(),l.createBlock(Tt,l.mergeProps({key:0},E.value,{class:"add-button-block d-none d-md-block"}),{default:l.withCtx(()=>[t.showAddButton?(l.openBlock(),l.createBlock(Re,{key:0,onClick:S},{default:l.withCtx(()=>[l.createVNode(oa),l.createTextVNode(" "+l.toDisplayString(l.unref(n)("contentLibraryTemplate.newMessageText")),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},16)):l.createCommentVNode("",!0),c.value?(l.openBlock(),l.createBlock(Tt,l.mergeProps({key:1},E.value,{class:"select-button-block"}),{default:l.withCtx(()=>[l.createVNode(l.unref(a$),{modelValue:i.value.provider,"onUpdate:modelValue":U[1]||(U[1]=F=>i.value.provider=F),options:t.providerSelectOptions,clearable:!1,searchable:!1,"onOption:selected":Y},{"open-indicator":l.withCtx(({attributes:F})=>[l.createElementVNode("span",l.normalizeProps(l.guardReactiveProps(F)),[l.createVNode(ea)],16)]),option:l.withCtx(({icon:F,label:X,img:H})=>[F?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(F),{key:0})):l.createCommentVNode("",!0),H?(l.openBlock(),l.createElementBlock("img",{key:1,src:H},null,8,F$)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(X),1)]),"selected-option":l.withCtx(({icon:F,label:X,img:H})=>[F?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(F),{key:0})):l.createCommentVNode("",!0),H?(l.openBlock(),l.createElementBlock("img",{key:1,src:H},null,8,z$)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(X),1)]),_:1},8,["modelValue","options"])]),_:1},16)):l.createCommentVNode("",!0)]),_:1})]),_:1},16),d.value?(l.openBlock(),l.createBlock(Tt,{key:0,md:12,lg:3,class:"content-library-body"},{default:l.withCtx(()=>[l.createVNode(Zc,{title:"Filter","show-on":"md","collapse-on":"md"},{body:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.provider.filters,(F,X)=>(l.openBlock(),l.createBlock(es,{key:F.label,label:F.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.options,(H,ee)=>(l.openBlock(),l.createBlock(Cr,{modelValue:i.value.selectedFilters,"onUpdate:modelValue":U[2]||(U[2]=ne=>i.value.selectedFilters=ne),key:ee,value:`${F.id}-${H.item}`,onChange:$},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(H.name),1)]),_:2},1032,["modelValue","value"]))),128)),F.moreOptions?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",{id:`collapse-${C(F.label)}`,class:"collapse"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.moreOptions,(H,ee)=>(l.openBlock(),l.createBlock(Cr,{modelValue:i.value.selectedFilters,"onUpdate:modelValue":U[3]||(U[3]=ne=>i.value.selectedFilters=ne),key:ee,value:`${F.id}-${H.item}`,onChange:$},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(H.name),1)]),_:2},1032,["modelValue","value"]))),128))],8,U$),l.createElementVNode("div",H$,[l.createVNode(Re,{class:l.normalizeClass(["collapse-button collapsed",{"collapse-button-last":t.provider.filters.length-1===X}]),variant:"link","data-bs-toggle":"collapse","data-bs-target":`#collapse-${C(F.label)}`},{default:l.withCtx(()=>[l.createVNode(Ac,{class:"collapsed-show"}),l.createElementVNode("span",j$,l.toDisplayString(l.unref(n)("contentLibraryTemplate.more")),1),l.createVNode(xc,{class:"collapsed-hide"}),l.createElementVNode("span",W$,l.toDisplayString(l.unref(n)("contentLibraryTemplate.less")),1)]),_:1},8,["class","data-bs-target"])])],64)):l.createCommentVNode("",!0),F.label==="Categorieën"&&t.editCategory?(l.openBlock(),l.createBlock(Re,{key:1,variant:"outline-primary-dark",class:"edit-category-button",size:"sm",onClick:G},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryTemplate.changeCategoryButtonLabel")),1)]),_:1})):l.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(Tt,{md:12,lg:p.value,class:"content-library-body"},{default:l.withCtx(()=>[l.createVNode(B$,{items:a.value,cols:m.value,onOnInsert:_,onOnChange:T,onDelete:D,onShowAttachment:W},null,8,["items","cols"]),l.createVNode(vn,{class:"content-library-pagination"},{default:l.withCtx(()=>[f.value?(l.openBlock(),l.createBlock(Bd,{key:0,modelValue:i.value.currentPage,"onUpdate:modelValue":U[4]||(U[4]=F=>i.value.currentPage=F),totalRows:h.value,rowsPerPage:t.provider.pageSize,onClick:j,isPatient:!0},null,8,["modelValue","totalRows","rowsPerPage"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["lg"])]),_:1})]))}}),o3={__name:"BDContentLibraryModal",props:{modelValue:{type:Object},provider:{type:Object},providerSelectOptions:{type:Array,default:()=>[]},visible:{type:Boolean,default:null},loading:{type:Boolean,default:!1}},emits:["on-insert","cancel","show-attachment","shown","provider-changed"],setup(t,{emit:e}){const{closeModal:n}=Do("content-library-modal"),r=t,o=e,i=l.ref(r.modelValue),s=l.computed(()=>{var p,m,g;return(g=(m=(p=r.modelValue)===null||p===void 0?void 0:p.provider)===null||m===void 0?void 0:m.img)!==null&&g!==void 0?g:null}),c=l.computed(()=>{var p,m,g;return(g=(m=(p=r.modelValue)===null||p===void 0?void 0:p.provider)===null||m===void 0?void 0:m.label)!==null&&g!==void 0?g:Ne});l.watch(()=>r.modelValue,p=>{i.value=p},{immediate:!0,deep:!0});const a=p=>{n(),o("on-insert",p)},d=()=>{o("cancel")},u=p=>{o("show-attachment",p)},f=()=>{o("shown")},h=p=>{o("provider-changed",p)};return(p,m)=>(l.openBlock(),l.createBlock(xn,{id:"content-library-modal","title-image":s.value,title:c.value,size:"xl",visible:t.visible,"hide-footer":!0,onCancel:d,onShown:f},{default:l.withCtx(()=>[l.createVNode(yh,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),provider:t.provider,providerSelectOptions:t.providerSelectOptions,loading:t.loading,onOnInsert:a,onShowAttachment:u,onProviderChanged:h},null,8,["modelValue","provider","providerSelectOptions","loading"])]),_:1},8,["title-image","title","visible"]))}};var K$=Object.defineProperty,Y$=(t,e,n)=>e in t?K$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i3=(t,e,n)=>(Y$(t,typeof e!="symbol"?e+"":e,n),n);class G${constructor(){i3(this,"seed",0),i3(this,"data",new Map)}id(){return Date.now().toString(26)+this.seed++}add(e,n=this.id()){return this.data.set(n,e),n}get(e){return this.data.get(e)}delete(e){this.delete(e)}}const Q$="Failed to copy value to clipboard. Unknown type.",Z$={asString(t){if(t==null)return console.warn("Clipboard input is empty"),"";if(typeof t!="string")try{return JSON.stringify(t)}catch(e){return console.warn(Q$,e),""}return t}},J$="position:fixed; pointer-events:none; z-index:-9999; opacity:0;",X$={createTextarea(t){const e=document.createElement("textarea");return e.addEventListener("focusin",n=>{n.stopPropagation()}),e.value=t,e.setAttribute("readonly",""),e.style.cssText=J$,e}},Si={async requestClipboardPermission(){return navigator.permissions.query({name:"clipboard-write"})},async writeClipboard(t){return(await Si.requestClipboardPermission()).state==="granted"?(await navigator.clipboard.writeText(t),!0):!1},writeClipboardExecCommand(t){const e=X$.createTextarea(t);if(document.body.appendChild(e),navigator.userAgent.match(/ipad|ipod|iphone/i)){e.contentEditable="true",e.readOnly=!0;const r=document.createRange();r.selectNodeContents(e);const o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(r),e.setSelectionRange(0,999999))}else e.select();const n=document.execCommand("copy");return document.body.removeChild(e),n},async copy(t){const e=typeof t=="function"?t():t,n=Z$.asString(e);if(Si.writeClipboardExecCommand(n))return!0;await Si.writeClipboard(n)}};new G$;const{showSuccessToast:bh}=Js(),q$=(t,e,n)=>{const r=`${e}
1304
+ https://vue-select.org/api/props.html#getoptionkey`,t,e)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(t,e,n){return(e||"").toLocaleLowerCase().indexOf(n.toLocaleLowerCase())>-1}},filter:{type:Function,default(t,e){return t.filter(n=>{let r=this.getOptionLabel(n);return typeof r=="number"&&(r=r.toString()),this.filterBy(n,r,e)})}},createOption:{type:Function,default(t){return typeof this.optionList[0]=="object"?{[this.label]:t}:t}},resetOnOptionsChange:{default:!1,validator:t=>["function","boolean"].includes(typeof t)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:t,multiple:e}){return t&&!e}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(t,e)=>t},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(t,e,{width:n,top:r,left:o}){t.style.top=r,t.style.left=o,t.style.width=n}},dropdownShouldOpen:{type:Function,default({noDrop:t,open:e,mutableLoading:n}){return t?!1:e&&!n}},uid:{type:[String,Number],default:()=>YR()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let t=this.modelValue;return this.isTrackingValues&&(t=this.$data._value),t!=null&&t!==""?[].concat(t):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const t={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:wi({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:e=>this.search=e.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:t,listFooter:t,header:e3(wi({},t),{deselect:this.deselect}),footer:e3(wi({},t),{deselect:this.deselect})}},childComponents(){return wi(wi({},t3),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const t=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t;const e=this.search.length?this.filter(t,this.search,this):t;if(this.taggable&&this.search.length){const n=this.createOption(this.search);this.optionExists(n)||e.unshift(n)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(t,e){const n=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(t,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&n()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(t){this.isTrackingValues&&this.setInternalValueFromOptions(t)}},multiple(){this.clearSelection()},open(t){this.$emit(t?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(t){Array.isArray(t)?this.$data._value=t.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(t)},select(t){this.$emit("option:selecting",t),this.isOptionSelected(t)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(t):(this.taggable&&!this.optionExists(t)&&(this.$emit("option:created",t),this.pushTag(t)),this.multiple&&(t=this.selectedValue.concat(t)),this.updateValue(t),this.$emit("option:selected",t)),this.onAfterSelect(t)},deselect(t){this.$emit("option:deselecting",t),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,t))),this.$emit("option:deselected",t)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(t){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(t){typeof this.modelValue>"u"&&(this.$data._value=t),t!==null&&(Array.isArray(t)?t=t.map(e=>this.reduce(e)):t=this.reduce(t)),this.$emit("update:modelValue",t)},toggleDropdown(t){const e=t.target!==this.searchEl;e&&t.preventDefault();const n=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||n.filter(Boolean).some(r=>r.contains(t.target)||r===t.target)){t.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(t){return this.selectedValue.some(e=>this.optionComparator(e,t))},isOptionDeselectable(t){return this.isOptionSelected(t)&&this.deselectFromDropdown},optionComparator(t,e){return this.getOptionKey(t)===this.getOptionKey(e)},findOptionFromReducedValue(t){const e=r=>JSON.stringify(this.reduce(r))===JSON.stringify(t),n=[...this.options,...this.pushedTags].filter(e);return n.length===1?n[0]:n.find(r=>this.optionComparator(r,this.$data._value))||t},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let t=null;this.multiple&&(t=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(t)}},optionExists(t){return this.optionList.some(e=>this.optionComparator(e,t))},normalizeOptionForSlot(t){return typeof t=="object"?t:{[this.label]:t}},pushTag(t){this.pushedTags.push(t)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:t,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:t,multiple:e})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(t){const e=o=>(o.preventDefault(),!this.isComposing&&this.typeAheadSelect()),n={8:o=>this.maybeDeleteValue(),9:o=>this.onTab(),27:o=>this.onEscape(),38:o=>(o.preventDefault(),this.typeAheadUp()),40:o=>(o.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(o=>n[o]=e);const r=this.mapKeydown(n,this);if(typeof r[t.keyCode]=="function")return r[t.keyCode](t)}}},QR=["dir"],ZR=["id","aria-expanded","aria-owns"],JR={ref:"selectedOptions",class:"vs__selected-options"},XR=["disabled","title","aria-label","onClick"],qR={ref:"actions",class:"vs__actions"},VR=["disabled"],e$={class:"vs__spinner"},t$=["id"],n$=["id","aria-selected","onMouseover","onClick"],r$={key:0,class:"vs__no-options"},o$=l.createTextVNode(" Sorry, no matching options. "),i$=["id"];function s$(t,e,n,r,o,i){const s=l.resolveDirective("append-to-body");return l.openBlock(),l.createElementBlock("div",{dir:n.dir,class:l.normalizeClass(["v-select",i.stateClasses])},[l.renderSlot(t.$slots,"header",l.normalizeProps(l.guardReactiveProps(i.scope.header))),l.createElementVNode("div",{id:`vs${n.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":i.dropdownOpen.toString(),"aria-owns":`vs${n.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=c=>i.toggleDropdown(c))},[l.createElementVNode("div",JR,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.selectedValue,(c,a)=>l.renderSlot(t.$slots,"selected-option-container",{option:i.normalizeOptionForSlot(c),deselect:i.deselect,multiple:n.multiple,disabled:n.disabled},()=>[(l.openBlock(),l.createElementBlock("span",{key:n.getOptionKey(c),class:"vs__selected"},[l.renderSlot(t.$slots,"selected-option",l.normalizeProps(l.guardReactiveProps(i.normalizeOptionForSlot(c))),()=>[l.createTextVNode(l.toDisplayString(n.getOptionLabel(c)),1)]),n.multiple?(l.openBlock(),l.createElementBlock("button",{key:0,ref_for:!0,ref:d=>o.deselectButtons[a]=d,disabled:n.disabled,type:"button",class:"vs__deselect",title:`Deselect ${n.getOptionLabel(c)}`,"aria-label":`Deselect ${n.getOptionLabel(c)}`,onClick:d=>i.deselect(c)},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.Deselect)))],8,XR)):l.createCommentVNode("",!0)]))])),256)),l.renderSlot(t.$slots,"search",l.normalizeProps(l.guardReactiveProps(i.scope.search)),()=>[l.createElementVNode("input",l.mergeProps({class:"vs__search"},i.scope.search.attributes,l.toHandlers(i.scope.search.events)),null,16)])],512),l.createElementVNode("div",qR,[l.withDirectives(l.createElementVNode("button",{ref:"clearButton",disabled:n.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...c)=>i.clearSelection&&i.clearSelection(...c))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.Deselect)))],8,VR),[[l.vShow,i.showClearButton]]),l.renderSlot(t.$slots,"open-indicator",l.normalizeProps(l.guardReactiveProps(i.scope.openIndicator)),()=>[n.noDrop?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(i.childComponents.OpenIndicator),l.normalizeProps(l.mergeProps({key:0},i.scope.openIndicator.attributes)),null,16))]),l.renderSlot(t.$slots,"spinner",l.normalizeProps(l.guardReactiveProps(i.scope.spinner)),()=>[l.withDirectives(l.createElementVNode("div",e$,"Loading...",512),[[l.vShow,t.mutableLoading]])])],512)],40,ZR),l.createVNode(l.Transition,{name:n.transition},{default:l.withCtx(()=>[i.dropdownOpen?l.withDirectives((l.openBlock(),l.createElementBlock("ul",{id:`vs${n.uid}__listbox`,ref:"dropdownMenu",key:`vs${n.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=l.withModifiers((...c)=>i.onMousedown&&i.onMousedown(...c),["prevent"])),onMouseup:e[3]||(e[3]=(...c)=>i.onMouseUp&&i.onMouseUp(...c))},[l.renderSlot(t.$slots,"list-header",l.normalizeProps(l.guardReactiveProps(i.scope.listHeader))),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.filteredOptions,(c,a)=>(l.openBlock(),l.createElementBlock("li",{id:`vs${n.uid}__option-${a}`,key:n.getOptionKey(c),role:"option",class:l.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":i.isOptionDeselectable(c)&&a===t.typeAheadPointer,"vs__dropdown-option--selected":i.isOptionSelected(c),"vs__dropdown-option--highlight":a===t.typeAheadPointer,"vs__dropdown-option--disabled":!n.selectable(c)}]),"aria-selected":a===t.typeAheadPointer?!0:null,onMouseover:d=>n.selectable(c)?t.typeAheadPointer=a:null,onClick:l.withModifiers(d=>n.selectable(c)?i.select(c):null,["prevent","stop"])},[l.renderSlot(t.$slots,"option",l.normalizeProps(l.guardReactiveProps(i.normalizeOptionForSlot(c))),()=>[l.createTextVNode(l.toDisplayString(n.getOptionLabel(c)),1)])],42,n$))),128)),i.filteredOptions.length===0?(l.openBlock(),l.createElementBlock("li",r$,[l.renderSlot(t.$slots,"no-options",l.normalizeProps(l.guardReactiveProps(i.scope.noOptions)),()=>[o$])])):l.createCommentVNode("",!0),l.renderSlot(t.$slots,"list-footer",l.normalizeProps(l.guardReactiveProps(i.scope.listFooter)))],40,t$)),[[s]]):(l.openBlock(),l.createElementBlock("ul",{key:1,id:`vs${n.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,i$))]),_:3},8,["name"]),l.renderSlot(t.$slots,"footer",l.normalizeProps(l.guardReactiveProps(i.scope.footer)))],10,QR)}const a$=vh(GR,[["render",s$]]),l$=t=>typeof t=="number",c$=12,d$=["textContent"],u$=["textContent"],f$={key:0,class:"content-library-card__body"},h$=["textContent"],p$={key:1},Ec=l.defineComponent({__name:"BDContentLibraryCard",props:{itemId:{type:[String,Number],required:!0},title:{type:String},subtitle:{type:String},description:{type:String},uri:{type:String},showFooter:{type:Boolean,default:!0},showBody:{type:Boolean,default:!0},cardClass:{type:String},provider:{type:String}},emits:["on-insert"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=l.computed(()=>`Open ${r.provider} in nieuw venster`),s=()=>{o("on-insert",r.itemId)},c=()=>{window.open(r.uri,"_blank","noopener,noreferrer")};return(a,d)=>(l.openBlock(),l.createElementBlock("article",{class:l.normalizeClass(["content-library-card",r.cardClass])},[l.createElementVNode("header",null,[l.renderSlot(a.$slots,"header",{},()=>[l.createElementVNode("h6",{textContent:l.toDisplayString(r.title)},null,8,d$),r.subtitle?(l.openBlock(),l.createElementBlock("small",{key:0,textContent:l.toDisplayString(r.subtitle)},null,8,u$)):l.createCommentVNode("",!0)])]),r.showBody?(l.openBlock(),l.createElementBlock("div",f$,[l.renderSlot(a.$slots,"default",{},()=>[l.createElementVNode("p",{textContent:l.toDisplayString(r.description),class:"content-library-card__description"},null,8,h$)])])):l.createCommentVNode("",!0),r.showFooter?(l.openBlock(),l.createElementBlock("footer",p$,[l.renderSlot(a.$slots,"footer",{},()=>[l.createVNode(Re,{variant:"secondary",onClick:s},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryCard.insert")),1)]),_:1}),l.createVNode(Re,{title:i.value,variant:"icon",onClick:c},{default:l.withCtx(()=>[l.createVNode(Bc)]),_:1},8,["title"])])])):l.createCommentVNode("",!0)],2))}}),m$=l.defineComponent({__name:"BDContentLibraryCardBasic",props:{item:{type:Object,required:!0}},setup(t){return(e,n)=>(l.openBlock(),l.createBlock(Ec,l.normalizeProps(l.guardReactiveProps(t.item)),null,16))}}),g$={class:"content-library-card-image__titles"},v$=["textContent"],y$=["textContent"],b$=["src"],C$=l.defineComponent({__name:"BDContentLibraryCardImage",props:{item:{type:Object,required:!0}},setup(t){const e=t,n=l.computed(()=>{const{itemId:r,uri:o,title:i,provider:s}=e.item;return{itemId:r,uri:o,title:i,provider:s}});return(r,o)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(n.value,{"card-class":"content-library-card-image","show-body":!1}),{header:l.withCtx(()=>[l.createElementVNode("div",g$,[l.createElementVNode("h6",{textContent:l.toDisplayString(t.item.title)},null,8,v$),l.createElementVNode("small",{textContent:l.toDisplayString(t.item.subtitle)},null,8,y$)]),l.createElementVNode("img",{src:t.item.imageUri,class:"content-library-card-image__figure"},null,8,b$)]),_:1},16))}}),E$=l.defineComponent({__name:"BDContentLibraryCardTitle",props:{item:{type:Object,required:!0}},setup(t){const e=t,n=l.computed(()=>{const{itemId:r,title:o,subtitle:i,uri:s,provider:c}=e.item;return{itemId:r,title:o,subtitle:i,uri:s,provider:c}});return(r,o)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(n.value,{"show-body":!1,"card-class":"content-library-card-title"}),null,16))}}),n3=t=>t.replace(/<\/?[^>]+(>|$)/g,_e),r3=t=>t.replace(/<li>/g," ").replace(/<(br|\/p)>/g," \r"),k$=t=>t.replace(/(?:\r\n|\r|\n)/g,"<br>"),w$={class:"content-library-card-message-template__tag"},S$=["textContent"],A$=["textContent"],x$=["textContent"],T$=["id"],I$=["innerHTML"],_$={class:"collapsed-hide"},N$={class:"collapsed-show"},O$={key:2,class:"edit-btn-group"},M$={key:3,class:"attachment-occurence"},L$={class:"number-icon"},D$=l.defineComponent({__name:"BDContentLibraryCardMessageTemplate",props:{item:{type:Object,required:!0},variant:{type:String,default:"insert",validator(t){return["insert","edit","shared"].includes(t)}},apiUrl:{type:String,default:""}},emits:["on-insert","show-attachment","on-change","delete"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=l.ref(null),s=l.ref(!1),c=l.ref(!1),a=l.computed(()=>`collapse-preview-${r.item.itemId}`),d=l.computed(()=>Pm(r.item.files)?null:r.item.files.length),u=l.computed(()=>r.variant==="insert"),f=l.computed(()=>r.variant==="edit"),h=l.computed(()=>r.variant==="shared"),p=l.computed(()=>c.value?_e:"content-library-card-not-collapsable"),m=l.computed(()=>r.item.text?k$(r.item.text):_e),g=l.computed(()=>So(r.apiUrl,r.item.files,!1)),v=l.computed(()=>So(r.apiUrl,r.item.files,!0)),y=()=>{i.value&&(c.value=s.value||i.value.scrollHeight>i.value.clientHeight||r.item.files&&r.item.files.length>0)},b=()=>{o("on-insert",r.item.itemId)},E=_=>{o("show-attachment",_)},C=()=>{o("on-change",r.item.itemId)},S=()=>{o("delete",r.item.itemId)};return l.watch(()=>r.item,()=>{i.value&&l.nextTick().then(()=>{y()})},{immediate:!0,deep:!0}),l.onMounted(()=>{l.nextTick(()=>{y()})}),(_,T)=>(l.openBlock(),l.createBlock(Ec,l.mergeProps(t.item,{cardClass:`content-library-card-message-template ${p.value}`,onOnInsert:b}),{header:l.withCtx(()=>[l.createElementVNode("div",w$,[l.createElementVNode("span",{textContent:l.toDisplayString(t.item.category)},null,8,S$)]),l.createElementVNode("h6",{textContent:l.toDisplayString(t.item.title)},null,8,A$),l.createElementVNode("small",{textContent:l.toDisplayString(t.item.practitionerName)},null,8,x$)]),footer:l.withCtx(()=>[u.value?(l.openBlock(),l.createBlock(Re,{key:0,variant:"secondary",onClick:b},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.insert")),1)]),_:1})):l.createCommentVNode("",!0),h.value?l.withDirectives((l.openBlock(),l.createBlock(Re,{key:1,variant:"icon",title:l.unref(n)("contentLibraryCardMessageTemplate.popoverIsSharedByOtherUser")},{default:l.withCtx(()=>[l.createVNode($c)]),_:1},8,["title"])),[[l.unref(Lo)]]):l.createCommentVNode("",!0),f.value?(l.openBlock(),l.createElementBlock("div",O$,[l.createVNode(Re,{title:l.unref(n)("contentLibraryCardMessageTemplate.edit"),variant:"icon",onClick:C},{default:l.withCtx(()=>[l.createVNode(Pc)]),_:1},8,["title"]),l.createVNode(Re,{title:l.unref(n)("contentLibraryCardMessageTemplate.delete"),variant:"icon",onClick:S},{default:l.withCtx(()=>[l.createVNode(Lc)]),_:1},8,["title"])])):l.createCommentVNode("",!0),d.value?(l.openBlock(),l.createElementBlock("div",M$,[l.createVNode(hr),l.createElementVNode("div",L$,l.toDisplayString(d.value),1)])):l.createCommentVNode("",!0)]),default:l.withCtx(()=>[l.createElementVNode("div",{id:a.value,class:"content-library-card-message-template__collapse collapse",ref_key:"content",ref:i},[l.createElementVNode("p",{class:"message-text",innerHTML:m.value},null,8,I$),t.item.files?(l.openBlock(),l.createBlock($s,{key:0,"no-download":!0,files:g.value},null,8,["files"])):l.createCommentVNode("",!0),t.item.files?(l.openBlock(),l.createBlock(Fs,{key:1,"no-download":!0,files:v.value,onShow:E},null,8,["files"])):l.createCommentVNode("",!0)],8,T$),c.value?(l.openBlock(),l.createBlock(Re,{key:0,class:"content-library-card-message-template__link-button collapse-button collapsed",variant:"link","data-bs-toggle":"collapse","data-bs-target":`#${a.value}`},{default:l.withCtx(()=>[l.createElementVNode("span",_$,l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.collapseOpen")),1),l.createElementVNode("span",N$,l.toDisplayString(l.unref(n)("contentLibraryCardMessageTemplate.collapseClosed")),1)]),_:1},8,["data-bs-target"])):l.createCommentVNode("",!0)]),_:1},16,["cardClass"]))}}),P$={class:"content-library-overview"},B$=ge({__name:"BDContentLibraryOverview",props:{items:{type:Array,default:null},cols:{type:Number,default:2}},emits:["on-insert","on-change","delete","show-attachment"],setup(t,{emit:e}){const{t:n}=Nt(),r={BDContentLibraryCardBasic:m$,BDContentLibraryCardImage:C$,BDContentLibraryCardTitle:E$,BDContentLibraryCardMessageTemplate:D$},o=t,i=e,s=l.computed(()=>Pm(o.items)),c=l.computed(()=>Math.floor(c$/o.cols)),a=h=>{i("on-insert",h)},d=h=>{i("on-change",h)},u=h=>{i("delete",h)},f=h=>{i("show-attachment",h)};return(h,p)=>(l.openBlock(),l.createElementBlock("div",P$,[l.createVNode(vn,null,{default:l.withCtx(()=>[s.value?(l.openBlock(),l.createBlock(Tt,{key:0,sm:12},{default:l.withCtx(()=>[l.createVNode(qr,{show:""},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryOverview.noResults")),1)]),_:1})]),_:1})):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.items,m=>(l.openBlock(),l.createBlock(Tt,{class:"card-container",key:m.itemId,sm:12,md:6,lg:c.value},{default:l.withCtx(()=>[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(r[m.componentToRender]),l.mergeProps({ref_for:!0},m,{item:m,onOnInsert:a,onOnChange:d,onDelete:u,onShowAttachment:f}),null,16,["item"]))]),_:2},1032,["lg"]))),128))]),_:1})]))}},[["__scopeId","data-v-de8a1bfb"]]),R$={class:"content-library-template"},$$={class:"number-of-messages"},F$=["src"],z$=["src"],U$=["id"],H$={class:"collapse-button-container"},j$={class:"collapsed-show"},W$={class:"collapsed-hide"},yh=l.defineComponent({__name:"BDContentLibraryTemplate",props:{modelValue:{},showAddButton:{type:Boolean,default:!1},providerSelectOptions:{default:()=>[]},provider:{},editCategory:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["create","on-insert","on-change","delete","update","on-input","show-attachment","provider-changed"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=l.ref(r.modelValue);l.watch(()=>r.modelValue,z=>{i.value=z},{immediate:!0,deep:!0});const s=l.computed(()=>r.modelValue?.provider?.SupportsSearch?n("contentLibraryTemplate.searchPlaceholderSearch"):n("contentLibraryTemplate.searchPlaceholder")),c=l.computed(()=>$d(r.providerSelectOptions)&&r.providerSelectOptions.length>1),a=l.computed(()=>r.provider&&$d(r.provider.items)?r.provider.items:[]),d=l.computed(()=>r.provider&&$d(r.provider.filters)),u=l.computed(()=>{let z=0;return r.provider&&l$(r.provider.totalNumber)&&(z=r.provider.totalNumber),z===1?`${z} ${n("contentLibraryTemplate.message")}`:`${z} ${n("contentLibraryTemplate.messages")}`}),f=l.computed(()=>r.provider&&r.provider.pageSize&&r.provider.totalNumber&&r.provider.pageSize<=r.provider.totalNumber),h=l.computed(()=>r.provider&&r.provider.totalNumber?r.provider.totalNumber:0),p=l.computed(()=>d.value?9:12),m=l.computed(()=>r.provider&&!d.value?3:2),g=l.computed(()=>r.showAddButton||c.value),v=l.computed(()=>({md:3,lg:3})),y=l.computed(()=>({md:9,lg:9})),b=l.computed(()=>({sm:12,md:12,lg:c.value?7:8,"offset-lg":g.value?0:3,"offset-md":g.value?0:3})),E=l.computed(()=>({sm:12,md:g.value?6:3,lg:c.value?5:4})),C=z=>z.replace(/\s/g,"-"),S=()=>{o("create")},_=z=>{o("on-insert",z)},T=z=>{o("on-change",z)},D=z=>{o("delete",z)},G=()=>{o("update","category")},$=()=>{i.value.currentPage=1,o("on-input",i.value)},j=()=>{o("on-input",i.value)},W=z=>{o("show-attachment",z)},Y=z=>{o("provider-changed",z.value)};return(z,U)=>(l.openBlock(),l.createElementBlock("div",R$,[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,l.mergeProps(v.value,{class:"content-library-header content-library-header__messages"}),{default:l.withCtx(()=>[l.createElementVNode("span",$$,l.toDisplayString(u.value),1),t.showAddButton?(l.openBlock(),l.createBlock(Re,{key:0,class:"d-md-none",onClick:S},{default:l.withCtx(()=>[l.createVNode(oa),l.createTextVNode(" "+l.toDisplayString(l.unref(n)("contentLibraryTemplate.newMessageText")),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},16),l.createVNode(Tt,l.mergeProps(y.value,{class:"content-library-header"}),{default:l.withCtx(()=>[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,l.mergeProps(b.value,{class:"search-block"}),{default:l.withCtx(()=>[l.createVNode(br,{type:"text",modelValue:i.value.searchTerm,"onUpdate:modelValue":U[0]||(U[0]=F=>i.value.searchTerm=F),placeholder:s.value,delayTimeMs:500,class:"search-input",onInput:$,autofocus:""},null,8,["modelValue","placeholder"])]),_:1},16),t.showAddButton?(l.openBlock(),l.createBlock(Tt,l.mergeProps({key:0},E.value,{class:"add-button-block d-none d-md-block"}),{default:l.withCtx(()=>[t.showAddButton?(l.openBlock(),l.createBlock(Re,{key:0,onClick:S},{default:l.withCtx(()=>[l.createVNode(oa),l.createTextVNode(" "+l.toDisplayString(l.unref(n)("contentLibraryTemplate.newMessageText")),1)]),_:1})):l.createCommentVNode("",!0)]),_:1},16)):l.createCommentVNode("",!0),c.value?(l.openBlock(),l.createBlock(Tt,l.mergeProps({key:1},E.value,{class:"select-button-block"}),{default:l.withCtx(()=>[l.createVNode(l.unref(a$),{modelValue:i.value.provider,"onUpdate:modelValue":U[1]||(U[1]=F=>i.value.provider=F),options:t.providerSelectOptions,clearable:!1,searchable:!1,"onOption:selected":Y},{"open-indicator":l.withCtx(({attributes:F})=>[l.createElementVNode("span",l.normalizeProps(l.guardReactiveProps(F)),[l.createVNode(ea)],16)]),option:l.withCtx(({icon:F,label:X,img:H})=>[F?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(F),{key:0})):l.createCommentVNode("",!0),H?(l.openBlock(),l.createElementBlock("img",{key:1,src:H},null,8,F$)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(X),1)]),"selected-option":l.withCtx(({icon:F,label:X,img:H})=>[F?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(F),{key:0})):l.createCommentVNode("",!0),H?(l.openBlock(),l.createElementBlock("img",{key:1,src:H},null,8,z$)):l.createCommentVNode("",!0),l.createElementVNode("span",null,l.toDisplayString(X),1)]),_:1},8,["modelValue","options"])]),_:1},16)):l.createCommentVNode("",!0)]),_:1})]),_:1},16),d.value?(l.openBlock(),l.createBlock(Tt,{key:0,md:12,lg:3,class:"content-library-body"},{default:l.withCtx(()=>[l.createVNode(Zc,{title:"Filter","show-on":"md","collapse-on":"md"},{body:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(t.provider.filters,(F,X)=>(l.openBlock(),l.createBlock(es,{key:F.label,label:F.label},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.options,(H,ee)=>(l.openBlock(),l.createBlock(Cr,{modelValue:i.value.selectedFilters,"onUpdate:modelValue":U[2]||(U[2]=ne=>i.value.selectedFilters=ne),key:ee,value:`${F.id}-${H.item}`,onChange:$},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(H.name),1)]),_:2},1032,["modelValue","value"]))),128)),F.moreOptions?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",{id:`collapse-${C(F.label)}`,class:"collapse"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(F.moreOptions,(H,ee)=>(l.openBlock(),l.createBlock(Cr,{modelValue:i.value.selectedFilters,"onUpdate:modelValue":U[3]||(U[3]=ne=>i.value.selectedFilters=ne),key:ee,value:`${F.id}-${H.item}`,onChange:$},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(H.name),1)]),_:2},1032,["modelValue","value"]))),128))],8,U$),l.createElementVNode("div",H$,[l.createVNode(Re,{class:l.normalizeClass(["collapse-button collapsed",{"collapse-button-last":t.provider.filters.length-1===X}]),variant:"link","data-bs-toggle":"collapse","data-bs-target":`#collapse-${C(F.label)}`},{default:l.withCtx(()=>[l.createVNode(Ac,{class:"collapsed-show"}),l.createElementVNode("span",j$,l.toDisplayString(l.unref(n)("contentLibraryTemplate.more")),1),l.createVNode(xc,{class:"collapsed-hide"}),l.createElementVNode("span",W$,l.toDisplayString(l.unref(n)("contentLibraryTemplate.less")),1)]),_:1},8,["class","data-bs-target"])])],64)):l.createCommentVNode("",!0),F.label==="Categorieën"&&t.editCategory?(l.openBlock(),l.createBlock(Re,{key:1,variant:"outline-primary-dark",class:"edit-category-button",size:"sm",onClick:G},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(n)("contentLibraryTemplate.changeCategoryButtonLabel")),1)]),_:1})):l.createCommentVNode("",!0)]),_:2},1032,["label"]))),128))]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(Tt,{md:12,lg:p.value,class:"content-library-body"},{default:l.withCtx(()=>[l.createVNode(B$,{items:a.value,cols:m.value,onOnInsert:_,onOnChange:T,onDelete:D,onShowAttachment:W},null,8,["items","cols"]),l.createVNode(vn,{class:"content-library-pagination"},{default:l.withCtx(()=>[f.value?(l.openBlock(),l.createBlock(Bd,{key:0,modelValue:i.value.currentPage,"onUpdate:modelValue":U[4]||(U[4]=F=>i.value.currentPage=F),totalRows:h.value,rowsPerPage:t.provider.pageSize,onClick:j,isPatient:!0},null,8,["modelValue","totalRows","rowsPerPage"])):l.createCommentVNode("",!0)]),_:1})]),_:1},8,["lg"])]),_:1})]))}}),o3={__name:"BDContentLibraryModal",props:{modelValue:{type:Object},provider:{type:Object},providerSelectOptions:{type:Array,default:()=>[]},visible:{type:Boolean,default:null},loading:{type:Boolean,default:!1}},emits:["on-insert","cancel","show-attachment","shown","provider-changed"],setup(t,{emit:e}){const{closeModal:n}=Do("content-library-modal"),r=t,o=e,i=l.ref(r.modelValue),s=l.computed(()=>{var p,m,g;return(g=(m=(p=r.modelValue)===null||p===void 0?void 0:p.provider)===null||m===void 0?void 0:m.img)!==null&&g!==void 0?g:null}),c=l.computed(()=>{var p,m,g;return(g=(m=(p=r.modelValue)===null||p===void 0?void 0:p.provider)===null||m===void 0?void 0:m.label)!==null&&g!==void 0?g:_e});l.watch(()=>r.modelValue,p=>{i.value=p},{immediate:!0,deep:!0});const a=p=>{n(),o("on-insert",p)},d=()=>{o("cancel")},u=p=>{o("show-attachment",p)},f=()=>{o("shown")},h=p=>{o("provider-changed",p)};return(p,m)=>(l.openBlock(),l.createBlock(xn,{id:"content-library-modal","title-image":s.value,title:c.value,size:"xl",visible:t.visible,"hide-footer":!0,onCancel:d,onShown:f},{default:l.withCtx(()=>[l.createVNode(yh,{modelValue:i.value,"onUpdate:modelValue":m[0]||(m[0]=g=>i.value=g),provider:t.provider,providerSelectOptions:t.providerSelectOptions,loading:t.loading,onOnInsert:a,onShowAttachment:u,onProviderChanged:h},null,8,["modelValue","provider","providerSelectOptions","loading"])]),_:1},8,["title-image","title","visible"]))}};var K$=Object.defineProperty,Y$=(t,e,n)=>e in t?K$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i3=(t,e,n)=>(Y$(t,typeof e!="symbol"?e+"":e,n),n);class G${constructor(){i3(this,"seed",0),i3(this,"data",new Map)}id(){return Date.now().toString(26)+this.seed++}add(e,n=this.id()){return this.data.set(n,e),n}get(e){return this.data.get(e)}delete(e){this.delete(e)}}const Q$="Failed to copy value to clipboard. Unknown type.",Z$={asString(t){if(t==null)return console.warn("Clipboard input is empty"),"";if(typeof t!="string")try{return JSON.stringify(t)}catch(e){return console.warn(Q$,e),""}return t}},J$="position:fixed; pointer-events:none; z-index:-9999; opacity:0;",X$={createTextarea(t){const e=document.createElement("textarea");return e.addEventListener("focusin",n=>{n.stopPropagation()}),e.value=t,e.setAttribute("readonly",""),e.style.cssText=J$,e}},Si={async requestClipboardPermission(){return navigator.permissions.query({name:"clipboard-write"})},async writeClipboard(t){return(await Si.requestClipboardPermission()).state==="granted"?(await navigator.clipboard.writeText(t),!0):!1},writeClipboardExecCommand(t){const e=X$.createTextarea(t);if(document.body.appendChild(e),navigator.userAgent.match(/ipad|ipod|iphone/i)){e.contentEditable="true",e.readOnly=!0;const r=document.createRange();r.selectNodeContents(e);const o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(r),e.setSelectionRange(0,999999))}else e.select();const n=document.execCommand("copy");return document.body.removeChild(e),n},async copy(t){const e=typeof t=="function"?t():t,n=Z$.asString(e);if(Si.writeClipboardExecCommand(n))return!0;await Si.writeClipboard(n)}};new G$;const{showSuccessToast:bh}=Js(),q$=(t,e,n)=>{const r=`${e}
1305
1305
  ${t.AfzenderNaam}: \r${t.Datum} \r${n3(r3(t.Tekst))}`;Si.copy(r).then(()=>bh(n))},s3=(t,e,n)=>{const r=t.filter(i=>i.selected).map(i=>`${i.AfzenderNaam}: \r${i.Datum}\r${n3(r3(i.Tekst))}`).join(`
1306
1306
  -----------------------
1307
1307
  `),o=`${e}
1308
- ${r}`;Si.copy(o).then(()=>bh(n))},V$=(t,e)=>{Si.copy(t).then(()=>bh(e))},eF={class:"message-cloud-multi-select"},tF={class:"message-cloud-multi-select__body"},nF={class:"message-content"},rF={class:"message-cloud__header"},oF={class:"message-cloud__title"},iF={key:0},sF=["innerHTML"],a3=l.defineComponent({__name:"BDConversationToTextModal",props:{modelValue:{},extraClass:{}},setup(t){const{t:e}=Lt(),n=t,r=l.ref([]),o=l.ref(!0);l.watchEffect(()=>{r.value=n.modelValue}),l.watch(()=>o.value,d=>{r.value.forEach(u=>u.selected=d)});const i=l.computed(()=>e("conversationToTextModal.systemMessage")),s=d=>{const u=d.IsTussentijdseMededeling?", ":"";if(d.AfzenderType===2&&d.AfzenderId!==d.BehandelaarId&&d.BehandelaarId!==null){const f=e("conversationToTextModal.onBehalfOf");return u+f+" "+d.BehandelaarNaam}return Ne},c=d=>d.AfzenderType===2?"is-sender":"is-receiver",a=()=>{const d=e("conversationToTextModal.prefix"),u=e("conversationToTextModal.copySuccess");return s3(r.value,d,u)};return(d,u)=>(l.openBlock(),l.createBlock(xn,{id:"conversation-to-text-modal",title:"Tekst versie","modal-class":t.extraClass,"hide-footer":""},{default:l.withCtx(()=>[l.createVNode(Re,{variant:"primary",onClick:a},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(e)("conversationToTextModal.copyButton")),1)]),_:1}),l.createElementVNode("div",eF,[l.createVNode(Cr,{class:"select-all-checkbox",modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=f=>o.value=f)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(e)("conversationToTextModal.selectAll")),1)]),_:1},8,["modelValue"]),l.createElementVNode("div",tF,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(f,h)=>(l.openBlock(),l.createElementBlock("div",{class:"message-cloud-selector",key:h},[l.createVNode(Cr,{class:"select-all-checkbox",modelValue:f.selected,"onUpdate:modelValue":p=>f.selected=p},null,8,["modelValue","onUpdate:modelValue"]),l.createElementVNode("div",nF,[l.createElementVNode("div",{class:l.normalizeClass(["message",c(f)])},[l.createElementVNode("div",rF,[l.createElementVNode("div",oF,[l.createTextVNode(l.toDisplayString(f.AfzenderNaam)+" ",1),f.IsTussentijdseMededeling?(l.openBlock(),l.createElementBlock("span",iF,[l.createElementVNode("i",null,l.toDisplayString(i.value),1)])):l.createCommentVNode("",!0),l.createElementVNode("span",null,[l.createElementVNode("i",null,l.toDisplayString(s(f)),1)]),l.createElementVNode("span",null,l.toDisplayString(f.Datum),1)])]),l.createElementVNode("div",{class:"message-cloud__body",innerHTML:f.Tekst},null,8,sF)],2)])]))),128))])])]),_:1},8,["modal-class"]))}});function l3(){const t=l.ref(0),e=l.ref(!0),n=l.ref(null),r=l.ref({top:0,left:0,x:0,y:0}),o=l.computed(()=>t.value>0?`zoom-${t.value}`:"");return{zoom:t,mouseDown:e,imageHolderRef:n,pos:r,SetZoom:o,OnMouseDown:a=>{if(!n.value)return;r.value.left=n.value.scrollLeft,r.value.top=n.value.scrollTop;const d=document.querySelector("#image-attachment-modal"),u=document.querySelector(".image-preview-image-holder");d&&(d.style.cursor="grabbing"),u&&(u.style.cursor="grabbing"),r.value.x=a.clientX,r.value.y=a.clientY,e.value=!0},OnMouseMove:a=>{if(e.value){const d=a.clientX-r.value.x,u=a.clientY-r.value.y;n.value&&(n.value.scrollTop=r.value.top-u,n.value.scrollLeft=r.value.left-d)}},OnMouseUp:()=>{const a=document.querySelector("#image-attachment-modal"),d=document.querySelector(".image-preview-image-holder");a&&a.style&&(a.style.cursor=""),d&&d.style&&(d.style.cursor="grab"),e.value=!1}}}const aF=["src","alt"],lF={key:0,class:"show-spinner"},cF={class:"spinner-border text-primary",role:"status"},dF=["textContent"],uF=["href"],c3=l.defineComponent({__name:"BDImageAttachmentModal",setup(t,{expose:e}){const{showModal:n}=Do("image-attachment-modal"),{zoom:r,imageHolderRef:o,SetZoom:i,OnMouseDown:s,OnMouseMove:c,OnMouseUp:a}=l3(),{t:d}=Lt(),u=l.ref(!0),f=l.ref({BerichtId:0,Id:void 0,MimeType:null,Naam:Ne,altName:Ne,downloadUrl:Ne,fullImageUrl:Ne,previewUrl:Ne}),h=l.computed(()=>d("imageAttachmentModal.download")),p=l.computed(()=>d("imageAttachmentModal.loading"));e({Show:y=>{f.value=y,r.value=0,n()}});const g=()=>{u.value=!1},v=()=>{f.value={BerichtId:0,Id:void 0,MimeType:null,Naam:Ne,altName:Ne,downloadUrl:Ne,fullImageUrl:Ne,previewUrl:Ne}};return(y,b)=>(l.openBlock(),l.createBlock(xn,{id:"image-attachment-modal",class:l.normalizeClass(l.unref(Ne)),title:f.value.Naam,hideFooterCancelButton:!0,showHeaderButton:!0,onCancel:v},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"image-preview-image-holder",ref_key:"imageHolderRef",ref:o,onMousedown:b[0]||(b[0]=(...E)=>l.unref(s)&&l.unref(s)(...E)),onMousemove:b[1]||(b[1]=(...E)=>l.unref(c)&&l.unref(c)(...E)),onMouseup:b[2]||(b[2]=(...E)=>l.unref(a)&&l.unref(a)(...E))},[f.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:f.value.downloadUrl,alt:f.value.Naam,class:l.normalizeClass(["image-preview-modal",l.unref(i)]),onLoad:g,draggable:!1},null,42,aF)):l.createCommentVNode("",!0)],544),u.value?(l.openBlock(),l.createElementBlock("div",lF,[l.createElementVNode("div",cF,[l.createElementVNode("span",{class:"visually-hidden",textContent:l.toDisplayString(p.value)},null,8,dF)])])):l.createCommentVNode("",!0),l.createVNode(Qc,{modelValue:l.unref(r),"onUpdate:modelValue":b[3]||(b[3]=E=>l.isRef(r)?r.value=E:null),class:"image-preview-bd-zoom-slider","max-value":4},null,8,["modelValue"]),l.createElementVNode("a",{href:f.value.downloadUrl},[l.createVNode(Re,{variant:"primary",class:"download-image",textContent:l.toDisplayString(h.value)},null,8,["textContent"])],8,uF)]),_:1},8,["class","title"]))}}),fF={key:0},hF={key:1},pF={key:2},mF={key:3},gF={key:1},vF={key:2},yF=["href"],d3=l.defineComponent({__name:"BDVideoCallConfirmationModal",props:["isMissingCameraPermission","isMissingMicrophonePermission","isMissingMobileActivation","isMissingVideoConferencingSupport","participantName","videoTestUrl"],emits:["confirmed"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=()=>r.isMissingCameraPermission||r.isMissingMicrophonePermission||r.isMissingMobileActivation||r.isMissingVideoConferencingSupport,s=l.computed(()=>i()?n("videoCallConfirmationModal.close"):n("videoCallConfirmationModal.cancel")),c=l.computed(()=>`${r.participantName} ${n("videoCallConfirmationModal.noMobileActivationMessage")}`),a=l.computed(()=>`${r.participantName} ${n("videoCallConfirmationModal.noCompatibleDevices")}`),d=l.computed(()=>n("videoCallConfirmationModal.title")),u=l.computed(()=>n("videoCallConfirmationModal.ok")),f=l.computed(()=>n("videoCallConfirmationModal.generalWarning")),h=l.computed(()=>n("videoCallConfirmationModal.cameraPermissionMissing")),p=l.computed(()=>n("videoCallConfirmationModal.microphonePermissionMissing")),m=l.computed(()=>n("videoCallConfirmationModal.message")),g=l.computed(()=>n("videoCallConfirmationModal.participantMessage")),v=l.computed(()=>n("videoCallConfirmationModal.testMessage")),y=l.computed(()=>n("videoCallConfirmationModal.helpMessage")),b=()=>o("confirmed");return(E,C)=>(l.openBlock(),l.createBlock(xn,{id:"video-call-confirmation-modal",title:d.value,"submit-button-title":u.value,"close-button-title":s.value,"hide-footer-submit-button":i(),onSubmit:b},{default:l.withCtx(()=>[i()?(l.openBlock(),l.createBlock(qr,{key:0,variant:"warning"},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(f.value),1),l.createElementVNode("ul",null,[r.isMissingCameraPermission?(l.openBlock(),l.createElementBlock("li",fF,l.toDisplayString(h.value),1)):l.createCommentVNode("",!0),r.isMissingMicrophonePermission?(l.openBlock(),l.createElementBlock("li",hF,l.toDisplayString(p.value),1)):l.createCommentVNode("",!0),r.isMissingMobileActivation?(l.openBlock(),l.createElementBlock("li",pF,l.toDisplayString(c.value),1)):l.createCommentVNode("",!0),r.isMissingVideoConferencingSupport?(l.openBlock(),l.createElementBlock("li",mF,l.toDisplayString(a.value),1)):l.createCommentVNode("",!0)])]),_:1})):r.participantName?(l.openBlock(),l.createElementBlock("p",gF,[l.createTextVNode(l.toDisplayString(g.value)+" ",1),l.createElementVNode("b",null,l.toDisplayString(r.participantName),1),C[0]||(C[0]=l.createTextVNode("?",-1))])):(l.openBlock(),l.createElementBlock("p",vF,l.toDisplayString(m.value),1)),l.createElementVNode("p",null,[l.createElementVNode("a",{href:r.videoTestUrl,target:"blank",rel:"noopener noreferrer"},l.toDisplayString(v.value),9,yF),l.createElementVNode("span",null," "+l.toDisplayString(y.value),1)])]),_:1},8,["title","submit-button-title","close-button-title","hide-footer-submit-button"]))}}),u3=()=>({ResetValidation:n=>{for(const r in n.value)n.value[r].state=null},ValidationObjectIsValid:n=>{for(let r in n)if(n[r].state===!1)return!1;return!0}}),bF={class:"template change-password-template"},CF={class:"template-title"},EF={key:0},kF={key:1},wF={class:"bd-form-field"},SF={class:"bd-form-field"},AF={class:"bd-form-field"},xF={class:"bd-form-buttons"},f3=l.defineComponent({__name:"BDChangePasswordTemplate",props:{templateTitle:{},alertText:{},currentPasswordLabel:{},newPasswordLabel:{},confirmNewPasswordLabel:{},submitButtonText:{},cancelButtonText:{},successText:{},failureText:{},requiredText:{},incompatibleText:{},minimalRequirementsText:{},submitPassword:{type:Function}},setup(t){const{showDangerToast:e,showSuccessToast:n}=Js(),{errorMessages:r,errorMessageText:o,MapServerErrors:i,ResetServerErrors:s}=gh(null),{ValidationObjectIsValid:c}=u3(),a=t;let d=l.ref({password:Ne,passwordNew:Ne,passwordRepeat:Ne}),u=l.ref({password:{state:null,errorLabel:Ne},passwordNew:{state:null,errorLabel:Ne},passwordRepeat:{state:null,errorLabel:Ne}});const f=()=>{if(!h())return;const g=a.submitPassword(d.value);g&&g.then(()=>{n(a.successText),p()}).catch(v=>{e(a.failureText),i(v)})},h=()=>{const m=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;if(d.value.passwordNew&&!m.test(d.value.passwordNew))u.value.passwordNew.state=!1,u.value.passwordNew.errorLabel=a.minimalRequirementsText;else{const g=d.value.passwordRepeat===d.value.passwordNew,v=g?a.requiredText:a.incompatibleText;u.value.passwordNew.state=d.value.passwordNew!==Ne&&g?null:!1,u.value.passwordNew.errorLabel=v,u.value.passwordRepeat.state=d.value.passwordRepeat!==Ne&&g?null:!1,u.value.passwordRepeat.errorLabel=v}return u.value.password.state=d.value.password!==Ne?null:!1,u.value.password.errorLabel=u.value.password.state?Ne:a.requiredText,c(u.value)},p=()=>{d.value.password=Ne,d.value.passwordNew=Ne,d.value.passwordRepeat=Ne,u.value.password.state=null,u.value.passwordNew.state=null,u.value.passwordRepeat.state=null,s()};return(m,g)=>(l.openBlock(),l.createElementBlock("main",bF,[l.createVNode(Ti,{class:"container-xl"},{default:l.withCtx(()=>[l.createVNode(vn,{class:"justify-content-md-center template-header"},{default:l.withCtx(()=>[l.createVNode(Tt,{xs:12,md:10,lg:7},{default:l.withCtx(()=>[l.createElementVNode("h1",CF,l.toDisplayString(a.templateTitle),1)]),_:1})]),_:1}),l.createVNode(vn,{class:"justify-content-md-center"},{default:l.withCtx(()=>[l.createVNode(Tt,{xs:12,md:10,lg:7},{default:l.withCtx(()=>[l.createVNode(aa,{class:"bd-card-template","no-header":!0},{body:l.withCtx(()=>[l.createVNode(Ti,{class:"container-fluid"},{default:l.withCtx(()=>[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,null,{default:l.withCtx(()=>[l.createVNode(qr,{variant:"warning"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.alertText),1)]),_:1})]),_:1})]),_:1}),l.unref(r)||l.unref(o)?(l.openBlock(),l.createBlock(vn,{key:0},{default:l.withCtx(()=>[l.createVNode(Tt,null,{default:l.withCtx(()=>[l.createVNode(qr,{variant:"danger"},{default:l.withCtx(()=>[l.unref(r)?(l.openBlock(),l.createElementBlock("div",EF,[l.createElementVNode("ul",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(v,y)=>(l.openBlock(),l.createElementBlock("li",{key:y},[l.createVNode(pr),l.createElementVNode("span",null,l.toDisplayString(v),1)]))),128))])])):(l.openBlock(),l.createElementBlock("div",kF,l.toDisplayString(l.unref(o)),1))]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,{class:"bd-card-form",sm:12,md:12},{default:l.withCtx(()=>[l.createElementVNode("form",{onSubmit:l.withModifiers(f,["prevent"]),onReset:l.withModifiers(p,["prevent"]),class:"form"},[l.createElementVNode("div",wF,[l.createVNode(br,{modelValue:l.unref(d).password,"onUpdate:modelValue":g[0]||(g[0]=v=>l.unref(d).password=v),label:t.currentPasswordLabel,state:l.unref(u).password.state,type:"password","invalid-feedback-text":l.unref(u).password.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",SF,[l.createVNode(br,{modelValue:l.unref(d).passwordNew,"onUpdate:modelValue":g[1]||(g[1]=v=>l.unref(d).passwordNew=v),label:t.newPasswordLabel,state:l.unref(u).passwordNew.state,type:"password","invalid-feedback-text":l.unref(u).passwordNew.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",AF,[l.createVNode(br,{modelValue:l.unref(d).passwordRepeat,"onUpdate:modelValue":g[2]||(g[2]=v=>l.unref(d).passwordRepeat=v),label:t.confirmNewPasswordLabel,state:l.unref(u).passwordRepeat.state,type:"password","invalid-feedback-text":l.unref(u).passwordRepeat.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",xF,[l.createVNode(Re,{type:"submit"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.submitButtonText),1)]),_:1}),l.createVNode(Re,{type:"reset",variant:"link"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.cancelButtonText),1)]),_:1})])],32)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]))}}),TF={class:"template not-found-template"},IF={class:"center-screen"},_F={class:"container-warning"},NF=["textContent"],OF=["textContent"],h3=l.defineComponent({__name:"BDNotFoundTemplate",props:{buttonText:{type:String}},emits:["navigate"],setup(t,{emit:e}){const{t:n}=Lt(),r=t,o=e,i=l.computed(()=>r.buttonText||n("notFoundTemplate.buttonDefault")),s=l.computed(()=>n("notFoundTemplate.title")),c=l.computed(()=>n("notFoundTemplate.description")),a=()=>o("navigate");return(d,u)=>(l.openBlock(),l.createElementBlock("main",TF,[l.createVNode(Ti,{class:"container-xl"},{default:l.withCtx(()=>[l.createElementVNode("div",IF,[l.createElementVNode("div",_F,[l.createVNode(Kc),l.createElementVNode("h5",{textContent:l.toDisplayString(s.value)},null,8,NF),l.createElementVNode("p",{textContent:l.toDisplayString(c.value)},null,8,OF),l.createVNode(Re,{onClick:a,variant:"primary",type:"button",textContent:l.toDisplayString(i.value)},null,8,["textContent"])])])]),_:1})]))}}),MF=t=>{const e=/<a\b[^>]*>.*?<\/a>/gi,n=[];let r;for(;(r=e.exec(t))!==null;)n.push({start:r.index,end:r.index+r[0].length});const o=/(https?:\/\/[^\s<>"',]+|www\.[^\s<>"',]+)/g;return t.replace(o,(i,s,c)=>n.some(u=>c>=u.start&&c<u.end)?i:`<a href="${i.startsWith("www.")?`http://${i}`:i}" target="_blank" rel="noopener noreferrer">${i}</a>`)},LF=(t,e)=>`<p><a href="${t}" title="${e}" target="_blank" rel="noopener noreferrer">${e}</a></p>`,DF=t=>t.startsWith("http://")||t.startsWith("https://"),PF={install:t=>{t.component("BDAlert",qr),t.component("BDArticle",Dm),t.component("BDAssignConversationModal",Jy),t.component("BDAttachmentPreviewList",$s),t.component("BDAttachmentUploadModal",Xy),t.component("BDBadge",Om),t.component("BDButton",Re),t.component("BDCard",aa),t.component("BDChangePasswordTemplate",f3),t.component("BDChatCloud",$y),t.component("BDCol",Tt),t.component("BDCollapsableCard",Zc),t.component("BDConfirmationModal",Zy),t.component("BDContentLibraryModal",o3),t.component("BDConversationToTextModal",a3),t.component("BDContentLibrarySplitButton",Am),t.component("BDContentLibraryTemplate",yh),t.component("BDContainer",Ti),t.component("BDDropdown",hh),t.component("BDDropdownItem",Ba),t.component("BDDropzone",Wd),t.component("BDForm",Mm),t.component("BDFormCheckbox",Cr),t.component("BDFormInput",br),t.component("BDFormInvalidFeedback",xa),t.component("BDFormSelect",Lm),t.component("BDHeader",ph),t.component("BDImageAttachmentModal",c3),t.component("BDImageAttachmentPreviewList",Fs),t.component("BDInputGroup",es),t.component("BDLink",Xr),t.component("BDLogo",Sc),t.component("BDMarkdownEditor",By),t.component("BDMobileMenu",fh),t.component("BDModal",xn),t.component("BDNotFoundTemplate",h3),t.component("BDPagination",Bd),t.component("BDPhoneNumberEditModal",Yy),t.component("BDPill",_a),t.component("BDPractitionerHeader",Ky),t.component("BDProfileImage",_i),t.component("BDRow",vn),t.component("BDSessionTimeOutModal",Qy),t.component("BDTable",Fy),t.component("BDToast",Rd),t.component("BDUser",Ry),t.component("BDUserInformation",Fd),t.component("BDVideoCallConfirmationModal",d3),t.component("BDVideoCallToast",Hy),t.component("BDZoomslider",Qc),t.component("BDDate",Ym),t.component("IconAcademy",qs),t.component("IconArrowDown",Ac),t.component("IconArrowUp",xc),t.component("IconAttachment",hr),t.component("IconBold",Tc),t.component("IconBulletList",Ic),t.component("IconCalendar",Th),t.component("IconCall",Vs),t.component("IconCallReject",_c),t.component("IconCardView",Ih),t.component("IconCaretDown",ea),t.component("IconCaretLeft",Nc),t.component("IconCaretRight",Oc),t.component("IconCheck",$o),t.component("IconClipboard",_h),t.component("IconClose",ta),t.component("IconComment",Mc),t.component("IconCommentActive",Nh),t.component("IconCommonFileEmpty",Mh),t.component("IconCommonFileWarning",Lh),t.component("IconCommentStatic",Oh),t.component("IconContactPerson",Dh),t.component("IconCopy",Ph),t.component("IconDelete",Lc),t.component("IconDoubleCheck",Bh),t.component("IconDownloadImage",Dc),t.component("IconEdit",Pc),t.component("IconEndCall",Rh),t.component("IconError",na),t.component("IconExternal",Bc),t.component("IconEyeShow",$h),t.component("IconEyeSlash",Fh),t.component("IconFile",Rc),t.component("IconFileAdded",zh),t.component("IconForward",Uh),t.component("IconHix",Hh),t.component("IconHyperlink",ra),t.component("IconImageFileLandscape",jh),t.component("IconImageFileWarning",Wh),t.component("IconInbox",Kh),t.component("IconInfo",pr),t.component("IconInformationCircle",$c),t.component("IconItalic",Fc),t.component("IconListView",Yh),t.component("IconLock",Gh),t.component("IconLusciiEscalated",Qh),t.component("IconLusciiLogo",Zh),t.component("IconLusciiOpen",Jh),t.component("IconLusciiPriorityHigh",Xh),t.component("IconLusciiPriorityLow",qh),t.component("IconLusciiPriorityMedium",Vh),t.component("IconMenu",zc),t.component("IconMessage",ep),t.component("IconMessageForward",tp),t.component("IconMicrophoneSlash",np),t.component("IconMicrosoftTeams",rp),t.component("IconMin",op),t.component("IconOrderedList",Uc),t.component("IconPlus",oa),t.component("IconRefresh",ip),t.component("IconRemove",Ii),t.component("IconSananetLogo",sp),t.component("IconService",ap),t.component("IconShareScreen",lp),t.component("IconSingleNeutral",cp),t.component("IconSort",dp),t.component("IconSortAsc",Hc),t.component("IconSortDesc",jc),t.component("IconSortNone",Wc),t.component("IconTriangleDown",up),t.component("IconTriangleExclamation",Kc),t.component("IconUnderline",Yc),t.component("IconVideoDisabled",hp),t.component("IconVideocall",fp),t.component("IconWarning",pp),t.component("IconZorgkaart",mp),t.directive("vBDTooltip",Lo)}};V.BDAlert=qr,V.BDArticle=Dm,V.BDAssignConversationModal=Jy,V.BDAttachmentPreviewList=$s,V.BDAttachmentUploadModal=Xy,V.BDBadge=Om,V.BDButton=Re,V.BDCard=aa,V.BDChangePasswordTemplate=f3,V.BDChatCloud=$y,V.BDCol=Tt,V.BDCollapsableCard=Zc,V.BDConfirmationModal=Zy,V.BDContainer=Ti,V.BDContentLibraryModal=o3,V.BDContentLibrarySplitButton=Am,V.BDContentLibraryTemplate=yh,V.BDConversationToTextModal=a3,V.BDDate=Ym,V.BDDropdown=hh,V.BDDropdownItem=Ba,V.BDDropzone=Wd,V.BDForm=Mm,V.BDFormCheckbox=Cr,V.BDFormInput=br,V.BDFormInvalidFeedback=xa,V.BDFormSelect=Lm,V.BDHeader=ph,V.BDImageAttachmentModal=c3,V.BDImageAttachmentPreviewList=Fs,V.BDInputGroup=es,V.BDLink=Xr,V.BDLogo=Sc,V.BDMarkdownEditor=By,V.BDMobileMenu=fh,V.BDModal=xn,V.BDNotFoundTemplate=h3,V.BDPagination=Bd,V.BDPhoneNumberEditModal=Yy,V.BDPill=_a,V.BDPractitionerHeader=Ky,V.BDProfileImage=_i,V.BDRow=vn,V.BDSessionTimeOutModal=Qy,V.BDTable=Fy,V.BDToast=Rd,V.BDUser=Ry,V.BDUserInformation=Fd,V.BDVideoCallConfirmationModal=d3,V.BDVideoCallToast=Hy,V.BDZoomslider=Qc,V.CopyChatMessageToClipboard=q$,V.CopyChatMessagesToClipboard=s3,V.CopyHl7MessagesToClipboard=V$,V.CreateHyperlinkParagraph=LF,V.CreateThumbnailUri=G2,V.IconAcademy=qs,V.IconArrowDown=Ac,V.IconArrowUp=xc,V.IconAttachment=hr,V.IconBold=Tc,V.IconBulletList=Ic,V.IconCalendar=Th,V.IconCall=Vs,V.IconCallReject=_c,V.IconCardView=Ih,V.IconCaretDown=ea,V.IconCaretLeft=Nc,V.IconCaretRight=Oc,V.IconCheck=$o,V.IconClipboard=_h,V.IconClose=ta,V.IconComment=Mc,V.IconCommentActive=Nh,V.IconCommentStatic=Oh,V.IconCommonFileEmpty=Mh,V.IconCommonFileWarning=Lh,V.IconContactPerson=Dh,V.IconCopy=Ph,V.IconDelete=Lc,V.IconDoubleCheck=Bh,V.IconDownloadImage=Dc,V.IconEdit=Pc,V.IconEndCall=Rh,V.IconError=na,V.IconExternal=Bc,V.IconEyeShow=$h,V.IconEyeSlash=Fh,V.IconFile=Rc,V.IconFileAdded=zh,V.IconForward=Uh,V.IconHix=Hh,V.IconHyperlink=ra,V.IconImageFileLandscape=jh,V.IconImageFileWarning=Wh,V.IconInbox=Kh,V.IconInfo=pr,V.IconInformationCircle=$c,V.IconItalic=Fc,V.IconListView=Yh,V.IconLock=Gh,V.IconLusciiEscalated=Qh,V.IconLusciiLogo=Zh,V.IconLusciiOpen=Jh,V.IconLusciiPriorityHigh=Xh,V.IconLusciiPriorityLow=qh,V.IconLusciiPriorityMedium=Vh,V.IconMenu=zc,V.IconMessage=ep,V.IconMessageForward=tp,V.IconMicrophoneSlash=np,V.IconMicrosoftTeams=rp,V.IconMin=op,V.IconOrderedList=Uc,V.IconPlus=oa,V.IconRefresh=ip,V.IconRemove=Ii,V.IconSananetLogo=sp,V.IconService=ap,V.IconShareScreen=lp,V.IconSingleNeutral=cp,V.IconSort=dp,V.IconSortAsc=Hc,V.IconSortDesc=jc,V.IconSortNone=Wc,V.IconTriangleDown=up,V.IconTriangleExclamation=Kc,V.IconUnderline=Yc,V.IconVideoDisabled=hp,V.IconVideocall=fp,V.IconWarning=pp,V.IconZorgkaart=mp,V.MapAttachmentsForApi=xO,V.MapToAttachmentObjects=So,V.TransformHyperlinks=MF,V.ValidateUrl=DF,V.default=PF,V.getDisplayDateNumeric=Hd,V.getDisplayDateTextual=Wm,V.getDisplayDateTimeNumeric=Ud,V.getDisplayDateTimeTextual=Km,V.useModal=Do,V.usePopover=Wy,V.useServerErrors=gh,V.useSessionTimeOut=Gy,V.useToaster=Js,V.useValidation=u3,V.useWindow=mh,V.useZoom=l3,V.vBdTooltip=Lo,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1308
+ ${r}`;Si.copy(o).then(()=>bh(n))},V$=(t,e)=>{Si.copy(t).then(()=>bh(e))},eF={class:"message-cloud-multi-select"},tF={class:"message-cloud-multi-select__body"},nF={class:"message-content"},rF={class:"message-cloud__header"},oF={class:"message-cloud__title"},iF={key:0},sF=["innerHTML"],a3=l.defineComponent({__name:"BDConversationToTextModal",props:{modelValue:{},extraClass:{}},setup(t){const{t:e}=Nt(),n=t,r=l.ref([]),o=l.ref(!0);l.watchEffect(()=>{r.value=n.modelValue}),l.watch(()=>o.value,d=>{r.value.forEach(u=>u.selected=d)});const i=l.computed(()=>e("conversationToTextModal.systemMessage")),s=d=>{const u=d.IsTussentijdseMededeling?", ":"";if(d.AfzenderType===2&&d.AfzenderId!==d.BehandelaarId&&d.BehandelaarId!==null){const f=e("conversationToTextModal.onBehalfOf");return u+f+" "+d.BehandelaarNaam}return _e},c=d=>d.AfzenderType===2?"is-sender":"is-receiver",a=()=>{const d=e("conversationToTextModal.prefix"),u=e("conversationToTextModal.copySuccess");return s3(r.value,d,u)};return(d,u)=>(l.openBlock(),l.createBlock(xn,{id:"conversation-to-text-modal",title:"Tekst versie","modal-class":t.extraClass,"hide-footer":""},{default:l.withCtx(()=>[l.createVNode(Re,{variant:"primary",onClick:a},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(e)("conversationToTextModal.copyButton")),1)]),_:1}),l.createElementVNode("div",eF,[l.createVNode(Cr,{class:"select-all-checkbox",modelValue:o.value,"onUpdate:modelValue":u[0]||(u[0]=f=>o.value=f)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(l.unref(e)("conversationToTextModal.selectAll")),1)]),_:1},8,["modelValue"]),l.createElementVNode("div",tF,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(f,h)=>(l.openBlock(),l.createElementBlock("div",{class:"message-cloud-selector",key:h},[l.createVNode(Cr,{class:"select-all-checkbox",modelValue:f.selected,"onUpdate:modelValue":p=>f.selected=p},null,8,["modelValue","onUpdate:modelValue"]),l.createElementVNode("div",nF,[l.createElementVNode("div",{class:l.normalizeClass(["message",c(f)])},[l.createElementVNode("div",rF,[l.createElementVNode("div",oF,[l.createTextVNode(l.toDisplayString(f.AfzenderNaam)+" ",1),f.IsTussentijdseMededeling?(l.openBlock(),l.createElementBlock("span",iF,[l.createElementVNode("i",null,l.toDisplayString(i.value),1)])):l.createCommentVNode("",!0),l.createElementVNode("span",null,[l.createElementVNode("i",null,l.toDisplayString(s(f)),1)]),l.createElementVNode("span",null,l.toDisplayString(f.Datum),1)])]),l.createElementVNode("div",{class:"message-cloud__body",innerHTML:f.Tekst},null,8,sF)],2)])]))),128))])])]),_:1},8,["modal-class"]))}});function l3(){const t=l.ref(0),e=l.ref(!0),n=l.ref(null),r=l.ref({top:0,left:0,x:0,y:0}),o=l.computed(()=>t.value>0?`zoom-${t.value}`:"");return{zoom:t,mouseDown:e,imageHolderRef:n,pos:r,SetZoom:o,OnMouseDown:a=>{if(!n.value)return;r.value.left=n.value.scrollLeft,r.value.top=n.value.scrollTop;const d=document.querySelector("#image-attachment-modal"),u=document.querySelector(".image-preview-image-holder");d&&(d.style.cursor="grabbing"),u&&(u.style.cursor="grabbing"),r.value.x=a.clientX,r.value.y=a.clientY,e.value=!0},OnMouseMove:a=>{if(e.value){const d=a.clientX-r.value.x,u=a.clientY-r.value.y;n.value&&(n.value.scrollTop=r.value.top-u,n.value.scrollLeft=r.value.left-d)}},OnMouseUp:()=>{const a=document.querySelector("#image-attachment-modal"),d=document.querySelector(".image-preview-image-holder");a&&a.style&&(a.style.cursor=""),d&&d.style&&(d.style.cursor="grab"),e.value=!1}}}const aF=["src","alt"],lF={key:0,class:"show-spinner"},cF={class:"spinner-border text-primary",role:"status"},dF=["textContent"],uF=["href"],c3=l.defineComponent({__name:"BDImageAttachmentModal",setup(t,{expose:e}){const{showModal:n}=Do("image-attachment-modal"),{zoom:r,imageHolderRef:o,SetZoom:i,OnMouseDown:s,OnMouseMove:c,OnMouseUp:a}=l3(),{t:d}=Nt(),u=l.ref(!0),f=l.ref({BerichtId:0,Id:void 0,MimeType:null,Naam:_e,altName:_e,downloadUrl:_e,fullImageUrl:_e,previewUrl:_e}),h=l.computed(()=>d("imageAttachmentModal.download")),p=l.computed(()=>d("imageAttachmentModal.loading"));e({Show:y=>{f.value=y,r.value=0,n()}});const g=()=>{u.value=!1},v=()=>{f.value={BerichtId:0,Id:void 0,MimeType:null,Naam:_e,altName:_e,downloadUrl:_e,fullImageUrl:_e,previewUrl:_e}};return(y,b)=>(l.openBlock(),l.createBlock(xn,{id:"image-attachment-modal",class:l.normalizeClass(l.unref(_e)),title:f.value.Naam,hideFooterCancelButton:!0,showHeaderButton:!0,onCancel:v},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"image-preview-image-holder",ref_key:"imageHolderRef",ref:o,onMousedown:b[0]||(b[0]=(...E)=>l.unref(s)&&l.unref(s)(...E)),onMousemove:b[1]||(b[1]=(...E)=>l.unref(c)&&l.unref(c)(...E)),onMouseup:b[2]||(b[2]=(...E)=>l.unref(a)&&l.unref(a)(...E))},[f.value?(l.openBlock(),l.createElementBlock("img",{key:0,src:f.value.downloadUrl,alt:f.value.Naam,class:l.normalizeClass(["image-preview-modal",l.unref(i)]),onLoad:g,draggable:!1},null,42,aF)):l.createCommentVNode("",!0)],544),u.value?(l.openBlock(),l.createElementBlock("div",lF,[l.createElementVNode("div",cF,[l.createElementVNode("span",{class:"visually-hidden",textContent:l.toDisplayString(p.value)},null,8,dF)])])):l.createCommentVNode("",!0),l.createVNode(Qc,{modelValue:l.unref(r),"onUpdate:modelValue":b[3]||(b[3]=E=>l.isRef(r)?r.value=E:null),class:"image-preview-bd-zoom-slider","max-value":4},null,8,["modelValue"]),l.createElementVNode("a",{href:f.value.downloadUrl},[l.createVNode(Re,{variant:"primary",class:"download-image",textContent:l.toDisplayString(h.value)},null,8,["textContent"])],8,uF)]),_:1},8,["class","title"]))}}),fF={key:0},hF={key:1},pF={key:2},mF={key:3},gF={key:1},vF={key:2},yF=["href"],d3=l.defineComponent({__name:"BDVideoCallConfirmationModal",props:["isMissingCameraPermission","isMissingMicrophonePermission","isMissingMobileActivation","isMissingVideoConferencingSupport","participantName","videoTestUrl"],emits:["confirmed"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=()=>r.isMissingCameraPermission||r.isMissingMicrophonePermission||r.isMissingMobileActivation||r.isMissingVideoConferencingSupport,s=l.computed(()=>i()?n("videoCallConfirmationModal.close"):n("videoCallConfirmationModal.cancel")),c=l.computed(()=>`${r.participantName} ${n("videoCallConfirmationModal.noMobileActivationMessage")}`),a=l.computed(()=>`${r.participantName} ${n("videoCallConfirmationModal.noCompatibleDevices")}`),d=l.computed(()=>n("videoCallConfirmationModal.title")),u=l.computed(()=>n("videoCallConfirmationModal.ok")),f=l.computed(()=>n("videoCallConfirmationModal.generalWarning")),h=l.computed(()=>n("videoCallConfirmationModal.cameraPermissionMissing")),p=l.computed(()=>n("videoCallConfirmationModal.microphonePermissionMissing")),m=l.computed(()=>n("videoCallConfirmationModal.message")),g=l.computed(()=>n("videoCallConfirmationModal.participantMessage")),v=l.computed(()=>n("videoCallConfirmationModal.testMessage")),y=l.computed(()=>n("videoCallConfirmationModal.helpMessage")),b=()=>o("confirmed");return(E,C)=>(l.openBlock(),l.createBlock(xn,{id:"video-call-confirmation-modal",title:d.value,"submit-button-title":u.value,"close-button-title":s.value,"hide-footer-submit-button":i(),onSubmit:b},{default:l.withCtx(()=>[i()?(l.openBlock(),l.createBlock(qr,{key:0,variant:"warning"},{default:l.withCtx(()=>[l.createElementVNode("p",null,l.toDisplayString(f.value),1),l.createElementVNode("ul",null,[r.isMissingCameraPermission?(l.openBlock(),l.createElementBlock("li",fF,l.toDisplayString(h.value),1)):l.createCommentVNode("",!0),r.isMissingMicrophonePermission?(l.openBlock(),l.createElementBlock("li",hF,l.toDisplayString(p.value),1)):l.createCommentVNode("",!0),r.isMissingMobileActivation?(l.openBlock(),l.createElementBlock("li",pF,l.toDisplayString(c.value),1)):l.createCommentVNode("",!0),r.isMissingVideoConferencingSupport?(l.openBlock(),l.createElementBlock("li",mF,l.toDisplayString(a.value),1)):l.createCommentVNode("",!0)])]),_:1})):r.participantName?(l.openBlock(),l.createElementBlock("p",gF,[l.createTextVNode(l.toDisplayString(g.value)+" ",1),l.createElementVNode("b",null,l.toDisplayString(r.participantName),1),C[0]||(C[0]=l.createTextVNode("?",-1))])):(l.openBlock(),l.createElementBlock("p",vF,l.toDisplayString(m.value),1)),l.createElementVNode("p",null,[l.createElementVNode("a",{href:r.videoTestUrl,target:"blank",rel:"noopener noreferrer"},l.toDisplayString(v.value),9,yF),l.createElementVNode("span",null," "+l.toDisplayString(y.value),1)])]),_:1},8,["title","submit-button-title","close-button-title","hide-footer-submit-button"]))}}),u3=()=>({ResetValidation:n=>{for(const r in n.value)n.value[r].state=null},ValidationObjectIsValid:n=>{for(let r in n)if(n[r].state===!1)return!1;return!0}}),bF={class:"template change-password-template"},CF={class:"template-title"},EF={key:0},kF={key:1},wF={class:"bd-form-field"},SF={class:"bd-form-field"},AF={class:"bd-form-field"},xF={class:"bd-form-buttons"},f3=l.defineComponent({__name:"BDChangePasswordTemplate",props:{templateTitle:{},alertText:{},currentPasswordLabel:{},newPasswordLabel:{},confirmNewPasswordLabel:{},submitButtonText:{},cancelButtonText:{},successText:{},failureText:{},requiredText:{},incompatibleText:{},minimalRequirementsText:{},submitPassword:{type:Function}},setup(t){const{t:e}=Nt(),{showDangerToast:n,showWarningToast:r,showSuccessToast:o}=Js(),{errorMessages:i,errorMessageText:s,MapServerErrors:c,ResetServerErrors:a}=gh(null),{ValidationObjectIsValid:d}=u3(),u=t;let f=l.ref({password:_e,passwordNew:_e,passwordRepeat:_e}),h=l.ref({password:{state:null,errorLabel:_e},passwordNew:{state:null,errorLabel:_e},passwordRepeat:{state:null,errorLabel:_e}});const p=()=>{if(!m())return;const y=u.submitPassword(f.value);y&&y.then(()=>{o(u.successText),g()}).catch(b=>{n(u.failureText),c(b)})},m=()=>{const v=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;if(f.value.passwordNew&&!v.test(f.value.passwordNew))h.value.passwordNew.state=!1,h.value.passwordNew.errorLabel=u.minimalRequirementsText;else{const y=f.value.passwordRepeat===f.value.passwordNew,b=y?u.requiredText:u.incompatibleText;h.value.passwordNew.state=f.value.passwordNew!==_e&&y?null:!1,h.value.passwordNew.errorLabel=b,h.value.passwordRepeat.state=f.value.passwordRepeat!==_e&&y?null:!1,h.value.passwordRepeat.errorLabel=b}return h.value.password.state=f.value.password!==_e?null:!1,h.value.password.errorLabel=h.value.password.state?_e:u.requiredText,d(h.value)},g=()=>{if(f.value.password===_e&&f.value.passwordNew===_e&&f.value.passwordRepeat===_e)return;f.value.password=_e,f.value.passwordNew=_e,f.value.passwordRepeat=_e,h.value.password.state=null,h.value.passwordNew.state=null,h.value.passwordRepeat.state=null,a();const v=e("changePasswordTemplate.toasters.reset");r(v)};return(v,y)=>(l.openBlock(),l.createElementBlock("main",bF,[l.createVNode(Ti,{class:"container-xl"},{default:l.withCtx(()=>[l.createVNode(vn,{class:"justify-content-md-center template-header"},{default:l.withCtx(()=>[l.createVNode(Tt,{xs:12,md:10,lg:7},{default:l.withCtx(()=>[l.createElementVNode("h1",CF,l.toDisplayString(u.templateTitle),1)]),_:1})]),_:1}),l.createVNode(vn,{class:"justify-content-md-center"},{default:l.withCtx(()=>[l.createVNode(Tt,{xs:12,md:10,lg:7},{default:l.withCtx(()=>[l.createVNode(aa,{class:"bd-card-template","no-header":!0},{body:l.withCtx(()=>[l.createVNode(Ti,{class:"container-fluid"},{default:l.withCtx(()=>[l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,null,{default:l.withCtx(()=>[l.createVNode(qr,{variant:"warning"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.alertText),1)]),_:1})]),_:1})]),_:1}),l.unref(i)||l.unref(s)?(l.openBlock(),l.createBlock(vn,{key:0},{default:l.withCtx(()=>[l.createVNode(Tt,null,{default:l.withCtx(()=>[l.createVNode(qr,{variant:"danger"},{default:l.withCtx(()=>[l.unref(i)?(l.openBlock(),l.createElementBlock("div",EF,[l.createElementVNode("ul",null,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(i),(b,E)=>(l.openBlock(),l.createElementBlock("li",{key:E},[l.createVNode(pr),l.createElementVNode("span",null,l.toDisplayString(b),1)]))),128))])])):(l.openBlock(),l.createElementBlock("div",kF,l.toDisplayString(l.unref(s)),1))]),_:1})]),_:1})]),_:1})):l.createCommentVNode("",!0),l.createVNode(vn,null,{default:l.withCtx(()=>[l.createVNode(Tt,{class:"bd-card-form",sm:12,md:12},{default:l.withCtx(()=>[l.createElementVNode("form",{onSubmit:l.withModifiers(p,["prevent"]),onReset:l.withModifiers(g,["prevent"]),class:"form"},[l.createElementVNode("div",wF,[l.createVNode(br,{modelValue:l.unref(f).password,"onUpdate:modelValue":y[0]||(y[0]=b=>l.unref(f).password=b),label:t.currentPasswordLabel,state:l.unref(h).password.state,type:"password","invalid-feedback-text":l.unref(h).password.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",SF,[l.createVNode(br,{modelValue:l.unref(f).passwordNew,"onUpdate:modelValue":y[1]||(y[1]=b=>l.unref(f).passwordNew=b),label:t.newPasswordLabel,state:l.unref(h).passwordNew.state,type:"password","invalid-feedback-text":l.unref(h).passwordNew.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",AF,[l.createVNode(br,{modelValue:l.unref(f).passwordRepeat,"onUpdate:modelValue":y[2]||(y[2]=b=>l.unref(f).passwordRepeat=b),label:t.confirmNewPasswordLabel,state:l.unref(h).passwordRepeat.state,type:"password","invalid-feedback-text":l.unref(h).passwordRepeat.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),l.createElementVNode("div",xF,[l.createVNode(Re,{type:"submit"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.submitButtonText),1)]),_:1}),l.createVNode(Re,{type:"reset",variant:"link"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(t.cancelButtonText),1)]),_:1})])],32)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]))}}),TF={class:"template not-found-template"},IF={class:"center-screen"},_F={class:"container-warning"},NF=["textContent"],OF=["textContent"],h3=l.defineComponent({__name:"BDNotFoundTemplate",props:{buttonText:{type:String}},emits:["navigate"],setup(t,{emit:e}){const{t:n}=Nt(),r=t,o=e,i=l.computed(()=>r.buttonText||n("notFoundTemplate.buttonDefault")),s=l.computed(()=>n("notFoundTemplate.title")),c=l.computed(()=>n("notFoundTemplate.description")),a=()=>o("navigate");return(d,u)=>(l.openBlock(),l.createElementBlock("main",TF,[l.createVNode(Ti,{class:"container-xl"},{default:l.withCtx(()=>[l.createElementVNode("div",IF,[l.createElementVNode("div",_F,[l.createVNode(Kc),l.createElementVNode("h5",{textContent:l.toDisplayString(s.value)},null,8,NF),l.createElementVNode("p",{textContent:l.toDisplayString(c.value)},null,8,OF),l.createVNode(Re,{onClick:a,variant:"primary",type:"button",textContent:l.toDisplayString(i.value)},null,8,["textContent"])])])]),_:1})]))}}),MF=t=>{const e=/<a\b[^>]*>.*?<\/a>/gi,n=[];let r;for(;(r=e.exec(t))!==null;)n.push({start:r.index,end:r.index+r[0].length});const o=/(https?:\/\/[^\s<>"',]+|www\.[^\s<>"',]+)/g;return t.replace(o,(i,s,c)=>n.some(u=>c>=u.start&&c<u.end)?i:`<a href="${i.startsWith("www.")?`http://${i}`:i}" target="_blank" rel="noopener noreferrer">${i}</a>`)},LF=(t,e)=>`<p><a href="${t}" title="${e}" target="_blank" rel="noopener noreferrer">${e}</a></p>`,DF=t=>t.startsWith("http://")||t.startsWith("https://"),PF={install:t=>{t.component("BDAlert",qr),t.component("BDArticle",Dm),t.component("BDAssignConversationModal",Jy),t.component("BDAttachmentPreviewList",$s),t.component("BDAttachmentUploadModal",Xy),t.component("BDBadge",Om),t.component("BDButton",Re),t.component("BDCard",aa),t.component("BDChangePasswordTemplate",f3),t.component("BDChatCloud",$y),t.component("BDCol",Tt),t.component("BDCollapsableCard",Zc),t.component("BDConfirmationModal",Zy),t.component("BDContentLibraryModal",o3),t.component("BDConversationToTextModal",a3),t.component("BDContentLibrarySplitButton",Am),t.component("BDContentLibraryTemplate",yh),t.component("BDContainer",Ti),t.component("BDDropdown",hh),t.component("BDDropdownItem",Ba),t.component("BDDropzone",Wd),t.component("BDForm",Mm),t.component("BDFormCheckbox",Cr),t.component("BDFormInput",br),t.component("BDFormInvalidFeedback",xa),t.component("BDFormSelect",Lm),t.component("BDHeader",ph),t.component("BDImageAttachmentModal",c3),t.component("BDImageAttachmentPreviewList",Fs),t.component("BDInputGroup",es),t.component("BDLink",Xr),t.component("BDLogo",Sc),t.component("BDMarkdownEditor",By),t.component("BDMobileMenu",fh),t.component("BDModal",xn),t.component("BDNotFoundTemplate",h3),t.component("BDPagination",Bd),t.component("BDPhoneNumberEditModal",Yy),t.component("BDPill",_a),t.component("BDPractitionerHeader",Ky),t.component("BDProfileImage",_i),t.component("BDRow",vn),t.component("BDSessionTimeOutModal",Qy),t.component("BDTable",Fy),t.component("BDToast",Rd),t.component("BDUser",Ry),t.component("BDUserInformation",Fd),t.component("BDVideoCallConfirmationModal",d3),t.component("BDVideoCallToast",Hy),t.component("BDZoomslider",Qc),t.component("BDDate",Ym),t.component("IconAcademy",qs),t.component("IconArrowDown",Ac),t.component("IconArrowUp",xc),t.component("IconAttachment",hr),t.component("IconBold",Tc),t.component("IconBulletList",Ic),t.component("IconCalendar",Th),t.component("IconCall",Vs),t.component("IconCallReject",_c),t.component("IconCardView",Ih),t.component("IconCaretDown",ea),t.component("IconCaretLeft",Nc),t.component("IconCaretRight",Oc),t.component("IconCheck",$o),t.component("IconClipboard",_h),t.component("IconClose",ta),t.component("IconComment",Mc),t.component("IconCommentActive",Nh),t.component("IconCommonFileEmpty",Mh),t.component("IconCommonFileWarning",Lh),t.component("IconCommentStatic",Oh),t.component("IconContactPerson",Dh),t.component("IconCopy",Ph),t.component("IconDelete",Lc),t.component("IconDoubleCheck",Bh),t.component("IconDownloadImage",Dc),t.component("IconEdit",Pc),t.component("IconEndCall",Rh),t.component("IconError",na),t.component("IconExternal",Bc),t.component("IconEyeShow",$h),t.component("IconEyeSlash",Fh),t.component("IconFile",Rc),t.component("IconFileAdded",zh),t.component("IconForward",Uh),t.component("IconHix",Hh),t.component("IconHyperlink",ra),t.component("IconImageFileLandscape",jh),t.component("IconImageFileWarning",Wh),t.component("IconInbox",Kh),t.component("IconInfo",pr),t.component("IconInformationCircle",$c),t.component("IconItalic",Fc),t.component("IconListView",Yh),t.component("IconLock",Gh),t.component("IconLusciiEscalated",Qh),t.component("IconLusciiLogo",Zh),t.component("IconLusciiOpen",Jh),t.component("IconLusciiPriorityHigh",Xh),t.component("IconLusciiPriorityLow",qh),t.component("IconLusciiPriorityMedium",Vh),t.component("IconMenu",zc),t.component("IconMessage",ep),t.component("IconMessageForward",tp),t.component("IconMicrophoneSlash",np),t.component("IconMicrosoftTeams",rp),t.component("IconMin",op),t.component("IconOrderedList",Uc),t.component("IconPlus",oa),t.component("IconRefresh",ip),t.component("IconRemove",Ii),t.component("IconSananetLogo",sp),t.component("IconService",ap),t.component("IconShareScreen",lp),t.component("IconSingleNeutral",cp),t.component("IconSort",dp),t.component("IconSortAsc",Hc),t.component("IconSortDesc",jc),t.component("IconSortNone",Wc),t.component("IconTriangleDown",up),t.component("IconTriangleExclamation",Kc),t.component("IconUnderline",Yc),t.component("IconVideoDisabled",hp),t.component("IconVideocall",fp),t.component("IconWarning",pp),t.component("IconZorgkaart",mp),t.directive("vBDTooltip",Lo)}};V.BDAlert=qr,V.BDArticle=Dm,V.BDAssignConversationModal=Jy,V.BDAttachmentPreviewList=$s,V.BDAttachmentUploadModal=Xy,V.BDBadge=Om,V.BDButton=Re,V.BDCard=aa,V.BDChangePasswordTemplate=f3,V.BDChatCloud=$y,V.BDCol=Tt,V.BDCollapsableCard=Zc,V.BDConfirmationModal=Zy,V.BDContainer=Ti,V.BDContentLibraryModal=o3,V.BDContentLibrarySplitButton=Am,V.BDContentLibraryTemplate=yh,V.BDConversationToTextModal=a3,V.BDDate=Ym,V.BDDropdown=hh,V.BDDropdownItem=Ba,V.BDDropzone=Wd,V.BDForm=Mm,V.BDFormCheckbox=Cr,V.BDFormInput=br,V.BDFormInvalidFeedback=xa,V.BDFormSelect=Lm,V.BDHeader=ph,V.BDImageAttachmentModal=c3,V.BDImageAttachmentPreviewList=Fs,V.BDInputGroup=es,V.BDLink=Xr,V.BDLogo=Sc,V.BDMarkdownEditor=By,V.BDMobileMenu=fh,V.BDModal=xn,V.BDNotFoundTemplate=h3,V.BDPagination=Bd,V.BDPhoneNumberEditModal=Yy,V.BDPill=_a,V.BDPractitionerHeader=Ky,V.BDProfileImage=_i,V.BDRow=vn,V.BDSessionTimeOutModal=Qy,V.BDTable=Fy,V.BDToast=Rd,V.BDUser=Ry,V.BDUserInformation=Fd,V.BDVideoCallConfirmationModal=d3,V.BDVideoCallToast=Hy,V.BDZoomslider=Qc,V.CopyChatMessageToClipboard=q$,V.CopyChatMessagesToClipboard=s3,V.CopyHl7MessagesToClipboard=V$,V.CreateHyperlinkParagraph=LF,V.CreateThumbnailUri=G2,V.IconAcademy=qs,V.IconArrowDown=Ac,V.IconArrowUp=xc,V.IconAttachment=hr,V.IconBold=Tc,V.IconBulletList=Ic,V.IconCalendar=Th,V.IconCall=Vs,V.IconCallReject=_c,V.IconCardView=Ih,V.IconCaretDown=ea,V.IconCaretLeft=Nc,V.IconCaretRight=Oc,V.IconCheck=$o,V.IconClipboard=_h,V.IconClose=ta,V.IconComment=Mc,V.IconCommentActive=Nh,V.IconCommentStatic=Oh,V.IconCommonFileEmpty=Mh,V.IconCommonFileWarning=Lh,V.IconContactPerson=Dh,V.IconCopy=Ph,V.IconDelete=Lc,V.IconDoubleCheck=Bh,V.IconDownloadImage=Dc,V.IconEdit=Pc,V.IconEndCall=Rh,V.IconError=na,V.IconExternal=Bc,V.IconEyeShow=$h,V.IconEyeSlash=Fh,V.IconFile=Rc,V.IconFileAdded=zh,V.IconForward=Uh,V.IconHix=Hh,V.IconHyperlink=ra,V.IconImageFileLandscape=jh,V.IconImageFileWarning=Wh,V.IconInbox=Kh,V.IconInfo=pr,V.IconInformationCircle=$c,V.IconItalic=Fc,V.IconListView=Yh,V.IconLock=Gh,V.IconLusciiEscalated=Qh,V.IconLusciiLogo=Zh,V.IconLusciiOpen=Jh,V.IconLusciiPriorityHigh=Xh,V.IconLusciiPriorityLow=qh,V.IconLusciiPriorityMedium=Vh,V.IconMenu=zc,V.IconMessage=ep,V.IconMessageForward=tp,V.IconMicrophoneSlash=np,V.IconMicrosoftTeams=rp,V.IconMin=op,V.IconOrderedList=Uc,V.IconPlus=oa,V.IconRefresh=ip,V.IconRemove=Ii,V.IconSananetLogo=sp,V.IconService=ap,V.IconShareScreen=lp,V.IconSingleNeutral=cp,V.IconSort=dp,V.IconSortAsc=Hc,V.IconSortDesc=jc,V.IconSortNone=Wc,V.IconTriangleDown=up,V.IconTriangleExclamation=Kc,V.IconUnderline=Yc,V.IconVideoDisabled=hp,V.IconVideocall=fp,V.IconWarning=pp,V.IconZorgkaart=mp,V.MapAttachmentsForApi=xO,V.MapToAttachmentObjects=So,V.TransformHyperlinks=MF,V.ValidateUrl=DF,V.default=PF,V.getDisplayDateNumeric=Hd,V.getDisplayDateTextual=Wm,V.getDisplayDateTimeNumeric=Ud,V.getDisplayDateTimeTextual=Km,V.useModal=Do,V.usePopover=Wy,V.useServerErrors=gh,V.useSessionTimeOut=Gy,V.useToaster=Js,V.useValidation=u3,V.useWindow=mh,V.useZoom=l3,V.vBdTooltip=Lo,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));