@beterdichtbij/component-library 0.44.0 → 0.44.2

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.
@@ -59,18 +59,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
59
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,_=!1,O;return{s:function(){N=D[Symbol.iterator]()},n:function(){var j=N.next();return T=j.done,j},e:function(j){_=!0,O=j},f:function(){try{!T&&N.return!=null&&N.return()}finally{if(_)throw O}}}}function v(D,B){if(D){if(typeof D=="string")return C(D,B);var N=Object.prototype.toString.call(D).slice(8,-1);if(N==="Object"&&D.constructor&&(N=D.constructor.name),N==="Map"||N==="Set")return Array.from(D);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return C(D,B)}}function C(D,B){(B==null||B>D.length)&&(B=D.length);for(var N=0,R=new Array(B);N<B;N++)R[N]=D[N];return R}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(B,N,R){if(R)return{dzuuid:R.file.upload.uuid,dzchunkindex:R.index,dztotalfilesize:R.file.size,dzchunksize:this.options.chunkSize,dztotalchunkcount:R.file.upload.totalChunkCount,dzchunkbyteoffset:R.index*this.options.chunkSize}},accept:function(B,N){return N()},chunksUploaded:function(B,N){N()},fallback:function(){var B;this.element.className="".concat(this.element.className," dz-browser-not-supported");var N=g(this.element.getElementsByTagName("div"),!0),R;try{for(N.s();!(R=N.n()).done;){var A=R.value;if(/(^| )dz-message($| )/.test(A.className)){B=A,A.className="dz-message";break}}}catch(_){N.e(_)}finally{N.f()}B||(B=U.createElement('<div class="dz-message"><span></span></div>'),this.element.appendChild(B));var T=B.getElementsByTagName("span")[0];return T&&(T.textContent!=null?T.textContent=this.options.dictFallbackMessage:T.innerText!=null&&(T.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(B,N,R,A){var T={srcX:0,srcY:0,srcWidth:B.width,srcHeight:B.height},_=B.width/B.height;N==null&&R==null?(N=T.srcWidth,R=T.srcHeight):N==null?N=R*_:R==null&&(R=N/_),N=Math.min(N,T.srcWidth),R=Math.min(R,T.srcHeight);var O=N/R;if(T.srcWidth>N||T.srcHeight>R)if(A==="crop")_>O?(T.srcHeight=B.height,T.srcWidth=T.srcHeight*O):(T.srcWidth=B.width,T.srcHeight=T.srcWidth/O);else if(A==="contain")_>O?R=N/_:N=R*_;else throw new Error("Unknown resizeMethod '".concat(A,"'"));return T.srcX=(B.width-T.srcWidth)/2,T.srcY=(B.height-T.srcHeight)/2,T.trgWidth=N,T.trgHeight=R,T},transformFile:function(B,N){return(this.options.resizeWidth||this.options.resizeHeight)&&B.type.match(/image.*/)?this.resizeImage(B,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,N):N(B)},previewTemplate:m,drop:function(B){return this.element.classList.remove("dz-drag-hover")},dragstart:function(B){},dragend:function(B){return this.element.classList.remove("dz-drag-hover")},dragenter:function(B){return this.element.classList.add("dz-drag-hover")},dragover:function(B){return this.element.classList.add("dz-drag-hover")},dragleave:function(B){return this.element.classList.remove("dz-drag-hover")},paste:function(B){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(B){var N=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer&&!this.options.disablePreviews){B.previewElement=U.createElement(this.options.previewTemplate.trim()),B.previewTemplate=B.previewElement,this.previewsContainer.appendChild(B.previewElement);var R=g(B.previewElement.querySelectorAll("[data-dz-name]"),!0),A;try{for(R.s();!(A=R.n()).done;){var T=A.value;T.textContent=B.name}}catch(S){R.e(S)}finally{R.f()}var _=g(B.previewElement.querySelectorAll("[data-dz-size]"),!0),O;try{for(_.s();!(O=_.n()).done;)T=O.value,T.innerHTML=this.filesize(B.size)}catch(S){_.e(S)}finally{_.f()}this.options.addRemoveLinks&&(B._removeLink=U.createElement('<a class="dz-remove" href="javascript:undefined;" data-dz-remove>'.concat(this.options.dictRemoveFile,"</a>")),B.previewElement.appendChild(B._removeLink));var H=function(k){return k.preventDefault(),k.stopPropagation(),B.status===U.UPLOADING?U.confirm(N.options.dictCancelUploadConfirmation,function(){return N.removeFile(B)}):N.options.dictRemoveFileConfirmation?U.confirm(N.options.dictRemoveFileConfirmation,function(){return N.removeFile(B)}):N.removeFile(B)},j=g(B.previewElement.querySelectorAll("[data-dz-remove]"),!0),Z;try{for(j.s();!(Z=j.n()).done;){var X=Z.value;X.addEventListener("click",H)}}catch(S){j.e(S)}finally{j.f()}}},removedfile:function(B){return B.previewElement!=null&&B.previewElement.parentNode!=null&&B.previewElement.parentNode.removeChild(B.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(B,N){if(B.previewElement){B.previewElement.classList.remove("dz-file-preview");var R=g(B.previewElement.querySelectorAll("[data-dz-thumbnail]"),!0),A;try{for(R.s();!(A=R.n()).done;){var T=A.value;T.alt=B.name,T.src=N}}catch(_){R.e(_)}finally{R.f()}return setTimeout(function(){return B.previewElement.classList.add("dz-image-preview")},1)}},error:function(B,N){if(B.previewElement){B.previewElement.classList.add("dz-error"),typeof N!="string"&&N.error&&(N=N.error);var R=g(B.previewElement.querySelectorAll("[data-dz-errormessage]"),!0),A;try{for(R.s();!(A=R.n()).done;){var T=A.value;T.textContent=N}}catch(_){R.e(_)}finally{R.f()}}},errormultiple:function(){},processing:function(B){if(B.previewElement&&(B.previewElement.classList.add("dz-processing"),B._removeLink))return B._removeLink.innerHTML=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(B,N,R){if(B.previewElement){var A=g(B.previewElement.querySelectorAll("[data-dz-uploadprogress]"),!0),T;try{for(A.s();!(T=A.n()).done;){var _=T.value;_.nodeName==="PROGRESS"?_.value=N:_.style.width="".concat(N,"%")}}catch(O){A.e(O)}finally{A.f()}}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(B){if(B.previewElement)return B.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(B){return this.emit("error",B,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(B){if(B._removeLink&&(B._removeLink.innerHTML=this.options.dictRemoveFile),B.previewElement)return B.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},E=b;function y(D){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?y=function(N){return typeof N}:y=function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},y(D)}function x(D,B){var N;if(typeof Symbol>"u"||D[Symbol.iterator]==null){if(Array.isArray(D)||(N=w(D))||B&&D&&typeof D.length=="number"){N&&(D=N);var R=0,A=function(){};return{s:A,n:function(){return R>=D.length?{done:!0}:{done:!1,value:D[R++]}},e:function(j){throw j},f:A}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
60
60
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var T=!0,_=!1,O;return{s:function(){N=D[Symbol.iterator]()},n:function(){var j=N.next();return T=j.done,j},e:function(j){_=!0,O=j},f:function(){try{!T&&N.return!=null&&N.return()}finally{if(_)throw O}}}}function w(D,B){if(D){if(typeof D=="string")return I(D,B);var N=Object.prototype.toString.call(D).slice(8,-1);if(N==="Object"&&D.constructor&&(N=D.constructor.name),N==="Map"||N==="Set")return Array.from(D);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return I(D,B)}}function I(D,B){(B==null||B>D.length)&&(B=D.length);for(var N=0,R=new Array(B);N<B;N++)R[N]=D[N];return R}function M(D,B){if(!(D instanceof B))throw new TypeError("Cannot call a class as a function")}function L(D,B){for(var N=0;N<B.length;N++){var R=B[N];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(D,R.key,R)}}function $(D,B,N){return B&&L(D.prototype,B),N&&L(D,N),D}function V(D,B){if(typeof B!="function"&&B!==null)throw new TypeError("Super expression must either be null or a function");D.prototype=Object.create(B&&B.prototype,{constructor:{value:D,writable:!0,configurable:!0}}),B&&z(D,B)}function z(D,B){return z=Object.setPrototypeOf||function(R,A){return R.__proto__=A,R},z(D,B)}function G(D){var B=W();return function(){var R=J(D),A;if(B){var T=J(this).constructor;A=Reflect.construct(R,arguments,T)}else A=R.apply(this,arguments);return Y(this,A)}}function Y(D,B){return B&&(y(B)==="object"||typeof B=="function")?B:K(D)}function K(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D}function W(){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 J(D){return J=Object.setPrototypeOf?Object.getPrototypeOf:function(N){return N.__proto__||Object.getPrototypeOf(N)},J(D)}var U=function(D){V(N,D);var B=G(N);function N(R,A){var T;M(this,N),T=B.call(this);var _,O;if(T.element=R,T.version=N.version,T.clickableElements=[],T.listeners=[],T.files=[],typeof T.element=="string"&&(T.element=document.querySelector(T.element)),!T.element||T.element.nodeType==null)throw new Error("Invalid dropzone element.");if(T.element.dropzone)throw new Error("Dropzone already attached.");N.instances.push(K(T)),T.element.dropzone=K(T);var H=(O=N.optionsForElement(T.element))!=null?O:{};if(T.options=N.extend({},E,H,A??{}),T.options.previewTemplate=T.options.previewTemplate.replace(/\n*/g,""),T.options.forceFallback||!N.isBrowserSupported())return Y(T,T.options.fallback.call(K(T)));if(T.options.url==null&&(T.options.url=T.element.getAttribute("action")),!T.options.url)throw new Error("No URL provided.");if(T.options.acceptedFiles&&T.options.acceptedMimeTypes)throw new Error("You can't provide both 'acceptedFiles' and 'acceptedMimeTypes'. 'acceptedMimeTypes' is deprecated.");if(T.options.uploadMultiple&&T.options.chunking)throw new Error("You cannot set both: uploadMultiple and chunking.");return T.options.acceptedMimeTypes&&(T.options.acceptedFiles=T.options.acceptedMimeTypes,delete T.options.acceptedMimeTypes),T.options.renameFilename!=null&&(T.options.renameFile=function(j){return T.options.renameFilename.call(K(T),j.name,j)}),typeof T.options.method=="string"&&(T.options.method=T.options.method.toUpperCase()),(_=T.getExistingFallback())&&_.parentNode&&_.parentNode.removeChild(_),T.options.previewsContainer!==!1&&(T.options.previewsContainer?T.previewsContainer=N.getElement(T.options.previewsContainer,"previewsContainer"):T.previewsContainer=T.element),T.options.clickable&&(T.options.clickable===!0?T.clickableElements=[T.element]:T.clickableElements=N.getElements(T.options.clickable,"clickable")),T.init(),T}return $(N,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(A){return A.accepted}).map(function(A){return A})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(A){return!A.accepted}).map(function(A){return A})}},{key:"getFilesWithStatus",value:function(A){return this.files.filter(function(T){return T.status===A}).map(function(T){return T})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(N.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(N.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(N.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(A){return A.status===N.UPLOADING||A.status===N.QUEUED}).map(function(A){return A})}},{key:"init",value:function(){var A=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(N.createElement('<div class="dz-default dz-message"><button class="dz-button" type="button">'.concat(this.options.dictDefaultMessage,"</button></div>"))),this.clickableElements.length){var T=function X(){A.hiddenFileInput&&A.hiddenFileInput.parentNode.removeChild(A.hiddenFileInput),A.hiddenFileInput=document.createElement("input"),A.hiddenFileInput.setAttribute("type","file"),(A.options.maxFiles===null||A.options.maxFiles>1)&&A.hiddenFileInput.setAttribute("multiple","multiple"),A.hiddenFileInput.className="dz-hidden-input",A.options.acceptedFiles!==null&&A.hiddenFileInput.setAttribute("accept",A.options.acceptedFiles),A.options.capture!==null&&A.hiddenFileInput.setAttribute("capture",A.options.capture),A.hiddenFileInput.setAttribute("tabindex","-1"),A.hiddenFileInput.style.visibility="hidden",A.hiddenFileInput.style.position="absolute",A.hiddenFileInput.style.top="0",A.hiddenFileInput.style.left="0",A.hiddenFileInput.style.height="0",A.hiddenFileInput.style.width="0",N.getElement(A.options.hiddenInputContainer,"hiddenInputContainer").appendChild(A.hiddenFileInput),A.hiddenFileInput.addEventListener("change",function(){var S=A.hiddenFileInput.files;if(S.length){var k=x(S,!0),F;try{for(k.s();!(F=k.n()).done;){var Q=F.value;A.addFile(Q)}}catch(ie){k.e(ie)}finally{k.f()}}A.emit("addedfiles",S),X()})};T()}this.URL=window.URL!==null?window.URL:window.webkitURL;var _=x(this.events,!0),O;try{for(_.s();!(O=_.n()).done;){var H=O.value;this.on(H,this.options[H])}}catch(X){_.e(X)}finally{_.f()}this.on("uploadprogress",function(){return A.updateTotalUploadProgress()}),this.on("removedfile",function(){return A.updateTotalUploadProgress()}),this.on("canceled",function(X){return A.emit("complete",X)}),this.on("complete",function(X){if(A.getAddedFiles().length===0&&A.getUploadingFiles().length===0&&A.getQueuedFiles().length===0)return setTimeout(function(){return A.emit("queuecomplete")},0)});var j=function(S){if(S.dataTransfer.types){for(var k=0;k<S.dataTransfer.types.length;k++)if(S.dataTransfer.types[k]==="Files")return!0}return!1},Z=function(S){if(j(S))return S.stopPropagation(),S.preventDefault?S.preventDefault():S.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(S){return A.emit("dragstart",S)},dragenter:function(S){return Z(S),A.emit("dragenter",S)},dragover:function(S){var k;try{k=S.dataTransfer.effectAllowed}catch{}return S.dataTransfer.dropEffect=k==="move"||k==="linkMove"?"move":"copy",Z(S),A.emit("dragover",S)},dragleave:function(S){return A.emit("dragleave",S)},drop:function(S){return Z(S),A.drop(S)},dragend:function(S){return A.emit("dragend",S)}}}],this.clickableElements.forEach(function(X){return A.listeners.push({element:X,events:{click:function(k){return(X!==A.element||k.target===A.element||N.elementInside(k.target,A.element.querySelector(".dz-message")))&&A.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,N.instances.splice(N.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var A,T=0,_=0,O=this.getActiveFiles();if(O.length){var H=x(this.getActiveFiles(),!0),j;try{for(H.s();!(j=H.n()).done;){var Z=j.value;T+=Z.upload.bytesSent,_+=Z.upload.total}}catch(X){H.e(X)}finally{H.f()}A=100*T/_}else A=100;return this.emit("totaluploadprogress",A,_,T)}},{key:"_getParamName",value:function(A){return typeof this.options.paramName=="function"?this.options.paramName(A):"".concat(this.options.paramName).concat(this.options.uploadMultiple?"[".concat(A,"]"):"")}},{key:"_renameFile",value:function(A){return typeof this.options.renameFile!="function"?A.name:this.options.renameFile(A)}},{key:"getFallbackForm",value:function(){var A,T;if(A=this.getExistingFallback())return A;var _='<div class="dz-fallback">';this.options.dictFallbackText&&(_+="<p>".concat(this.options.dictFallbackText,"</p>")),_+='<input type="file" name="'.concat(this._getParamName(0),'" ').concat(this.options.uploadMultiple?'multiple="multiple"':void 0,' /><input type="submit" value="Upload!"></div>');var O=N.createElement(_);return this.element.tagName!=="FORM"?(T=N.createElement('<form action="'.concat(this.options.url,'" enctype="multipart/form-data" method="').concat(this.options.method,'"></form>')),T.appendChild(O)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),T??O}},{key:"getExistingFallback",value:function(){for(var A=function(Z){var X=x(Z,!0),S;try{for(X.s();!(S=X.n()).done;){var k=S.value;if(/(^| )fallback($| )/.test(k.className))return k}}catch(F){X.e(F)}finally{X.f()}},T=0,_=["div","form"];T<_.length;T++){var O=_[T],H;if(H=A(this.element.getElementsByTagName(O)))return H}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(A){return function(){var T=[];for(var _ in A.events){var O=A.events[_];T.push(A.element.addEventListener(_,O,!1))}return T}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(A){return function(){var T=[];for(var _ in A.events){var O=A.events[_];T.push(A.element.removeEventListener(_,O,!1))}return T}()})}},{key:"disable",value:function(){var A=this;return this.clickableElements.forEach(function(T){return T.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(T){return A.cancelUpload(T)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(A){return A.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(A){var T=0,_="b";if(A>0){for(var O=["tb","gb","mb","kb","b"],H=0;H<O.length;H++){var j=O[H],Z=Math.pow(this.options.filesizeBase,4-H)/10;if(A>=Z){T=A/Math.pow(this.options.filesizeBase,4-H),_=j;break}}T=Math.round(10*T)/10}return"<strong>".concat(T,"</strong> ").concat(this.options.dictFileSizeUnits[_])}},{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(A){if(A.dataTransfer){this.emit("drop",A);for(var T=[],_=0;_<A.dataTransfer.files.length;_++)T[_]=A.dataTransfer.files[_];if(T.length){var O=A.dataTransfer.items;O&&O.length&&O[0].webkitGetAsEntry!=null?this._addFilesFromItems(O):this.handleFiles(T)}this.emit("addedfiles",T)}}},{key:"paste",value:function(A){if(ke(A!=null?A.clipboardData:void 0,function(_){return _.items})!=null){this.emit("paste",A);var T=A.clipboardData.items;if(T.length)return this._addFilesFromItems(T)}}},{key:"handleFiles",value:function(A){var T=x(A,!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value;this.addFile(O)}}catch(H){T.e(H)}finally{T.f()}}},{key:"_addFilesFromItems",value:function(A){var T=this;return function(){var _=[],O=x(A,!0),H;try{for(O.s();!(H=O.n()).done;){var j=H.value,Z;j.webkitGetAsEntry!=null&&(Z=j.webkitGetAsEntry())?Z.isFile?_.push(T.addFile(j.getAsFile())):Z.isDirectory?_.push(T._addFilesFromDirectory(Z,Z.name)):_.push(void 0):j.getAsFile!=null&&(j.kind==null||j.kind==="file")?_.push(T.addFile(j.getAsFile())):_.push(void 0)}}catch(X){O.e(X)}finally{O.f()}return _}()}},{key:"_addFilesFromDirectory",value:function(A,T){var _=this,O=A.createReader(),H=function(X){return Ne(console,"log",function(S){return S.log(X)})},j=function Z(){return O.readEntries(function(X){if(X.length>0){var S=x(X,!0),k;try{for(S.s();!(k=S.n()).done;){var F=k.value;F.isFile?F.file(function(Q){if(!(_.options.ignoreHiddenFiles&&Q.name.substring(0,1)==="."))return Q.fullPath="".concat(T,"/").concat(Q.name),_.addFile(Q)}):F.isDirectory&&_._addFilesFromDirectory(F,"".concat(T,"/").concat(F.name))}}catch(Q){S.e(Q)}finally{S.f()}Z()}return null},H)};return j()}},{key:"accept",value:function(A,T){this.options.maxFilesize&&A.size>this.options.maxFilesize*1024*1024?T(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(A.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):N.isValidFile(A,this.options.acceptedFiles)?this.options.maxFiles!=null&&this.getAcceptedFiles().length>=this.options.maxFiles?(T(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",A)):this.options.accept.call(this,A,T):T(this.options.dictInvalidFileType)}},{key:"addFile",value:function(A){var T=this;A.upload={uuid:N.uuidv4(),progress:0,total:A.size,bytesSent:0,filename:this._renameFile(A)},this.files.push(A),A.status=N.ADDED,this.emit("addedfile",A),this._enqueueThumbnail(A),this.accept(A,function(_){_?(A.accepted=!1,T._errorProcessing([A],_)):(A.accepted=!0,T.options.autoQueue&&T.enqueueFile(A)),T._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(A){var T=x(A,!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value;this.enqueueFile(O)}}catch(H){T.e(H)}finally{T.f()}return null}},{key:"enqueueFile",value:function(A){var T=this;if(A.status===N.ADDED&&A.accepted===!0){if(A.status=N.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return T.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(A){var T=this;if(this.options.createImageThumbnails&&A.type.match(/image.*/)&&A.size<=this.options.maxThumbnailFilesize*1024*1024)return this._thumbnailQueue.push(A),setTimeout(function(){return T._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var A=this;if(!(this._processingThumbnail||this._thumbnailQueue.length===0)){this._processingThumbnail=!0;var T=this._thumbnailQueue.shift();return this.createThumbnail(T,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(_){return A.emit("thumbnail",T,_),A._processingThumbnail=!1,A._processThumbnailQueue()})}}},{key:"removeFile",value:function(A){if(A.status===N.UPLOADING&&this.cancelUpload(A),this.files=ee(this.files,A),this.emit("removedfile",A),this.files.length===0)return this.emit("reset")}},{key:"removeAllFiles",value:function(A){A==null&&(A=!1);var T=x(this.files.slice(),!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value;(O.status!==N.UPLOADING||A)&&this.removeFile(O)}}catch(H){T.e(H)}finally{T.f()}return null}},{key:"resizeImage",value:function(A,T,_,O,H){var j=this;return this.createThumbnail(A,T,_,O,!0,function(Z,X){if(X==null)return H(A);var S=j.options.resizeMimeType;S==null&&(S=A.type);var k=X.toDataURL(S,j.options.resizeQuality);return(S==="image/jpeg"||S==="image/jpg")&&(k=ve.restore(A.dataURL,k)),H(N.dataURItoBlob(k))})}},{key:"createThumbnail",value:function(A,T,_,O,H,j){var Z=this,X=new FileReader;X.onload=function(){if(A.dataURL=X.result,A.type==="image/svg+xml"){j!=null&&j(X.result);return}Z.createThumbnailFromUrl(A,T,_,O,H,j)},X.readAsDataURL(A)}},{key:"displayExistingFile",value:function(A,T,_,O){var H=this,j=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;if(this.emit("addedfile",A),this.emit("complete",A),!j)this.emit("thumbnail",A,T),_&&_();else{var Z=function(S){H.emit("thumbnail",A,S),_&&_()};A.dataURL=T,this.createThumbnailFromUrl(A,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,this.options.fixOrientation,Z,O)}}},{key:"createThumbnailFromUrl",value:function(A,T,_,O,H,j,Z){var X=this,S=document.createElement("img");return Z&&(S.crossOrigin=Z),H=getComputedStyle(document.body).imageOrientation=="from-image"?!1:H,S.onload=function(){var k=function(Q){return Q(1)};return typeof EXIF<"u"&&EXIF!==null&&H&&(k=function(Q){return EXIF.getData(S,function(){return Q(EXIF.getTag(this,"Orientation"))})}),k(function(F){A.width=S.width,A.height=S.height;var Q=X.options.resize.call(X,A,T,_,O),ie=document.createElement("canvas"),he=ie.getContext("2d");switch(ie.width=Q.trgWidth,ie.height=Q.trgHeight,F>4&&(ie.width=Q.trgHeight,ie.height=Q.trgWidth),F){case 2:he.translate(ie.width,0),he.scale(-1,1);break;case 3:he.translate(ie.width,ie.height),he.rotate(Math.PI);break;case 4:he.translate(0,ie.height),he.scale(1,-1);break;case 5:he.rotate(.5*Math.PI),he.scale(1,-1);break;case 6:he.rotate(.5*Math.PI),he.translate(0,-ie.width);break;case 7:he.rotate(.5*Math.PI),he.translate(ie.height,-ie.width),he.scale(-1,1);break;case 8:he.rotate(-.5*Math.PI),he.translate(-ie.height,0);break}me(he,S,Q.srcX!=null?Q.srcX:0,Q.srcY!=null?Q.srcY:0,Q.srcWidth,Q.srcHeight,Q.trgX!=null?Q.trgX:0,Q.trgY!=null?Q.trgY:0,Q.trgWidth,Q.trgHeight);var be=ie.toDataURL("image/png");if(j!=null)return j(be,ie)})},j!=null&&(S.onerror=j),S.src=A.dataURL}},{key:"processQueue",value:function(){var A=this.options.parallelUploads,T=this.getUploadingFiles().length,_=T;if(!(T>=A)){var O=this.getQueuedFiles();if(O.length>0){if(this.options.uploadMultiple)return this.processFiles(O.slice(0,A-T));for(;_<A;){if(!O.length)return;this.processFile(O.shift()),_++}}}}},{key:"processFile",value:function(A){return this.processFiles([A])}},{key:"processFiles",value:function(A){var T=x(A,!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value;O.processing=!0,O.status=N.UPLOADING,this.emit("processing",O)}}catch(H){T.e(H)}finally{T.f()}return this.options.uploadMultiple&&this.emit("processingmultiple",A),this.uploadFiles(A)}},{key:"_getFilesWithXhr",value:function(A){return this.files.filter(function(T){return T.xhr===A}).map(function(T){return T})}},{key:"cancelUpload",value:function(A){if(A.status===N.UPLOADING){var T=this._getFilesWithXhr(A.xhr),_=x(T,!0),O;try{for(_.s();!(O=_.n()).done;){var H=O.value;H.status=N.CANCELED}}catch(S){_.e(S)}finally{_.f()}typeof A.xhr<"u"&&A.xhr.abort();var j=x(T,!0),Z;try{for(j.s();!(Z=j.n()).done;){var X=Z.value;this.emit("canceled",X)}}catch(S){j.e(S)}finally{j.f()}this.options.uploadMultiple&&this.emit("canceledmultiple",T)}else(A.status===N.ADDED||A.status===N.QUEUED)&&(A.status=N.CANCELED,this.emit("canceled",A),this.options.uploadMultiple&&this.emit("canceledmultiple",[A]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(A){if(typeof A=="function"){for(var T=arguments.length,_=new Array(T>1?T-1:0),O=1;O<T;O++)_[O-1]=arguments[O];return A.apply(this,_)}return A}},{key:"uploadFile",value:function(A){return this.uploadFiles([A])}},{key:"uploadFiles",value:function(A){var T=this;this._transformFiles(A,function(_){if(T.options.chunking){var O=_[0];A[0].upload.chunked=T.options.chunking&&(T.options.forceChunking||O.size>T.options.chunkSize),A[0].upload.totalChunkCount=Math.ceil(O.size/T.options.chunkSize)}if(A[0].upload.chunked){var H=A[0],j=_[0];H.upload.chunks=[];var Z=function(){for(var Q=0;H.upload.chunks[Q]!==void 0;)Q++;if(!(Q>=H.upload.totalChunkCount)){var ie=Q*T.options.chunkSize,he=Math.min(ie+T.options.chunkSize,j.size),be={name:T._getParamName(0),data:j.webkitSlice?j.webkitSlice(ie,he):j.slice(ie,he),filename:H.upload.filename,chunkIndex:Q};H.upload.chunks[Q]={file:H,index:Q,dataBlock:be,status:N.UPLOADING,progress:0,retries:0},T._uploadData(A,[be])}};if(H.upload.finishedChunkUpload=function(F,Q){var ie=!0;F.status=N.SUCCESS,F.dataBlock=null,F.xhr=null;for(var he=0;he<H.upload.totalChunkCount;he++){if(H.upload.chunks[he]===void 0)return Z();H.upload.chunks[he].status!==N.SUCCESS&&(ie=!1)}ie&&T.options.chunksUploaded(H,function(){T._finished(A,Q,null)})},T.options.parallelChunkUploads)for(var X=0;X<H.upload.totalChunkCount;X++)Z();else Z()}else{for(var S=[],k=0;k<A.length;k++)S[k]={name:T._getParamName(k),data:_[k],filename:A[k].upload.filename};T._uploadData(A,S)}})}},{key:"_getChunk",value:function(A,T){for(var _=0;_<A.upload.totalChunkCount;_++)if(A.upload.chunks[_]!==void 0&&A.upload.chunks[_].xhr===T)return A.upload.chunks[_]}},{key:"_uploadData",value:function(A,T){var _=this,O=new XMLHttpRequest,H=x(A,!0),j;try{for(H.s();!(j=H.n()).done;){var Z=j.value;Z.xhr=O}}catch(pe){H.e(pe)}finally{H.f()}A[0].upload.chunked&&(A[0].upload.chunks[T[0].chunkIndex].xhr=O);var X=this.resolveOption(this.options.method,A),S=this.resolveOption(this.options.url,A);O.open(X,S,!0);var k=this.resolveOption(this.options.timeout,A);k&&(O.timeout=this.resolveOption(this.options.timeout,A)),O.withCredentials=!!this.options.withCredentials,O.onload=function(pe){_._finishedUploading(A,O,pe)},O.ontimeout=function(){_._handleUploadError(A,O,"Request timedout after ".concat(_.options.timeout/1e3," seconds"))},O.onerror=function(){_._handleUploadError(A,O)};var F=O.upload!=null?O.upload:O;F.onprogress=function(pe){return _._updateFilesUploadProgress(A,O,pe)};var Q={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&N.extend(Q,this.options.headers);for(var ie in Q){var he=Q[ie];he&&O.setRequestHeader(ie,he)}var be=new FormData;if(this.options.params){var q=this.options.params;typeof q=="function"&&(q=q.call(this,A,O,A[0].upload.chunked?this._getChunk(A[0],O):null));for(var se in q){var Ae=q[se];if(Array.isArray(Ae))for(var Be=0;Be<Ae.length;Be++)be.append(se,Ae[Be]);else be.append(se,Ae)}}var Ze=x(A,!0),tt;try{for(Ze.s();!(tt=Ze.n()).done;){var Ct=tt.value;this.emit("sending",Ct,O,be)}}catch(pe){Ze.e(pe)}finally{Ze.f()}this.options.uploadMultiple&&this.emit("sendingmultiple",A,O,be),this._addFormElementData(be);for(var te=0;te<T.length;te++){var ge=T[te];be.append(ge.name,ge.data,ge.filename)}this.submitRequest(O,be,A)}},{key:"_transformFiles",value:function(A,T){for(var _=this,O=[],H=0,j=function(S){_.options.transformFile.call(_,A[S],function(k){O[S]=k,++H===A.length&&T(O)})},Z=0;Z<A.length;Z++)j(Z)}},{key:"_addFormElementData",value:function(A){if(this.element.tagName==="FORM"){var T=x(this.element.querySelectorAll("input, textarea, select, button"),!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value,H=O.getAttribute("name"),j=O.getAttribute("type");if(j&&(j=j.toLowerCase()),!(typeof H>"u"||H===null))if(O.tagName==="SELECT"&&O.hasAttribute("multiple")){var Z=x(O.options,!0),X;try{for(Z.s();!(X=Z.n()).done;){var S=X.value;S.selected&&A.append(H,S.value)}}catch(k){Z.e(k)}finally{Z.f()}}else(!j||j!=="checkbox"&&j!=="radio"||O.checked)&&A.append(H,O.value)}}catch(k){T.e(k)}finally{T.f()}}}},{key:"_updateFilesUploadProgress",value:function(A,T,_){if(A[0].upload.chunked){var Z=A[0],X=this._getChunk(Z,T);_?(X.progress=100*_.loaded/_.total,X.total=_.total,X.bytesSent=_.loaded):(X.progress=100,X.bytesSent=X.total),Z.upload.progress=0,Z.upload.total=0,Z.upload.bytesSent=0;for(var S=0;S<Z.upload.totalChunkCount;S++)Z.upload.chunks[S]&&typeof Z.upload.chunks[S].progress<"u"&&(Z.upload.progress+=Z.upload.chunks[S].progress,Z.upload.total+=Z.upload.chunks[S].total,Z.upload.bytesSent+=Z.upload.chunks[S].bytesSent);Z.upload.progress=Z.upload.progress/Z.upload.totalChunkCount,this.emit("uploadprogress",Z,Z.upload.progress,Z.upload.bytesSent)}else{var O=x(A,!0),H;try{for(O.s();!(H=O.n()).done;){var j=H.value;j.upload.total&&j.upload.bytesSent&&j.upload.bytesSent==j.upload.total||(_?(j.upload.progress=100*_.loaded/_.total,j.upload.total=_.total,j.upload.bytesSent=_.loaded):(j.upload.progress=100,j.upload.bytesSent=j.upload.total),this.emit("uploadprogress",j,j.upload.progress,j.upload.bytesSent))}}catch(k){O.e(k)}finally{O.f()}}}},{key:"_finishedUploading",value:function(A,T,_){var O;if(A[0].status!==N.CANCELED&&T.readyState===4){if(T.responseType!=="arraybuffer"&&T.responseType!=="blob"&&(O=T.responseText,T.getResponseHeader("content-type")&&~T.getResponseHeader("content-type").indexOf("application/json")))try{O=JSON.parse(O)}catch(H){_=H,O="Invalid JSON response from server."}this._updateFilesUploadProgress(A,T),200<=T.status&&T.status<300?A[0].upload.chunked?A[0].upload.finishedChunkUpload(this._getChunk(A[0],T),O):this._finished(A,O,_):this._handleUploadError(A,T,O)}}},{key:"_handleUploadError",value:function(A,T,_){if(A[0].status!==N.CANCELED){if(A[0].upload.chunked&&this.options.retryChunks){var O=this._getChunk(A[0],T);if(O.retries++<this.options.retryChunksLimit){this._uploadData(A,[O.dataBlock]);return}else console.warn("Retried this chunk too often. Giving up.")}this._errorProcessing(A,_||this.options.dictResponseError.replace("{{statusCode}}",T.status),T)}}},{key:"submitRequest",value:function(A,T,_){if(A.readyState!=1){console.warn("Cannot send this request because the XMLHttpRequest.readyState is not OPENED.");return}A.send(T)}},{key:"_finished",value:function(A,T,_){var O=x(A,!0),H;try{for(O.s();!(H=O.n()).done;){var j=H.value;j.status=N.SUCCESS,this.emit("success",j,T,_),this.emit("complete",j)}}catch(Z){O.e(Z)}finally{O.f()}if(this.options.uploadMultiple&&(this.emit("successmultiple",A,T,_),this.emit("completemultiple",A)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(A,T,_){var O=x(A,!0),H;try{for(O.s();!(H=O.n()).done;){var j=H.value;j.status=N.ERROR,this.emit("error",j,T,_),this.emit("complete",j)}}catch(Z){O.e(Z)}finally{O.f()}if(this.options.uploadMultiple&&(this.emit("errormultiple",A,T,_),this.emit("completemultiple",A)),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(A){for(var T=arguments.length,_=new Array(T>1?T-1:0),O=1;O<T;O++)_[O-1]=arguments[O];for(var H=0,j=_;H<j.length;H++){var Z=j[H];for(var X in Z){var S=Z[X];A[X]=S}}return A}},{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(A){var T=Math.random()*16|0,_=A==="x"?T:T&3|8;return _.toString(16)})}}]),N}(h);U.initClass(),U.version="5.9.3",U.options={},U.optionsForElement=function(D){if(D.getAttribute("id"))return U.options[ne(D.getAttribute("id"))]},U.instances=[],U.forElement=function(D){if(typeof D=="string"&&(D=document.querySelector(D)),(D!=null?D.dropzone:void 0)==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 D.dropzone},U.autoDiscover=!0,U.discover=function(){var D;if(document.querySelectorAll)D=document.querySelectorAll(".dropzone");else{D=[];var B=function(R){return function(){var A=[],T=x(R,!0),_;try{for(T.s();!(_=T.n()).done;){var O=_.value;/(^| )dropzone($| )/.test(O.className)?A.push(D.push(O)):A.push(void 0)}}catch(H){T.e(H)}finally{T.f()}return A}()};B(document.getElementsByTagName("div")),B(document.getElementsByTagName("form"))}return function(){var N=[],R=x(D,!0),A;try{for(R.s();!(A=R.n()).done;){var T=A.value;U.optionsForElement(T)!==!1?N.push(new U(T)):N.push(void 0)}}catch(_){R.e(_)}finally{R.f()}return N}()},U.blockedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],U.isBrowserSupported=function(){var D=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if(!("classList"in document.createElement("a")))D=!1;else{U.blacklistedBrowsers!==void 0&&(U.blockedBrowsers=U.blacklistedBrowsers);var B=x(U.blockedBrowsers,!0),N;try{for(B.s();!(N=B.n()).done;){var R=N.value;if(R.test(navigator.userAgent)){D=!1;continue}}}catch(A){B.e(A)}finally{B.f()}}else D=!1;return D},U.dataURItoBlob=function(D){for(var B=atob(D.split(",")[1]),N=D.split(",")[0].split(":")[1].split(";")[0],R=new ArrayBuffer(B.length),A=new Uint8Array(R),T=0,_=B.length,O=0<=_;O?T<=_:T>=_;O?T++:T--)A[T]=B.charCodeAt(T);return new Blob([R],{type:N})};var ee=function(B,N){return B.filter(function(R){return R!==N}).map(function(R){return R})},ne=function(B){return B.replace(/[\-_](\w)/g,function(N){return N.charAt(1).toUpperCase()})};U.createElement=function(D){var B=document.createElement("div");return B.innerHTML=D,B.childNodes[0]},U.elementInside=function(D,B){if(D===B)return!0;for(;D=D.parentNode;)if(D===B)return!0;return!1},U.getElement=function(D,B){var N;if(typeof D=="string"?N=document.querySelector(D):D.nodeType!=null&&(N=D),N==null)throw new Error("Invalid `".concat(B,"` option provided. Please provide a CSS selector or a plain HTML element."));return N},U.getElements=function(D,B){var N,R;if(D instanceof Array){R=[];try{var A=x(D,!0),T;try{for(A.s();!(T=A.n()).done;)N=T.value,R.push(this.getElement(N,B))}catch(H){A.e(H)}finally{A.f()}}catch{R=null}}else if(typeof D=="string"){R=[];var _=x(document.querySelectorAll(D),!0),O;try{for(_.s();!(O=_.n()).done;)N=O.value,R.push(N)}catch(H){_.e(H)}finally{_.f()}}else D.nodeType!=null&&(R=[D]);if(R==null||!R.length)throw new Error("Invalid `".concat(B,"` option provided. Please provide a CSS selector, a plain HTML element or a list of those."));return R},U.confirm=function(D,B,N){if(window.confirm(D))return B();if(N!=null)return N()},U.isValidFile=function(D,B){if(!B)return!0;B=B.split(",");var N=D.type,R=N.replace(/\/.*$/,""),A=x(B,!0),T;try{for(A.s();!(T=A.n()).done;){var _=T.value;if(_=_.trim(),_.charAt(0)==="."){if(D.name.toLowerCase().indexOf(_.toLowerCase(),D.name.length-_.length)!==-1)return!0}else if(/\/\*$/.test(_)){if(R===_.replace(/\/.*$/,""))return!0}else if(N===_)return!0}}catch(O){A.e(O)}finally{A.f()}return!1},typeof jQuery<"u"&&jQuery!==null&&(jQuery.fn.dropzone=function(D){return this.each(function(){return new U(this,D)})}),U.ADDED="added",U.QUEUED="queued",U.ACCEPTED=U.QUEUED,U.UPLOADING="uploading",U.PROCESSING=U.UPLOADING,U.CANCELED="canceled",U.ERROR="error",U.SUCCESS="success";var ce=function(B){B.naturalWidth;var N=B.naturalHeight,R=document.createElement("canvas");R.width=1,R.height=N;var A=R.getContext("2d");A.drawImage(B,0,0);for(var T=A.getImageData(1,0,1,N),_=T.data,O=0,H=N,j=N;j>O;){var Z=_[(j-1)*4+3];Z===0?H=j:O=j,j=H+O>>1}var X=j/N;return X===0?1:X},me=function(B,N,R,A,T,_,O,H,j,Z){var X=ce(N);return B.drawImage(N,R,A,T,_,O,H,j,Z/X)},ve=function(){function D(){M(this,D)}return $(D,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(N){for(var R="",A=void 0,T=void 0,_="",O=void 0,H=void 0,j=void 0,Z="",X=0;A=N[X++],T=N[X++],_=N[X++],O=A>>2,H=(A&3)<<4|T>>4,j=(T&15)<<2|_>>6,Z=_&63,isNaN(T)?j=Z=64:isNaN(_)&&(Z=64),R=R+this.KEY_STR.charAt(O)+this.KEY_STR.charAt(H)+this.KEY_STR.charAt(j)+this.KEY_STR.charAt(Z),A=T=_="",O=H=j=Z="",X<N.length;);return R}},{key:"restore",value:function(N,R){if(!N.match("data:image/jpeg;base64,"))return R;var A=this.decode64(N.replace("data:image/jpeg;base64,","")),T=this.slice2Segments(A),_=this.exifManipulation(R,T);return"data:image/jpeg;base64,".concat(this.encode64(_))}},{key:"exifManipulation",value:function(N,R){var A=this.getExifArray(R),T=this.insertExif(N,A),_=new Uint8Array(T);return _}},{key:"getExifArray",value:function(N){for(var R=void 0,A=0;A<N.length;){if(R=N[A],R[0]===255&R[1]===225)return R;A++}return[]}},{key:"insertExif",value:function(N,R){var A=N.replace("data:image/jpeg;base64,",""),T=this.decode64(A),_=T.indexOf(255,3),O=T.slice(0,_),H=T.slice(_),j=O;return j=j.concat(R),j=j.concat(H),j}},{key:"slice2Segments",value:function(N){for(var R=0,A=[];;){var T;if(N[R]===255&N[R+1]===218)break;if(N[R]===255&N[R+1]===216)R+=2;else{T=N[R+2]*256+N[R+3];var _=R+T+2,O=N.slice(R,_);A.push(O),R=_}if(R>N.length)break}return A}},{key:"decode64",value:function(N){var R=void 0,A=void 0,T="",_=void 0,O=void 0,H=void 0,j="",Z=0,X=[],S=/[^A-Za-z0-9\+\/\=]/g;for(S.exec(N)&&console.warn(`There were invalid base64 characters in the input text.
61
61
  Valid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='
62
- Expect errors in decoding.`),N=N.replace(/[^A-Za-z0-9\+\/\=]/g,"");_=this.KEY_STR.indexOf(N.charAt(Z++)),O=this.KEY_STR.indexOf(N.charAt(Z++)),H=this.KEY_STR.indexOf(N.charAt(Z++)),j=this.KEY_STR.indexOf(N.charAt(Z++)),R=_<<2|O>>4,A=(O&15)<<4|H>>2,T=(H&3)<<6|j,X.push(R),H!==64&&X.push(A),j!==64&&X.push(T),R=A=T="",_=O=H=j="",Z<N.length;);return X}}]),D}();ve.initClass();var Te=function(B,N){var R=!1,A=!0,T=B.document,_=T.documentElement,O=T.addEventListener?"addEventListener":"attachEvent",H=T.addEventListener?"removeEventListener":"detachEvent",j=T.addEventListener?"":"on",Z=function S(k){if(!(k.type==="readystatechange"&&T.readyState!=="complete")&&((k.type==="load"?B:T)[H](j+k.type,S,!1),!R&&(R=!0)))return N.call(B,k.type||k)},X=function S(){try{_.doScroll("left")}catch{setTimeout(S,50);return}return Z("poll")};if(T.readyState!=="complete"){if(T.createEventObject&&_.doScroll){try{A=!B.frameElement}catch{}A&&X()}return T[O](j+"DOMContentLoaded",Z,!1),T[O](j+"readystatechange",Z,!1),B[O](j+"load",Z,!1)}};U._autoDiscoverFunction=function(){if(U.autoDiscover)return U.discover()},Te(window,U._autoDiscoverFunction);function ke(D,B){return typeof D<"u"&&D!==null?B(D):void 0}function Ne(D,B,N){if(typeof D<"u"&&D!==null&&typeof D[B]=="function")return N(D,B)}window.Dropzone=U;var Ce=U}(),s}()})})(X1);var r9=X1.exports;const Xd=Nu(r9),o9={class:"fallback"},s9=c.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),i9={for:"file"},a9={class:"dz-message","data-dz-message":""},l9={id:"bd-dropzone-theme",style:{display:"none"}},c9={class:"dz-preview dz-file-preview"},u9={class:"dz-details"},d9=c.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),f9=c.createElementVNode("div",{class:"dz-filename"},[c.createElementVNode("small",{"data-dz-name":""})],-1),h9=c.createElementVNode("div",{class:"dz-progress"},[c.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[c.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),p9={class:"dz-success-mark"},m9={class:"dz-error-message text-danger"},g9=c.createElementVNode("small",{"data-dz-errormessage":""},null,-1),q1=c.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(n,{emit:e}){const t=n,r=c.computed(()=>({variant:Pa.PRIMARY,size:Tt.SM})),o=io(t,"modelValue",e);let s=null;Xd.autoDiscover=!1,c.watch(()=>t.modelValue,()=>{i()}),c.onMounted(()=>{document.getElementById("dropzone")&&l()});const i=()=>{s&&(s.destroy(),l())},l=()=>{var p;s=new Xd("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?3:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(p=document.querySelector("#bd-dropzone-theme"))==null?void 0:p.innerHTML}),s.on("error",u),s.on("success",a),s.on("removedfile",f)},a=function(p,m){var g;o.value.push({UUID:(g=p.upload)==null?void 0:g.uuid,CorrelationId:m.CorrelationId,Naam:m.Naam}),d(p)},u=function(p){d(p)},d=function(p){const m=p.name;if(!(m.endsWith(".png")||m.endsWith(".jpg")||m.endsWith(".jpeg")||m.endsWith(".gif"))){const g=p.previewElement.getElementsByClassName("icon-file"),v=p.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),v[0].classList.add("d-none")}},f=function(p){const m=o.value.findIndex(g=>{var v;return(g==null?void 0:g.UUID)===((v=p.upload)==null?void 0:v.uuid)});m!==-1&&o.value.splice(m,1)},h=c.computed(()=>t.tag??"form");return(p,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(h.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:c.withCtx(()=>[c.createElementVNode("div",o9,[s9,c.createTextVNode(" test "),c.createElementVNode("label",i9,[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(t.buttonText),1)])]),c.createElementVNode("div",a9,[c.createVNode(Qe,c.normalizeProps(c.guardReactiveProps(r.value)),{default:c.withCtx(()=>[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),c.createElementVNode("div",l9,[c.createElementVNode("div",c9,[c.createElementVNode("div",u9,[d9,c.createVNode(c.unref(gu),{"data-dz-thumbnail":"",class:"d-none"}),f9,c.createVNode(Qe,{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:c.withCtx(()=>[c.createVNode(c.unref(Us))]),_:1})]),h9,c.createElementVNode("div",p9,[c.createVNode(c.unref(Go))]),c.createElementVNode("div",m9,[c.createVNode(c.unref(Ra)),g9])])])],64))}});function ht(n){this.content=n}ht.prototype={constructor:ht,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),s=r.content.slice();return o==-1?s.push(t||n,e):(s[o+1]=e,t&&(s[o]=t)),new ht(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ht(t)},addToStart:function(n,e){return new ht([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ht(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),s=r.find(n);return o.splice(s==-1?o.length:s,0,e,t),new ht(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ht.from(n),n.size?new ht(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ht.from(n),n.size?new ht(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ht.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ht.from=function(n){if(n instanceof ht)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ht(e)};function e0(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),s=e.child(r);if(o==s){t+=o.nodeSize;continue}if(!o.sameMarkup(s))return t;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)t++;return t}if(o.content.size||s.content.size){let i=e0(o.content,s.content,t+1);if(i!=null)return i}t+=o.nodeSize}}function t0(n,e,t,r){for(let o=n.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:t,b:r};let i=n.child(--o),l=e.child(--s),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let u=0,d=Math.min(i.text.length,l.text.length);for(;u<d&&i.text[i.text.length-u-1]==l.text[l.text.length-u-1];)u++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let u=t0(i.content,l.content,t-1,r-1);if(u)return u}t-=a,r-=a}}class fe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,s){for(let i=0,l=0;l<t;i++){let a=this.content[i],u=l+a.nodeSize;if(u>e&&r(a,o+l,s||null,i)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,t-d),r,o+d)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let s="",i=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(s+=l.text.slice(Math.max(e,a)-a,t-a),i=!r):l.isLeaf?(o?s+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(s+=l.type.spec.leafText(l)),i=!r):!i&&l.isBlock&&(s+=r,i=!0)},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new fe(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let s=0,i=0;i<t;s++){let l=this.content[s],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),o+=l.nodeSize),i=a}return new fe(r,o)}cutByIndex(e,t){return e==t?fe.empty:e==0&&t==this.content.length?this:new fe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new fe(o,s)}addToStart(e){return new fe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new fe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return e0(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return t0(this,e,t,r)}findIndex(e,t=-1){if(e==0)return oi(0,e);if(e==this.size)return oi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),i=o+s.nodeSize;if(i>=e)return i==e||t>0?oi(r+1,i):oi(r,o);o=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,t){if(!t)return fe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new fe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return fe.empty;let t,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(t||(t=e.slice(0,o)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new fe(t||e,r)}static from(e){if(!e)return fe.empty;if(e instanceof fe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new fe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}fe.empty=new fe([],0);const Al={index:0,offset:0};function oi(n,e){return Al.index=n,Al.offset=e,Al}function Li(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Li(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Li(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let We=class gc{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return gc.none;if(e instanceof gc)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};We.none=[];class Di extends Error{}class we{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=r0(this.content,e+this.openStart,t);return r&&new we(r,this.openStart,this.openEnd)}removeBetween(e,t){return new we(n0(this.content,e+this.openStart,t+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,t){if(!t)return we.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new we(fe.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)o++;return new we(e,r,o)}}we.empty=new we(fe.empty,0,0);function n0(n,e,t){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(o==e||s.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(n0(s.content,e-o-1,t-o-1)))}function r0(n,e,t,r){let{index:o,offset:s}=n.findIndex(e),i=n.maybeChild(o);if(s==e||i.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=r0(i.content,e-s-1,t);return l&&n.replaceChild(o,i.copy(l))}function v9(n,e,t){if(t.openStart>n.depth)throw new Di("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Di("Inconsistent open depths");return o0(n,e,t,0)}function o0(n,e,t,r){let o=n.index(r),s=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let i=o0(n,e,t,r+1);return s.copy(s.content.replaceChild(o,i))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let i=n.parent,l=i.content;return Wr(i,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:i,end:l}=y9(t,n);return Wr(s,i0(n,i,l,e,r))}else return Wr(s,Ri(n,e,r))}function s0(n,e){if(!e.type.compatibleContent(n.type))throw new Di("Cannot join "+e.type.name+" onto "+n.type.name)}function vc(n,e,t){let r=n.node(t);return s0(r,e.node(t)),r}function jr(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function fs(n,e,t,r){let o=(e||n).node(t),s=0,i=e?e.index(t):o.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(jr(n.nodeAfter,r),s++));for(let l=s;l<i;l++)jr(o.child(l),r);e&&e.depth==t&&e.textOffset&&jr(e.nodeBefore,r)}function Wr(n,e){return n.type.checkContent(e),n.copy(e)}function i0(n,e,t,r,o){let s=n.depth>o&&vc(n,e,o+1),i=r.depth>o&&vc(t,r,o+1),l=[];return fs(null,n,o,l),s&&i&&e.index(o)==t.index(o)?(s0(s,i),jr(Wr(s,i0(n,e,t,r,o+1)),l)):(s&&jr(Wr(s,Ri(n,e,o+1)),l),fs(e,t,o,l),i&&jr(Wr(i,Ri(t,r,o+1)),l)),fs(r,null,o,l),new fe(l)}function Ri(n,e,t){let r=[];if(fs(null,n,t,r),n.depth>t){let o=vc(n,e,t+1);jr(Wr(o,Ri(n,e,t+1)),r)}return fs(e,null,t,r),new fe(r)}function y9(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)o=e.node(s).copy(fe.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Ss{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return We.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let s=r.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!o||!s[i].isInSet(o.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Bi(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,s=t;for(let i=e;;){let{index:l,offset:a}=i.content.findIndex(s),u=s-a;if(r.push(i,l,o+a),!u||(i=i.child(l),i.isText))break;s=u-1,o+=a+1}return new Ss(t,r,s)}static resolveCached(e,t){for(let o=0;o<bl.length;o++){let s=bl[o];if(s.pos==t&&s.doc==e)return s}let r=bl[wl]=Ss.resolve(e,t);return wl=(wl+1)%E9,r}}let bl=[],wl=0,E9=12;class Bi{constructor(e,t,r){this.$from=e,this.$to=t,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 C9=Object.create(null);let Kr=class yc{constructor(e,t,r,o=We.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||fe.empty}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,t,r,o=0){this.content.nodesBetween(e,t,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,t,r,o){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Li(this.attrs,t||e.defaultAttrs||C9)&&We.sameSet(this.marks,r||We.none)}copy(e=null){return e==this.content?this:new yc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yc(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return we.empty;let o=this.resolve(e),s=this.resolve(t),i=r?0:o.sharedDepth(t),l=o.start(i),u=o.node(i).content.cut(o.pos-l,s.pos-l);return new we(u,o.depth-i,s.depth-i)}replace(e,t,r){return v9(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return Ss.resolveCached(this,e)}resolveNoCache(e){return Ss.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.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()+")"),a0(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=fe.empty,o=0,s=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,o,s),l=i&&i.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),i=s&&s.matchFragment(this.content,t);return i?i.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);let e=We.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!We.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=fe.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};Kr.prototype.text=void 0;class Pi extends Kr{constructor(e,t,r,o){if(super(e,t,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):a0(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Pi(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function a0(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Xr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new A9(e,t);if(r.next==null)return Xr.empty;let o=l0(r);r.next&&r.err("Unexpected trailing text");let s=x9(_9(o));return N9(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let s=t;o&&s<r;s++)o=o.matchType(e.child(s).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function s(i,l){let a=i.matchFragment(e,r);if(a&&(!t||a.validEnd))return fe.from(l.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:d,next:f}=i.next[u];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=s(f,l.concat(d));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let i=[];for(let l=o;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:l,next:a}=s.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.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 t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)s+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return s}).join(`
63
- `)}}Xr.empty=new Xr(!0);class A9{constructor(e,t){this.string=e,this.nodeTypes=t,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 l0(n){let e=[];do e.push(b9(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function b9(n){let e=[];do e.push(w9(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function w9(n){let e=k9(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=T9(n,e);else break;return e}function qd(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function T9(n,e){let t=qd(n),r=t;return n.eat(",")&&(n.next!="}"?r=qd(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function S9(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let s in t){let i=t[s];i.groups.indexOf(e)>-1&&o.push(i)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function k9(n){if(n.eat("(")){let e=l0(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=S9(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function _9(n){let e=[[]];return o(s(n,0),t()),e;function t(){return e.push([])-1}function r(i,l,a){let u={term:a,to:l};return e[i].push(u),u}function o(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(i.type=="seq")for(let a=0;;a++){let u=s(i.exprs[a],l);if(a==i.exprs.length-1)return u;o(u,l=t())}else if(i.type=="star"){let a=t();return r(l,a),o(s(i.expr,a),a),[r(a)]}else if(i.type=="plus"){let a=t();return o(s(i.expr,l),a),o(s(i.expr,a),a),[r(a)]}else{if(i.type=="opt")return[r(l)].concat(s(i.expr,l));if(i.type=="range"){let a=l;for(let u=0;u<i.min;u++){let d=t();o(s(i.expr,a),d),a=d}if(i.max==-1)o(s(i.expr,a),a);else for(let u=i.min;u<i.max;u++){let d=t();r(a,d),o(s(i.expr,a),d),a=d}return[r(a)]}else{if(i.type=="name")return[r(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function c0(n,e){return e-n}function ef(n,e){let t=[];return r(e),t.sort(c0);function r(o){let s=n[o];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(o);for(let i=0;i<s.length;i++){let{term:l,to:a}=s[i];!l&&t.indexOf(a)==-1&&r(a)}}}function x9(n){let e=Object.create(null);return t(ef(n,0));function t(r){let o=[];r.forEach(i=>{n[i].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let d=0;d<o.length;d++)o[d][0]==l&&(u=o[d][1]);ef(n,a).forEach(d=>{u||o.push([l,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let s=e[r.join(",")]=new Xr(r.indexOf(n.length-1)>-1);for(let i=0;i<o.length;i++){let l=o[i][1].sort(c0);s.next.push({type:o[i][0],next:e[l.join(",")]||t(l)})}return s}}function N9(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],s=!o.validEnd,i=[];for(let l=0;l<o.next.length;l++){let{type:a,next:u}=o.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function u0(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function d0(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let s=n[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function f0(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new I9(n[t]);return e}let tf=class h0{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=f0(r.attrs),this.defaultAttrs=u0(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==Xr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:d0(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Kr(this,this.computeAttrs(e),fe.from(t),We.setFrom(r))}createChecked(e=null,t,r){return t=fe.from(t),this.checkContent(t),new Kr(this,this.computeAttrs(e),t,We.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=fe.from(t),t.size){let i=this.contentMatch.fillBefore(t);if(!i)return null;t=i.append(t)}let o=this.contentMatch.matchFragment(t),s=o&&o.fillBefore(fe.empty,!0);return s?new Kr(this,e,t.append(s),We.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:We.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,i)=>r[s]=new h0(s,t,i));let o=t.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 s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class I9{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class za{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=f0(o.attrs),this.excluded=null;let s=u0(this.attrs);this.instance=s?new We(this,s):null}create(e=null){return!e&&this.instance?this.instance:new We(this,d0(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new za(s,o++,t,i)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class M9{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=ht.from(e.nodes),t.marks=ht.from(e.marks||{}),this.nodes=tf.compile(this.spec.nodes,this),this.marks=za.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 s=this.nodes[o],i=s.spec.content||"",l=s.spec.marks;s.contentMatch=r[i]||(r[i]=Xr.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=l=="_"?null:l?nf(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:nf(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof tf){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(t,r,o)}text(e,t){let r=this.nodes.text;return new Pi(r,r.defaultAttrs,e,We.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Kr.fromJSON(this,e)}markFromJSON(e){return We.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function nf(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],s=n.marks[o],i=s;if(s)t.push(s);else for(let l in n.marks){let a=n.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&t.push(i=a)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Lo{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new of(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new of(this,t,!0);return r.addAll(e,t.from,t.to),we.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(D9(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,t,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let t=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<t.length;i++){let l=t[i];if((l.priority==null?50:l.priority)<s)break}t.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=sf(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=sf(i)),i.node||i.ignore||i.mark||(i.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Lo(e,Lo.schemaRules(e)))}}const p0={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},O9={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},m0={ol:!0,ul:!0},Fi=1,Vi=2,hs=4;function rf(n,e,t){return e!=null?(e?Fi:0)|(e==="full"?Vi:0):n&&n.whitespace=="pre"?Fi|Vi:t&~hs}class si{constructor(e,t,r,o,s,i,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=s,this.options=l,this.content=[],this.activeMarks=We.none,this.stashMarks=[],this.match=i||(l&hs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(fe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);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&Fi)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let t=fe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(fe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):B9(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!p0.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class of{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,s,i=rf(null,t.preserveWhitespace,0)|(r?hs:0);o?s=new si(o.type,o.attrs,We.none,We.none,!0,t.topMatch||o.type.contentMatch,i):r?s=new si(null,null,We.none,We.none,!0,null,i):s=new si(e.schema.topNodeType,null,We.none,We.none,!0,null,i),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let o=this.readStyles(R9(r));if(!o)return;let[s,i]=o,l=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a]);t();for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Vi||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Fi)r.options&Vi?t=t.replace(/\r\n?/g,`
64
- `):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o;m0.hasOwnProperty(r)&&this.parser.normalizeLists&&L9(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(s?s.ignore:O9.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let i,l=this.top,a=this.needsBlock;if(p0.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),i=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),i&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
65
- `))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=We.none,r=We.none;for(let o=0;o<e.length;o+=2)for(let s=void 0;;){let i=this.parser.matchStyle(e[o],e[o+1],this,s);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{i.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),i.consuming===!1)s=i;else break}return[t,r]}addElementByRule(e,t,r){let o,s,i;t.node?(s=this.parser.schema.nodes[t.node],s.isLeaf?this.insertNode(s.create(t.attrs))||this.leafFallback(e):o=this.enter(s,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,i&&this.removePendingMark(i,l)}addAll(e,t,r){let o=t||0;for(let s=t?e.childNodes[t]:e.firstChild,i=r==null?null:e.childNodes[r];s!=i;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let s=this.nodes[o],i=s.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,r=s,!i.length)||s.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let i=rf(e,o,s.options);s.options&hs&&s.content.length==0&&(i|=hs),this.nodes.push(new si(e,t,s.activeMarks,s.pendingMarks,r,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&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)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(l,a)=>{for(;l>=0;l--){let u=t[l];if(u==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!d||d.name!=u&&d.groups.indexOf(u)==-1)return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=P9(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let i=o.popFromStashMark(e);i&&o.type&&o.type.allowsMarkType(i.type)&&(o.activeMarks=i.addToSet(o.activeMarks))}if(o==t)break}}}function L9(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&m0.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function D9(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function R9(n){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,t,r=[];for(;t=e.exec(n);)r.push(t[1],t[2].trim());return r}function sf(n){let e={};for(let t in n)e[t]=n[t];return e}function B9(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:d}=l.edge(a);if(u==e||s.indexOf(d)<0&&i(d))return!0}};if(i(o.contentMatch))return!0}}function P9(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class Sn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Tl(t).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let u=i.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)o=s.pop()[1];for(;a<i.marks.length;){let u=i.marks[a++],d=this.serializeMark(u,i.isInline,t);d&&(s.push([u,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(i,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=Sn.renderSpec(Tl(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&Sn.renderSpec(Tl(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let i,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let d in a)if(a[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),a[d]):l.setAttribute(d,a[d])}}for(let d=u;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Sn.renderSpec(e,f,r);if(l.appendChild(h),p){if(i)throw new RangeError("Multiple content holes");i=p}}}return{dom:l,contentDOM:i}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Sn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=af(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return af(e.marks)}}function af(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Tl(n){return n.document||window.document}const g0=65535,v0=Math.pow(2,16);function F9(n,e){return n+e*v0}function lf(n){return n&g0}function V9(n){return(n-(n&g0))/v0}const y0=1,E0=2,Ai=4,C0=8;class Ec{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&C0)>0}get deletedBefore(){return(this.delInfo&(y0|Ai))>0}get deletedAfter(){return(this.delInfo&(E0|Ai))>0}get deletedAcross(){return(this.delInfo&Ai)>0}}class $t{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&$t.empty)return $t.empty}recover(e){let t=0,r=lf(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+V9(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let u=this.ranges[l+s],d=this.ranges[l+i],f=a+u;if(e<=f){let h=u?e==a?-1:e==f?1:t:t,p=a+o+(h<0?0:d);if(r)return p;let m=e==(t<0?a:f)?null:F9(l/3,e-a),g=e==a?E0:e==f?y0:Ai;return(t<0?e!=a:e!=f)&&(g|=C0),new Ec(p,g,m)}o+=d-u}return r?e+o:new Ec(e+o,0,null)}touches(e,t){let r=0,o=lf(t),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+s],d=a+u;if(e<=d&&l==o*3)return!0;r+=this.ranges[l+i]-u}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),u=this.ranges[o+t],d=this.ranges[o+r];e(l,l+u,a,a+d),s+=d-u}}invert(){return new $t(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?$t.empty:new $t(e<0?[0,-e,0]:[0,0,e])}}$t.empty=new $t([]);class ps{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new ps(this.maps,this.mirror,e,t)}copy(){return new ps(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new ps;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],l=i.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new Ec(e,o,null)}}const Sl=Object.create(null);class Et{getMap(){return $t.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Sl[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Sl)throw new RangeError("Duplicate use of step JSON ID "+e);return Sl[e]=t,t.prototype.jsonID=e,t}}class ot{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ot(e,null)}static fail(e){return new ot(null,e)}static fromReplace(e,t,r,o){try{return ot.ok(e.replace(t,r,o))}catch(s){if(s instanceof Di)return ot.fail(s.message);throw s}}}function Iu(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let s=n.child(o);s.content.size&&(s=s.copy(Iu(s.content,e,s))),s.isInline&&(s=e(s,t,o)),r.push(s)}return fe.fromArray(r)}class lr extends Et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new we(Iu(t.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),t.openStart,t.openEnd);return ot.fromReplace(e,this.from,this.to,s)}invert(){return new kn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new lr(t.pos,r.pos,this.mark)}merge(e){return e instanceof lr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new lr(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new lr(t.from,t.to,e.markFromJSON(t.mark))}}Et.jsonID("addMark",lr);class kn extends Et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new we(Iu(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return ot.fromReplace(e,this.from,this.to,r)}invert(){return new lr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new kn(t.pos,r.pos,this.mark)}merge(e){return e instanceof kn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new kn(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new kn(t.from,t.to,e.markFromJSON(t.mark))}}Et.jsonID("removeMark",kn);class cr extends Et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new cr(this.pos,t.marks[o]);return new cr(this.pos,this.mark)}}return new Do(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new cr(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new cr(t.pos,e.markFromJSON(t.mark))}}Et.jsonID("addNodeMark",cr);class Do extends Et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new cr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Do(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Do(t.pos,e.markFromJSON(t.mark))}}Et.jsonID("removeNodeMark",Do);class pt extends Et{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&Cc(e,this.from,this.to)?ot.fail("Structure replace would overwrite content"):ot.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new $t([this.from,this.to-this.from,this.slice.size])}invert(e){return new pt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new pt(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof pt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?we.empty:new we(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new pt(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?we.empty:new we(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new pt(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new pt(t.from,t.to,we.fromJSON(e,t.slice),!!t.structure)}}Et.jsonID("replace",pt);class ut extends Et{constructor(e,t,r,o,s,i,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=l}apply(e){if(this.structure&&(Cc(e,this.from,this.gapFrom)||Cc(e,this.gapTo,this.to)))return ot.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ot.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?ot.fromReplace(e,this.from,this.to,r):ot.fail("Content does not fit in gap")}getMap(){return new $t([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ut(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),s=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||s>r.pos?null:new ut(t.pos,r.pos,o,s,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ut(t.from,t.to,t.gapFrom,t.gapTo,we.fromJSON(e,t.slice),t.insert,!!t.structure)}}Et.jsonID("replaceAround",ut);function Cc(n,e,t){let r=n.resolve(e),o=t-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function $9(n,e,t,r){let o=[],s=[],i,l;n.doc.nodesBetween(e,t,(a,u,d)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+a.nodeSize,t),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(i&&i.to==h&&i.mark.eq(f[g])?i.to=p:o.push(i=new kn(h,p,f[g])));l&&l.to==h?l.to=p:s.push(l=new lr(h,p,r))}}),o.forEach(a=>n.step(a)),s.forEach(a=>n.step(a))}function z9(n,e,t,r){let o=[],s=0;n.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(r instanceof za){let u=i.marks,d;for(;d=r.isInSet(u);)(a||(a=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(i.marks)&&(a=[r]):a=i.marks;if(a&&a.length){let u=Math.min(l+i.nodeSize,t);for(let d=0;d<a.length;d++){let f=a[d],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==s-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=u,h.step=s):o.push({style:f,from:Math.max(l,e),to:u,step:s})}}}),o.forEach(i=>n.step(new kn(i.from,i.to,i.style)))}function U9(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),s=[],i=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),u=i+a.nodeSize,d=r.matchType(a.type);if(!d)s.push(new pt(i,u,we.empty));else{r=d;for(let f=0;f<a.marks.length;f++)t.allowsMarkType(a.marks[f].type)||n.step(new kn(i,u,a.marks[f]));if(a.isText&&!t.spec.code){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(a.text);)p||(p=new we(fe.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),s.push(new pt(i+f.index,i+f.index+f[0].length,p))}}i=u}if(!r.validEnd){let l=r.fillBefore(fe.empty,!0);n.replace(i,i,new we(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function H9(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Zo(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),s=n.$from.index(r),i=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(s,i,t))return r;if(r==0||o.type.spec.isolating||!H9(o,s,i))break}return null}function j9(n,e,t){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),l=o.after(s+1),a=i,u=l,d=fe.empty,f=0;for(let m=s,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,d=fe.from(r.node(m).copy(d)),f++):a--;let h=fe.empty,p=0;for(let m=s,g=!1;m>t;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=fe.from(o.node(m).copy(h)),p++):u++;n.step(new ut(a,u,i,l,new we(d.append(h),f,p),d.size-f,!0))}function Mu(n,e,t=null,r=n){let o=W9(n,e),s=o&&K9(r,e);return s?o.map(cf).concat({type:e,attrs:t}).concat(s.map(cf)):null}function cf(n){return{type:n,attrs:null}}function W9(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return t.canReplaceWith(r,o,i)?s:null}function K9(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:e).contentMatch;for(let u=r;a&&u<o;u++)a=a.matchType(t.child(u).type);return!a||!a.validEnd?null:i}function Y9(n,e,t){let r=fe.empty;for(let i=t.length-1;i>=0;i--){if(r.size){let l=t[i].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=fe.from(t[i].type.create(t[i].attrs,r))}let o=e.start,s=e.end;n.step(new ut(o,s,o,s,new we(r,0,0),t.length,!0))}function G9(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(i,l)=>{if(i.isTextblock&&!i.hasMarkup(r,o)&&Q9(n.doc,n.mapping.slice(s).map(l),r)){n.clearIncompatible(n.mapping.slice(s).map(l,1),r);let a=n.mapping.slice(s),u=a.map(l,1),d=a.map(l+i.nodeSize,1);return n.step(new ut(u,d,u+1,d-1,new we(fe.from(r.create(o,null,i.marks)),0,0),1,!0)),!1}})}function Q9(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Z9(n,e,t,r,o){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let i=t.create(r,null,o||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,i);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new ut(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new we(fe.from(i),0,0),1,!0))}function Io(n,e,t=1,r){let o=n.resolve(e),s=o.depth-t,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,d=t-2;u>s;u--,d--){let f=o.node(u),h=o.index(u);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[d+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[d]||f;if(!f.canReplace(h+1,f.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(s),a=r&&r[0];return o.node(s).canReplaceWith(l,l,a?a.type:o.node(s+1).type)}function J9(n,e,t=1,r){let o=n.doc.resolve(e),s=fe.empty,i=fe.empty;for(let l=o.depth,a=o.depth-t,u=t-1;l>a;l--,u--){s=fe.from(o.node(l).copy(s));let d=r&&r[u];i=fe.from(d?d.type.create(d.attrs,i):o.node(l).copy(i))}n.step(new pt(e,e,new we(s.append(i),t,t),!0))}function Cr(n,e){let t=n.resolve(e),r=t.index();return A0(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function A0(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Ua(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let s,i,l=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):t>0?(s=r.node(o+1),l++,i=r.node(o).maybeChild(l)):(s=r.node(o).maybeChild(l-1),i=r.node(o+1)),s&&!s.isTextblock&&A0(s,i)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function X9(n,e,t){let r=new pt(e-t,e+t,we.empty,!0);n.step(r)}function q9(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,t))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,t))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function eE(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let s=0;s<t.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let i=r.depth;i>=0;i--){let l=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,a=r.index(i)+(l>0?1:0),u=r.node(i),d=!1;if(s==1)d=u.canReplace(a,a,o);else{let f=u.contentMatchAt(a).findWrapping(o.firstChild.type);d=f&&u.canReplaceWith(a,a,f[0])}if(d)return l==0?r.pos:l<0?r.before(i+1):r.after(i+1)}return null}function Ou(n,e,t=e,r=we.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),s=n.resolve(t);return b0(o,s,r)?new pt(e,t,r):new tE(o,s,r).fit()}function b0(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class tE{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=fe.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=fe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=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 s=this.placed,i=r.depth,l=o.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new we(s,i,l);return e>-1?new ut(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new pt(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=t.firstChild;if(t.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=kl(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],d,f=null;if(t==1&&(i?u.matchType(i.type)||(f=u.fillBefore(fe.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:f};if(t==2&&i&&(d=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:d};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=kl(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new we(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=kl(e,t);if(o.childCount<=1&&t>0){let s=e.size-t<=t+o.size;this.unplaced=new we(ls(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new we(ls(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let g=0;g<s.length;g++)this.openFrontierNode(s[g]);let i=this.unplaced,l=r?r.content:i.content,a=i.openStart-e,u=0,d=[],{match:f,type:h}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)d.push(o.child(g));f=f.matchFragment(o)}let p=l.size+e-(i.content.size-i.openEnd);for(;u<l.childCount;){let g=l.child(u),v=f.matchType(g.type);if(!v)break;u++,(u>1||a==0||g.content.size)&&(f=v,d.push(w0(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let m=u==l.childCount;m||(p=-1),this.placed=cs(this.placed,t,fe.from(d)),this.frontier[t].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=l;g<p;g++){let C=v.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),v=C.content}this.unplaced=m?e==0?we.empty:new we(ls(i.content,e-1,1),e-1,p<0?i.openEnd:e-1):new we(ls(i.content,e,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!_l(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.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 t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=_l(e,t,o,r,s);if(i){for(let l=t-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],d=_l(e,l,u,a,!0);if(!d||d.childCount)continue e}return{depth:t,fit:i,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=cs(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=cs(this.placed,this.depth,fe.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(fe.empty,!0);t.childCount&&(this.placed=cs(this.placed,this.frontier.length,t))}}function ls(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(ls(n.firstChild.content,e-1,t)))}function cs(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(cs(n.lastChild.content,e-1,t)))}function kl(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function w0(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,w0(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(fe.empty,!0)))),n.copy(r)}function _l(n,e,t,r,o){let s=n.node(e),i=o?n.indexAfter(e):n.index(e);if(i==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,i);return l&&!nE(t,s.content,i)?l:null}function nE(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function rE(n){return n.spec.defining||n.spec.definingForContent}function oE(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),s=n.doc.resolve(t);if(b0(o,s,r))return n.step(new pt(e,t,r));let i=S0(o,n.doc.resolve(t));i[i.length-1]==0&&i.pop();let l=-(o.depth+1);i.unshift(l);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;i.indexOf(h)>-1?l=h:o.before(h)==p&&i.splice(1,0,-h)}let a=i.indexOf(l),u=[],d=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(u.push(m),p==r.openStart)break;h=m.content}for(let h=d-1;h>=0;h--){let p=u[h],m=rE(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(l)-1)))d=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+d+1)%(r.openStart+1),m=u[p];if(m)for(let g=0;g<i.length;g++){let v=i[(g+a)%i.length],C=!0;v<0&&(C=!1,v=-v);let b=o.node(v-1),E=o.index(v-1);if(b.canReplaceWith(E,E,m.type,m.marks))return n.replace(o.before(v),C?s.after(v):t,new we(T0(r.content,0,r.openStart,p),p,r.openEnd))}}let f=n.steps.length;for(let h=i.length-1;h>=0&&(n.replace(e,t,r),!(n.steps.length>f));h--){let p=i[h];p<0||(e=o.before(p),t=s.after(p))}}function T0(n,e,t,r,o){if(e<t){let s=n.firstChild;n=n.replaceChild(0,s.copy(T0(s.content,e+1,t,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(n).append(n);n=i.append(s.matchFragment(i).fillBefore(fe.empty,!0))}return n}function sE(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=q9(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new we(fe.from(r),0,0))}function iE(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),s=S0(r,o);for(let i=0;i<s.length;i++){let l=s[i],a=i==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&t>r.end(i)&&o.end(i)-t!=o.depth-i)return n.delete(r.before(i),t);n.delete(e,t)}function S0(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let s=n.start(o);if(s<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&t.push(o)}return t}class Mo extends Et{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(o),0,t.isLeaf?0:1))}getMap(){return $t.empty}invert(e){return new Mo(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Mo(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Mo(t.pos,t.attr,t.value)}}Et.jsonID("attr",Mo);class ks extends Et{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return ot.ok(r)}getMap(){return $t.empty}invert(e){return new ks(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ks(t.attr,t.value)}}Et.jsonID("docAttr",ks);let Ro=class extends Error{};Ro=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Ro.prototype=Object.create(Error.prototype);Ro.prototype.constructor=Ro;Ro.prototype.name="TransformError";class k0{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ps}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ro(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=we.empty){let o=Ou(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new we(fe.from(r),0,0))}delete(e,t){return this.replace(e,t,we.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return oE(this,e,t,r),this}replaceRangeWith(e,t,r){return sE(this,e,t,r),this}deleteRange(e,t){return iE(this,e,t),this}lift(e,t){return j9(this,e,t),this}join(e,t=1){return X9(this,e,t),this}wrap(e,t){return Y9(this,e,t),this}setBlockType(e,t=e,r,o=null){return G9(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Z9(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new Mo(e,t,r)),this}setDocAttribute(e,t){return this.step(new ks(e,t)),this}addNodeMark(e,t){return this.step(new cr(e,t)),this}removeNodeMark(e,t){if(!(t instanceof We)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Do(e,t)),this}split(e,t=1,r){return J9(this,e,t,r),this}addMark(e,t,r){return $9(this,e,t,r),this}removeMark(e,t,r){return z9(this,e,t,r),this}clearIncompatible(e,t,r){return U9(this,e,t,r),this}}const xl=Object.create(null);class $e{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new aE(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=we.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:u}=i[l],d=e.mapping.slice(s);e.replaceRange(d.map(a.pos),d.map(u.pos),l?we.empty:t),l==0&&ff(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:l}=o[s],a=e.mapping.slice(r),u=a.map(i.pos),d=a.map(l.pos);s?e.deleteRange(u,d):(e.replaceRangeWith(u,d,t),ff(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new Ue(e):vo(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=t<0?vo(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):vo(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new dn(e.node(0))}static atStart(e){return vo(e,e,0,0,1)||new dn(e)}static atEnd(e){return vo(e,e,e.content.size,e.childCount,-1)||new dn(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=xl[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in xl)throw new RangeError("Duplicate use of selection JSON ID "+e);return xl[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ue.between(this.$anchor,this.$head).getBookmark()}}$e.prototype.visible=!0;class aE{constructor(e,t){this.$from=e,this.$to=t}}let uf=!1;function df(n){!uf&&!n.parent.inlineContent&&(uf=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Ue extends $e{constructor(e,t=e){df(e),df(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return $e.near(r);let o=e.resolve(t.map(this.anchor));return new Ue(o.parent.inlineContent?o:r,r)}replace(e,t=we.empty){if(super.replace(e,t),t==we.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ue&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ha(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ue(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let s=$e.findFrom(t,r,!0)||$e.findFrom(t,-r,!0);if(s)t=s.$head;else return $e.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=($e.findFrom(e,-r,!0)||$e.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new Ue(e,t)}}$e.jsonID("text",Ue);class Ha{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ha(e.map(this.anchor),e.map(this.head))}resolve(e){return Ue.between(e.resolve(this.anchor),e.resolve(this.head))}}class Le extends $e{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),s=e.resolve(o);return r?$e.near(s):new Le(s)}content(){return new we(fe.from(this.node),0,0)}eq(e){return e instanceof Le&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Lu(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Le(e.resolve(t.anchor))}static create(e,t){return new Le(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Le.prototype.visible=!1;$e.jsonID("node",Le);class Lu{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Ha(r,r):new Lu(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Le.isSelectable(r)?new Le(t):$e.near(t)}}class dn extends $e{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=we.empty){if(t==we.empty){e.delete(0,e.doc.content.size);let r=$e.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new dn(e)}map(e){return new dn(e)}eq(e){return e instanceof dn}getBookmark(){return lE}}$e.jsonID("all",dn);const lE={map(){return this},resolve(n){return new dn(n)}};function vo(n,e,t,r,o,s=!1){if(e.inlineContent)return Ue.create(n,t);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let l=e.child(i);if(l.isAtom){if(!s&&Le.isSelectable(l))return Le.create(n,t-(o<0?l.nodeSize:0))}else{let a=vo(n,l,t+o,o<0?l.childCount:0,o,s);if(a)return a}t+=l.nodeSize*o}return null}function ff(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof pt||o instanceof ut))return;let s=n.mapping.maps[r],i;s.forEach((l,a,u,d)=>{i==null&&(i=d)}),n.setSelection($e.near(n.doc.resolve(i),t))}const hf=1,ii=2,pf=4;class cE extends k0{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|hf)&~ii,this.storedMarks=null,this}get selectionSet(){return(this.updated&hf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ii,this}ensureMarks(e){return We.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&ii)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~ii,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||We.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let i=this.doc.resolve(t);s=r==t?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,s)),this.selection.empty||this.setSelection($e.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=pf,this}get scrolledIntoView(){return(this.updated&pf)>0}}function mf(n,e){return!e||!n?n:n.bind(e)}class us{constructor(e,t,r){this.name=e,this.init=mf(t.init,r),this.apply=mf(t.apply,r)}}const uE=[new us("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new us("selection",{init(n,e){return n.selection||$e.atStart(e.doc)},apply(n){return n.selection}}),new us("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new us("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Nl{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=uE.slice(),t&&t.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 us(r.key,r.spec.state,r))})}}class ko{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,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){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 t=[e],r=this.applyInner(e),o=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let l=this.config.plugins[i];if(l.spec.appendTransaction){let a=o?o[i].n:0,u=o?o[i].state:this,d=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,u,r);if(d&&r.filterTransaction(d,i)){if(d.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<i?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),s=!0}o&&(o[i]={state:r,n:t.length})}}if(!s)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new ko(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let s=r[o];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new cE(this)}static create(e){let t=new Nl(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ko(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new Nl(this.schema,e.plugins),r=t.fields,o=new ko(t);for(let s=0;s<r.length;s++){let i=r[s].name;o[i]=this.hasOwnProperty(i)?this[i]:r[s].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.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],s=o.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Nl(e.schema,e.plugins),s=new ko(o);return o.fields.forEach(i=>{if(i.name=="doc")s.doc=Kr.fromJSON(e.schema,t.doc);else if(i.name=="selection")s.selection=$e.fromJSON(s.doc,t.selection);else if(i.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[i.name]=u.fromJSON.call(a,e,t[l],s);return}}s[i.name]=i.init(e,s)}}),s}}function _0(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=_0(o,e,{})),t[r]=o}return t}class Ft{constructor(e){this.spec=e,this.props={},e.props&&_0(e.props,this,this.props),this.key=e.key?e.key.key:x0("plugin")}getState(e){return e[this.key]}}const Il=Object.create(null);function x0(n){return n in Il?n+"$"+ ++Il[n]:(Il[n]=0,n+"$")}class gn{constructor(e="key"){this.key=x0(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const kt=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},_s=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let gf=null;const $n=function(n,e,t){let r=gf||(gf=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},qr=function(n,e,t,r){return t&&(vf(n,e,t,r,-1)||vf(n,e,t,r,1))},dE=/^(img|br|input|textarea|hr)$/i;function vf(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Tn(n))){let s=n.parentNode;if(!s||s.nodeType!=1||Du(n)||dE.test(n.nodeName)||n.contentEditable=="false")return!1;e=kt(n)+(o<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Tn(n):0}else return!1}}function Tn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function fE(n,e,t){for(let r=e==0,o=e==Tn(n);r||o;){if(n==t)return!0;let s=kt(n);if(n=n.parentNode,!n)return!1;r=r&&s==0,o=o&&s==Tn(n)}}function Du(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const ja=function(n){return n.focusNode&&qr(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Rr(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function hE(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pE(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}}const In=typeof navigator<"u"?navigator:null,yf=typeof document<"u"?document:null,Ar=In&&In.userAgent||"",Ac=/Edge\/(\d+)/.exec(Ar),N0=/MSIE \d/.exec(Ar),bc=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ar),Pt=!!(N0||bc||Ac),dr=N0?document.documentMode:bc?+bc[1]:Ac?+Ac[1]:0,pn=!Pt&&/gecko\/(\d+)/i.test(Ar);pn&&+(/Firefox\/(\d+)/.exec(Ar)||[0,0])[1];const wc=!Pt&&/Chrome\/(\d+)/.exec(Ar),vt=!!wc,mE=wc?+wc[1]:0,Nt=!Pt&&!!In&&/Apple Computer/.test(In.vendor),Bo=Nt&&(/Mobile\/\w+/.test(Ar)||!!In&&In.maxTouchPoints>2),qt=Bo||(In?/Mac/.test(In.platform):!1),gE=In?/Win/.test(In.platform):!1,cn=/Android \d/.test(Ar),js=!!yf&&"webkitFontSmoothing"in yf.documentElement.style,vE=js?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function yE(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Bn(n,e){return typeof n=="number"?n:n[e]}function EE(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ef(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let i=t||n.dom;i;i=_s(i)){if(i.nodeType!=1)continue;let l=i,a=l==s.body,u=a?yE(s):EE(l),d=0,f=0;if(e.top<u.top+Bn(r,"top")?f=-(u.top-e.top+Bn(o,"top")):e.bottom>u.bottom-Bn(r,"bottom")&&(f=e.bottom-e.top>u.bottom-u.top?e.top+Bn(o,"top")-u.top:e.bottom-u.bottom+Bn(o,"bottom")),e.left<u.left+Bn(r,"left")?d=-(u.left-e.left+Bn(o,"left")):e.right>u.right-Bn(r,"right")&&(d=e.right-u.right+Bn(o,"right")),d||f)if(a)s.defaultView.scrollBy(d,f);else{let h=l.scrollLeft,p=l.scrollTop;f&&(l.scrollTop+=f),d&&(l.scrollLeft+=d);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function CE(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let s=(e.left+e.right)/2,i=t+1;i<Math.min(innerHeight,e.bottom);i+=5){let l=n.root.elementFromPoint(s,i);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:I0(n.dom)}}function I0(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=_s(r));return e}function AE({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;M0(t,r==0?0:r-e)}function M0(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:s}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let uo=null;function bE(n){if(n.setActive)return n.setActive();if(uo)return n.focus(uo);let e=I0(n);n.focus(uo==null?{get preventScroll(){return uo={preventScroll:!0},!0}}:void 0),uo||(uo=!1,M0(e,0))}function O0(n,e){let t,r=2e8,o,s=0,i=e.top,l=e.top,a,u;for(let d=n.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=$n(d).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=i&&m.bottom>=l){i=Math.max(m.bottom,i),l=Math.min(m.top,l);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){t=d,r=g,o=g&&t.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,d.nodeType==1&&g&&(s=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=d,u={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!t&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(s=f+1)}}return!t&&a&&(t=a,o=u,r=0),t&&t.nodeType==3?wE(t,o):!t||r&&t.nodeType==1?{node:n,offset:s}:O0(t,o)}function wE(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let s=rr(r,1);if(s.top!=s.bottom&&Ru(e,s))return{node:n,offset:o+(e.left>=(s.left+s.right)/2?1:0)}}return{node:n,offset:0}}function Ru(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function TE(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function SE(n,e,t){let{node:r,offset:o}=O0(e,t),s=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();s=i.left!=i.right&&t.left>(i.left+i.right)/2?1:-1}return n.docView.posFromDOM(r,o,s)}function kE(n,e,t,r){let o=-1;for(let s=e,i=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!i||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!i&&(i=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(o=l.posAfter)),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}s=l.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function L0(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),s=o;;){let i=n.childNodes[s];if(i.nodeType==1){let l=i.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(Ru(e,u))return L0(i,e,u)}}if((s=(s+1)%r)==o)break}return n}function _E(n,e){let t=n.dom.ownerDocument,r,o=0,s=pE(t,e.left,e.top);s&&({node:r,offset:o}=s);let i=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!i||!n.dom.contains(i.nodeType!=1?i.parentNode:i)){let u=n.dom.getBoundingClientRect();if(!Ru(e,u)||(i=L0(n.dom,e,u),!i))return null}if(Nt)for(let u=i;r&&u;u=_s(u))u.draggable&&(r=void 0);if(i=TE(i,e),r){if(pn&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let d=r.childNodes[o],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let u;js&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=kE(n,r,o,e))}l==null&&(l=SE(n,i,e));let a=n.docView.nearestDesc(i,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Cf(n){return n.top<n.bottom||n.left<n.right}function rr(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Cf(r))return r}return Array.prototype.find.call(t,Cf)||n.getBoundingClientRect()}const xE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function D0(n,e,t){let{node:r,offset:o,atom:s}=n.docView.domFromPos(e,t<0?-1:1),i=js||pn;if(r.nodeType==3)if(i&&(xE.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=rr($n(r,o,o),t);if(pn&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=rr($n(r,o-1,o-1),-1);if(u.top==a.top){let d=rr($n(r,o,o+1),-1);if(d.top!=a.top)return rs(d,d.left<u.left)}}return a}else{let a=o,u=o,d=t<0?1:-1;return t<0&&!o?(u++,d=-1):t>=0&&o==r.nodeValue.length?(a--,d=1):t<0?a--:u++,rs(rr($n(r,a,u),d),d<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(t<0||o==Tn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return Ml(a.getBoundingClientRect(),!1)}if(s==null&&o<Tn(r)){let a=r.childNodes[o];if(a.nodeType==1)return Ml(a.getBoundingClientRect(),!0)}return Ml(r.getBoundingClientRect(),t>=0)}if(s==null&&o&&(t<0||o==Tn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?$n(a,Tn(a)-(i?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return rs(rr(u,1),!1)}if(s==null&&o<Tn(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?$n(a,0,i?0:1):a.nodeType==1?a:null:null;if(u)return rs(rr(u,-1),!0)}return rs(rr(r.nodeType==3?$n(r):r,-t),t>=0)}function rs(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Ml(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function R0(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function NE(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return R0(n,e,()=>{let{node:s}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let i=D0(n,o.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=$n(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let d=a[u];if(d.bottom>d.top+1&&(t=="up"?i.top-d.top>(d.bottom-i.top)*2:d.bottom-i.bottom>(i.bottom-d.top)*2))return!1}}return!0})}const IE=/[\u0590-\u08ac]/;function ME(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,i=o==r.parent.content.size,l=n.domSelection();return!IE.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:i:R0(n,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:d,anchorOffset:f}=n.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",t,"character");let p=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:m,focusOffset:g}=n.domSelectionRange(),v=m&&!p.contains(m.nodeType==1?m:m.parentNode)||a==m&&u==g;try{l.collapse(d,f),a&&(a!=d||u!=f)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),v})}let Af=null,bf=null,wf=!1;function OE(n,e,t){return Af==e&&bf==t?wf:(Af=e,bf=t,wf=t=="up"||t=="down"?NE(n,e,t):ME(n,e,t))}const nn=0,Tf=1,Pr=2,Mn=3;class Ws{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=nn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].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 t=0,r=this.posAtStart;;t++){let o=this.children[t];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,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,i;if(e==this.contentDOM)s=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>kt(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(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),i;if(s&&(!t||s.node))if(r&&(i=s.nodeDOM)&&!(i.nodeType==1?i.contains(e.nodeType==1?e:e.parentNode):i==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],s=r+o.size;if(r==e&&s!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<s)return o.descAt(e-r-o.border);r=s}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let s=0;r<this.children.length;r++){let i=this.children[r],l=s+i.size;if(l>e||i instanceof P0){o=e-s;break}s=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof B0&&s.side>=0;r--);if(t<=0){let s,i=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,i=!1);return s&&t&&i&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?kt(s.dom)+1:0}}else{let s,i=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,i=!1);return s&&i&&!s.border&&!s.domAtom?s.domFromPos(0,t):{node:this.contentDOM,offset:s?kt(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let i=r,l=0;;l++){let a=this.children[l],u=i+a.size;if(o==-1&&e<=u){let d=i+a.border;if(e>=d&&t<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,d);e=i;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=kt(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>t||l==this.children.length-1)){t=u;for(let d=l+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=kt(f.dom);break}t+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let s=Math.min(e,t),i=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(s>p&&i<g)return m.setSelection(e-p-m.border,t-p-m.border,r,o);p=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),u=r.getSelection(),d=!1;if((pn||Nt)&&e==t){let{node:h,offset:p}=l;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==`
66
- `),d&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:kt(g)+1});break}let v=m.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let m=h.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(pn&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||d&&Nt)&&qr(l.node,l.offset,u.anchorNode,u.anchorOffset)&&qr(a.node,a.offset,u.focusNode,u.focusOffset))return;let f=!1;if((u.extend||e==t)&&!d){u.collapse(l.node,l.offset);try{e!=t&&u.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>t){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let s=this.children[o],i=r+s.size;if(r==i?e<=i&&t>=r:e<i&&t>r){let l=r+s.border,a=i-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==i?Pr:Tf,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Mn:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Pr:Mn}r=i}this.dirty=Pr}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Pr:Tf;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class B0 extends Ws{constructor(e,t,r,o){let s,i=t.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(i.nodeType!=1){let l=document.createElement("span");l.appendChild(i),i=l}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==nn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 side(){return this.widget.type.side}}class LE extends Ws{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class eo extends Ws{constructor(e,t,r,o){super(e,[],r,o),this.mark=t}static create(e,t,r,o){let s=o.nodeViews[t.type.name],i=s&&s(t,o,r);return(!i||!i.dom)&&(i=Sn.renderSpec(document,t.type.spec.toDOM(t,r))),new eo(e,t,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&Mn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Mn&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=nn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=nn}}slice(e,t,r){let o=eo.create(this.parent,this.mark,!0,r),s=this.children,i=this.size;t<i&&(s=kc(s,t,i,r)),e>0&&(s=kc(s,0,e,r));for(let l=0;l<s.length;l++)s[l].parent=o;return o.children=s,o}}class fr extends Ws{constructor(e,t,r,o,s,i,l,a,u){super(e,[],s,i),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,t,r,o,s,i){let l=s.nodeViews[t.type.name],a,u=l&&l(t,s,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=u&&u.dom,f=u&&u.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=Sn.renderSpec(document,t.type.spec.toDOM(t)));!f&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let h=d;return d=$0(d,r,t),u?a=new DE(e,t,r,o,d,f||null,h,u,s,i+1):t.isText?new Wa(e,t,r,o,d,h,s):new fr(e,t,r,o,d,f||null,h,s,i+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 t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>fe.empty)}return e}matchesNode(e,t,r){return this.dirty==nn&&e.eq(this.node)&&Sc(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,s=e.composing?this.localCompositionInfo(e,t):null,i=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new BE(this,i&&i.node,e);VE(this.node,this.innerDeco,(u,d,f)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!f&&a.syncToMarks(d==this.node.childCount?We.none:this.node.child(d).marks,r,e),a.placeWidget(u,e,o)},(u,d,f,h)=>{a.syncToMarks(u.marks,r,e);let p;a.findNodeMatch(u,d,f,h)||l&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(p=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,d,f,p,e)||a.updateNextNode(u,d,f,e,h,o)||a.addNode(u,d,f,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Pr)&&(i&&this.protectLocalComposition(e,i),F0(this.contentDOM,this.children,e),Bo&&$E(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ue)||r<t||o>t+this.node.content.size)return null;let s=e.domSelectionRange(),i=zE(s.focusNode,s.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let l=i.nodeValue,a=UE(this.node.content,l,r-t,o-t);return a<0?null:{node:i,pos:a,text:l}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let i=new LE(this,s,t,o);e.input.compositionNodes.push(i),this.children=kc(this.children,r,r+o.length,e,i)}update(e,t,r,o){return this.dirty==Mn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=nn}updateOuterDeco(e){if(Sc(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=V0(this.dom,this.nodeDOM,Tc(this.outerDeco,this.node,t),Tc(e,this.node,t)),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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Sf(n,e,t,r,o){$0(r,e,n);let s=new fr(void 0,n,e,t,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Wa extends fr{constructor(e,t,r,o,s,i,l){super(e,t,r,o,s,null,i,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==Mn||this.dirty!=nn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=nn||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=nn,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),s=document.createTextNode(o.text);return new Wa(this.parent,o,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Mn)}get domAtom(){return!1}}class P0 extends Ws{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==nn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class DE extends fr{constructor(e,t,r,o,s,i,l,a,u,d){super(e,t,r,o,s,i,l,u,d),this.spec=a}update(e,t,r,o){if(this.dirty==Mn)return!1;if(this.spec.update){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,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 F0(n,e,t){let r=n.firstChild,o=!1;for(let s=0;s<e.length;s++){let i=e[s],l=i.dom;if(l.parentNode==n){for(;l!=r;)r=kf(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(l,r);if(i instanceof eo){let a=r?r.previousSibling:n.lastChild;F0(i.contentDOM,i.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=kf(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const ms=function(n){n&&(this.nodeName=n)};ms.prototype=Object.create(null);const Fr=[new ms];function Tc(n,e,t){if(n.length==0)return Fr;let r=t?Fr[0]:new ms,o=[r];for(let s=0;s<n.length;s++){let i=n[s].type.attrs;if(i){i.nodeName&&o.push(r=new ms(i.nodeName));for(let l in i){let a=i[l];a!=null&&(t&&o.length==1&&o.push(r=new ms(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return o}function V0(n,e,t,r){if(t==Fr&&r==Fr)return e;let o=e;for(let s=0;s<r.length;s++){let i=r[s],l=t[s];if(s){let a;l&&l.nodeName==i.nodeName&&o!=n&&(a=o.parentNode)&&a.nodeName.toLowerCase()==i.nodeName||(a=document.createElement(i.nodeName),a.pmIsDeco=!0,a.appendChild(o),l=Fr[0]),o=a}RE(o,l||Fr[0],i)}return o}function RE(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&n.classList.remove(r[s]);for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&n.classList.add(o[s]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function $0(n,e,t){return V0(n,n,Fr,Tc(e,t,n.nodeType!=1))}function Sc(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function kf(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class BE{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=PE(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,s=this.stack.length>>1,i=Math.min(s,e.length);for(;o<i&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=nn,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(e[s])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=eo.create(this.top,e[s],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(e,t,r,o){let s=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,r))s=this.top.children.indexOf(i,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(e,t,r)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,r,o,s){let i=this.top.children[o];return i.dirty==Mn&&i.dom==i.contentDOM&&(i.dirty=Pr),i.update(e,t,r,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==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=t}}updateNextNode(e,t,r,o,s,i){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof fr){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let d=a.dom,f,h=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Mn&&Sc(t,a.outerDeco));if(!h&&a.update(e,t,r,o))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,t,r,o,i)))return this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Pr,f.updateChildren(o,i+1),f.dirty=nn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,s,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=fr.create(this.top,t,r,o,s,i);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,o,s){let i=fr.create(this.top,e,t,r,o,s);i.contentDOM&&i.updateChildren(o,s+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,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 s=new B0(this.top,e,t,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof eo;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Wa)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Nt||vt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.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 P0(this.top,[],r,null);t!=this.top?t.children.push(o):t.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 PE(n,e){let t=e,r=t.children.length,o=n.childCount,s=new Map,i=[];e:for(;o>0;){let l;for(;;)if(r){let u=t.children[r-1];if(u instanceof eo)t=u,r=u.children.length;else{l=u,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(o-1))break;--o,s.set(l,o),i.push(l)}}return{index:o,matched:s,matches:i.reverse()}}function FE(n,e){return n.type.side-e.type.side}function VE(n,e,t,r){let o=e.locals(n),s=0;if(o.length==0){for(let u=0;u<n.childCount;u++){let d=n.child(u);r(d,o,e.forChild(s,d),u),s+=d.nodeSize}return}let i=0,l=[],a=null;for(let u=0;;){let d,f;for(;i<o.length&&o[i].to==s;){let v=o[i++];v.widget&&(d?(f||(f=[d])).push(v):d=v)}if(d)if(f){f.sort(FE);for(let v=0;v<f.length;v++)t(f[v],u,!!a)}else t(d,u,!!a);let h,p;if(a)p=-1,h=a,a=null;else if(u<n.childCount)p=u,h=n.child(u++);else break;for(let v=0;v<l.length;v++)l[v].to<=s&&l.splice(v--,1);for(;i<o.length&&o[i].from<=s&&o[i].to>s;)l.push(o[i++]);let m=s+h.nodeSize;if(h.isText){let v=m;i<o.length&&o[i].from<v&&(v=o[i].from);for(let C=0;C<l.length;C++)l[C].to<v&&(v=l[C].to);v<m&&(a=h.cut(v-s),h=h.cut(0,v-s),m=v,p=-1)}let g=h.isInline&&!h.isLeaf?l.filter(v=>!v.inline):l.slice();r(h,g,e.forChild(s,h),p),s=m}}function $E(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function zE(n,e){for(;;){if(n.nodeType==3)return n;if(n.nodeType==1&&e>0){if(n.childNodes.length>e&&n.childNodes[e].nodeType==3)return n.childNodes[e];n=n.childNodes[e-1],e=Tn(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function UE(n,e,t,r){for(let o=0,s=0;o<n.childCount&&s<=r;){let i=n.child(o++),l=s;if(s+=i.nodeSize,!i.isText)continue;let a=i.text;for(;o<n.childCount;){let u=n.child(o++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l<r?a.lastIndexOf(e,r-l-1):-1;if(u>=0&&u+e.length+l>=t)return l+u;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function kc(n,e,t,r,o){let s=[];for(let i=0,l=0;i<n.length;i++){let a=n[i],u=l,d=l+=a.size;u>=t||d<=e?s.push(a):(u<e&&s.push(a.slice(0,e-u,r)),o&&(s.push(o),o=void 0),d>t&&s.push(a.slice(t-u,a.size,r)))}return s}function Bu(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),s=o&&o.size==0,i=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(i<0)return null;let l=r.resolve(i),a,u;if(ja(t)){for(a=l;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&Le.isSelectable(d)&&o.parent&&!(d.isInline&&fE(t.focusNode,t.focusOffset,o.dom))){let f=o.posBefore;u=new Le(i==f?l:r.resolve(f))}}else{let d=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(d<0)return null;a=r.resolve(d)}if(!u){let d=e=="pointer"||n.state.selection.head<l.pos&&!s?1:-1;u=Pu(n,a,l,d)}return u}function z0(n){return n.editable?n.hasFocus():H0(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function jn(n,e=!1){let t=n.state.selection;if(U0(n,t),!!z0(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&vt){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&qr(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)jE(n);else{let{anchor:r,head:o}=t,s,i;_f&&!(t instanceof Ue)&&(t.$from.parent.inlineContent||(s=xf(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(i=xf(n,t.to))),n.docView.setSelection(r,o,n.root,e),_f&&(s&&Nf(s),i&&Nf(i)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&HE(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const _f=Nt||vt&&mE<63;function xf(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,s=r?t.childNodes[r-1]:null;if(Nt&&o&&o.contentEditable=="false")return Ol(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Ol(o);if(s)return Ol(s)}}function Ol(n){return n.contentEditable="true",Nt&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Nf(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function HE(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!z0(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function jE(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,kt(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&Pt&&dr<=11&&(r.disabled=!0,r.disabled=!1)}function U0(n,e){if(e instanceof Le){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(If(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else If(n)}function If(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Pu(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||Ue.between(e,t,r)}function Mf(n){return n.editable&&!n.hasFocus()?!1:H0(n)}function H0(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function WE(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return qr(e.node,e.offset,t.anchorNode,t.anchorOffset)}function _c(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&$e.findFrom(s,e)}function or(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Of(n,e,t){let r=n.state.selection;if(r instanceof Ue)if(t.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=n.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return or(n,new Ue(r.$anchor,i))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=_c(n.state,e);return o&&o instanceof Le?or(n,o):!1}else if(!(qt&&t.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let l=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=n.docView.descAt(l))&&!i.contentDOM?Le.isSelectable(s)?or(n,new Le(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):js?or(n,new Ue(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Le&&r.node.isInline)return or(n,new Ue(e>0?r.$to:r.$from));{let o=_c(n.state,e);return o?or(n,o):!1}}}function $i(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function gs(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function fo(n,e){return e<0?KE(n):YE(n)}function KE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,s,i=!1;for(pn&&t.nodeType==1&&r<$i(t)&&gs(t.childNodes[r],-1)&&(i=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(gs(l,-1))o=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(j0(t))break;{let l=t.previousSibling;for(;l&&gs(l,-1);)o=t.parentNode,s=kt(l),l=l.previousSibling;if(l)t=l,r=$i(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}i?xc(n,t,r):o&&xc(n,o,s)}function YE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=$i(t),s,i;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(gs(l,1))s=t,i=++r;else break}else{if(j0(t))break;{let l=t.nextSibling;for(;l&&gs(l,1);)s=l.parentNode,i=kt(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=$i(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}s&&xc(n,s,i)}function j0(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function GE(n,e){for(;n&&e==n.childNodes.length&&!Du(n);)e=kt(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function QE(n,e){for(;n&&!e&&!Du(n);)e=kt(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function xc(n,e,t){if(e.nodeType!=3){let s,i;(i=GE(e,t))?(e=i,t=0):(s=QE(e,t))&&(e=s,t=s.nodeValue.length)}let r=n.domSelection();if(ja(r)){let s=document.createRange();s.setEnd(e,t),s.setStart(e,t),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&jn(n)},50)}function Lf(n,e){let t=n.state.doc.resolve(e);if(!(vt||gE)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<t.end()){let s=n.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Df(n,e,t){let r=n.state.selection;if(r instanceof Ue&&!r.empty||t.indexOf("s")>-1||qt&&t.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let i=_c(n.state,e);if(i&&i instanceof Le)return or(n,i)}if(!o.parent.inlineContent){let i=e<0?o:s,l=r instanceof dn?$e.near(i,e):$e.findFrom(i,e);return l?or(n,l):!1}return!1}function Rf(n,e){if(!(n.state.selection instanceof Ue))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let i=n.state.tr;return e<0?i.delete(t.pos-s.nodeSize,t.pos):i.delete(t.pos,t.pos+s.nodeSize),n.dispatch(i),!0}return!1}function Bf(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function ZE(n){if(!Nt||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Bf(n,r,"true"),setTimeout(()=>Bf(n,r,"false"),20)}return!1}function JE(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function XE(n,e){let t=e.keyCode,r=JE(e);if(t==8||qt&&t==72&&r=="c")return Rf(n,-1)||fo(n,-1);if(t==46&&!e.shiftKey||qt&&t==68&&r=="c")return Rf(n,1)||fo(n,1);if(t==13||t==27)return!0;if(t==37||qt&&t==66&&r=="c"){let o=t==37?Lf(n,n.state.selection.from)=="ltr"?-1:1:-1;return Of(n,o,r)||fo(n,o)}else if(t==39||qt&&t==70&&r=="c"){let o=t==39?Lf(n,n.state.selection.from)=="ltr"?1:-1:1;return Of(n,o,r)||fo(n,o)}else{if(t==38||qt&&t==80&&r=="c")return Df(n,-1,r)||fo(n,-1);if(t==40||qt&&t==78&&r=="c")return ZE(n)||Df(n,1,r)||fo(n,1);if(r==(qt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function W0(n,e){n.someProp("transformCopied",p=>{e=p(e,n)});let t=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let p=r.firstChild;t.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let i=n.someProp("clipboardSerializer")||Sn.fromSchema(n.state.schema),l=J0(),a=l.createElement("div");a.appendChild(i.serializeFragment(r,{document:l}));let u=a.firstChild,d,f=0;for(;u&&u.nodeType==1&&(d=Z0[u.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let m=l.createElement(d[p]);for(;a.firstChild;)m.appendChild(a.firstChild);a.appendChild(m),f++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${s}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",p=>p(e,n))||e.content.textBetween(0,e.content.size,`
67
-
68
- `);return{dom:a,text:h}}function K0(n,e,t,r,o){let s=o.parent.type.spec.code,i,l;if(!t&&!e)return null;let a=e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",h=>{e=h(e,s||r,n)}),s)return e?new we(fe.from(n.state.schema.text(e.replace(/\r\n?/g,`
69
- `))),0,0):we.empty;let f=n.someProp("clipboardTextParser",h=>h(e,o,r,n));if(f)l=f;else{let h=o.marks(),{schema:p}=n.state,m=Sn.fromSchema(p);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=i.appendChild(document.createElement("p"));g&&v.appendChild(m.serializeNode(p.text(g,h)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),i=tC(t),js&&nC(i);let u=i&&i.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=i.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;i=h}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Lo.fromSchema(n.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!qE.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)l=rC(Pf(l,+d[1],+d[2]),d[4]);else if(l=we.maxOpen(eC(l.content,o),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=Pf(l,f,h)}return n.someProp("transformPasted",f=>{l=f(l,n)}),l}const qE=/^(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 eC(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),s,i=[];if(n.forEach(l=>{if(!i)return;let a=o.findWrapping(l.type),u;if(!a)return i=null;if(u=i.length&&s.length&&G0(a,s,l,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=Q0(i[i.length-1],s.length));let d=Y0(l,a);i.push(d),o=o.matchType(d.type),s=a}}),i)return fe.from(i)}return n}function Y0(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,fe.from(n));return n}function G0(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let s=G0(n,e,t,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(fe.from(Y0(t,n,o+1))))}}function Q0(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Q0(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(fe.empty,!0);return n.copy(t.append(r))}function Nc(n,e,t,r,o,s){let i=e<0?n.firstChild:n.lastChild,l=i.content;return n.childCount>1&&(s=0),o<r-1&&(l=Nc(l,e,t,r,o+1,s)),o>=t&&(l=e<0?i.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(fe.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,i.copy(l))}function Pf(n,e,t){return e<n.openStart&&(n=new we(Nc(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new we(Nc(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Z0={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 Ff=null;function J0(){return Ff||(Ff=document.implementation.createHTMLDocument("title"))}function tC(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=J0().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&Z0[r[1].toLowerCase()])&&(n=o.map(s=>"<"+s+">").join("")+n+o.map(s=>"</"+s+">").reverse().join("")),t.innerHTML=n,o)for(let s=0;s<o.length;s++)t=t.querySelector(o[s])||t;return t}function nC(n){let e=n.querySelectorAll(vt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function rC(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:s,openEnd:i}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=fe.from(a.create(r[l+1],o)),s++,i++}return new we(o,s,i)}const It={},Mt={},oC={touchstart:!0,touchmove:!0};class sC{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function iC(n){for(let e in It){let t=It[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{lC(n,r)&&!Fu(n,r)&&(n.editable||!(r.type in Mt))&&t(n,r)},oC[e]?{passive:!0}:void 0)}Nt&&n.dom.addEventListener("input",()=>null),Ic(n)}function ur(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function aC(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Ic(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Fu(n,r))})}function Fu(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function lC(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function cC(n,e){!Fu(n,e)&&It[e.type]&&(n.editable||!(e.type in Mt))&&It[e.type](n,e)}Mt.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!q0(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(cn&&vt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Bo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,Rr(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||XE(n,t)?t.preventDefault():ur(n,"key")};Mt.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Mt.keypress=(n,e)=>{let t=e;if(q0(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||qt&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof Ue)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",s=>s(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Ka(n){return{left:n.clientX,top:n.clientY}}function uC(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Vu(n,e,t,r,o){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(n.someProp(e,l=>i>s.depth?l(n,t,s.nodeAfter,s.before(i),o,!0):l(n,t,s.node(i),s.before(i),o,!1)))return!0;return!1}function Oo(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function dC(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(Oo(n,new Le(t),"pointer"),!0):!1}function fC(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Le&&(r=t.node);let s=n.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let l=i>s.depth?s.nodeAfter:s.node(i);if(Le.isSelectable(l)){r&&t.$from.depth>0&&i>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?o=s.before(t.$from.depth):o=s.before(i);break}}return o!=null?(Oo(n,Le.create(n.state.doc,o),"pointer"),!0):!1}function hC(n,e,t,r,o){return Vu(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(o?fC(n,t):dC(n,t))}function pC(n,e,t,r){return Vu(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function mC(n,e,t,r){return Vu(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||gC(n,t,r)}function gC(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Oo(n,Ue.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let i=s>o.depth?o.nodeAfter:o.node(s),l=o.before(s);if(i.inlineContent)Oo(n,Ue.create(r,l+1,l+1+i.content.size),"pointer");else if(Le.isSelectable(i))Oo(n,Le.create(r,l),"pointer");else continue;return!0}}function $u(n){return zi(n)}const X0=qt?"metaKey":"ctrlKey";It.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=$u(n),o=Date.now(),s="singleClick";o-n.input.lastClick.time<500&&uC(t,n.input.lastClick)&&!t[X0]&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:s};let i=n.posAtCoords(Ka(t));i&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new vC(n,i,t,!!r)):(s=="doubleClick"?pC:mC)(n,i.pos,i.inside,t)?t.preventDefault():ur(n,"pointer"))};class vC{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[X0],this.allowDefault=r.shiftKey;let s,i;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),i=t.inside;else{let d=e.state.doc.resolve(t.pos);s=d.parent,i=d.depth?d.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof Le&&u.from<=i&&u.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&pn&&!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)),ur(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(()=>jn(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ka(e))),this.updateAllowDefault(e),this.allowDefault||!t?ur(this.view,"pointer"):hC(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Nt&&this.mightDrag&&!this.mightDrag.node.isAtom||vt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Oo(this.view,$e.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ur(this.view,"pointer")}move(e){this.updateAllowDefault(e),ur(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)}}It.touchstart=n=>{n.input.lastTouch=Date.now(),$u(n),ur(n,"pointer")};It.touchmove=n=>{n.input.lastTouch=Date.now(),ur(n,"pointer")};It.contextmenu=n=>$u(n);function q0(n,e){return n.composing?!0:Nt&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const yC=cn?5e3:-1;Mt.compositionstart=Mt.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),zi(n,!0),n.markCursor=null;else if(zi(n),pn&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let i=s<0?o.lastChild:o.childNodes[s-1];if(!i)break;if(i.nodeType==3){n.domSelection().collapse(i,i.nodeValue.length);break}else o=i,s=-1}}n.input.composing=!0}em(n,yC)};Mt.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,em(n,20))};function em(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>zi(n),e))}function tm(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=EC());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function EC(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function zi(n,e=!1){if(!(cn&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),tm(n),e||n.docView&&n.docView.dirty){let t=Bu(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function CC(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const xs=Pt&&dr<15||Bo&&vE<604;It.copy=Mt.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let s=xs?null:t.clipboardData,i=r.content(),{dom:l,text:a}=W0(n,i);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):CC(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function AC(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function bC(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Ns(n,r.value,null,o,e):Ns(n,r.textContent,r.innerHTML,o,e)},50)}function Ns(n,e,t,r,o){let s=K0(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,o,s||we.empty)))return!0;if(!s)return!1;let i=AC(s),l=i?n.state.tr.replaceSelectionWith(i,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function nm(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Mt.paste=(n,e)=>{let t=e;if(n.composing&&!cn)return;let r=xs?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Ns(n,nm(r),r.getData("text/html"),o,t)?t.preventDefault():bC(n,t)};class rm{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const om=qt?"altKey":"ctrlKey";It.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,s=o.empty?null:n.posAtCoords(Ka(t)),i;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)i=Le.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(i=Le.create(n.state.doc,d.posBefore))}}let l=(i||n.state.selection).content(),{dom:a,text:u}=W0(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(xs?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",xs||t.dataTransfer.setData("text/plain",u),n.dragging=new rm(l,!t[om],i)};It.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Mt.dragover=Mt.dragenter=(n,e)=>e.preventDefault();Mt.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Ka(t));if(!o)return;let s=n.state.doc.resolve(o.pos),i=r&&r.slice;i?n.someProp("transformPasted",m=>{i=m(i,n)}):i=K0(n,nm(t.dataTransfer),xs?null:t.dataTransfer.getData("text/html"),!1,s);let l=!!(r&&!t[om]);if(n.someProp("handleDrop",m=>m(n,t,i||we.empty,l))){t.preventDefault();return}if(!i)return;t.preventDefault();let a=i?eE(n.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let u=n.state.tr;if(l){let{node:m}=r;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(a),f=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,h=u.doc;if(f?u.replaceRangeWith(d,d,i.content.firstChild):u.replaceRange(d,d,i),u.doc.eq(h))return;let p=u.doc.resolve(d);if(f&&Le.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new Le(p));else{let m=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,v,C,b)=>m=b),u.setSelection(Pu(n,p,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))};It.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&jn(n)},20))};It.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};It.beforeinput=(n,e)=>{if(vt&&cn&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,Rr(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in Mt)It[n]=Mt[n];function Is(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Ui{constructor(e,t){this.toDOM=e,this.spec=t||Yr,this.side=this.spec.side||0}map(e,t,r,o){let{pos:s,deleted:i}=e.mapResult(t.from+o,this.side<0?-1:1);return i?null:new tn(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ui&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Is(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class hr{constructor(e,t){this.attrs=e,this.spec=t||Yr}map(e,t,r,o){let s=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,i=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=i?null:new tn(s,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof hr&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}static is(e){return e.type instanceof hr}destroy(){}}class zu{constructor(e,t){this.attrs=e,this.spec=t||Yr}map(e,t,r,o){let s=e.mapResult(t.from+o,1);if(s.deleted)return null;let i=e.mapResult(t.to+o,-1);return i.deleted||i.pos<=s.pos?null:new tn(s.pos-r,i.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),s;return o==t.from&&!(s=e.child(r)).isText&&o+s.nodeSize==t.to}eq(e){return this==e||e instanceof zu&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}destroy(){}}class tn{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new tn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new tn(e,e,new Ui(t,r))}static inline(e,t,r,o){return new tn(e,t,new hr(r,o))}static node(e,t,r,o){return new tn(e,t,new zu(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof hr}get widget(){return this.type instanceof Ui}}const yo=[],Yr={};class it{constructor(e,t){this.local=e.length?e:yo,this.children=t.length?t:yo}static create(e,t){return t.length?Hi(t,e,0,Yr):gt}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,s){for(let i=0;i<this.local.length;i++){let l=this.local[i];l.from<=t&&l.to>=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let l=this.children[i]+1;this.children[i+2].findInner(e-l,t-l,r,o+l,s)}}map(e,t,r){return this==gt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Yr)}mapInner(e,t,r,o,s){let i;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,o);a&&a.type.valid(t,a)?(i||(i=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?wC(this.children,i||[],e,t,r,o,s):i?new it(i.sort(Gr),yo):gt}add(e,t){return t.length?this==gt?it.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,s=0;e.forEach((l,a)=>{let u=a+r,d;if(d=im(t,l,u)){for(o||(o=this.children.slice());s<o.length&&o[s]<a;)s+=3;o[s]==a?o[s+2]=o[s+2].addInner(l,d,u+1):o.splice(s,0,a,a+l.nodeSize,Hi(d,l,u+1,Yr)),s+=3}});let i=sm(s?am(t):t,-r);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||i.splice(l--,1);return new it(i.length?this.local.concat(i).sort(Gr):this.local,o||this.children)}remove(e){return e.length==0||this==gt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let i,l=r[s]+t,a=r[s+1]+t;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>l&&f.to<a&&(e[d]=null,(i||(i=[])).push(f));if(!i)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(i,l+1);u!=gt?r[s+2]=u:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,i;s<e.length;s++)if(i=e[s])for(let l=0;l<o.length;l++)o[l].eq(i,t)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new it(o,r):gt}forChild(e,t){if(this==gt)return this;if(t.isLeaf)return it.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,i=s+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<i&&a.to>s&&a.type instanceof hr){let u=Math.max(s,a.from)-s,d=Math.min(i,a.to)-s;u<d&&(o||(o=[])).push(a.copy(u,d))}}if(o){let l=new it(o.sort(Gr),yo);return r?new ir([l,r]):l}return r||gt}eq(e){if(this==e)return!0;if(!(e instanceof it)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Uu(this.localsInner(e))}localsInner(e){if(this==gt)return yo;if(e.inlineContent||!this.local.some(hr.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof hr||t.push(this.local[r]);return t}}it.empty=new it([],[]);it.removeOverlap=Uu;const gt=it.empty;class ir{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,Yr));return ir.from(r)}forChild(e,t){if(t.isLeaf)return it.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,t);s!=gt&&(s instanceof ir?r=r.concat(s.members):r.push(s))}return ir.from(r)}eq(e){if(!(e instanceof ir)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!t)t=s;else{r&&(t=t.slice(),r=!1);for(let i=0;i<s.length;i++)t.push(s[i])}}return t?Uu(r?t:t.sort(Gr)):yo}static from(e){switch(e.length){case 0:return gt;case 1:return e[0];default:return new ir(e.every(t=>t instanceof it)?e:e.reduce((t,r)=>t.concat(r instanceof it?r:r.members),[]))}}}function wC(n,e,t,r,o,s,i){let l=n.slice();for(let u=0,d=s;u<t.maps.length;u++){let f=0;t.maps[u].forEach((h,p,m,g)=>{let v=g-m-(p-h);for(let C=0;C<l.length;C+=3){let b=l[C+1];if(b<0||h>b+d-f)continue;let E=l[C]+d-f;p>=E?l[C+1]=h<=E?-2:-1:m>=o&&v&&(l[C]+=v,l[C+1]+=v)}f+=v}),d=t.maps[u].map(d,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let d=t.map(n[u]+s),f=d-o;if(f<0||f>=r.content.size){a=!0;continue}let h=t.map(n[u+1]+s,-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 C=l[u+2].mapInner(t,v,d+1,n[u]+s+1,i);C!=gt?(l[u]=f,l[u+1]=p,l[u+2]=C):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=TC(l,n,e,t,o,s,i),d=Hi(u,r,0,i);e=d.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let p=d.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new it(e.sort(Gr),l)}function sm(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new tn(o.from+e,o.to+e,o.type))}return t}function TC(n,e,t,r,o,s,i){function l(a,u){for(let d=0;d<a.local.length;d++){let f=a.local[d].map(r,o,u);f?t.push(f):i.onRemove&&i.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+u+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+s+1);return t}function im(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let s=0,i;s<n.length;s++)(i=n[s])&&i.from>t&&i.to<r&&((o||(o=[])).push(i),n[s]=null);return o}function am(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Hi(n,e,t,r){let o=[],s=!1;e.forEach((l,a)=>{let u=im(n,l,a+t);if(u){s=!0;let d=Hi(u,l,t+a+1,r);d!=gt&&o.push(a,a+l.nodeSize,d)}});let i=sm(s?am(n):n,-t).sort(Gr);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||(r.onRemove&&r.onRemove(i[l].spec),i.splice(l--,1));return i.length||o.length?new it(i,o):gt}function Gr(n,e){return n.from-e.from||n.to-e.to}function Uu(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let s=e[o];if(s.from==r.from){s.to!=r.to&&(e==n&&(e=n.slice()),e[o]=s.copy(s.from,r.to),Vf(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,s.from),Vf(e,o,r.copy(s.from,r.to)));break}}}return e}function Vf(n,e,t){for(;e<n.length&&Gr(t,n[e])>0;)e++;n.splice(e,0,t)}function Ll(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=gt&&e.push(r)}),n.cursorWrapper&&e.push(it.create(n.state.doc,[n.cursorWrapper.deco])),ir.from(e)}const SC={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},kC=Pt&&dr<=11;class _C{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 xC{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _C,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Pt&&dr<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),kC&&(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,SC)),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 t=0;t<e.length;t++)this.queue.push(e[t]);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(Mf(this.view)){if(this.suppressingSelectionUpdates)return jn(this.view);if(Pt&&dr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&qr(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 t=new Set,r;for(let s=e.focusNode;s;s=_s(s))t.add(s);for(let s=e.anchorNode;s;s=_s(s))if(t.has(s)){r=s;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 t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Mf(e)&&!this.ignoreSelectionChange(r),s=-1,i=-1,l=!1,a=[];if(e.editable)for(let d=0;d<t.length;d++){let f=this.registerMutation(t[d],a);f&&(s=s<0?f.from:Math.min(f.from,s),i=i<0?f.to:Math.max(f.to,i),f.typeOver&&(l=!0))}if(pn&&a.length>1){let d=a.filter(f=>f.nodeName=="BR");if(d.length==2){let f=d[0],h=d[1];f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}}let u=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ja(r)&&(u=Bu(e))&&u.eq($e.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,jn(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,i),NC(e)),this.handleDOMChange(s,i,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||jn(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.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 d=0;d<e.addedNodes.length;d++)t.push(e.addedNodes[d]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,s=e.nextSibling;if(Pt&&dr<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h)}let i=o&&o.parentNode==e.target?kt(o)+1:0,l=r.localPosFromDOM(e.target,i,-1),a=s&&s.parentNode==e.target?kt(s):e.target.childNodes.length,u=r.localPosFromDOM(e.target,a,1);return{from:l,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let $f=new WeakMap,zf=!1;function NC(n){if(!$f.has(n)&&($f.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=pn,zf)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."),zf=!0}}function IC(n){let e;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let r=e.startContainer,o=e.startOffset,s=e.endContainer,i=e.endOffset,l=n.domAtPos(n.state.selection.anchor);return qr(l.node,l.offset,s,i)&&([r,o,s,i]=[s,i,r,o]),{anchorNode:r,anchorOffset:o,focusNode:s,focusOffset:i}}function MC(n,e,t){let{node:r,fromOffset:o,toOffset:s,from:i,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),u,d=a.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:a.anchorOffset}],ja(a)||u.push({node:a.focusNode,offset:a.focusOffset})),vt&&n.input.lastKeyCode===8)for(let v=s;v>o;v--){let C=r.childNodes[v-1],b=C.pmViewDesc;if(C.nodeName=="BR"&&!b){s=v;break}if(!b||b.size)break}let f=n.state.doc,h=n.someProp("domParser")||Lo.fromSchema(n.state.schema),p=f.resolve(i),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:OC,context:p});if(u&&u[0].pos!=null){let v=u[0].pos,C=u[1]&&u[1].pos;C==null&&(C=v),m={anchor:v+i,head:C+i}}return{doc:g,sel:m,from:i,to:l}}function OC(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(Nt&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||Nt&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const LC=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function DC(n,e,t,r,o){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let L=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,$=Bu(n,L);if($&&!n.state.selection.eq($)){if(vt&&cn&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",z=>z(n,Rr(13,"Enter"))))return;let V=n.state.tr.setSelection($);L=="pointer"?V.setMeta("pointer",!0):L=="key"&&V.scrollIntoView(),s&&V.setMeta("composition",s),n.dispatch(V)}return}let i=n.state.doc.resolve(e),l=i.sharedDepth(t);e=i.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,u=MC(n,e,t),d=n.state.doc,f=d.slice(u.from,u.to),h,p;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(h=n.state.selection.to,p="end"):(h=n.state.selection.from,p="start"),n.input.lastKeyCode=null;let m=PC(f.content,u.doc.content,u.from,h,p);if((Bo&&n.input.lastIOSEnter>Date.now()-225||cn)&&o.some(L=>L.nodeType==1&&!LC.test(L.nodeName))&&(!m||m.endA>=m.endB)&&n.someProp("handleKeyDown",L=>L(n,Rr(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!m)if(r&&a instanceof Ue&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))m={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let L=Uf(n,n.state.doc,u.sel);if(L&&!L.eq(n.state.selection)){let $=n.state.tr.setSelection(L);s&&$.setMeta("composition",s),n.dispatch($)}}return}if(vt&&n.cursorWrapper&&u.sel&&u.sel.anchor==n.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let L=m.endB-m.start;u.sel={anchor:u.sel.anchor+L,head:u.sel.anchor+L}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&m.start==m.endB&&n.state.selection instanceof Ue&&(m.start>n.state.selection.from&&m.start<=n.state.selection.from+2&&n.state.selection.from>=u.from?m.start=n.state.selection.from:m.endA<n.state.selection.to&&m.endA>=n.state.selection.to-2&&n.state.selection.to<=u.to&&(m.endB+=n.state.selection.to-m.endA,m.endA=n.state.selection.to)),Pt&&dr<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=u.doc.resolveNoCache(m.start-u.from),v=u.doc.resolveNoCache(m.endB-u.from),C=d.resolve(m.start),b=g.sameParent(v)&&g.parent.inlineContent&&C.end()>=m.endA,E;if((Bo&&n.input.lastIOSEnter>Date.now()-225&&(!b||o.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!b&&g.pos<u.doc.content.size&&!g.sameParent(v)&&(E=$e.findFrom(u.doc.resolve(g.pos+1),1,!0))&&E.head==v.pos)&&n.someProp("handleKeyDown",L=>L(n,Rr(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>m.start&&BC(d,m.start,m.endA,g,v)&&n.someProp("handleKeyDown",L=>L(n,Rr(8,"Backspace")))){cn&&vt&&n.domObserver.suppressSelectionUpdates();return}vt&&cn&&m.endB==m.start&&(n.input.lastAndroidDelete=Date.now()),cn&&!b&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,v=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{n.someProp("handleKeyDown",function(L){return L(n,Rr(13,"Enter"))})},20));let y=m.start,x=m.endA,w,I,M;if(b){if(g.pos==v.pos)Pt&&dr<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>jn(n),20)),w=n.state.tr.delete(y,x),I=d.resolve(m.start).marksAcross(d.resolve(m.endA));else if(m.endA==m.endB&&(M=RC(g.parent.content.cut(g.parentOffset,v.parentOffset),C.parent.content.cut(C.parentOffset,m.endA-C.start()))))w=n.state.tr,M.type=="add"?w.addMark(y,x,M.mark):w.removeMark(y,x,M.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let L=g.parent.textBetween(g.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",$=>$(n,y,x,L)))return;w=n.state.tr.insertText(L,y,x)}}if(w||(w=n.state.tr.replace(y,x,u.doc.slice(m.start-u.from,m.endB-u.from))),u.sel){let L=Uf(n,w.doc,u.sel);L&&!(vt&&cn&&n.composing&&L.empty&&(m.start!=m.endB||n.input.lastAndroidDelete<Date.now()-100)&&(L.head==y||L.head==w.mapping.map(x)-1)||Pt&&L.empty&&L.head==y)&&w.setSelection(L)}I&&w.ensureMarks(I),s&&w.setMeta("composition",s),n.dispatch(w.scrollIntoView())}function Uf(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Pu(n,e.resolve(t.anchor),e.resolve(t.head))}function RC(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,s=r,i,l,a;for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);for(let d=0;d<t.length;d++)s=t[d].removeFromSet(s);if(o.length==1&&s.length==0)l=o[0],i="add",a=d=>d.mark(l.addToSet(d.marks));else if(o.length==0&&s.length==1)l=s[0],i="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<e.childCount;d++)u.push(a(e.child(d)));if(fe.from(u).eq(n))return{mark:l,type:i}}function BC(n,e,t,r,o){if(!r.parent.isTextblock||t-e<=o.pos-r.pos||Dl(r,!0,!1)<o.pos)return!1;let s=n.resolve(e);if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let i=n.resolve(Dl(s,!0,!0));return!i.parent.isTextblock||i.pos>t||Dl(i,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function Dl(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function PC(n,e,t,r,o){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:i,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let a=Math.max(0,s-Math.min(i,l));r-=i+a-s}if(i<s&&n.size<e.size){let a=r<=s&&r>=i?s-r:0;s-=a,s&&s<e.size&&Hf(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-i),i=s}else if(l<s){let a=r<=s&&r>=l?s-r:0;s-=a,s&&s<n.size&&Hf(n.textBetween(s-1,s+1))&&(s+=a?1:-1),i=s+(i-l),l=s}return{start:s,endA:i,endB:l}}function Hf(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class FC{constructor(e,t){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 sC,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Gf),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=Kf(this),Wf(this),this.nodeViews=Yf(this),this.docView=Sf(this.state.doc,jf(this),Ll(this),this.dom,this),this.domObserver=new xC(this,(r,o,s,i)=>DC(this,r,o,s,i)),this.domObserver.start(),iC(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ic(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Gf),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,s=!1,i=!1;e.storedMarks&&this.composing&&(tm(this),i=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let p=Yf(this);$C(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ic(this),this.editable=Kf(this),Wf(this);let a=Ll(this),u=jf(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=s||!this.docView.matchesNode(e.doc,u,a);(f||!e.selection.eq(o.selection))&&(i=!0);let h=d=="preserve"&&i&&this.dom.style.overflowAnchor==null&&CE(this);if(i){this.domObserver.stop();let p=f&&(Pt||vt)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&VC(o.selection,e.selection);if(f){let m=vt?this.trackWrites=this.domSelectionRange().focusNode:null;(s||!this.docView.update(e.doc,u,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Sf(e.doc,u,a,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&WE(this))?jn(this,p):(U0(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),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&AE(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Le){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ef(this,t.getBoundingClientRect(),e)}else Ef(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 t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let s=r.from+(this.state.doc.content.size-t.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(o=s)}this.dragging=new rm(e.slice,e.move,o<0?void 0:Le.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let i=0;i<this.directPlugins.length;i++){let l=this.directPlugins[i].props[e];if(l!=null&&(o=t?t(l):l))return o}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let l=s[i].props[e];if(l!=null&&(o=t?t(l):l))return o}}hasFocus(){if(Pt){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&&bE(this.dom),jn(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return _E(this,e)}coordsAtPos(e,t=1){return D0(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return OE(this,t||this.state,e)}pasteHTML(e,t){return Ns(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Ns(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(aC(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ll(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return cC(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Nt&&this.root.nodeType===11&&hE(this.dom.ownerDocument)==this.dom?IC(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function jf(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[tn.node(0,n.state.doc.content.size,e)]}function Wf(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:tn.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Kf(n){return!n.someProp("editable",e=>e(n.state)===!1)}function VC(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Yf(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function $C(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function Gf(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var mr={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:"'"},ji={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},zC=typeof navigator<"u"&&/Mac/.test(navigator.platform),UC=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var mt=0;mt<10;mt++)mr[48+mt]=mr[96+mt]=String(mt);for(var mt=1;mt<=24;mt++)mr[mt+111]="F"+mt;for(var mt=65;mt<=90;mt++)mr[mt]=String.fromCharCode(mt+32),ji[mt]=String.fromCharCode(mt);for(var Rl in mr)ji.hasOwnProperty(Rl)||(ji[Rl]=mr[Rl]);function HC(n){var e=zC&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||UC&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ji:mr)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const jC=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function WC(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,s,i;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!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))s=!0;else if(/^mod$/i.test(a))jC?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),i&&(t="Meta-"+t),s&&(t="Shift-"+t),t}function KC(n){let e=Object.create(null);for(let t in n)e[WC(t)]=n[t];return e}function Bl(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function YC(n){return new Ft({props:{handleKeyDown:GC(n)}})}function GC(n){let e=KC(n);return function(t,r){let o=HC(r),s,i=e[Bl(o,r)];if(i&&i(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Bl(o,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(s=mr[r.keyCode])&&s!=o){let l=e[Bl(s,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const QC=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function ZC(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const JC=(n,e,t)=>{let r=ZC(n,t);if(!r)return!1;let o=lm(r);if(!o){let i=r.blockRange(),l=i&&Zo(i);return l==null?!1:(e&&e(n.tr.lift(i,l).scrollIntoView()),!0)}let s=o.nodeBefore;if(!s.type.spec.isolating&&dm(n,o,e))return!0;if(r.parent.content.size==0&&(Po(s,"end")||Le.isSelectable(s))){let i=Ou(n.doc,r.before(),r.after(),we.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=n.tr.step(i);l.setSelection(Po(s,"end")?$e.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Le.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1};function Po(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const XC=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=lm(r)}let i=s&&s.nodeBefore;return!i||!Le.isSelectable(i)?!1:(e&&e(n.tr.setSelection(Le.create(n.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function lm(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function qC(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const eA=(n,e,t)=>{let r=qC(n,t);if(!r)return!1;let o=cm(r);if(!o)return!1;let s=o.nodeAfter;if(dm(n,o,e))return!0;if(r.parent.content.size==0&&(Po(s,"start")||Le.isSelectable(s))){let i=Ou(n.doc,r.before(),r.after(),we.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=n.tr.step(i);l.setSelection(Po(s,"start")?$e.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):Le.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},tA=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;s=cm(r)}let i=s&&s.nodeAfter;return!i||!Le.isSelectable(i)?!1:(e&&e(n.tr.setSelection(Le.create(n.doc,s.pos)).scrollIntoView()),!0)};function cm(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const nA=(n,e)=>{let t=n.selection,r=t instanceof Le,o;if(r){if(t.node.isTextblock||!Cr(n.doc,t.from))return!1;o=t.from}else if(o=Ua(n.doc,t.from,-1),o==null)return!1;if(e){let s=n.tr.join(o);r&&s.setSelection(Le.create(s.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},rA=(n,e)=>{let t=n.selection,r;if(t instanceof Le){if(t.node.isTextblock||!Cr(n.doc,t.to))return!1;r=t.to}else if(r=Ua(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},oA=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),s=o&&Zo(o);return s==null?!1:(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)},sA=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
70
- `).scrollIntoView()),!0)};function um(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const iA=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),s=t.indexAfter(-1),i=um(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,i.createAndFill());a.setSelection($e.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},aA=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof dn||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=um(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=n.tr.insert(i,s.createAndFill());l.setSelection(Ue.create(l.doc,i+1)),e(l.scrollIntoView())}return!0},lA=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(Io(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),o=r&&Zo(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},cA=(n,e)=>{let{$from:t,to:r}=n.selection,o,s=t.sharedDepth(r);return s==0?!1:(o=t.before(s),e&&e(n.tr.setSelection(Le.create(n.doc,o))),!0)};function uA(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||Cr(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function dm(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,s,i;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(uA(n,e,t))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(s=(i=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&i.matchType(s[0]||o.type).validEnd){if(t){let f=e.pos+o.nodeSize,h=fe.empty;for(let g=s.length-1;g>=0;g--)h=fe.from(s[g].create(null,h));h=fe.from(r.copy(h));let p=n.tr.step(new ut(e.pos-1,f,e.pos,f,new we(h,1,0),s.length,!0)),m=f+2*s.length;Cr(p.doc,m)&&p.join(m),t(p.scrollIntoView())}return!0}let a=$e.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),d=u&&Zo(u);if(d!=null&&d>=e.depth)return t&&t(n.tr.lift(u,d).scrollIntoView()),!0;if(l&&Po(o,"start",!0)&&Po(r,"end")){let f=r,h=[];for(;h.push(f),!f.isTextblock;)f=f.lastChild;let p=o,m=1;for(;!p.isTextblock;p=p.firstChild)m++;if(f.canReplace(f.childCount,f.childCount,p.content)){if(t){let g=fe.empty;for(let C=h.length-1;C>=0;C--)g=fe.from(h[C].copy(g));let v=n.tr.step(new ut(e.pos-h.length,e.pos+o.nodeSize,e.pos+m,e.pos+o.nodeSize-m,new we(g,h.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function fm(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(t&&t(e.tr.setSelection(Ue.create(e.doc,n<0?o.start(s):o.end(s)))),!0):!1}}const dA=fm(-1),fA=fm(1);function hA(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,i=o.blockRange(s),l=i&&Mu(i,n,e);return l?(r&&r(t.tr.wrap(i,l).scrollIntoView()),!0):!1}}function Qf(n,e=null){return function(t,r){let o=!1;for(let s=0;s<t.selection.ranges.length&&!o;s++){let{$from:{pos:i},$to:{pos:l}}=t.selection.ranges[s];t.doc.nodesBetween(i,l,(a,u)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let d=t.doc.resolve(u),f=d.index();o=d.parent.canReplaceWith(f,f+1,n)}})}if(!o)return!1;if(r){let s=t.tr;for(let i=0;i<t.selection.ranges.length;i++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[i];s.setBlockType(l,a,n,e)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function pA(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,i=o.blockRange(s),l=!1,a=i;if(!i)return!1;if(i.depth>=2&&o.node(i.depth-1).type.compatibleContent(n)&&i.startIndex==0){if(o.index(i.depth-1)==0)return!1;let d=t.doc.resolve(i.start-2);a=new Bi(d,d,i.depth),i.endIndex<i.parent.childCount&&(i=new Bi(o,t.doc.resolve(s.end(i.depth)),i.depth)),l=!0}let u=Mu(a,n,e,i);return u?(r&&r(mA(t.tr,i,u,l,n).scrollIntoView()),!0):!1}}function mA(n,e,t,r,o){let s=fe.empty;for(let d=t.length-1;d>=0;d--)s=fe.from(t[d].type.create(t[d].attrs,s));n.step(new ut(e.start-(r?2:0),e.end,e.start,e.end,new we(s,0,0),t.length,!0));let i=0;for(let d=0;d<t.length;d++)t[d].type==o&&(i=d+1);let l=t.length-i,a=e.start+t.length-(r?2:0),u=e.parent;for(let d=e.startIndex,f=e.endIndex,h=!0;d<f;d++,h=!1)!h&&Io(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=u.child(d).nodeSize;return n}function gA(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?vA(e,t,n,s):yA(e,t,s):!0:!1}}function vA(n,e,t,r){let o=n.tr,s=r.end,i=r.$to.end(r.depth);s<i&&(o.step(new ut(s-1,i,s,i,new we(fe.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Bi(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const l=Zo(r);if(l==null)return!1;o.lift(r,l);let a=o.mapping.map(s,-1)-1;return Cr(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}function yA(n,e,t){let r=n.tr,o=t.parent;for(let p=t.end,m=t.endIndex-1,g=t.startIndex;m>g;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let s=r.doc.resolve(t.start),i=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(l?0:1),d+1,i.content.append(a?fe.empty:fe.from(o))))return!1;let f=s.pos,h=f+i.nodeSize;return r.step(new ut(f-(l?1:0),h+(a?1:0),f+1,h-1,new we((l?fe.empty:fe.from(o.copy(fe.empty))).append(a?fe.empty:fe.from(o.copy(fe.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function EA(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==n);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=n)return!1;if(t){let u=a.lastChild&&a.lastChild.type==l.type,d=fe.from(u?n.create():null),f=new we(fe.from(n.create(null,fe.from(l.type.create(null,d)))),u?3:1,0),h=s.start,p=s.end;t(e.tr.step(new ut(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function Ya(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,s=t.storedMarks,t}}}class Ga{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{const f=a(...d)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l=[],a=!!e,u=e||s.tr,d=()=>(!a&&t&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),l.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...g)=>{const v=this.buildProps(u,t),C=p(...g)(v);return l.push(C),f}])),run:d};return f}createCan(e){const{rawCommands:t,state:r}=this,o=!1,s=e||r.tr,i=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...d)=>u(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l={tr:e,editor:o,view:i,state:Ya({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,u])=>[a,(...d)=>u(...d)(l)]))}};return l}}class CA{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function xe(n,e,t){return n.config[e]===void 0&&n.parent?xe(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?xe(n.parent,e,t):null}):n.config[e]}function Qa(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function hm(n){const e=[],{nodeExtensions:t,markExtensions:r}=Qa(n),o=[...t,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(i=>{const l={name:i.name,options:i.options,storage:i.storage},a=xe(i,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([h,p])=>{e.push({type:f,name:h,attribute:{...s,...p}})})})})}),o.forEach(i=>{const l={name:i.name,options:i.options,storage:i.storage},a=xe(i,"addAttributes",l);if(!a)return;const u=a();Object.entries(u).forEach(([d,f])=>{const h={...s,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:i.name,name:d,attribute:h})})}),e}function dt(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function Ot(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const l=s?s.split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(d=>!a.includes(d));r[o]=[...a,...u].join(" ")}else o==="style"?r[o]=[r[o],s].join("; "):r[o]=s}),r},{})}function Mc(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>Ot(t,r),{})}function pm(n){return typeof n=="function"}function Ve(n,e=void 0,...t){return pm(n)?e?n.bind(e)(...t):n(...t):n}function AA(n={}){return Object.keys(n).length===0&&n.constructor===Object}function bA(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function Zf(n,e){return n.style?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((s,i)=>{const l=i.attribute.parseHTML?i.attribute.parseHTML(t):bA(t.getAttribute(i.name));return l==null?s:{...s,[i.name]:l}},{});return{...r,...o}}}}function Jf(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&AA(t)?!1:t!=null))}function wA(n,e){var t;const r=hm(n),{nodeExtensions:o,markExtensions:s}=Qa(n),i=(t=o.find(u=>xe(u,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(u=>{const d=r.filter(C=>C.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:e},h=n.reduce((C,b)=>{const E=xe(b,"extendNodeSchema",f);return{...C,...E?E(u):{}}},{}),p=Jf({...h,content:Ve(xe(u,"content",f)),marks:Ve(xe(u,"marks",f)),group:Ve(xe(u,"group",f)),inline:Ve(xe(u,"inline",f)),atom:Ve(xe(u,"atom",f)),selectable:Ve(xe(u,"selectable",f)),draggable:Ve(xe(u,"draggable",f)),code:Ve(xe(u,"code",f)),defining:Ve(xe(u,"defining",f)),isolating:Ve(xe(u,"isolating",f)),attrs:Object.fromEntries(d.map(C=>{var b;return[C.name,{default:(b=C==null?void 0:C.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Ve(xe(u,"parseHTML",f));m&&(p.parseDOM=m.map(C=>Zf(C,d)));const g=xe(u,"renderHTML",f);g&&(p.toDOM=C=>g({node:C,HTMLAttributes:Mc(C,d)}));const v=xe(u,"renderText",f);return v&&(p.toText=v),[u.name,p]})),a=Object.fromEntries(s.map(u=>{const d=r.filter(v=>v.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:e},h=n.reduce((v,C)=>{const b=xe(C,"extendMarkSchema",f);return{...v,...b?b(u):{}}},{}),p=Jf({...h,inclusive:Ve(xe(u,"inclusive",f)),excludes:Ve(xe(u,"excludes",f)),group:Ve(xe(u,"group",f)),spanning:Ve(xe(u,"spanning",f)),code:Ve(xe(u,"code",f)),attrs:Object.fromEntries(d.map(v=>{var C;return[v.name,{default:(C=v==null?void 0:v.attribute)===null||C===void 0?void 0:C.default}]}))}),m=Ve(xe(u,"parseHTML",f));m&&(p.parseDOM=m.map(v=>Zf(v,d)));const g=xe(u,"renderHTML",f);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:Mc(v,d)})),[u.name,p]}));return new M9({topNode:i,nodes:l,marks:a})}function Pl(n,e){return e.nodes[n]||e.marks[n]||null}function Xf(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const TA=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,s,i,l)=>{var a,u;const d=((u=(a=o.type.spec).toText)===null||u===void 0?void 0:u.call(a,{node:o,pos:s,parent:i,index:l}))||o.textContent||"%leaf%";t+=d.slice(0,Math.max(0,r-s))}),t};function Hu(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class mm{constructor(e){this.find=e.find,this.handler=e.handler}}const SA=(n,e)=>{if(Hu(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Fl(n){var e;const{editor:t,from:r,to:o,text:s,rules:i,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const u=a.state.doc.resolve(r);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let d=!1;const f=TA(u)+s;return i.forEach(h=>{if(d)return;const p=SA(f,h.find);if(!p)return;const m=a.state.tr,g=Ya({state:a.state,transaction:m}),v={from:r-(p[0].length-s.length),to:o},{commands:C,chain:b,can:E}=new Ga({editor:t,state:g});h.handler({state:g,range:v,match:p,commands:C,chain:b,can:E})===null||!m.steps.length||(m.setMeta(l,{transform:m,from:r,to:o,text:s}),a.dispatch(m),d=!0)}),d}function kA(n){const{editor:e,rules:t}=n,r=new Ft({state:{init(){return null},apply(o,s){const i=o.getMeta(r);return i||(o.selectionSet||o.docChanged?null:s)}},props:{handleTextInput(o,s,i,l){return Fl({editor:e,from:s,to:i,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&Fl({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:i}=o.state.selection;return i?Fl({editor:e,from:i.pos,to:i.pos,text:`
71
- `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function _A(n){return typeof n=="number"}class xA{constructor(e){this.find=e.find,this.handler=e.handler}}const NA=(n,e)=>{if(Hu(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const o=[r.text];return o.index=r.index,o.input=n,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function IA(n){const{editor:e,state:t,from:r,to:o,rule:s,pasteEvent:i,dropEvent:l}=n,{commands:a,chain:u,can:d}=new Ga({editor:e,state:t}),f=[];return t.doc.nodesBetween(r,o,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,m),v=Math.min(o,m+p.content.size),C=p.textBetween(g-m,v-m,void 0,"");NA(C,s.find).forEach(E=>{if(E.index===void 0)return;const y=g+E.index+1,x=y+E[0].length,w={from:t.tr.mapping.map(y),to:t.tr.mapping.map(x)},I=s.handler({state:t,range:w,match:E,commands:a,chain:u,can:d,pasteEvent:i,dropEvent:l});f.push(I)})}),f.every(p=>p!==null)}function MA(n){const{editor:e,rules:t}=n;let r=null,o=!1,s=!1,i=new ClipboardEvent("paste"),l=new DragEvent("drop");return t.map(u=>new Ft({view(d){const f=h=>{var p;r=!((p=d.dom.parentElement)===null||p===void 0)&&p.contains(h.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(d,f)=>(s=r===d.dom.parentElement,l=f,!1),paste:(d,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return i=f,o=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!s;if(!m&&!g)return;const v=f.doc.content.findDiffStart(h.doc.content),C=f.doc.content.findDiffEnd(h.doc.content);if(!_A(v)||!C||v===C.b)return;const b=h.tr,E=Ya({state:h,transaction:b});if(!(!IA({editor:e,state:E,from:Math.max(v-1,0),to:C.b-1,rule:u,pasteEvent:i,dropEvent:l})||!b.steps.length))return l=new DragEvent("drop"),i=new ClipboardEvent("paste"),b}}))}function OA(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class _o{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=_o.resolve(e),this.schema=wA(this.extensions,t),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const s={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:Pl(r.name,this.schema)};r.type==="mark"&&(!((o=Ve(xe(r,"keepOnSplit",s)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const i=xe(r,"onBeforeCreate",s);i&&this.editor.on("beforeCreate",i);const l=xe(r,"onCreate",s);l&&this.editor.on("create",l);const a=xe(r,"onUpdate",s);a&&this.editor.on("update",a);const u=xe(r,"onSelectionUpdate",s);u&&this.editor.on("selectionUpdate",u);const d=xe(r,"onTransaction",s);d&&this.editor.on("transaction",d);const f=xe(r,"onFocus",s);f&&this.editor.on("focus",f);const h=xe(r,"onBlur",s);h&&this.editor.on("blur",h);const p=xe(r,"onDestroy",s);p&&this.editor.on("destroy",p)})}static resolve(e){const t=_o.sort(_o.flatten(e)),r=OA(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},o=xe(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const s=xe(r,"priority")||100,i=xe(o,"priority")||100;return s>i?-1:s<i?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Pl(t.name,this.schema)},o=xe(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=_o.sort([...this.extensions].reverse()),r=[],o=[],s=t.map(i=>{const l={name:i.name,options:i.options,storage:i.storage,editor:e,type:Pl(i.name,this.schema)},a=[],u=xe(i,"addKeyboardShortcuts",l);let d={};if(i.type==="mark"&&i.config.exitable&&(d.ArrowRight=()=>On.handleExit({editor:e,mark:i})),u){const g=Object.fromEntries(Object.entries(u()).map(([v,C])=>[v,()=>C({editor:e})]));d={...d,...g}}const f=YC(d);a.push(f);const h=xe(i,"addInputRules",l);Xf(i,e.options.enableInputRules)&&h&&r.push(...h());const p=xe(i,"addPasteRules",l);Xf(i,e.options.enablePasteRules)&&p&&o.push(...p());const m=xe(i,"addProseMirrorPlugins",l);if(m){const g=m();a.push(...g)}return a}).flat();return[kA({editor:e,rules:r}),...MA({editor:e,rules:o}),...s]}get attributes(){return hm(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Qa(this.extensions);return Object.fromEntries(t.filter(r=>!!xe(r,"addNodeView")).map(r=>{const o=this.attributes.filter(a=>a.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:e,type:dt(r.name,this.schema)},i=xe(r,"addNodeView",s);if(!i)return[];const l=(a,u,d,f)=>{const h=Mc(a,o);return i()({editor:e,node:a,getPos:d,decorations:f,HTMLAttributes:h,extension:r})};return[r.name,l]}))}}function LA(n){return Object.prototype.toString.call(n).slice(8,-1)}function Vl(n){return LA(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Za(n,e){const t={...n};return Vl(n)&&Vl(e)&&Object.keys(e).forEach(r=>{Vl(e[r])?r in n?t[r]=Za(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class rn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new rn(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new rn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}}function gm(n,e,t){const{from:r,to:o}=e,{blockSeparator:s=`
72
-
73
- `,textSerializers:i={}}=t||{};let l="",a=!0;return n.nodesBetween(r,o,(u,d,f,h)=>{var p;const m=i==null?void 0:i[u.type.name];m?(u.isBlock&&!a&&(l+=s,a=!0),f&&(l+=m({node:u,pos:d,parent:f,index:h,range:e}))):u.isText?(l+=(p=u==null?void 0:u.text)===null||p===void 0?void 0:p.slice(Math.max(r,d)-d,o-d),a=!1):u.isBlock&&!a&&(l+=s,a=!0)}),l}function vm(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const DA=rn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ft({key:new gn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(d=>d.$from.pos)),l=Math.max(...s.map(d=>d.$to.pos)),a=vm(t);return gm(r,{from:i,to:l},{textSerializers:a})}}})]}}),RA=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),BA=(n=!1)=>({commands:e})=>e.setContent("",n),PA=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:s,$to:i})=>{n.doc.nodesBetween(s.pos,i.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:d}=e,f=u.resolve(d.map(a)),h=u.resolve(d.map(a+l.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Zo(p);if(l.type.isTextblock){const{defaultType:g}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,g)}(m||m===0)&&e.lift(p,m)})}),!0},FA=n=>e=>n(e),VA=()=>({state:n,dispatch:e})=>aA(n,e),$A=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,s=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new Ue(r.doc.resolve(i-1))),!0},zA=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const l=o.before(s),a=o.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1},UA=n=>({tr:e,state:t,dispatch:r})=>{const o=dt(n,t.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const a=s.before(i),u=s.after(i);e.delete(a,u).scrollIntoView()}return!0}return!1},HA=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},jA=()=>({state:n,dispatch:e})=>QC(n,e),WA=()=>({commands:n})=>n.keyboardShortcut("Enter"),KA=()=>({state:n,dispatch:e})=>iA(n,e);function Wi(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:Hu(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function Oc(n,e,t={}){return n.find(r=>r.type===e&&Wi(r.attrs,t))}function YA(n,e,t={}){return!!Oc(n,e,t)}function ju(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&r.offset!==0&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const o=Oc([...r.node.marks],e,t);if(!o)return;let s=r.index,i=n.start()+r.offset,l=s+1,a=i+r.node.nodeSize;for(Oc([...r.node.marks],e,t);s>0&&o.isInSet(n.parent.child(s-1).marks);)s-=1,i-=n.parent.child(s).nodeSize;for(;l<n.parent.childCount&&YA([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:i,to:a}}function br(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const GA=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const s=br(n,r.schema),{doc:i,selection:l}=t,{$from:a,from:u,to:d}=l;if(o){const f=ju(a,s,e);if(f&&f.from<=u&&f.to>=d){const h=Ue.create(i,f.from,f.to);t.setSelection(h)}}return!0},QA=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function Wu(n){return n instanceof Ue}function Hn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function ym(n,e=null){if(!e)return null;const t=$e.atStart(n),r=$e.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,s=r.to;return e==="all"?Ue.create(n,Hn(0,o,s),Hn(n.content.size,o,s)):Ue.create(n,Hn(e,o,s),Hn(e,o,s))}function Ku(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const ZA=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{Ku()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(s&&n===null&&!Wu(t.state.selection))return i(),!0;const l=ym(o.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},JA=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),XA=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function qf(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function Ki(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?fe.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Ki("",e,t)}if(typeof n=="string"){const r=Lo.fromSchema(e);return t.slice?r.parseSlice(qf(n),t.parseOptions).content:r.parse(qf(n),t.parseOptions)}return Ki("",e,t)}function qA(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof pt||o instanceof ut))return;const s=n.mapping.maps[r];let i=0;s.forEach((l,a,u,d)=>{i===0&&(i=d)}),n.setSelection($e.near(n.doc.resolve(i),t))}const eb=n=>n.toString().startsWith("<"),tb=(n,e,t)=>({tr:r,dispatch:o,editor:s})=>{if(o){t={parseOptions:{},updateSelection:!0,...t};const i=Ki(e,s.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if(i.toString()==="<>")return!0;let{from:l,to:a}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,d=!0;if((eb(i)?i:[i]).forEach(h=>{h.check(),u=u?h.isText&&h.marks.length===0:!1,d=d?h.isBlock:!1}),l===a&&d){const{parent:h}=r.doc.resolve(l);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,a+=1)}u?Array.isArray(e)?r.insertText(e.map(h=>h.text||"").join(""),l,a):typeof e=="object"&&e&&e.text?r.insertText(e.text,l,a):r.insertText(e,l,a):r.replaceWith(l,a,i),t.updateSelection&&qA(r,r.steps.length-1,-1)}return!0},nb=()=>({state:n,dispatch:e})=>nA(n,e),rb=()=>({state:n,dispatch:e})=>rA(n,e),ob=()=>({state:n,dispatch:e})=>JC(n,e),sb=()=>({state:n,dispatch:e})=>eA(n,e),ib=()=>({tr:n,state:e,dispatch:t})=>{try{const r=Ua(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},ab=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Ua(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function Em(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function lb(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,s,i;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!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))s=!0;else if(/^mod$/i.test(a))Ku()||Em()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),i&&(t=`Meta-${t}`),s&&(t=`Shift-${t}`),t}const cb=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const s=lb(n).split(/-(?!$)/),i=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",u=>u(t,l))});return a==null||a.steps.forEach(u=>{const d=u.map(r.mapping);d&&o&&r.maybeStep(d)}),!0};function Ms(n,e,t={}){const{from:r,to:o,empty:s}=n.selection,i=e?dt(e,n.schema):null,l=[];n.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);l.push({node:f,from:p,to:m})});const a=o-r,u=l.filter(f=>i?i.name===f.node.type.name:!0).filter(f=>Wi(f.node.attrs,t,{strict:!1}));return s?!!u.length:u.reduce((f,h)=>f+h.to-h.from,0)>=a}const ub=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return Ms(t,o,e)?oA(t,r):!1},db=()=>({state:n,dispatch:e})=>lA(n,e),fb=n=>({state:e,dispatch:t})=>{const r=dt(n,e.schema);return gA(r)(e,t)},hb=()=>({state:n,dispatch:e})=>sA(n,e);function Ja(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function eh(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const pb=(n,e)=>({tr:t,state:r,dispatch:o})=>{let s=null,i=null;const l=Ja(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=dt(n,r.schema)),l==="mark"&&(i=br(n,r.schema)),o&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(u,d)=>{s&&s===u.type&&t.setNodeMarkup(d,void 0,eh(u.attrs,e)),i&&u.marks.length&&u.marks.forEach(f=>{i===f.type&&t.addMark(d,d+u.nodeSize,i.create(eh(f.attrs,e)))})})}),!0):!1},mb=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),gb=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),vb=()=>({state:n,dispatch:e})=>XC(n,e),yb=()=>({state:n,dispatch:e})=>tA(n,e),Eb=()=>({state:n,dispatch:e})=>cA(n,e),Cb=()=>({state:n,dispatch:e})=>fA(n,e),Ab=()=>({state:n,dispatch:e})=>dA(n,e);function Cm(n,e,t={}){return Ki(n,e,{slice:!1,parseOptions:t})}const bb=(n,e=!1,t={})=>({tr:r,editor:o,dispatch:s})=>{const{doc:i}=r,l=Cm(n,o.schema,t);return s&&r.replaceWith(0,i.content.size,l).setMeta("preventUpdate",!e),!0};function Xa(n,e){const t=br(e,n.schema),{from:r,to:o,empty:s}=n.selection,i=[];s?(n.storedMarks&&i.push(...n.storedMarks),i.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,a=>{i.push(...a.marks)});const l=i.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function wb(n,e){const t=new k0(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function Tb(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function Sb(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,s)=>{t(o)&&r.push({node:o,pos:s})}),r}function kb(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Yu(n){return e=>kb(e.$from,n)}function _b(n,e){const t=Sn.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}function xb(n,e){const t={from:0,to:n.content.size};return gm(n,t,e)}function Nb(n,e){const t=dt(e,n.schema),{from:r,to:o}=n.selection,s=[];n.doc.nodesBetween(r,o,l=>{s.push(l)});const i=s.reverse().find(l=>l.type.name===t.name);return i?{...i.attrs}:{}}function Am(n,e){const t=Ja(typeof e=="string"?e:e.name,n.schema);return t==="node"?Nb(n,e):t==="mark"?Xa(n,e):{}}function Ib(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function Mb(n){const e=Ib(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,i)=>i!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function Ob(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,s)=>{const i=[];if(o.ranges.length)o.forEach((l,a)=>{i.push({from:l,to:a})});else{const{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;i.push({from:l,to:a})}i.forEach(({from:l,to:a})=>{const u=e.slice(s).map(l,-1),d=e.slice(s).map(a),f=e.invert().map(u,-1),h=e.invert().map(d);r.push({oldRange:{from:f,to:h},newRange:{from:u,to:d}})})}),Mb(r)}function Gu(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const s=t.resolve(n-1),i=ju(s,o.type);i&&r.push({mark:o,...i})}):t.nodesBetween(n,e,(o,s)=>{r.push(...o.marks.map(i=>({from:s,to:s+o.nodeSize,mark:i})))}),r}function bi(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function Lc(n,e,t={}){const{empty:r,ranges:o}=n.selection,s=e?br(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(f=>s?s.name===f.type.name:!0).find(f=>Wi(f.attrs,t,{strict:!1}));let i=0;const l=[];if(o.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;n.doc.nodesBetween(p,m,(g,v)=>{if(!g.isText&&!g.marks.length)return;const C=Math.max(p,v),b=Math.min(m,v+g.nodeSize),E=b-C;i+=E,l.push(...g.marks.map(y=>({mark:y,from:C,to:b})))})}),i===0)return!1;const a=l.filter(f=>s?s.name===f.mark.type.name:!0).filter(f=>Wi(f.mark.attrs,t,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),u=l.filter(f=>s?f.mark.type!==s&&f.mark.type.excludes(s):!0).reduce((f,h)=>f+h.to-h.from,0);return(a>0?a+u:a)>=i}function Lb(n,e,t={}){if(!e)return Ms(n,null,t)||Lc(n,null,t);const r=Ja(e,n.schema);return r==="node"?Ms(n,e,t):r==="mark"?Lc(n,e,t):!1}function th(n,e){const{nodeExtensions:t}=Qa(e),r=t.find(i=>i.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=Ve(xe(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function Db(n){var e;const t=(e=n.type.createAndFill())===null||e===void 0?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}function Rb(n){return n instanceof Le}function bm(n,e,t){const o=n.state.doc.content.size,s=Hn(e,0,o),i=Hn(t,0,o),l=n.coordsAtPos(s),a=n.coordsAtPos(i,-1),u=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom),f=Math.min(l.left,a.left),h=Math.max(l.right,a.right),p=h-f,m=d-u,C={top:u,bottom:d,left:f,right:h,width:p,height:m,x:f,y:u};return{...C,toJSON:()=>C}}function Bb(n,e,t){var r;const{selection:o}=e;let s=null;if(Wu(o)&&(s=o.$cursor),s){const l=(r=n.storedMarks)!==null&&r!==void 0?r:s.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:i}=o;return i.some(({$from:l,$to:a})=>{let u=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(d,f,h)=>{if(u)return!1;if(d.isInline){const p=!h||h.type.allowsMarkType(t),m=!!t.isInSet(d.marks)||!d.marks.some(g=>g.type.excludes(t));u=p&&m}return!u}),u})}const Pb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:s}=t,{empty:i,ranges:l}=s,a=br(n,r.schema);if(o)if(i){const u=Xa(r,a);t.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const d=u.$from.pos,f=u.$to.pos;r.doc.nodesBetween(d,f,(h,p)=>{const m=Math.max(p,d),g=Math.min(p+h.nodeSize,f);h.marks.find(C=>C.type===a)?h.marks.forEach(C=>{a===C.type&&t.addMark(m,g,a.create({...C.attrs,...e}))}):t.addMark(m,g,a.create(e))})});return Bb(r,t,a)},Fb=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Vb=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const s=dt(n,t.schema);return s.isTextblock?o().command(({commands:i})=>Qf(s,e)(t)?!0:i.clearNodes()).command(({state:i})=>Qf(s,e)(i,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},$b=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=Hn(n,0,r.content.size),s=Le.create(r,o);e.setSelection(s)}return!0},zb=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:s}=typeof n=="number"?{from:n,to:n}:n,i=Ue.atStart(r).from,l=Ue.atEnd(r).to,a=Hn(o,i,l),u=Hn(s,i,l),d=Ue.create(r,a,u);e.setSelection(d)}return!0},Ub=n=>({state:e,dispatch:t})=>{const r=dt(n,e.schema);return EA(r)(e,t)};function nh(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const Hb=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:l,$to:a}=s,u=o.extensionManager.attributes,d=bi(u,l.node().type.name,l.node().attrs);if(s instanceof Le&&s.node.isBlock)return!l.parentOffset||!Io(i,l.pos)?!1:(r&&(n&&nh(t,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const f=a.parentOffset===a.parent.content.size;s instanceof Ue&&e.deleteSelection();const h=l.depth===0?void 0:Tb(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=f&&h?[{type:h,attrs:d}]:void 0,m=Io(e.doc,e.mapping.map(l.pos),1,p);if(!p&&!m&&Io(e.doc,e.mapping.map(l.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:d}]:void 0),m&&(e.split(e.mapping.map(l.pos),1,p),h&&!f&&!l.parentOffset&&l.parent.type!==h)){const g=e.mapping.map(l.before()),v=e.doc.resolve(g);l.node(-1).canReplaceWith(v.index(),v.index()+1,h)&&e.setNodeMarkup(e.mapping.map(l.before()),h)}n&&nh(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},jb=n=>({tr:e,state:t,dispatch:r,editor:o})=>{var s;const i=dt(n,t.schema),{$from:l,$to:a}=t.selection,u=t.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(a))return!1;const d=l.node(-1);if(d.type!==i)return!1;const f=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let v=fe.empty;const C=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-C;I>=l.depth-3;I-=1)v=fe.from(l.node(I).copy(v));const b=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,E=bi(f,l.node().type.name,l.node().attrs),y=((s=i.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(E))||void 0;v=v.append(fe.from(i.createAndFill(null,y)||void 0));const x=l.before(l.depth-(C-1));e.replace(x,l.after(-b),new we(v,4-C,0));let w=-1;e.doc.nodesBetween(x,e.doc.content.size,(I,M)=>{if(w>-1)return!1;I.isTextblock&&I.content.size===0&&(w=M+1)}),w>-1&&e.setSelection(Ue.near(e.doc.resolve(w))),e.scrollIntoView()}return!0}const h=a.pos===l.end()?d.contentMatchAt(0).defaultType:null,p=bi(f,d.type.name,d.attrs),m=bi(f,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=h?[{type:i,attrs:p},{type:h,attrs:m}]:[{type:i,attrs:p}];if(!Io(e.doc,l.pos,2))return!1;if(r){const{selection:v,storedMarks:C}=t,{splittableMarks:b}=o.extensionManager,E=C||v.$to.parentOffset&&v.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!E||!r)return!0;const y=E.filter(x=>b.includes(x.type.name));e.ensureMarks(y)}return!0},$l=(n,e)=>{const t=Yu(i=>i.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Cr(n.doc,t.pos)&&n.join(t.pos),!0},zl=(n,e)=>{const t=Yu(i=>i.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Cr(n.doc,r)&&n.join(r),!0},Wb=(n,e,t,r={})=>({editor:o,tr:s,state:i,dispatch:l,chain:a,commands:u,can:d})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,p=dt(n,i.schema),m=dt(e,i.schema),{selection:g,storedMarks:v}=i,{$from:C,$to:b}=g,E=C.blockRange(b),y=v||g.$to.parentOffset&&g.$from.marks();if(!E)return!1;const x=Yu(w=>th(w.type.name,f))(g);if(E.depth>=1&&x&&E.depth-x.depth<=1){if(x.node.type===p)return u.liftListItem(m);if(th(x.node.type.name,f)&&p.validContent(x.node.content)&&l)return a().command(()=>(s.setNodeMarkup(x.pos,p),!0)).command(()=>$l(s,p)).command(()=>zl(s,p)).run()}return!t||!y||!l?a().command(()=>d().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>$l(s,p)).command(()=>zl(s,p)).run():a().command(()=>{const w=d().wrapInList(p,r),I=y.filter(M=>h.includes(M.type.name));return s.ensureMarks(I),w?!0:u.clearNodes()}).wrapInList(p,r).command(()=>$l(s,p)).command(()=>zl(s,p)).run()},Kb=(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=t,i=br(n,r.schema);return Lc(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},Yb=(n,e,t={})=>({state:r,commands:o})=>{const s=dt(n,r.schema),i=dt(e,r.schema);return Ms(r,s,t)?o.setNode(i):o.setNode(s,t)},Gb=(n,e={})=>({state:t,commands:r})=>{const o=dt(n,t.schema);return Ms(t,o,e)?r.lift(o):r.wrapIn(o,e)},Qb=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let s;if(o.spec.isInputRules&&(s=o.getState(n))){if(e){const i=n.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)i.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else i.delete(s.from,s.to)}return!0}}return!1},Zb=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},Jb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:l}=t,a=br(n,r.schema),{$from:u,empty:d,ranges:f}=l;if(!o)return!0;if(d&&i){let{from:h,to:p}=l;const m=(s=u.marks().find(v=>v.type===a))===null||s===void 0?void 0:s.attrs,g=ju(u,a,m);g&&(h=g.from,p=g.to),t.removeMark(h,p,a)}else f.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,a)});return t.removeStoredMark(a),!0},Xb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{let s=null,i=null;const l=Ja(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=dt(n,r.schema)),l==="mark"&&(i=br(n,r.schema)),o&&t.selection.ranges.forEach(a=>{const u=a.$from.pos,d=a.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{s&&s===f.type&&t.setNodeMarkup(h,void 0,{...f.attrs,...e}),i&&f.marks.length&&f.marks.forEach(p=>{if(i===p.type){const m=Math.max(h,u),g=Math.min(h+f.nodeSize,d);t.addMark(m,g,i.create({...p.attrs,...e}))}})})}),!0):!1},qb=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return hA(o,e)(t,r)},ew=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return pA(o,e)(t,r)};var tw=Object.freeze({__proto__:null,blur:RA,clearContent:BA,clearNodes:PA,command:FA,createParagraphNear:VA,cut:$A,deleteCurrentNode:zA,deleteNode:UA,deleteRange:HA,deleteSelection:jA,enter:WA,exitCode:KA,extendMarkRange:GA,first:QA,focus:ZA,forEach:JA,insertContent:XA,insertContentAt:tb,joinUp:nb,joinDown:rb,joinBackward:ob,joinForward:sb,joinItemBackward:ib,joinItemForward:ab,keyboardShortcut:cb,lift:ub,liftEmptyBlock:db,liftListItem:fb,newlineInCode:hb,resetAttributes:pb,scrollIntoView:mb,selectAll:gb,selectNodeBackward:vb,selectNodeForward:yb,selectParentNode:Eb,selectTextblockEnd:Cb,selectTextblockStart:Ab,setContent:bb,setMark:Pb,setMeta:Fb,setNode:Vb,setNodeSelection:$b,setTextSelection:zb,sinkListItem:Ub,splitBlock:Hb,splitListItem:jb,toggleList:Wb,toggleMark:Kb,toggleNode:Yb,toggleWrap:Gb,undoInputRule:Qb,unsetAllMarks:Zb,unsetMark:Jb,updateAttributes:Xb,wrapIn:qb,wrapInList:ew});const nw=rn.create({name:"commands",addCommands(){return{...tw}}}),rw=rn.create({name:"editable",addProseMirrorPlugins(){return[new Ft({key:new gn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ow=rn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Ft({key:new gn("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),sw=rn.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:d,$anchor:f}=a,{pos:h,parent:p}=f,m=f.parent.isTextblock?l.doc.resolve(h-1):f,g=m.parent.type.spec.isolating,v=f.pos-f.parentOffset,C=g&&m.parent.childCount===1?v===f.pos:$e.atStart(u).from===h;return!d||!C||!p.type.isTextblock||p.textContent.length?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"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 Ku()||Em()?s:o},addProseMirrorPlugins(){return[new Ft({key:new gn("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(m=>m.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:o,from:s,to:i}=e.selection,l=$e.atStart(e.doc).from,a=$e.atEnd(e.doc).to;if(o||!(s===l&&i===a)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;const f=t.tr,h=Ya({state:t,transaction:f}),{commands:p}=new Ga({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),iw=rn.create({name:"tabindex",addProseMirrorPlugins(){return[new Ft({key:new gn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var aw=Object.freeze({__proto__:null,ClipboardTextSerializer:DA,Commands:nw,Editable:rw,FocusEvents:ow,Keymap:sw,Tabindex:iw});const lw=`.ProseMirror {
62
+ Expect errors in decoding.`),N=N.replace(/[^A-Za-z0-9\+\/\=]/g,"");_=this.KEY_STR.indexOf(N.charAt(Z++)),O=this.KEY_STR.indexOf(N.charAt(Z++)),H=this.KEY_STR.indexOf(N.charAt(Z++)),j=this.KEY_STR.indexOf(N.charAt(Z++)),R=_<<2|O>>4,A=(O&15)<<4|H>>2,T=(H&3)<<6|j,X.push(R),H!==64&&X.push(A),j!==64&&X.push(T),R=A=T="",_=O=H=j="",Z<N.length;);return X}}]),D}();ve.initClass();var Te=function(B,N){var R=!1,A=!0,T=B.document,_=T.documentElement,O=T.addEventListener?"addEventListener":"attachEvent",H=T.addEventListener?"removeEventListener":"detachEvent",j=T.addEventListener?"":"on",Z=function S(k){if(!(k.type==="readystatechange"&&T.readyState!=="complete")&&((k.type==="load"?B:T)[H](j+k.type,S,!1),!R&&(R=!0)))return N.call(B,k.type||k)},X=function S(){try{_.doScroll("left")}catch{setTimeout(S,50);return}return Z("poll")};if(T.readyState!=="complete"){if(T.createEventObject&&_.doScroll){try{A=!B.frameElement}catch{}A&&X()}return T[O](j+"DOMContentLoaded",Z,!1),T[O](j+"readystatechange",Z,!1),B[O](j+"load",Z,!1)}};U._autoDiscoverFunction=function(){if(U.autoDiscover)return U.discover()},Te(window,U._autoDiscoverFunction);function ke(D,B){return typeof D<"u"&&D!==null?B(D):void 0}function Ne(D,B,N){if(typeof D<"u"&&D!==null&&typeof D[B]=="function")return N(D,B)}window.Dropzone=U;var Ce=U}(),s}()})})(X1);var r9=X1.exports;const Xd=Nu(r9),o9={class:"fallback"},s9=c.createElementVNode("input",{id:"file",type:"file",name:"file",multiple:""},null,-1),i9={for:"file"},a9={class:"dz-message","data-dz-message":""},l9={id:"bd-dropzone-theme",style:{display:"none"}},c9={class:"dz-preview dz-file-preview"},u9={class:"dz-details"},d9=c.createElementVNode("img",{"data-dz-thumbnail":"",class:"dz-image"},null,-1),f9=c.createElementVNode("div",{class:"dz-filename"},[c.createElementVNode("small",{"data-dz-name":""})],-1),h9=c.createElementVNode("div",{class:"dz-progress"},[c.createElementVNode("div",{class:"spinner-border text-primary spinner-border-sm",role:"status"},[c.createElementVNode("span",{class:"visually-hidden"},"Loading...")])],-1),p9={class:"dz-success-mark"},m9={class:"dz-error-message text-danger"},g9=c.createElementVNode("small",{"data-dz-errormessage":""},null,-1),q1=c.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(n,{emit:e}){const t=n,r=c.computed(()=>({variant:Pa.PRIMARY,size:Tt.SM})),o=io(t,"modelValue",e);let s=null;Xd.autoDiscover=!1,c.watch(()=>t.modelValue,()=>{i()}),c.onMounted(()=>{document.getElementById("dropzone")&&l()});const i=()=>{s&&(s.destroy(),l())},l=()=>{var p;s=new Xd("#dropzone",{url:t.url,method:"post",acceptedFiles:t.acceptedFiles,addRemoveLinks:!1,maxFilesize:10,maxFiles:t.multiple?3:1,headers:{RequestVerificationToken:t.token},dictResponseError:t.errorMessage,dictFileTooBig:t.fileSizeExceededMessage,previewTemplate:(p=document.querySelector("#bd-dropzone-theme"))==null?void 0:p.innerHTML}),s.on("error",u),s.on("success",a),s.on("removedfile",f)},a=function(p,m){var g;o.value.push({UUID:(g=p.upload)==null?void 0:g.uuid,CorrelationId:m.CorrelationId,Naam:m.Naam}),d(p)},u=function(p){d(p)},d=function(p){const m=p.name;if(!(m.endsWith(".png")||m.endsWith(".jpg")||m.endsWith(".jpeg")||m.endsWith(".gif"))){const g=p.previewElement.getElementsByClassName("icon-file"),v=p.previewElement.getElementsByClassName("dz-image");g[0].classList.remove("d-none"),v[0].classList.add("d-none")}},f=function(p){const m=o.value.findIndex(g=>{var v;return(g==null?void 0:g.UUID)===((v=p.upload)==null?void 0:v.uuid)});m!==-1&&o.value.splice(m,1)},h=c.computed(()=>t.tag??"form");return(p,m)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(h.value),{id:"dropzone",class:"dropzone bd-dropzone",enctype:"multipart/form-data"},{default:c.withCtx(()=>[c.createElementVNode("div",o9,[s9,c.createTextVNode(" test "),c.createElementVNode("label",i9,[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(t.buttonText),1)])]),c.createElementVNode("div",a9,[c.createVNode(Qe,c.normalizeProps(c.guardReactiveProps(r.value)),{default:c.withCtx(()=>[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(t.buttonText),1)]),_:1},16)])]),_:1})),c.createElementVNode("div",l9,[c.createElementVNode("div",c9,[c.createElementVNode("div",u9,[d9,c.createVNode(c.unref(gu),{"data-dz-thumbnail":"",class:"d-none"}),f9,c.createVNode(Qe,{class:"dz-remove",alt:"Click me to remove the file.","data-dz-remove":""},{default:c.withCtx(()=>[c.createVNode(c.unref(Us))]),_:1})]),h9,c.createElementVNode("div",p9,[c.createVNode(c.unref(Go))]),c.createElementVNode("div",m9,[c.createVNode(c.unref(Ra)),g9])])])],64))}});function ht(n){this.content=n}ht.prototype={constructor:ht,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,o=r.find(n),s=r.content.slice();return o==-1?s.push(t||n,e):(s[o+1]=e,t&&(s[o]=t)),new ht(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ht(t)},addToStart:function(n,e){return new ht([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ht(t)},addBefore:function(n,e,t){var r=this.remove(e),o=r.content.slice(),s=r.find(n);return o.splice(s==-1?o.length:s,0,e,t),new ht(o)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ht.from(n),n.size?new ht(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ht.from(n),n.size?new ht(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ht.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ht.from=function(n){if(n instanceof ht)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ht(e)};function em(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let o=n.child(r),s=e.child(r);if(o==s){t+=o.nodeSize;continue}if(!o.sameMarkup(s))return t;if(o.isText&&o.text!=s.text){for(let i=0;o.text[i]==s.text[i];i++)t++;return t}if(o.content.size||s.content.size){let i=em(o.content,s.content,t+1);if(i!=null)return i}t+=o.nodeSize}}function tm(n,e,t,r){for(let o=n.childCount,s=e.childCount;;){if(o==0||s==0)return o==s?null:{a:t,b:r};let i=n.child(--o),l=e.child(--s),a=i.nodeSize;if(i==l){t-=a,r-=a;continue}if(!i.sameMarkup(l))return{a:t,b:r};if(i.isText&&i.text!=l.text){let u=0,d=Math.min(i.text.length,l.text.length);for(;u<d&&i.text[i.text.length-u-1]==l.text[l.text.length-u-1];)u++,t--,r--;return{a:t,b:r}}if(i.content.size||l.content.size){let u=tm(i.content,l.content,t-1,r-1);if(u)return u}t-=a,r-=a}}class fe{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,o=0,s){for(let i=0,l=0;l<t;i++){let a=this.content[i],u=l+a.nodeSize;if(u>e&&r(a,o+l,s||null,i)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,t-d),r,o+d)}l=u}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,o){let s="",i=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(s+=l.text.slice(Math.max(e,a)-a,t-a),i=!r):l.isLeaf?(o?s+=typeof o=="function"?o(l):o:l.type.spec.leafText&&(s+=l.type.spec.leafText(l)),i=!r):!i&&l.isBlock&&(s+=r,i=!0)},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,o=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(o[o.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)o.push(e.content[s]);return new fe(o,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],o=0;if(t>e)for(let s=0,i=0;i<t;s++){let l=this.content[s],a=i+l.nodeSize;a>e&&((i<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-i),Math.min(l.text.length,t-i)):l=l.cut(Math.max(0,e-i-1),Math.min(l.content.size,t-i-1))),r.push(l),o+=l.nodeSize),i=a}return new fe(r,o)}cutByIndex(e,t){return e==t?fe.empty:e==0&&t==this.content.length?this:new fe(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let o=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return o[e]=t,new fe(o,s)}addToStart(e){return new fe([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new fe(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))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 t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let o=this.content[t];e(o,r,t),r+=o.nodeSize}}findDiffStart(e,t=0){return em(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return tm(this,e,t,r)}findIndex(e,t=-1){if(e==0)return oi(0,e);if(e==this.size)return oi(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,o=0;;r++){let s=this.child(r),i=o+s.nodeSize;if(i>=e)return i==e||t>0?oi(r+1,i):oi(r,o);o=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,t){if(!t)return fe.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new fe(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return fe.empty;let t,r=0;for(let o=0;o<e.length;o++){let s=e[o];r+=s.nodeSize,o&&s.isText&&e[o-1].sameMarkup(s)?(t||(t=e.slice(0,o)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new fe(t||e,r)}static from(e){if(!e)return fe.empty;if(e instanceof fe)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new fe([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}fe.empty=new fe([],0);const Al={index:0,offset:0};function oi(n,e){return Al.index=n,Al.offset=e,Al}function Li(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Li(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Li(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let We=class gc{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let o=0;o<e.length;o++){let s=e[o];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,o));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,o)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Li(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return gc.none;if(e instanceof gc)return[e];let t=e.slice();return t.sort((r,o)=>r.type.rank-o.type.rank),t}};We.none=[];class Di extends Error{}class we{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=rm(this.content,e+this.openStart,t);return r&&new we(r,this.openStart,this.openEnd)}removeBetween(e,t){return new we(nm(this.content,e+this.openStart,t+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,t){if(!t)return we.empty;let r=t.openStart||0,o=t.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new we(fe.fromJSON(e,t.content),r,o)}static maxOpen(e,t=!0){let r=0,o=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)o++;return new we(e,r,o)}}we.empty=new we(fe.empty,0,0);function nm(n,e,t){let{index:r,offset:o}=n.findIndex(e),s=n.maybeChild(r),{index:i,offset:l}=n.findIndex(t);if(o==e||s.isText){if(l!=t&&!n.child(i).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=i)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(nm(s.content,e-o-1,t-o-1)))}function rm(n,e,t,r){let{index:o,offset:s}=n.findIndex(e),i=n.maybeChild(o);if(s==e||i.isText)return r&&!r.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=rm(i.content,e-s-1,t);return l&&n.replaceChild(o,i.copy(l))}function v9(n,e,t){if(t.openStart>n.depth)throw new Di("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Di("Inconsistent open depths");return om(n,e,t,0)}function om(n,e,t,r){let o=n.index(r),s=n.node(r);if(o==e.index(r)&&r<n.depth-t.openStart){let i=om(n,e,t,r+1);return s.copy(s.content.replaceChild(o,i))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let i=n.parent,l=i.content;return Wr(i,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:i,end:l}=y9(t,n);return Wr(s,im(n,i,l,e,r))}else return Wr(s,Ri(n,e,r))}function sm(n,e){if(!e.type.compatibleContent(n.type))throw new Di("Cannot join "+e.type.name+" onto "+n.type.name)}function vc(n,e,t){let r=n.node(t);return sm(r,e.node(t)),r}function jr(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function fs(n,e,t,r){let o=(e||n).node(t),s=0,i=e?e.index(t):o.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(jr(n.nodeAfter,r),s++));for(let l=s;l<i;l++)jr(o.child(l),r);e&&e.depth==t&&e.textOffset&&jr(e.nodeBefore,r)}function Wr(n,e){return n.type.checkContent(e),n.copy(e)}function im(n,e,t,r,o){let s=n.depth>o&&vc(n,e,o+1),i=r.depth>o&&vc(t,r,o+1),l=[];return fs(null,n,o,l),s&&i&&e.index(o)==t.index(o)?(sm(s,i),jr(Wr(s,im(n,e,t,r,o+1)),l)):(s&&jr(Wr(s,Ri(n,e,o+1)),l),fs(e,t,o,l),i&&jr(Wr(i,Ri(t,r,o+1)),l)),fs(r,null,o,l),new fe(l)}function Ri(n,e,t){let r=[];if(fs(null,n,t,r),n.depth>t){let o=vc(n,e,t+1);jr(Wr(o,Ri(n,e,t+1)),r)}return fs(e,null,t,r),new fe(r)}function y9(n,e){let t=e.depth-n.openStart,o=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)o=e.node(s).copy(fe.from(o));return{start:o.resolveNoCache(n.openStart+t),end:o.resolveNoCache(o.content.size-n.openEnd-t)}}class Ss{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.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,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(t);return r?e.child(t).cut(r):o}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],o=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)o+=r.child(s).nodeSize;return o}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return We.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),o=e.maybeChild(t);if(!r){let l=r;r=o,o=l}let s=r.marks;for(var i=0;i<s.length;i++)s[i].type.spec.inclusive===!1&&(!o||!s[i].isInSet(o.marks))&&(s=s[i--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,o=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!o||!r[s].isInSet(o.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){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)&&(!t||t(this.node(r))))return new Bi(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 t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],o=0,s=t;for(let i=e;;){let{index:l,offset:a}=i.content.findIndex(s),u=s-a;if(r.push(i,l,o+a),!u||(i=i.child(l),i.isText))break;s=u-1,o+=a+1}return new Ss(t,r,s)}static resolveCached(e,t){for(let o=0;o<bl.length;o++){let s=bl[o];if(s.pos==t&&s.doc==e)return s}let r=bl[wl]=Ss.resolve(e,t);return wl=(wl+1)%E9,r}}let bl=[],wl=0,E9=12;class Bi{constructor(e,t,r){this.$from=e,this.$to=t,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 C9=Object.create(null);let Kr=class yc{constructor(e,t,r,o=We.none){this.type=e,this.attrs=t,this.marks=o,this.content=r||fe.empty}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,t,r,o=0){this.content.nodesBetween(e,t,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,t,r,o){return this.content.textBetween(e,t,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,t,r){return this.type==e&&Li(this.attrs,t||e.defaultAttrs||C9)&&We.sameSet(this.marks,r||We.none)}copy(e=null){return e==this.content?this:new yc(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new yc(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return we.empty;let o=this.resolve(e),s=this.resolve(t),i=r?0:o.sharedDepth(t),l=o.start(i),u=o.node(i).content.cut(o.pos-l,s.pos-l);return new we(u,o.depth-i,s.depth-i)}replace(e,t,r){return v9(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:o}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(o==e||t.isText)return t;e-=o+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let o=this.content.child(t-1);return{node:o,index:t-1,offset:r-o.nodeSize}}resolve(e){return Ss.resolveCached(this,e)}resolveNoCache(e){return Ss.resolve(this,e)}rangeHasMark(e,t,r){let o=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.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()+")"),am(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=fe.empty,o=0,s=r.childCount){let i=this.contentMatchAt(e).matchFragment(r,o,s),l=i&&i.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=o;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,o){if(o&&!this.type.allowsMarks(o))return!1;let s=this.contentMatchAt(e).matchType(r),i=s&&s.matchFragment(this.content,t);return i?i.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);let e=We.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!We.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t 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(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let o=fe.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,o,r)}};Kr.prototype.text=void 0;class Pi extends Kr{constructor(e,t,r,o){if(super(e,t,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):am(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Pi(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Pi(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function am(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Xr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new A9(e,t);if(r.next==null)return Xr.empty;let o=lm(r);r.next&&r.err("Unexpected trailing text");let s=x9(_9(o));return N9(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let o=this;for(let s=t;o&&s<r;s++)o=o.matchType(e.child(s).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:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let o=[this];function s(i,l){let a=i.matchFragment(e,r);if(a&&(!t||a.validEnd))return fe.from(l.map(u=>u.createAndFill()));for(let u=0;u<i.next.length;u++){let{type:d,next:f}=i.next[u];if(!(d.isText||d.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=s(f,l.concat(d));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),s=o.match;if(s.matchType(e)){let i=[];for(let l=o;l.type;l=l.via)i.push(l.type);return i.reverse()}for(let i=0;i<s.next.length;i++){let{type:l,next:a}=s.next[i];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!o.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),t[l.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 t(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&t(r.next[o].next)}return t(this),e.map((r,o)=>{let s=o+(r.validEnd?"*":" ")+" ";for(let i=0;i<r.next.length;i++)s+=(i?", ":"")+r.next[i].type.name+"->"+e.indexOf(r.next[i].next);return s}).join(`
63
+ `)}}Xr.empty=new Xr(!0);class A9{constructor(e,t){this.string=e,this.nodeTypes=t,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 lm(n){let e=[];do e.push(b9(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function b9(n){let e=[];do e.push(w9(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function w9(n){let e=k9(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=T9(n,e);else break;return e}function qd(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function T9(n,e){let t=qd(n),r=t;return n.eat(",")&&(n.next!="}"?r=qd(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function S9(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let o=[];for(let s in t){let i=t[s];i.groups.indexOf(e)>-1&&o.push(i)}return o.length==0&&n.err("No node type or group '"+e+"' found"),o}function k9(n){if(n.eat("(")){let e=lm(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=S9(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function _9(n){let e=[[]];return o(s(n,0),t()),e;function t(){return e.push([])-1}function r(i,l,a){let u={term:a,to:l};return e[i].push(u),u}function o(i,l){i.forEach(a=>a.to=l)}function s(i,l){if(i.type=="choice")return i.exprs.reduce((a,u)=>a.concat(s(u,l)),[]);if(i.type=="seq")for(let a=0;;a++){let u=s(i.exprs[a],l);if(a==i.exprs.length-1)return u;o(u,l=t())}else if(i.type=="star"){let a=t();return r(l,a),o(s(i.expr,a),a),[r(a)]}else if(i.type=="plus"){let a=t();return o(s(i.expr,l),a),o(s(i.expr,a),a),[r(a)]}else{if(i.type=="opt")return[r(l)].concat(s(i.expr,l));if(i.type=="range"){let a=l;for(let u=0;u<i.min;u++){let d=t();o(s(i.expr,a),d),a=d}if(i.max==-1)o(s(i.expr,a),a);else for(let u=i.min;u<i.max;u++){let d=t();r(a,d),o(s(i.expr,a),d),a=d}return[r(a)]}else{if(i.type=="name")return[r(l,void 0,i.value)];throw new Error("Unknown expr type")}}}}function cm(n,e){return e-n}function ef(n,e){let t=[];return r(e),t.sort(cm);function r(o){let s=n[o];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(o);for(let i=0;i<s.length;i++){let{term:l,to:a}=s[i];!l&&t.indexOf(a)==-1&&r(a)}}}function x9(n){let e=Object.create(null);return t(ef(n,0));function t(r){let o=[];r.forEach(i=>{n[i].forEach(({term:l,to:a})=>{if(!l)return;let u;for(let d=0;d<o.length;d++)o[d][0]==l&&(u=o[d][1]);ef(n,a).forEach(d=>{u||o.push([l,u=[]]),u.indexOf(d)==-1&&u.push(d)})})});let s=e[r.join(",")]=new Xr(r.indexOf(n.length-1)>-1);for(let i=0;i<o.length;i++){let l=o[i][1].sort(cm);s.next.push({type:o[i][0],next:e[l.join(",")]||t(l)})}return s}}function N9(n,e){for(let t=0,r=[n];t<r.length;t++){let o=r[t],s=!o.validEnd,i=[];for(let l=0;l<o.next.length;l++){let{type:a,next:u}=o.next[l];i.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(u)==-1&&r.push(u)}s&&e.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function um(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function dm(n,e){let t=Object.create(null);for(let r in n){let o=e&&e[r];if(o===void 0){let s=n[r];if(s.hasDefault)o=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=o}return t}function fm(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new I9(n[t]);return e}let tf=class hm{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=fm(r.attrs),this.defaultAttrs=um(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==Xr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}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:dm(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Kr(this,this.computeAttrs(e),fe.from(t),We.setFrom(r))}createChecked(e=null,t,r){return t=fe.from(t),this.checkContent(t),new Kr(this,this.computeAttrs(e),t,We.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=fe.from(t),t.size){let i=this.contentMatch.fillBefore(t);if(!i)return null;t=i.append(t)}let o=this.contentMatch.matchFragment(t),s=o&&o.fillBefore(fe.empty,!0);return s?new Kr(this,e,t.append(s),We.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.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)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:We.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,i)=>r[s]=new hm(s,t,i));let o=t.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 s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class I9{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class za{constructor(e,t,r,o){this.name=e,this.rank=t,this.schema=r,this.spec=o,this.attrs=fm(o.attrs),this.excluded=null;let s=um(this.attrs);this.instance=s?new We(this,s):null}create(e=null){return!e&&this.instance?this.instance:new We(this,dm(this.attrs,e))}static compile(e,t){let r=Object.create(null),o=0;return e.forEach((s,i)=>r[s]=new za(s,o++,t,i)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class M9{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let o in e)t[o]=e[o];t.nodes=ht.from(e.nodes),t.marks=ht.from(e.marks||{}),this.nodes=tf.compile(this.spec.nodes,this),this.marks=za.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 s=this.nodes[o],i=s.spec.content||"",l=s.spec.marks;s.contentMatch=r[i]||(r[i]=Xr.parse(i,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=l=="_"?null:l?nf(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let o in this.marks){let s=this.marks[o],i=s.spec.excludes;s.excluded=i==null?[s]:i==""?[]:nf(this,i.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof tf){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(t,r,o)}text(e,t){let r=this.nodes.text;return new Pi(r,r.defaultAttrs,e,We.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Kr.fromJSON(this,e)}markFromJSON(e){return We.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function nf(n,e){let t=[];for(let r=0;r<e.length;r++){let o=e[r],s=n.marks[o],i=s;if(s)t.push(s);else for(let l in n.marks){let a=n.marks[l];(o=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(o)>-1)&&t.push(i=a)}if(!i)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class Lo{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let o=e.nodes[r.node];return o.contentMatch.matchType(o)})}parse(e,t={}){let r=new of(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new of(this,t,!0);return r.addAll(e,t.from,t.to),we.maxOpen(r.finish())}matchTag(e,t,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let s=this.tags[o];if(D9(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let i=s.getAttrs(e);if(i===!1)continue;s.attrs=i||void 0}return s}}}matchStyle(e,t,r,o){for(let s=o?this.styles.indexOf(o)+1:0;s<this.styles.length;s++){let i=this.styles[s],l=i.style;if(!(l.indexOf(e)!=0||i.context&&!r.matchesContext(i.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(i.getAttrs){let a=i.getAttrs(t);if(a===!1)continue;i.attrs=a||void 0}return i}}}static schemaRules(e){let t=[];function r(o){let s=o.priority==null?50:o.priority,i=0;for(;i<t.length;i++){let l=t[i];if((l.priority==null?50:l.priority)<s)break}t.splice(i,0,o)}for(let o in e.marks){let s=e.marks[o].spec.parseDOM;s&&s.forEach(i=>{r(i=sf(i)),i.mark||i.ignore||i.clearMark||(i.mark=o)})}for(let o in e.nodes){let s=e.nodes[o].spec.parseDOM;s&&s.forEach(i=>{r(i=sf(i)),i.node||i.ignore||i.mark||(i.node=o)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Lo(e,Lo.schemaRules(e)))}}const pm={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},O9={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},mm={ol:!0,ul:!0},Fi=1,Vi=2,hs=4;function rf(n,e,t){return e!=null?(e?Fi:0)|(e==="full"?Vi:0):n&&n.whitespace=="pre"?Fi|Vi:t&~hs}class si{constructor(e,t,r,o,s,i,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=o,this.solid=s,this.options=l,this.content=[],this.activeMarks=We.none,this.stashMarks=[],this.match=i||(l&hs?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(fe.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);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&Fi)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-o[0].length))}}let t=fe.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(fe.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let o=r[t];(this.type?this.type.allowsMarkType(o.type):B9(o.type,e))&&!o.isInSet(this.activeMarks)&&(this.activeMarks=o.addToSet(this.activeMarks),this.pendingMarks=o.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!pm.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class of{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let o=t.topNode,s,i=rf(null,t.preserveWhitespace,0)|(r?hs:0);o?s=new si(o.type,o.attrs,We.none,We.none,!0,t.topMatch||o.type.contentMatch,i):r?s=new si(null,null,We.none,We.none,!0,null,i):s=new si(e.schema.topNodeType,null,We.none,We.none,!0,null,i),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let o=this.readStyles(R9(r));if(!o)return;let[s,i]=o,l=this.top;for(let a=0;a<i.length;a++)this.removePendingMark(i[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a]);t();for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<i.length;a++)this.addPendingMark(i[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Vi||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&Fi)r.options&Vi?t=t.replace(/\r\n?/g,`
64
+ `):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let o=r.content[r.content.length-1],s=e.previousSibling;(!o||s&&s.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),o;mm.hasOwnProperty(r)&&this.parser.normalizeLists&&L9(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,t));if(s?s.ignore:O9.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let i,l=this.top,a=this.needsBlock;if(pm.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),i=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),i&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?o:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
65
+ `))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=We.none,r=We.none;for(let o=0;o<e.length;o+=2)for(let s=void 0;;){let i=this.parser.matchStyle(e[o],e[o+1],this,s);if(!i)break;if(i.ignore)return null;if(i.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{i.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[i.mark].create(i.attrs).addToSet(t),i.consuming===!1)s=i;else break}return[t,r]}addElementByRule(e,t,r){let o,s,i;t.node?(s=this.parser.schema.nodes[t.node],s.isLeaf?this.insertNode(s.create(t.attrs))||this.leafFallback(e):o=this.enter(s,t.attrs||null,t.preserveWhitespace)):(i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i));let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}o&&this.sync(l)&&this.open--,i&&this.removePendingMark(i,l)}addAll(e,t,r){let o=t||0;for(let s=t?e.childNodes[t]:e.firstChild,i=r==null?null:e.childNodes[r];s!=i;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s);this.findAtPoint(e,o)}findPlace(e){let t,r;for(let o=this.open;o>=0;o--){let s=this.nodes[o],i=s.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,r=s,!i.length)||s.solid)break}if(!t)return!1;this.sync(r);for(let o=0;o<t.length;o++)this.enterInner(t[o],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let o=0;o<e.marks.length;o++)(!t.type||t.type.allowsMarkType(e.marks[o].type))&&(r=e.marks[o].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let o=this.findPlace(e.create(t));return o&&this.enterInner(e,t,!0,r),o}enterInner(e,t=null,r=!1,o){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let i=rf(e,o,s.options);s.options&hs&&s.content.length==0&&(i|=hs),this.nodes.push(new si(e,t,s.activeMarks,s.pendingMarks,r,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].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 t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&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)&&t.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(o?0:1),i=(l,a)=>{for(;l>=0;l--){let u=t[l];if(u==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(i(l-1,a))return!0;return!1}else{let d=a>0||a==0&&o?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!d||d.name!=u&&d.groups.indexOf(u)==-1)return!1;a--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=P9(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let o=this.nodes[r];if(o.pendingMarks.lastIndexOf(e)>-1)o.pendingMarks=e.removeFromSet(o.pendingMarks);else{o.activeMarks=e.removeFromSet(o.activeMarks);let i=o.popFromStashMark(e);i&&o.type&&o.type.allowsMarkType(i.type)&&(o.activeMarks=i.addToSet(o.activeMarks))}if(o==t)break}}}function L9(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&mm.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function D9(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function R9(n){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,t,r=[];for(;t=e.exec(n);)r.push(t[1],t[2].trim());return r}function sf(n){let e={};for(let t in n)e[t]=n[t];return e}function B9(n,e){let t=e.schema.nodes;for(let r in t){let o=t[r];if(!o.allowsMarkType(n))continue;let s=[],i=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:u,next:d}=l.edge(a);if(u==e||s.indexOf(d)<0&&i(d))return!0}};if(i(o.contentMatch))return!0}}function P9(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class Sn{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Tl(t).createDocumentFragment());let o=r,s=[];return e.forEach(i=>{if(s.length||i.marks.length){let l=0,a=0;for(;l<s.length&&a<i.marks.length;){let u=i.marks[a];if(!this.marks[u.type.name]){a++;continue}if(!u.eq(s[l][0])||u.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)o=s.pop()[1];for(;a<i.marks.length;){let u=i.marks[a++],d=this.serializeMark(u,i.isInline,t);d&&(s.push([u,o]),o.appendChild(d.dom),o=d.contentDOM||d.dom)}}o.appendChild(this.serializeNodeInner(i,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:o}=Sn.renderSpec(Tl(t),this.nodes[e.type.name](e));if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,o)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let o=e.marks.length-1;o>=0;o--){let s=this.serializeMark(e.marks[o],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let o=this.marks[e.type.name];return o&&Sn.renderSpec(Tl(r),o(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let o=t[0],s=o.indexOf(" ");s>0&&(r=o.slice(0,s),o=o.slice(s+1));let i,l=r?e.createElementNS(r,o):e.createElement(o),a=t[1],u=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){u=2;for(let d in a)if(a[d]!=null){let f=d.indexOf(" ");f>0?l.setAttributeNS(d.slice(0,f),d.slice(f+1),a[d]):l.setAttribute(d,a[d])}}for(let d=u;d<t.length;d++){let f=t[d];if(f===0){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:p}=Sn.renderSpec(e,f,r);if(l.appendChild(h),p){if(i)throw new RangeError("Multiple content holes");i=p}}}return{dom:l,contentDOM:i}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Sn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=af(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return af(e.marks)}}function af(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Tl(n){return n.document||window.document}const gm=65535,vm=Math.pow(2,16);function F9(n,e){return n+e*vm}function lf(n){return n&gm}function V9(n){return(n-(n&gm))/vm}const ym=1,Em=2,Ai=4,Cm=8;class Ec{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Cm)>0}get deletedBefore(){return(this.delInfo&(ym|Ai))>0}get deletedAfter(){return(this.delInfo&(Em|Ai))>0}get deletedAcross(){return(this.delInfo&Ai)>0}}class $t{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&$t.empty)return $t.empty}recover(e){let t=0,r=lf(e);if(!this.inverted)for(let o=0;o<r;o++)t+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+t+V9(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let o=0,s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?o:0);if(a>e)break;let u=this.ranges[l+s],d=this.ranges[l+i],f=a+u;if(e<=f){let h=u?e==a?-1:e==f?1:t:t,p=a+o+(h<0?0:d);if(r)return p;let m=e==(t<0?a:f)?null:F9(l/3,e-a),g=e==a?Em:e==f?ym:Ai;return(t<0?e!=a:e!=f)&&(g|=Cm),new Ec(p,g,m)}o+=d-u}return r?e+o:new Ec(e+o,0,null)}touches(e,t){let r=0,o=lf(t),s=this.inverted?2:1,i=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let u=this.ranges[l+s],d=a+u;if(e<=d&&l==o*3)return!0;r+=this.ranges[l+i]-u}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,s=0;o<this.ranges.length;o+=3){let i=this.ranges[o],l=i-(this.inverted?s:0),a=i+(this.inverted?0:s),u=this.ranges[o+t],d=this.ranges[o+r];e(l,l+u,a,a+d),s+=d-u}}invert(){return new $t(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?$t.empty:new $t(e<0?[0,-e,0]:[0,0,e])}}$t.empty=new $t([]);class ps{constructor(e=[],t,r=0,o=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=o}slice(e=0,t=this.maps.length){return new ps(this.maps,this.mirror,e,t)}copy(){return new ps(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let o=e.getMirror(t);this.appendMap(e.maps[t],o!=null&&o<t?r+o:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let o=e.getMirror(t);this.appendMap(e.maps[t].invert(),o!=null&&o>t?r-o-1:void 0)}}invert(){let e=new ps;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let o=0;for(let s=this.from;s<this.to;s++){let i=this.maps[s],l=i.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this.maps[a].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new Ec(e,o,null)}}const Sl=Object.create(null);class Et{getMap(){return $t.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Sl[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in Sl)throw new RangeError("Duplicate use of step JSON ID "+e);return Sl[e]=t,t.prototype.jsonID=e,t}}class ot{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ot(e,null)}static fail(e){return new ot(null,e)}static fromReplace(e,t,r,o){try{return ot.ok(e.replace(t,r,o))}catch(s){if(s instanceof Di)return ot.fail(s.message);throw s}}}function Iu(n,e,t){let r=[];for(let o=0;o<n.childCount;o++){let s=n.child(o);s.content.size&&(s=s.copy(Iu(s.content,e,s))),s.isInline&&(s=e(s,t,o)),r.push(s)}return fe.fromArray(r)}class lr extends Et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),s=new we(Iu(t.content,(i,l)=>!i.isAtom||!l.type.allowsMarkType(this.mark.type)?i:i.mark(this.mark.addToSet(i.marks)),o),t.openStart,t.openEnd);return ot.fromReplace(e,this.from,this.to,s)}invert(){return new kn(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new lr(t.pos,r.pos,this.mark)}merge(e){return e instanceof lr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new lr(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new lr(t.from,t.to,e.markFromJSON(t.mark))}}Et.jsonID("addMark",lr);class kn extends Et{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new we(Iu(t.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),t.openStart,t.openEnd);return ot.fromReplace(e,this.from,this.to,r)}invert(){return new lr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new kn(t.pos,r.pos,this.mark)}merge(e){return e instanceof kn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new kn(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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new kn(t.from,t.to,e.markFromJSON(t.mark))}}Et.jsonID("removeMark",kn);class cr extends Et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let o=0;o<t.marks.length;o++)if(!t.marks[o].isInSet(r))return new cr(this.pos,t.marks[o]);return new cr(this.pos,this.mark)}}return new Do(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new cr(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new cr(t.pos,e.markFromJSON(t.mark))}}Et.jsonID("addNodeMark",cr);class Do extends Et{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new cr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Do(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Do(t.pos,e.markFromJSON(t.mark))}}Et.jsonID("removeNodeMark",Do);class pt extends Et{constructor(e,t,r,o=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=o}apply(e){return this.structure&&Cc(e,this.from,this.to)?ot.fail("Structure replace would overwrite content"):ot.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new $t([this.from,this.to-this.from,this.slice.size])}invert(e){return new pt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new pt(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof pt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?we.empty:new we(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new pt(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?we.empty:new we(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new pt(e.from,this.to,t,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,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new pt(t.from,t.to,we.fromJSON(e,t.slice),!!t.structure)}}Et.jsonID("replace",pt);class ut extends Et{constructor(e,t,r,o,s,i,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=o,this.slice=s,this.insert=i,this.structure=l}apply(e){if(this.structure&&(Cc(e,this.from,this.gapFrom)||Cc(e,this.gapTo,this.to)))return ot.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ot.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?ot.fromReplace(e,this.from,this.to,r):ot.fail("Content does not fit in gap")}getMap(){return new $t([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new ut(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),s=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||o<t.pos||s>r.pos?null:new ut(t.pos,r.pos,o,s,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,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new ut(t.from,t.to,t.gapFrom,t.gapTo,we.fromJSON(e,t.slice),t.insert,!!t.structure)}}Et.jsonID("replaceAround",ut);function Cc(n,e,t){let r=n.resolve(e),o=t-e,s=r.depth;for(;o>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,o--;if(o>0){let i=r.node(s).maybeChild(r.indexAfter(s));for(;o>0;){if(!i||i.isLeaf)return!0;i=i.firstChild,o--}}return!1}function $9(n,e,t,r){let o=[],s=[],i,l;n.doc.nodesBetween(e,t,(a,u,d)=>{if(!a.isInline)return;let f=a.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let h=Math.max(u,e),p=Math.min(u+a.nodeSize,t),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(i&&i.to==h&&i.mark.eq(f[g])?i.to=p:o.push(i=new kn(h,p,f[g])));l&&l.to==h?l.to=p:s.push(l=new lr(h,p,r))}}),o.forEach(a=>n.step(a)),s.forEach(a=>n.step(a))}function z9(n,e,t,r){let o=[],s=0;n.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;s++;let a=null;if(r instanceof za){let u=i.marks,d;for(;d=r.isInSet(u);)(a||(a=[])).push(d),u=d.removeFromSet(u)}else r?r.isInSet(i.marks)&&(a=[r]):a=i.marks;if(a&&a.length){let u=Math.min(l+i.nodeSize,t);for(let d=0;d<a.length;d++){let f=a[d],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==s-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=u,h.step=s):o.push({style:f,from:Math.max(l,e),to:u,step:s})}}}),o.forEach(i=>n.step(new kn(i.from,i.to,i.style)))}function U9(n,e,t,r=t.contentMatch){let o=n.doc.nodeAt(e),s=[],i=e+1;for(let l=0;l<o.childCount;l++){let a=o.child(l),u=i+a.nodeSize,d=r.matchType(a.type);if(!d)s.push(new pt(i,u,we.empty));else{r=d;for(let f=0;f<a.marks.length;f++)t.allowsMarkType(a.marks[f].type)||n.step(new kn(i,u,a.marks[f]));if(a.isText&&!t.spec.code){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(a.text);)p||(p=new we(fe.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),s.push(new pt(i+f.index,i+f.index+f[0].length,p))}}i=u}if(!r.validEnd){let l=r.fillBefore(fe.empty,!0);n.replace(i,i,new we(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function H9(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Zo(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let o=n.$from.node(r),s=n.$from.index(r),i=n.$to.indexAfter(r);if(r<n.depth&&o.canReplace(s,i,t))return r;if(r==0||o.type.spec.isolating||!H9(o,s,i))break}return null}function j9(n,e,t){let{$from:r,$to:o,depth:s}=e,i=r.before(s+1),l=o.after(s+1),a=i,u=l,d=fe.empty,f=0;for(let m=s,g=!1;m>t;m--)g||r.index(m)>0?(g=!0,d=fe.from(r.node(m).copy(d)),f++):a--;let h=fe.empty,p=0;for(let m=s,g=!1;m>t;m--)g||o.after(m+1)<o.end(m)?(g=!0,h=fe.from(o.node(m).copy(h)),p++):u++;n.step(new ut(a,u,i,l,new we(d.append(h),f,p),d.size-f,!0))}function Mu(n,e,t=null,r=n){let o=W9(n,e),s=o&&K9(r,e);return s?o.map(cf).concat({type:e,attrs:t}).concat(s.map(cf)):null}function cf(n){return{type:n,attrs:null}}function W9(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let i=s.length?s[0]:e;return t.canReplaceWith(r,o,i)?s:null}function K9(n,e){let{parent:t,startIndex:r,endIndex:o}=n,s=t.child(r),i=e.contentMatch.findWrapping(s.type);if(!i)return null;let a=(i.length?i[i.length-1]:e).contentMatch;for(let u=r;a&&u<o;u++)a=a.matchType(t.child(u).type);return!a||!a.validEnd?null:i}function Y9(n,e,t){let r=fe.empty;for(let i=t.length-1;i>=0;i--){if(r.size){let l=t[i].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=fe.from(t[i].type.create(t[i].attrs,r))}let o=e.start,s=e.end;n.step(new ut(o,s,o,s,new we(r,0,0),t.length,!0))}function G9(n,e,t,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(i,l)=>{if(i.isTextblock&&!i.hasMarkup(r,o)&&Q9(n.doc,n.mapping.slice(s).map(l),r)){n.clearIncompatible(n.mapping.slice(s).map(l,1),r);let a=n.mapping.slice(s),u=a.map(l,1),d=a.map(l+i.nodeSize,1);return n.step(new ut(u,d,u+1,d-1,new we(fe.from(r.create(o,null,i.marks)),0,0),1,!0)),!1}})}function Q9(n,e,t){let r=n.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,t)}function Z9(n,e,t,r,o){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let i=t.create(r,null,o||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,i);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new ut(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new we(fe.from(i),0,0),1,!0))}function Io(n,e,t=1,r){let o=n.resolve(e),s=o.depth-t,i=r&&r[r.length-1]||o.parent;if(s<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let u=o.depth-1,d=t-2;u>s;u--,d--){let f=o.node(u),h=o.index(u);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[d+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let g=r&&r[d]||f;if(!f.canReplace(h+1,f.childCount)||!g.type.validContent(p))return!1}let l=o.indexAfter(s),a=r&&r[0];return o.node(s).canReplaceWith(l,l,a?a.type:o.node(s+1).type)}function J9(n,e,t=1,r){let o=n.doc.resolve(e),s=fe.empty,i=fe.empty;for(let l=o.depth,a=o.depth-t,u=t-1;l>a;l--,u--){s=fe.from(o.node(l).copy(s));let d=r&&r[u];i=fe.from(d?d.type.create(d.attrs,i):o.node(l).copy(i))}n.step(new pt(e,e,new we(s.append(i),t,t),!0))}function Cr(n,e){let t=n.resolve(e),r=t.index();return Am(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Am(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Ua(n,e,t=-1){let r=n.resolve(e);for(let o=r.depth;;o--){let s,i,l=r.index(o);if(o==r.depth?(s=r.nodeBefore,i=r.nodeAfter):t>0?(s=r.node(o+1),l++,i=r.node(o).maybeChild(l)):(s=r.node(o).maybeChild(l-1),i=r.node(o+1)),s&&!s.isTextblock&&Am(s,i)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=t<0?r.before(o):r.after(o)}}function X9(n,e,t){let r=new pt(e-t,e+t,we.empty,!0);n.step(r)}function q9(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let s=r.index(o);if(r.node(o).canReplaceWith(s,s,t))return r.before(o+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let s=r.indexAfter(o);if(r.node(o).canReplaceWith(s,s,t))return r.after(o+1);if(s<r.node(o).childCount)return null}return null}function eE(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let o=t.content;for(let s=0;s<t.openStart;s++)o=o.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let i=r.depth;i>=0;i--){let l=i==r.depth?0:r.pos<=(r.start(i+1)+r.end(i+1))/2?-1:1,a=r.index(i)+(l>0?1:0),u=r.node(i),d=!1;if(s==1)d=u.canReplace(a,a,o);else{let f=u.contentMatchAt(a).findWrapping(o.firstChild.type);d=f&&u.canReplaceWith(a,a,f[0])}if(d)return l==0?r.pos:l<0?r.before(i+1):r.after(i+1)}return null}function Ou(n,e,t=e,r=we.empty){if(e==t&&!r.size)return null;let o=n.resolve(e),s=n.resolve(t);return bm(o,s,r)?new pt(e,t,r):new tE(o,s,r).fit()}function bm(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class tE{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=fe.empty;for(let o=0;o<=e.depth;o++){let s=e.node(o);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=fe.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let u=this.findFittable();u?this.placeNodes(u):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=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 s=this.placed,i=r.depth,l=o.depth;for(;i&&l&&s.childCount==1;)s=s.firstChild.content,i--,l--;let a=new we(s,i,l);return e>-1?new ut(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new pt(r.pos,o.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let s=t.firstChild;if(t.childCount>1&&(o=0),s.type.spec.isolating&&o<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let o,s=null;r?(s=kl(this.unplaced.content,r-1).firstChild,o=s.content):o=this.unplaced.content;let i=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:u}=this.frontier[l],d,f=null;if(t==1&&(i?u.matchType(i.type)||(f=u.fillBefore(fe.from(i),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:f};if(t==2&&i&&(d=u.findWrapping(i.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:d};if(s&&u.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=kl(e,t);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new we(e,t+1,Math.max(r,o.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,o=kl(e,t);if(o.childCount<=1&&t>0){let s=e.size-t<=t+o.size;this.unplaced=new we(ls(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new we(ls(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:o,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let g=0;g<s.length;g++)this.openFrontierNode(s[g]);let i=this.unplaced,l=r?r.content:i.content,a=i.openStart-e,u=0,d=[],{match:f,type:h}=this.frontier[t];if(o){for(let g=0;g<o.childCount;g++)d.push(o.child(g));f=f.matchFragment(o)}let p=l.size+e-(i.content.size-i.openEnd);for(;u<l.childCount;){let g=l.child(u),v=f.matchType(g.type);if(!v)break;u++,(u>1||a==0||g.content.size)&&(f=v,d.push(wm(g.mark(h.allowedMarks(g.marks)),u==1?a:0,u==l.childCount?p:-1)))}let m=u==l.childCount;m||(p=-1),this.placed=cs(this.placed,t,fe.from(d)),this.frontier[t].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let g=0,v=l;g<p;g++){let C=v.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),v=C.content}this.unplaced=m?e==0?we.empty:new we(ls(i.content,e-1,1),e-1,p<0?i.openEnd:e-1):new we(ls(i.content,e,u),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!_l(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.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 t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:o}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=_l(e,t,o,r,s);if(i){for(let l=t-1;l>=0;l--){let{match:a,type:u}=this.frontier[l],d=_l(e,l,u,a,!0);if(!d||d.childCount)continue e}return{depth:t,fit:i,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=cs(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let o=e.node(r),s=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,s)}return e}openFrontierNode(e,t=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=cs(this.placed,this.depth,fe.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(fe.empty,!0);t.childCount&&(this.placed=cs(this.placed,this.frontier.length,t))}}function ls(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(ls(n.firstChild.content,e-1,t)))}function cs(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(cs(n.lastChild.content,e-1,t)))}function kl(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function wm(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,wm(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(fe.empty,!0)))),n.copy(r)}function _l(n,e,t,r,o){let s=n.node(e),i=o?n.indexAfter(e):n.index(e);if(i==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,i);return l&&!nE(t,s.content,i)?l:null}function nE(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function rE(n){return n.spec.defining||n.spec.definingForContent}function oE(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let o=n.doc.resolve(e),s=n.doc.resolve(t);if(bm(o,s,r))return n.step(new pt(e,t,r));let i=Sm(o,n.doc.resolve(t));i[i.length-1]==0&&i.pop();let l=-(o.depth+1);i.unshift(l);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;i.indexOf(h)>-1?l=h:o.before(h)==p&&i.splice(1,0,-h)}let a=i.indexOf(l),u=[],d=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(u.push(m),p==r.openStart)break;h=m.content}for(let h=d-1;h>=0;h--){let p=u[h],m=rE(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(l)-1)))d=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+d+1)%(r.openStart+1),m=u[p];if(m)for(let g=0;g<i.length;g++){let v=i[(g+a)%i.length],C=!0;v<0&&(C=!1,v=-v);let b=o.node(v-1),E=o.index(v-1);if(b.canReplaceWith(E,E,m.type,m.marks))return n.replace(o.before(v),C?s.after(v):t,new we(Tm(r.content,0,r.openStart,p),p,r.openEnd))}}let f=n.steps.length;for(let h=i.length-1;h>=0&&(n.replace(e,t,r),!(n.steps.length>f));h--){let p=i[h];p<0||(e=o.before(p),t=s.after(p))}}function Tm(n,e,t,r,o){if(e<t){let s=n.firstChild;n=n.replaceChild(0,s.copy(Tm(s.content,e+1,t,r,s)))}if(e>r){let s=o.contentMatchAt(0),i=s.fillBefore(n).append(n);n=i.append(s.matchFragment(i).fillBefore(fe.empty,!0))}return n}function sE(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let o=q9(n.doc,e,r.type);o!=null&&(e=t=o)}n.replaceRange(e,t,new we(fe.from(r),0,0))}function iE(n,e,t){let r=n.doc.resolve(e),o=n.doc.resolve(t),s=Sm(r,o);for(let i=0;i<s.length;i++){let l=s[i],a=i==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),o.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return n.delete(r.before(l),o.after(l))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(e-r.start(i)==r.depth-i&&t>r.end(i)&&o.end(i)-t!=o.depth-i)return n.delete(r.before(i),t);n.delete(e,t)}function Sm(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let o=r;o>=0;o--){let s=n.start(o);if(s<n.pos-(n.depth-o)||e.end(o)>e.pos+(e.depth-o)||n.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(s==e.start(o)||o==n.depth&&o==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==s-1)&&t.push(o)}return t}class Mo extends Et{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return ot.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let o=t.type.create(r,null,t.marks);return ot.fromReplace(e,this.pos,this.pos+1,new we(fe.from(o),0,t.isLeaf?0:1))}getMap(){return $t.empty}invert(e){return new Mo(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Mo(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Mo(t.pos,t.attr,t.value)}}Et.jsonID("attr",Mo);class ks extends Et{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let o in e.attrs)t[o]=e.attrs[o];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return ot.ok(r)}getMap(){return $t.empty}invert(e){return new ks(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new ks(t.attr,t.value)}}Et.jsonID("docAttr",ks);let Ro=class extends Error{};Ro=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};Ro.prototype=Object.create(Error.prototype);Ro.prototype.constructor=Ro;Ro.prototype.name="TransformError";class km{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ps}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new Ro(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=we.empty){let o=Ou(this.doc,e,t,r);return o&&this.step(o),this}replaceWith(e,t,r){return this.replace(e,t,new we(fe.from(r),0,0))}delete(e,t){return this.replace(e,t,we.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return oE(this,e,t,r),this}replaceRangeWith(e,t,r){return sE(this,e,t,r),this}deleteRange(e,t){return iE(this,e,t),this}lift(e,t){return j9(this,e,t),this}join(e,t=1){return X9(this,e,t),this}wrap(e,t){return Y9(this,e,t),this}setBlockType(e,t=e,r,o=null){return G9(this,e,t,r,o),this}setNodeMarkup(e,t,r=null,o){return Z9(this,e,t,r,o),this}setNodeAttribute(e,t,r){return this.step(new Mo(e,t,r)),this}setDocAttribute(e,t){return this.step(new ks(e,t)),this}addNodeMark(e,t){return this.step(new cr(e,t)),this}removeNodeMark(e,t){if(!(t instanceof We)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new Do(e,t)),this}split(e,t=1,r){return J9(this,e,t,r),this}addMark(e,t,r){return $9(this,e,t,r),this}removeMark(e,t,r){return z9(this,e,t,r),this}clearIncompatible(e,t,r){return U9(this,e,t,r),this}}const xl=Object.create(null);class $e{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new aE(e.min(t),e.max(t))]}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 t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=we.empty){let r=t.content.lastChild,o=null;for(let l=0;l<t.openEnd;l++)o=r,r=r.lastChild;let s=e.steps.length,i=this.ranges;for(let l=0;l<i.length;l++){let{$from:a,$to:u}=i[l],d=e.mapping.slice(s);e.replaceRange(d.map(a.pos),d.map(u.pos),l?we.empty:t),l==0&&ff(e,s,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){let{$from:i,$to:l}=o[s],a=e.mapping.slice(r),u=a.map(i.pos),d=a.map(l.pos);s?e.deleteRange(u,d):(e.replaceRangeWith(u,d,t),ff(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let o=e.parent.inlineContent?new Ue(e):vo(e.node(0),e.parent,e.pos,e.index(),t,r);if(o)return o;for(let s=e.depth-1;s>=0;s--){let i=t<0?vo(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):vo(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new dn(e.node(0))}static atStart(e){return vo(e,e,0,0,1)||new dn(e)}static atEnd(e){return vo(e,e,e.content.size,e.childCount,-1)||new dn(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=xl[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in xl)throw new RangeError("Duplicate use of selection JSON ID "+e);return xl[e]=t,t.prototype.jsonID=e,t}getBookmark(){return Ue.between(this.$anchor,this.$head).getBookmark()}}$e.prototype.visible=!0;class aE{constructor(e,t){this.$from=e,this.$to=t}}let uf=!1;function df(n){!uf&&!n.parent.inlineContent&&(uf=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class Ue extends $e{constructor(e,t=e){df(e),df(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return $e.near(r);let o=e.resolve(t.map(this.anchor));return new Ue(o.parent.inlineContent?o:r,r)}replace(e,t=we.empty){if(super.replace(e,t),t==we.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof Ue&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Ha(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ue(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let o=e.resolve(t);return new this(o,r==t?o:e.resolve(r))}static between(e,t,r){let o=e.pos-t.pos;if((!r||o)&&(r=o>=0?1:-1),!t.parent.inlineContent){let s=$e.findFrom(t,r,!0)||$e.findFrom(t,-r,!0);if(s)t=s.$head;else return $e.near(t,r)}return e.parent.inlineContent||(o==0?e=t:(e=($e.findFrom(e,-r,!0)||$e.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=o<0&&(e=t))),new Ue(e,t)}}$e.jsonID("text",Ue);class Ha{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Ha(e.map(this.anchor),e.map(this.head))}resolve(e){return Ue.between(e.resolve(this.anchor),e.resolve(this.head))}}class Le extends $e{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:o}=t.mapResult(this.anchor),s=e.resolve(o);return r?$e.near(s):new Le(s)}content(){return new we(fe.from(this.node),0,0)}eq(e){return e instanceof Le&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Lu(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Le(e.resolve(t.anchor))}static create(e,t){return new Le(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Le.prototype.visible=!1;$e.jsonID("node",Le);class Lu{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new Ha(r,r):new Lu(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&Le.isSelectable(r)?new Le(t):$e.near(t)}}class dn extends $e{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=we.empty){if(t==we.empty){e.delete(0,e.doc.content.size);let r=$e.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new dn(e)}map(e){return new dn(e)}eq(e){return e instanceof dn}getBookmark(){return lE}}$e.jsonID("all",dn);const lE={map(){return this},resolve(n){return new dn(n)}};function vo(n,e,t,r,o,s=!1){if(e.inlineContent)return Ue.create(n,t);for(let i=r-(o>0?0:1);o>0?i<e.childCount:i>=0;i+=o){let l=e.child(i);if(l.isAtom){if(!s&&Le.isSelectable(l))return Le.create(n,t-(o<0?l.nodeSize:0))}else{let a=vo(n,l,t+o,o<0?l.childCount:0,o,s);if(a)return a}t+=l.nodeSize*o}return null}function ff(n,e,t){let r=n.steps.length-1;if(r<e)return;let o=n.steps[r];if(!(o instanceof pt||o instanceof ut))return;let s=n.mapping.maps[r],i;s.forEach((l,a,u,d)=>{i==null&&(i=d)}),n.setSelection($e.near(n.doc.resolve(i),t))}const hf=1,ii=2,pf=4;class cE extends km{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|hf)&~ii,this.storedMarks=null,this}get selectionSet(){return(this.updated&hf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=ii,this}ensureMarks(e){return We.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&ii)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~ii,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||We.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let o=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let i=this.doc.resolve(t);s=r==t?i.marks():i.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,o.text(e,s)),this.selection.empty||this.setSelection($e.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,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|=pf,this}get scrolledIntoView(){return(this.updated&pf)>0}}function mf(n,e){return!e||!n?n:n.bind(e)}class us{constructor(e,t,r){this.name=e,this.init=mf(t.init,r),this.apply=mf(t.apply,r)}}const uE=[new us("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new us("selection",{init(n,e){return n.selection||$e.atStart(e.doc)},apply(n){return n.selection}}),new us("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new us("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class Nl{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=uE.slice(),t&&t.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 us(r.key,r.spec.state,r))})}}class ko{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,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){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 t=[e],r=this.applyInner(e),o=null;for(;;){let s=!1;for(let i=0;i<this.config.plugins.length;i++){let l=this.config.plugins[i];if(l.spec.appendTransaction){let a=o?o[i].n:0,u=o?o[i].state:this,d=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,u,r);if(d&&r.filterTransaction(d,i)){if(d.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<i?{state:r,n:t.length}:{state:this,n:0})}t.push(d),r=r.applyInner(d),s=!0}o&&(o[i]={state:r,n:t.length})}}if(!s)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new ko(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let s=r[o];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new cE(this)}static create(e){let t=new Nl(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new ko(t);for(let o=0;o<t.fields.length;o++)r[t.fields[o].name]=t.fields[o].init(e,r);return r}reconfigure(e){let t=new Nl(this.schema,e.plugins),r=t.fields,o=new ko(t);for(let s=0;s<r.length;s++){let i=r[s].name;o[i]=this.hasOwnProperty(i)?this[i]:r[s].init(e,o)}return o}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.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],s=o.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(o,this[o.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Nl(e.schema,e.plugins),s=new ko(o);return o.fields.forEach(i=>{if(i.name=="doc")s.doc=Kr.fromJSON(e.schema,t.doc);else if(i.name=="selection")s.selection=$e.fromJSON(s.doc,t.selection);else if(i.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],u=a.spec.state;if(a.key==i.name&&u&&u.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[i.name]=u.fromJSON.call(a,e,t[l],s);return}}s[i.name]=i.init(e,s)}}),s}}function _m(n,e,t){for(let r in n){let o=n[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=_m(o,e,{})),t[r]=o}return t}class Ft{constructor(e){this.spec=e,this.props={},e.props&&_m(e.props,this,this.props),this.key=e.key?e.key.key:xm("plugin")}getState(e){return e[this.key]}}const Il=Object.create(null);function xm(n){return n in Il?n+"$"+ ++Il[n]:(Il[n]=0,n+"$")}class gn{constructor(e="key"){this.key=xm(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const kt=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},_s=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let gf=null;const $n=function(n,e,t){let r=gf||(gf=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},qr=function(n,e,t,r){return t&&(vf(n,e,t,r,-1)||vf(n,e,t,r,1))},dE=/^(img|br|input|textarea|hr)$/i;function vf(n,e,t,r,o){for(;;){if(n==t&&e==r)return!0;if(e==(o<0?0:Tn(n))){let s=n.parentNode;if(!s||s.nodeType!=1||Du(n)||dE.test(n.nodeName)||n.contentEditable=="false")return!1;e=kt(n)+(o<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(o<0?-1:0)],n.contentEditable=="false")return!1;e=o<0?Tn(n):0}else return!1}}function Tn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function fE(n,e,t){for(let r=e==0,o=e==Tn(n);r||o;){if(n==t)return!0;let s=kt(n);if(n=n.parentNode,!n)return!1;r=r&&s==0,o=o&&s==Tn(n)}}function Du(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const ja=function(n){return n.focusNode&&qr(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function Rr(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function hE(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function pE(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}}const In=typeof navigator<"u"?navigator:null,yf=typeof document<"u"?document:null,Ar=In&&In.userAgent||"",Ac=/Edge\/(\d+)/.exec(Ar),Nm=/MSIE \d/.exec(Ar),bc=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ar),Pt=!!(Nm||bc||Ac),dr=Nm?document.documentMode:bc?+bc[1]:Ac?+Ac[1]:0,pn=!Pt&&/gecko\/(\d+)/i.test(Ar);pn&&+(/Firefox\/(\d+)/.exec(Ar)||[0,0])[1];const wc=!Pt&&/Chrome\/(\d+)/.exec(Ar),vt=!!wc,mE=wc?+wc[1]:0,Nt=!Pt&&!!In&&/Apple Computer/.test(In.vendor),Bo=Nt&&(/Mobile\/\w+/.test(Ar)||!!In&&In.maxTouchPoints>2),qt=Bo||(In?/Mac/.test(In.platform):!1),gE=In?/Win/.test(In.platform):!1,cn=/Android \d/.test(Ar),js=!!yf&&"webkitFontSmoothing"in yf.documentElement.style,vE=js?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function yE(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Bn(n,e){return typeof n=="number"?n:n[e]}function EE(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function Ef(n,e,t){let r=n.someProp("scrollThreshold")||0,o=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let i=t||n.dom;i;i=_s(i)){if(i.nodeType!=1)continue;let l=i,a=l==s.body,u=a?yE(s):EE(l),d=0,f=0;if(e.top<u.top+Bn(r,"top")?f=-(u.top-e.top+Bn(o,"top")):e.bottom>u.bottom-Bn(r,"bottom")&&(f=e.bottom-e.top>u.bottom-u.top?e.top+Bn(o,"top")-u.top:e.bottom-u.bottom+Bn(o,"bottom")),e.left<u.left+Bn(r,"left")?d=-(u.left-e.left+Bn(o,"left")):e.right>u.right-Bn(r,"right")&&(d=e.right-u.right+Bn(o,"right")),d||f)if(a)s.defaultView.scrollBy(d,f);else{let h=l.scrollLeft,p=l.scrollTop;f&&(l.scrollTop+=f),d&&(l.scrollLeft+=d);let m=l.scrollLeft-h,g=l.scrollTop-p;e={left:e.left-m,top:e.top-g,right:e.right-m,bottom:e.bottom-g}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function CE(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,o;for(let s=(e.left+e.right)/2,i=t+1;i<Math.min(innerHeight,e.bottom);i+=5){let l=n.root.elementFromPoint(s,i);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,o=a.top;break}}return{refDOM:r,refTop:o,stack:Im(n.dom)}}function Im(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=_s(r));return e}function AE({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;Mm(t,r==0?0:r-e)}function Mm(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:o,left:s}=n[t];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let uo=null;function bE(n){if(n.setActive)return n.setActive();if(uo)return n.focus(uo);let e=Im(n);n.focus(uo==null?{get preventScroll(){return uo={preventScroll:!0},!0}}:void 0),uo||(uo=!1,Mm(e,0))}function Om(n,e){let t,r=2e8,o,s=0,i=e.top,l=e.top,a,u;for(let d=n.firstChild,f=0;d;d=d.nextSibling,f++){let h;if(d.nodeType==1)h=d.getClientRects();else if(d.nodeType==3)h=$n(d).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=i&&m.bottom>=l){i=Math.max(m.bottom,i),l=Math.min(m.top,l);let g=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(g<r){t=d,r=g,o=g&&t.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,d.nodeType==1&&g&&(s=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=d,u={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!t&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(s=f+1)}}return!t&&a&&(t=a,o=u,r=0),t&&t.nodeType==3?wE(t,o):!t||r&&t.nodeType==1?{node:n,offset:s}:Om(t,o)}function wE(n,e){let t=n.nodeValue.length,r=document.createRange();for(let o=0;o<t;o++){r.setEnd(n,o+1),r.setStart(n,o);let s=rr(r,1);if(s.top!=s.bottom&&Ru(e,s))return{node:n,offset:o+(e.left>=(s.left+s.right)/2?1:0)}}return{node:n,offset:0}}function Ru(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function TE(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function SE(n,e,t){let{node:r,offset:o}=Om(e,t),s=-1;if(r.nodeType==1&&!r.firstChild){let i=r.getBoundingClientRect();s=i.left!=i.right&&t.left>(i.left+i.right)/2?1:-1}return n.docView.posFromDOM(r,o,s)}function kE(n,e,t,r){let o=-1;for(let s=e,i=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!i||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!i&&(i=!0,a.left>r.left||a.top>r.top?o=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(o=l.posAfter)),!l.contentDOM&&o<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}s=l.dom.parentNode}return o>-1?o:n.docView.posFromDOM(e,t,-1)}function Lm(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),s=o;;){let i=n.childNodes[s];if(i.nodeType==1){let l=i.getClientRects();for(let a=0;a<l.length;a++){let u=l[a];if(Ru(e,u))return Lm(i,e,u)}}if((s=(s+1)%r)==o)break}return n}function _E(n,e){let t=n.dom.ownerDocument,r,o=0,s=pE(t,e.left,e.top);s&&({node:r,offset:o}=s);let i=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!i||!n.dom.contains(i.nodeType!=1?i.parentNode:i)){let u=n.dom.getBoundingClientRect();if(!Ru(e,u)||(i=Lm(n.dom,e,u),!i))return null}if(Nt)for(let u=i;r&&u;u=_s(u))u.draggable&&(r=void 0);if(i=TE(i,e),r){if(pn&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let d=r.childNodes[o],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let u;js&&o&&r.nodeType==1&&(u=r.childNodes[o-1]).nodeType==1&&u.contentEditable=="false"&&u.getBoundingClientRect().top>=e.top&&o--,r==n.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=kE(n,r,o,e))}l==null&&(l=SE(n,i,e));let a=n.docView.nearestDesc(i,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function Cf(n){return n.top<n.bottom||n.left<n.right}function rr(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(Cf(r))return r}return Array.prototype.find.call(t,Cf)||n.getBoundingClientRect()}const xE=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Dm(n,e,t){let{node:r,offset:o,atom:s}=n.docView.domFromPos(e,t<0?-1:1),i=js||pn;if(r.nodeType==3)if(i&&(xE.test(r.nodeValue)||(t<0?!o:o==r.nodeValue.length))){let a=rr($n(r,o,o),t);if(pn&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let u=rr($n(r,o-1,o-1),-1);if(u.top==a.top){let d=rr($n(r,o,o+1),-1);if(d.top!=a.top)return rs(d,d.left<u.left)}}return a}else{let a=o,u=o,d=t<0?1:-1;return t<0&&!o?(u++,d=-1):t>=0&&o==r.nodeValue.length?(a--,d=1):t<0?a--:u++,rs(rr($n(r,a,u),d),d<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&o&&(t<0||o==Tn(r))){let a=r.childNodes[o-1];if(a.nodeType==1)return Ml(a.getBoundingClientRect(),!1)}if(s==null&&o<Tn(r)){let a=r.childNodes[o];if(a.nodeType==1)return Ml(a.getBoundingClientRect(),!0)}return Ml(r.getBoundingClientRect(),t>=0)}if(s==null&&o&&(t<0||o==Tn(r))){let a=r.childNodes[o-1],u=a.nodeType==3?$n(a,Tn(a)-(i?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(u)return rs(rr(u,1),!1)}if(s==null&&o<Tn(r)){let a=r.childNodes[o];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let u=a?a.nodeType==3?$n(a,0,i?0:1):a.nodeType==1?a:null:null;if(u)return rs(rr(u,-1),!0)}return rs(rr(r.nodeType==3?$n(r):r,-t),t>=0)}function rs(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function Ml(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function Rm(n,e,t){let r=n.state,o=n.root.activeElement;r!=e&&n.updateState(e),o!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),o!=n.dom&&o&&o.focus()}}function NE(n,e,t){let r=e.selection,o=t=="up"?r.$from:r.$to;return Rm(n,e,()=>{let{node:s}=n.docView.domFromPos(o.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let i=Dm(n,o.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=$n(l,0,l.nodeValue.length).getClientRects();else continue;for(let u=0;u<a.length;u++){let d=a[u];if(d.bottom>d.top+1&&(t=="up"?i.top-d.top>(d.bottom-i.top)*2:d.bottom-i.bottom>(i.bottom-d.top)*2))return!1}}return!0})}const IE=/[\u0590-\u08ac]/;function ME(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,s=!o,i=o==r.parent.content.size,l=n.domSelection();return!IE.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:i:Rm(n,e,()=>{let{focusNode:a,focusOffset:u,anchorNode:d,anchorOffset:f}=n.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",t,"character");let p=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:m,focusOffset:g}=n.domSelectionRange(),v=m&&!p.contains(m.nodeType==1?m:m.parentNode)||a==m&&u==g;try{l.collapse(d,f),a&&(a!=d||u!=f)&&l.extend&&l.extend(a,u)}catch{}return h!=null&&(l.caretBidiLevel=h),v})}let Af=null,bf=null,wf=!1;function OE(n,e,t){return Af==e&&bf==t?wf:(Af=e,bf=t,wf=t=="up"||t=="down"?NE(n,e,t):ME(n,e,t))}const nn=0,Tf=1,Pr=2,Mn=3;class Ws{constructor(e,t,r,o){this.parent=e,this.children=t,this.dom=r,this.contentDOM=o,this.dirty=nn,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].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 t=0,r=this.posAtStart;;t++){let o=this.children[t];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,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,i;if(e==this.contentDOM)s=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(i)+i.size:this.posAtStart}else{let s,i;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((i=s.pmViewDesc)&&i.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(i):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=t>kt(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(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!1;break}if(s.previousSibling)break}if(o==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){o=!0;break}if(s.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,o=e;o;o=o.parentNode){let s=this.getDesc(o),i;if(s&&(!t||s.node))if(r&&(i=s.nodeDOM)&&!(i.nodeType==1?i.contains(e.nodeType==1?e:e.parentNode):i==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let o=e;o;o=o.parentNode){let s=this.getDesc(o);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let o=this.children[t],s=r+o.size;if(r==e&&s!=r){for(;!o.border&&o.children.length;)o=o.children[0];return o}if(e<s)return o.descAt(e-r-o.border);r=s}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let s=0;r<this.children.length;r++){let i=this.children[r],l=s+i.size;if(l>e||i instanceof Pm){o=e-s;break}s=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof Bm&&s.side>=0;r--);if(t<=0){let s,i=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,i=!1);return s&&t&&i&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?kt(s.dom)+1:0}}else{let s,i=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,i=!1);return s&&i&&!s.border&&!s.domAtom?s.domFromPos(0,t):{node:this.contentDOM,offset:s?kt(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,s=-1;for(let i=r,l=0;;l++){let a=this.children[l],u=i+a.size;if(o==-1&&e<=u){let d=i+a.border;if(e>=d&&t<=u-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,d);e=i;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=kt(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(u>t||l==this.children.length-1)){t=u;for(let d=l+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){s=kt(f.dom);break}t+=f.size}s==-1&&(s=this.contentDOM.childNodes.length);break}i=u}return{node:this.contentDOM,from:e,to:t,fromOffset:o,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,o=!1){let s=Math.min(e,t),i=Math.max(e,t);for(let h=0,p=0;h<this.children.length;h++){let m=this.children[h],g=p+m.size;if(s>p&&i<g)return m.setSelection(e-p-m.border,t-p-m.border,r,o);p=g}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),u=r.getSelection(),d=!1;if((pn||Nt)&&e==t){let{node:h,offset:p}=l;if(h.nodeType==3){if(d=!!(p&&h.nodeValue[p-1]==`
66
+ `),d&&p==h.nodeValue.length)for(let m=h,g;m;m=m.parentNode){if(g=m.nextSibling){g.nodeName=="BR"&&(l=a={node:g.parentNode,offset:kt(g)+1});break}let v=m.pmViewDesc;if(v&&v.node&&v.node.isBlock)break}}else{let m=h.childNodes[p-1];d=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(pn&&u.focusNode&&u.focusNode!=a.node&&u.focusNode.nodeType==1){let h=u.focusNode.childNodes[u.focusOffset];h&&h.contentEditable=="false"&&(o=!0)}if(!(o||d&&Nt)&&qr(l.node,l.offset,u.anchorNode,u.anchorOffset)&&qr(a.node,a.offset,u.focusNode,u.focusOffset))return;let f=!1;if((u.extend||e==t)&&!d){u.collapse(l.node,l.offset);try{e!=t&&u.extend(a.node,a.offset),f=!0}catch{}}if(!f){if(e>t){let p=l;l=a,a=p}let h=document.createRange();h.setEnd(a.node,a.offset),h.setStart(l.node,l.offset),u.removeAllRanges(),u.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let r=0,o=0;o<this.children.length;o++){let s=this.children[o],i=r+s.size;if(r==i?e<=i&&t>=r:e<i&&t>r){let l=r+s.border,a=i-s.border;if(e>=l&&t<=a){this.dirty=e==r||t==i?Pr:Tf,e==l&&t==a&&(s.contentLost||s.dom.parentNode!=this.contentDOM)?s.dirty=Mn:s.markDirty(e-l,t-l);return}else s.dirty=s.dom==s.contentDOM&&s.dom.parentNode==this.contentDOM&&!s.children.length?Pr:Mn}r=i}this.dirty=Pr}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let r=e==1?Pr:Tf;t.dirty<r&&(t.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}}class Bm extends Ws{constructor(e,t,r,o){let s,i=t.type.toDOM;if(typeof i=="function"&&(i=i(r,()=>{if(!s)return o;if(s.parent)return s.parent.posBeforeChild(s)})),!t.type.spec.raw){if(i.nodeType!=1){let l=document.createElement("span");l.appendChild(i),i=l}i.contentEditable="false",i.classList.add("ProseMirror-widget")}super(e,[],i,null),this.widget=t,this.widget=t,s=this}matchesWidget(e){return this.dirty==nn&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 side(){return this.widget.type.side}}class LE extends Ws{constructor(e,t,r,o){super(e,[],t,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class eo extends Ws{constructor(e,t,r,o){super(e,[],r,o),this.mark=t}static create(e,t,r,o){let s=o.nodeViews[t.type.name],i=s&&s(t,o,r);return(!i||!i.dom)&&(i=Sn.renderSpec(document,t.type.spec.toDOM(t,r))),new eo(e,t,i.dom,i.contentDOM||i.dom)}parseRule(){return this.dirty&Mn||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Mn&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=nn){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=nn}}slice(e,t,r){let o=eo.create(this.parent,this.mark,!0,r),s=this.children,i=this.size;t<i&&(s=kc(s,t,i,r)),e>0&&(s=kc(s,0,e,r));for(let l=0;l<s.length;l++)s[l].parent=o;return o.children=s,o}}class fr extends Ws{constructor(e,t,r,o,s,i,l,a,u){super(e,[],s,i),this.node=t,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,t,r,o,s,i){let l=s.nodeViews[t.type.name],a,u=l&&l(t,s,()=>{if(!a)return i;if(a.parent)return a.parent.posBeforeChild(a)},r,o),d=u&&u.dom,f=u&&u.contentDOM;if(t.isText){if(!d)d=document.createTextNode(t.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=Sn.renderSpec(document,t.type.spec.toDOM(t)));!f&&!t.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),t.type.spec.draggable&&(d.draggable=!0));let h=d;return d=$m(d,r,t),u?a=new DE(e,t,r,o,d,f||null,h,u,s,i+1):t.isText?new Wa(e,t,r,o,d,h,s):new fr(e,t,r,o,d,f||null,h,s,i+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 t=this.children.length-1;t>=0;t--){let r=this.children[t];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>fe.empty)}return e}matchesNode(e,t,r){return this.dirty==nn&&e.eq(this.node)&&Sc(t,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let r=this.node.inlineContent,o=t,s=e.composing?this.localCompositionInfo(e,t):null,i=s&&s.pos>-1?s:null,l=s&&s.pos<0,a=new BE(this,i&&i.node,e);VE(this.node,this.innerDeco,(u,d,f)=>{u.spec.marks?a.syncToMarks(u.spec.marks,r,e):u.type.side>=0&&!f&&a.syncToMarks(d==this.node.childCount?We.none:this.node.child(d).marks,r,e),a.placeWidget(u,e,o)},(u,d,f,h)=>{a.syncToMarks(u.marks,r,e);let p;a.findNodeMatch(u,d,f,h)||l&&e.state.selection.from>o&&e.state.selection.to<o+u.nodeSize&&(p=a.findIndexWithChild(s.node))>-1&&a.updateNodeAt(u,d,f,p,e)||a.updateNextNode(u,d,f,e,h,o)||a.addNode(u,d,f,e,o),o+=u.nodeSize}),a.syncToMarks([],r,e),this.node.isTextblock&&a.addTextblockHacks(),a.destroyRest(),(a.changed||this.dirty==Pr)&&(i&&this.protectLocalComposition(e,i),Fm(this.contentDOM,this.children,e),Bo&&$E(this.dom))}localCompositionInfo(e,t){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof Ue)||r<t||o>t+this.node.content.size)return null;let s=e.domSelectionRange(),i=zE(s.focusNode,s.focusOffset);if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let l=i.nodeValue,a=UE(this.node.content,l,r-t,o-t);return a<0?null:{node:i,pos:a,text:l}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:r,text:o}){if(this.getDesc(t))return;let s=t;for(;s.parentNode!=this.contentDOM;s=s.parentNode){for(;s.previousSibling;)s.parentNode.removeChild(s.previousSibling);for(;s.nextSibling;)s.parentNode.removeChild(s.nextSibling);s.pmViewDesc&&(s.pmViewDesc=void 0)}let i=new LE(this,s,t,o);e.input.compositionNodes.push(i),this.children=kc(this.children,r,r+o.length,e,i)}update(e,t,r,o){return this.dirty==Mn||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,r,o),!0)}updateInner(e,t,r,o){this.updateOuterDeco(t),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=nn}updateOuterDeco(e){if(Sc(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Vm(this.dom,this.nodeDOM,Tc(this.outerDeco,this.node,t),Tc(e,this.node,t)),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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable")}get domAtom(){return this.node.isAtom}}function Sf(n,e,t,r,o){$m(r,e,n);let s=new fr(void 0,n,e,t,r,r,r,o,0);return s.contentDOM&&s.updateChildren(o,0),s}class Wa extends fr{constructor(e,t,r,o,s,i,l){super(e,t,r,o,s,null,i,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,r,o){return this.dirty==Mn||this.dirty!=nn&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=nn||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=nn,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,r){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,r){let o=this.node.cut(e,t),s=document.createTextNode(o.text);return new Wa(this.parent,o,this.outerDeco,this.innerDeco,s,s,r)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Mn)}get domAtom(){return!1}}class Pm extends Ws{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==nn&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class DE extends fr{constructor(e,t,r,o,s,i,l,a,u,d){super(e,t,r,o,s,i,l,u,d),this.spec=a}update(e,t,r,o){if(this.dirty==Mn)return!1;if(this.spec.update){let s=this.spec.update(e,t,r);return s&&this.updateInner(e,t,r,o),s}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,r,o){this.spec.setSelection?this.spec.setSelection(e,t,r):super.setSelection(e,t,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 Fm(n,e,t){let r=n.firstChild,o=!1;for(let s=0;s<e.length;s++){let i=e[s],l=i.dom;if(l.parentNode==n){for(;l!=r;)r=kf(r),o=!0;r=r.nextSibling}else o=!0,n.insertBefore(l,r);if(i instanceof eo){let a=r?r.previousSibling:n.lastChild;Fm(i.contentDOM,i.children,t),r=a?a.nextSibling:n.firstChild}}for(;r;)r=kf(r),o=!0;o&&t.trackWrites==n&&(t.trackWrites=null)}const ms=function(n){n&&(this.nodeName=n)};ms.prototype=Object.create(null);const Fr=[new ms];function Tc(n,e,t){if(n.length==0)return Fr;let r=t?Fr[0]:new ms,o=[r];for(let s=0;s<n.length;s++){let i=n[s].type.attrs;if(i){i.nodeName&&o.push(r=new ms(i.nodeName));for(let l in i){let a=i[l];a!=null&&(t&&o.length==1&&o.push(r=new ms(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+a:l=="style"?r.style=(r.style?r.style+";":"")+a:l!="nodeName"&&(r[l]=a))}}}return o}function Vm(n,e,t,r){if(t==Fr&&r==Fr)return e;let o=e;for(let s=0;s<r.length;s++){let i=r[s],l=t[s];if(s){let a;l&&l.nodeName==i.nodeName&&o!=n&&(a=o.parentNode)&&a.nodeName.toLowerCase()==i.nodeName||(a=document.createElement(i.nodeName),a.pmIsDeco=!0,a.appendChild(o),l=Fr[0]),o=a}RE(o,l||Fr[0],i)}return o}function RE(n,e,t){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in t)&&n.removeAttribute(r);for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&t[r]!=e[r]&&n.setAttribute(r,t[r]);if(e.class!=t.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=t.class?t.class.split(" ").filter(Boolean):[];for(let s=0;s<r.length;s++)o.indexOf(r[s])==-1&&n.classList.remove(r[s]);for(let s=0;s<o.length;s++)r.indexOf(o[s])==-1&&n.classList.add(o[s]);n.classList.length==0&&n.removeAttribute("class")}if(e.style!=t.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)n.style.removeProperty(o[1])}t.style&&(n.style.cssText+=t.style)}}function $m(n,e,t){return Vm(n,n,Fr,Tc(e,t,n.nodeType!=1))}function Sc(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].type.eq(e[t].type))return!1;return!0}function kf(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class BE{constructor(e,t,r){this.lock=t,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=PE(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let r=e;r<t;r++)this.top.children[r].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,r){let o=0,s=this.stack.length>>1,i=Math.min(s,e.length);for(;o<i&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(e[o])&&e[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=nn,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let a=this.index;a<Math.min(this.index+3,this.top.children.length);a++){let u=this.top.children[a];if(u.matchesMark(e[s])&&!this.isLocked(u.dom)){l=a;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let a=eo.create(this.top,e[s],t,r);this.top.children.splice(this.index,0,a),this.top=a,this.changed=!0}this.index=0,s++}}findNodeMatch(e,t,r,o){let s=-1,i;if(o>=this.preMatch.index&&(i=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&i.matchesNode(e,t,r))s=this.top.children.indexOf(i,this.index);else for(let l=this.index,a=Math.min(this.top.children.length,l+5);l<a;l++){let u=this.top.children[l];if(u.matchesNode(e,t,r)&&!this.preMatch.matched.has(u)){s=l;break}}return s<0?!1:(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(e,t,r,o,s){let i=this.top.children[o];return i.dirty==Mn&&i.dom==i.contentDOM&&(i.dirty=Pr),i.update(e,t,r,s)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==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=t}}updateNextNode(e,t,r,o,s,i){for(let l=this.index;l<this.top.children.length;l++){let a=this.top.children[l];if(a instanceof fr){let u=this.preMatch.matched.get(a);if(u!=null&&u!=s)return!1;let d=a.dom,f,h=this.isLocked(d)&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&a.dirty!=Mn&&Sc(t,a.outerDeco));if(!h&&a.update(e,t,r,o))return this.destroyBetween(this.index,l),a.dom!=d&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(a,e,t,r,o,i)))return this.top.children[this.index]=f,f.contentDOM&&(f.dirty=Pr,f.updateChildren(o,i+1),f.dirty=nn),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,r,o,s,i){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let l=fr.create(this.top,t,r,o,s,i);if(l.contentDOM){l.children=e.children,e.children=[];for(let a of l.children)a.parent=l}return e.destroy(),l}addNode(e,t,r,o,s){let i=fr.create(this.top,e,t,r,o,s);i.contentDOM&&i.updateChildren(o,s+1),this.top.children.splice(this.index++,0,i),this.changed=!0}placeWidget(e,t,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 s=new Bm(this.top,e,t,r);this.top.children.splice(this.index++,0,s),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof eo;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Wa)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Nt||vt)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.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 Pm(this.top,[],r,null);t!=this.top?t.children.push(o):t.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 PE(n,e){let t=e,r=t.children.length,o=n.childCount,s=new Map,i=[];e:for(;o>0;){let l;for(;;)if(r){let u=t.children[r-1];if(u instanceof eo)t=u,r=u.children.length;else{l=u,r--;break}}else{if(t==e)break e;r=t.parent.children.indexOf(t),t=t.parent}let a=l.node;if(a){if(a!=n.child(o-1))break;--o,s.set(l,o),i.push(l)}}return{index:o,matched:s,matches:i.reverse()}}function FE(n,e){return n.type.side-e.type.side}function VE(n,e,t,r){let o=e.locals(n),s=0;if(o.length==0){for(let u=0;u<n.childCount;u++){let d=n.child(u);r(d,o,e.forChild(s,d),u),s+=d.nodeSize}return}let i=0,l=[],a=null;for(let u=0;;){let d,f;for(;i<o.length&&o[i].to==s;){let v=o[i++];v.widget&&(d?(f||(f=[d])).push(v):d=v)}if(d)if(f){f.sort(FE);for(let v=0;v<f.length;v++)t(f[v],u,!!a)}else t(d,u,!!a);let h,p;if(a)p=-1,h=a,a=null;else if(u<n.childCount)p=u,h=n.child(u++);else break;for(let v=0;v<l.length;v++)l[v].to<=s&&l.splice(v--,1);for(;i<o.length&&o[i].from<=s&&o[i].to>s;)l.push(o[i++]);let m=s+h.nodeSize;if(h.isText){let v=m;i<o.length&&o[i].from<v&&(v=o[i].from);for(let C=0;C<l.length;C++)l[C].to<v&&(v=l[C].to);v<m&&(a=h.cut(v-s),h=h.cut(0,v-s),m=v,p=-1)}let g=h.isInline&&!h.isLeaf?l.filter(v=>!v.inline):l.slice();r(h,g,e.forChild(s,h),p),s=m}}function $E(n){if(n.nodeName=="UL"||n.nodeName=="OL"){let e=n.style.cssText;n.style.cssText=e+"; list-style: square !important",window.getComputedStyle(n).listStyle,n.style.cssText=e}}function zE(n,e){for(;;){if(n.nodeType==3)return n;if(n.nodeType==1&&e>0){if(n.childNodes.length>e&&n.childNodes[e].nodeType==3)return n.childNodes[e];n=n.childNodes[e-1],e=Tn(n)}else if(n.nodeType==1&&e<n.childNodes.length)n=n.childNodes[e],e=0;else return null}}function UE(n,e,t,r){for(let o=0,s=0;o<n.childCount&&s<=r;){let i=n.child(o++),l=s;if(s+=i.nodeSize,!i.isText)continue;let a=i.text;for(;o<n.childCount;){let u=n.child(o++);if(s+=u.nodeSize,!u.isText)break;a+=u.text}if(s>=t){if(s>=r&&a.slice(r-e.length-l,r-l)==e)return r-e.length;let u=l<r?a.lastIndexOf(e,r-l-1):-1;if(u>=0&&u+e.length+l>=t)return l+u;if(t==r&&a.length>=r+e.length-l&&a.slice(r-l,r-l+e.length)==e)return r}}return-1}function kc(n,e,t,r,o){let s=[];for(let i=0,l=0;i<n.length;i++){let a=n[i],u=l,d=l+=a.size;u>=t||d<=e?s.push(a):(u<e&&s.push(a.slice(0,e-u,r)),o&&(s.push(o),o=void 0),d>t&&s.push(a.slice(t-u,a.size,r)))}return s}function Bu(n,e=null){let t=n.domSelectionRange(),r=n.state.doc;if(!t.focusNode)return null;let o=n.docView.nearestDesc(t.focusNode),s=o&&o.size==0,i=n.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(i<0)return null;let l=r.resolve(i),a,u;if(ja(t)){for(a=l;o&&!o.node;)o=o.parent;let d=o.node;if(o&&d.isAtom&&Le.isSelectable(d)&&o.parent&&!(d.isInline&&fE(t.focusNode,t.focusOffset,o.dom))){let f=o.posBefore;u=new Le(i==f?l:r.resolve(f))}}else{let d=n.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(d<0)return null;a=r.resolve(d)}if(!u){let d=e=="pointer"||n.state.selection.head<l.pos&&!s?1:-1;u=Pu(n,a,l,d)}return u}function zm(n){return n.editable?n.hasFocus():Hm(n)&&document.activeElement&&document.activeElement.contains(n.dom)}function jn(n,e=!1){let t=n.state.selection;if(Um(n,t),!!zm(n)){if(!e&&n.input.mouseDown&&n.input.mouseDown.allowDefault&&vt){let r=n.domSelectionRange(),o=n.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&qr(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){n.input.mouseDown.delayedSelectionSync=!0,n.domObserver.setCurSelection();return}}if(n.domObserver.disconnectSelection(),n.cursorWrapper)jE(n);else{let{anchor:r,head:o}=t,s,i;_f&&!(t instanceof Ue)&&(t.$from.parent.inlineContent||(s=xf(n,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(i=xf(n,t.to))),n.docView.setSelection(r,o,n.root,e),_f&&(s&&Nf(s),i&&Nf(i)),t.visible?n.dom.classList.remove("ProseMirror-hideselection"):(n.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&HE(n))}n.domObserver.setCurSelection(),n.domObserver.connectSelection()}}const _f=Nt||vt&&mE<63;function xf(n,e){let{node:t,offset:r}=n.docView.domFromPos(e,0),o=r<t.childNodes.length?t.childNodes[r]:null,s=r?t.childNodes[r-1]:null;if(Nt&&o&&o.contentEditable=="false")return Ol(o);if((!o||o.contentEditable=="false")&&(!s||s.contentEditable=="false")){if(o)return Ol(o);if(s)return Ol(s)}}function Ol(n){return n.contentEditable="true",Nt&&n.draggable&&(n.draggable=!1,n.wasDraggable=!0),n}function Nf(n){n.contentEditable="false",n.wasDraggable&&(n.draggable=!0,n.wasDraggable=null)}function HE(n){let e=n.dom.ownerDocument;e.removeEventListener("selectionchange",n.input.hideSelectionGuard);let t=n.domSelectionRange(),r=t.anchorNode,o=t.anchorOffset;e.addEventListener("selectionchange",n.input.hideSelectionGuard=()=>{(t.anchorNode!=r||t.anchorOffset!=o)&&(e.removeEventListener("selectionchange",n.input.hideSelectionGuard),setTimeout(()=>{(!zm(n)||n.state.selection.visible)&&n.dom.classList.remove("ProseMirror-hideselection")},20))})}function jE(n){let e=n.domSelection(),t=document.createRange(),r=n.cursorWrapper.dom,o=r.nodeName=="IMG";o?t.setEnd(r.parentNode,kt(r)+1):t.setEnd(r,0),t.collapse(!1),e.removeAllRanges(),e.addRange(t),!o&&!n.state.selection.visible&&Pt&&dr<=11&&(r.disabled=!0,r.disabled=!1)}function Um(n,e){if(e instanceof Le){let t=n.docView.descAt(e.from);t!=n.lastSelectedViewDesc&&(If(n),t&&t.selectNode(),n.lastSelectedViewDesc=t)}else If(n)}function If(n){n.lastSelectedViewDesc&&(n.lastSelectedViewDesc.parent&&n.lastSelectedViewDesc.deselectNode(),n.lastSelectedViewDesc=void 0)}function Pu(n,e,t,r){return n.someProp("createSelectionBetween",o=>o(n,e,t))||Ue.between(e,t,r)}function Mf(n){return n.editable&&!n.hasFocus()?!1:Hm(n)}function Hm(n){let e=n.domSelectionRange();if(!e.anchorNode)return!1;try{return n.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(n.editable||n.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function WE(n){let e=n.docView.domFromPos(n.state.selection.anchor,0),t=n.domSelectionRange();return qr(e.node,e.offset,t.anchorNode,t.anchorOffset)}function _c(n,e){let{$anchor:t,$head:r}=n.selection,o=e>0?t.max(r):t.min(r),s=o.parent.inlineContent?o.depth?n.doc.resolve(e>0?o.after():o.before()):null:o;return s&&$e.findFrom(s,e)}function or(n,e){return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()),!0}function Of(n,e,t){let r=n.state.selection;if(r instanceof Ue)if(t.indexOf("s")>-1){let{$head:o}=r,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!s||s.isText||!s.isLeaf)return!1;let i=n.state.doc.resolve(o.pos+s.nodeSize*(e<0?-1:1));return or(n,new Ue(r.$anchor,i))}else if(r.empty){if(n.endOfTextblock(e>0?"forward":"backward")){let o=_c(n.state,e);return o&&o instanceof Le?or(n,o):!1}else if(!(qt&&t.indexOf("m")>-1)){let o=r.$head,s=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,i;if(!s||s.isText)return!1;let l=e<0?o.pos-s.nodeSize:o.pos;return s.isAtom||(i=n.docView.descAt(l))&&!i.contentDOM?Le.isSelectable(s)?or(n,new Le(e<0?n.state.doc.resolve(o.pos-s.nodeSize):o)):js?or(n,new Ue(n.state.doc.resolve(e<0?l:l+s.nodeSize))):!1:!1}}else return!1;else{if(r instanceof Le&&r.node.isInline)return or(n,new Ue(e>0?r.$to:r.$from));{let o=_c(n.state,e);return o?or(n,o):!1}}}function $i(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function gs(n,e){let t=n.pmViewDesc;return t&&t.size==0&&(e<0||n.nextSibling||n.nodeName!="BR")}function fo(n,e){return e<0?KE(n):YE(n)}function KE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o,s,i=!1;for(pn&&t.nodeType==1&&r<$i(t)&&gs(t.childNodes[r],-1)&&(i=!0);;)if(r>0){if(t.nodeType!=1)break;{let l=t.childNodes[r-1];if(gs(l,-1))o=t,s=--r;else if(l.nodeType==3)t=l,r=t.nodeValue.length;else break}}else{if(jm(t))break;{let l=t.previousSibling;for(;l&&gs(l,-1);)o=t.parentNode,s=kt(l),l=l.previousSibling;if(l)t=l,r=$i(t);else{if(t=t.parentNode,t==n.dom)break;r=0}}}i?xc(n,t,r):o&&xc(n,o,s)}function YE(n){let e=n.domSelectionRange(),t=e.focusNode,r=e.focusOffset;if(!t)return;let o=$i(t),s,i;for(;;)if(r<o){if(t.nodeType!=1)break;let l=t.childNodes[r];if(gs(l,1))s=t,i=++r;else break}else{if(jm(t))break;{let l=t.nextSibling;for(;l&&gs(l,1);)s=l.parentNode,i=kt(l)+1,l=l.nextSibling;if(l)t=l,r=0,o=$i(t);else{if(t=t.parentNode,t==n.dom)break;r=o=0}}}s&&xc(n,s,i)}function jm(n){let e=n.pmViewDesc;return e&&e.node&&e.node.isBlock}function GE(n,e){for(;n&&e==n.childNodes.length&&!Du(n);)e=kt(n)+1,n=n.parentNode;for(;n&&e<n.childNodes.length;){let t=n.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=0}}function QE(n,e){for(;n&&!e&&!Du(n);)e=kt(n),n=n.parentNode;for(;n&&e;){let t=n.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;n=t,e=n.childNodes.length}}function xc(n,e,t){if(e.nodeType!=3){let s,i;(i=GE(e,t))?(e=i,t=0):(s=QE(e,t))&&(e=s,t=s.nodeValue.length)}let r=n.domSelection();if(ja(r)){let s=document.createRange();s.setEnd(e,t),s.setStart(e,t),r.removeAllRanges(),r.addRange(s)}else r.extend&&r.extend(e,t);n.domObserver.setCurSelection();let{state:o}=n;setTimeout(()=>{n.state==o&&jn(n)},50)}function Lf(n,e){let t=n.state.doc.resolve(e);if(!(vt||gE)&&t.parent.inlineContent){let o=n.coordsAtPos(e);if(e>t.start()){let s=n.coordsAtPos(e-1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left<o.left?"ltr":"rtl"}if(e<t.end()){let s=n.coordsAtPos(e+1),i=(s.top+s.bottom)/2;if(i>o.top&&i<o.bottom&&Math.abs(s.left-o.left)>1)return s.left>o.left?"ltr":"rtl"}}return getComputedStyle(n.dom).direction=="rtl"?"rtl":"ltr"}function Df(n,e,t){let r=n.state.selection;if(r instanceof Ue&&!r.empty||t.indexOf("s")>-1||qt&&t.indexOf("m")>-1)return!1;let{$from:o,$to:s}=r;if(!o.parent.inlineContent||n.endOfTextblock(e<0?"up":"down")){let i=_c(n.state,e);if(i&&i instanceof Le)return or(n,i)}if(!o.parent.inlineContent){let i=e<0?o:s,l=r instanceof dn?$e.near(i,e):$e.findFrom(i,e);return l?or(n,l):!1}return!1}function Rf(n,e){if(!(n.state.selection instanceof Ue))return!0;let{$head:t,$anchor:r,empty:o}=n.state.selection;if(!t.sameParent(r))return!0;if(!o)return!1;if(n.endOfTextblock(e>0?"forward":"backward"))return!0;let s=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(s&&!s.isText){let i=n.state.tr;return e<0?i.delete(t.pos-s.nodeSize,t.pos):i.delete(t.pos,t.pos+s.nodeSize),n.dispatch(i),!0}return!1}function Bf(n,e,t){n.domObserver.stop(),e.contentEditable=t,n.domObserver.start()}function ZE(n){if(!Nt||n.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=n.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Bf(n,r,"true"),setTimeout(()=>Bf(n,r,"false"),20)}return!1}function JE(n){let e="";return n.ctrlKey&&(e+="c"),n.metaKey&&(e+="m"),n.altKey&&(e+="a"),n.shiftKey&&(e+="s"),e}function XE(n,e){let t=e.keyCode,r=JE(e);if(t==8||qt&&t==72&&r=="c")return Rf(n,-1)||fo(n,-1);if(t==46&&!e.shiftKey||qt&&t==68&&r=="c")return Rf(n,1)||fo(n,1);if(t==13||t==27)return!0;if(t==37||qt&&t==66&&r=="c"){let o=t==37?Lf(n,n.state.selection.from)=="ltr"?-1:1:-1;return Of(n,o,r)||fo(n,o)}else if(t==39||qt&&t==70&&r=="c"){let o=t==39?Lf(n,n.state.selection.from)=="ltr"?1:-1:1;return Of(n,o,r)||fo(n,o)}else{if(t==38||qt&&t==80&&r=="c")return Df(n,-1,r)||fo(n,-1);if(t==40||qt&&t==78&&r=="c")return ZE(n)||Df(n,1,r)||fo(n,1);if(r==(qt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Wm(n,e){n.someProp("transformCopied",p=>{e=p(e,n)});let t=[],{content:r,openStart:o,openEnd:s}=e;for(;o>1&&s>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,s--;let p=r.firstChild;t.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let i=n.someProp("clipboardSerializer")||Sn.fromSchema(n.state.schema),l=Jm(),a=l.createElement("div");a.appendChild(i.serializeFragment(r,{document:l}));let u=a.firstChild,d,f=0;for(;u&&u.nodeType==1&&(d=Zm[u.nodeName.toLowerCase()]);){for(let p=d.length-1;p>=0;p--){let m=l.createElement(d[p]);for(;a.firstChild;)m.appendChild(a.firstChild);a.appendChild(m),f++}u=a.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${o} ${s}${f?` -${f}`:""} ${JSON.stringify(t)}`);let h=n.someProp("clipboardTextSerializer",p=>p(e,n))||e.content.textBetween(0,e.content.size,`
67
+
68
+ `);return{dom:a,text:h}}function Km(n,e,t,r,o){let s=o.parent.type.spec.code,i,l;if(!t&&!e)return null;let a=e&&(r||s||!t);if(a){if(n.someProp("transformPastedText",h=>{e=h(e,s||r,n)}),s)return e?new we(fe.from(n.state.schema.text(e.replace(/\r\n?/g,`
69
+ `))),0,0):we.empty;let f=n.someProp("clipboardTextParser",h=>h(e,o,r,n));if(f)l=f;else{let h=o.marks(),{schema:p}=n.state,m=Sn.fromSchema(p);i=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(g=>{let v=i.appendChild(document.createElement("p"));g&&v.appendChild(m.serializeNode(p.text(g,h)))})}}else n.someProp("transformPastedHTML",f=>{t=f(t,n)}),i=tC(t),js&&nC(i);let u=i&&i.querySelector("[data-pm-slice]"),d=u&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(u.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let h=i.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;i=h}if(l||(l=(n.someProp("clipboardParser")||n.someProp("domParser")||Lo.fromSchema(n.state.schema)).parseSlice(i,{preserveWhitespace:!!(a||d),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!qE.test(h.parentNode.nodeName)?{ignore:!0}:null}})),d)l=rC(Pf(l,+d[1],+d[2]),d[4]);else if(l=we.maxOpen(eC(l.content,o),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=Pf(l,f,h)}return n.someProp("transformPasted",f=>{l=f(l,n)}),l}const qE=/^(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 eC(n,e){if(n.childCount<2)return n;for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.index(t)),s,i=[];if(n.forEach(l=>{if(!i)return;let a=o.findWrapping(l.type),u;if(!a)return i=null;if(u=i.length&&s.length&&Gm(a,s,l,i[i.length-1],0))i[i.length-1]=u;else{i.length&&(i[i.length-1]=Qm(i[i.length-1],s.length));let d=Ym(l,a);i.push(d),o=o.matchType(d.type),s=a}}),i)return fe.from(i)}return n}function Ym(n,e,t=0){for(let r=e.length-1;r>=t;r--)n=e[r].create(null,fe.from(n));return n}function Gm(n,e,t,r,o){if(o<n.length&&o<e.length&&n[o]==e[o]){let s=Gm(n,e,t,r.lastChild,o+1);if(s)return r.copy(r.content.replaceChild(r.childCount-1,s));if(r.contentMatchAt(r.childCount).matchType(o==n.length-1?t.type:n[o+1]))return r.copy(r.content.append(fe.from(Ym(t,n,o+1))))}}function Qm(n,e){if(e==0)return n;let t=n.content.replaceChild(n.childCount-1,Qm(n.lastChild,e-1)),r=n.contentMatchAt(n.childCount).fillBefore(fe.empty,!0);return n.copy(t.append(r))}function Nc(n,e,t,r,o,s){let i=e<0?n.firstChild:n.lastChild,l=i.content;return n.childCount>1&&(s=0),o<r-1&&(l=Nc(l,e,t,r,o+1,s)),o>=t&&(l=e<0?i.contentMatchAt(0).fillBefore(l,s<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(fe.empty,!0))),n.replaceChild(e<0?0:n.childCount-1,i.copy(l))}function Pf(n,e,t){return e<n.openStart&&(n=new we(Nc(n.content,-1,e,n.openStart,0,n.openEnd),e,n.openEnd)),t<n.openEnd&&(n=new we(Nc(n.content,1,t,n.openEnd,0,0),n.openStart,t)),n}const Zm={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 Ff=null;function Jm(){return Ff||(Ff=document.implementation.createHTMLDocument("title"))}function tC(n){let e=/^(\s*<meta [^>]*>)*/.exec(n);e&&(n=n.slice(e[0].length));let t=Jm().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(n),o;if((o=r&&Zm[r[1].toLowerCase()])&&(n=o.map(s=>"<"+s+">").join("")+n+o.map(s=>"</"+s+">").reverse().join("")),t.innerHTML=n,o)for(let s=0;s<o.length;s++)t=t.querySelector(o[s])||t;return t}function nC(n){let e=n.querySelectorAll(vt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let r=e[t];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(n.ownerDocument.createTextNode(" "),r)}}function rC(n,e){if(!n.size)return n;let t=n.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return n}let{content:o,openStart:s,openEnd:i}=n;for(let l=r.length-2;l>=0;l-=2){let a=t.nodes[r[l]];if(!a||a.hasRequiredAttrs())break;o=fe.from(a.create(r[l+1],o)),s++,i++}return new we(o,s,i)}const It={},Mt={},oC={touchstart:!0,touchmove:!0};class sC{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function iC(n){for(let e in It){let t=It[e];n.dom.addEventListener(e,n.input.eventHandlers[e]=r=>{lC(n,r)&&!Fu(n,r)&&(n.editable||!(r.type in Mt))&&t(n,r)},oC[e]?{passive:!0}:void 0)}Nt&&n.dom.addEventListener("input",()=>null),Ic(n)}function ur(n,e){n.input.lastSelectionOrigin=e,n.input.lastSelectionTime=Date.now()}function aC(n){n.domObserver.stop();for(let e in n.input.eventHandlers)n.dom.removeEventListener(e,n.input.eventHandlers[e]);clearTimeout(n.input.composingTimeout),clearTimeout(n.input.lastIOSEnterFallbackTimeout)}function Ic(n){n.someProp("handleDOMEvents",e=>{for(let t in e)n.input.eventHandlers[t]||n.dom.addEventListener(t,n.input.eventHandlers[t]=r=>Fu(n,r))})}function Fu(n,e){return n.someProp("handleDOMEvents",t=>{let r=t[e.type];return r?r(n,e)||e.defaultPrevented:!1})}function lC(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=n.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function cC(n,e){!Fu(n,e)&&It[e.type]&&(n.editable||!(e.type in Mt))&&It[e.type](n,e)}Mt.keydown=(n,e)=>{let t=e;if(n.input.shiftKey=t.keyCode==16||t.shiftKey,!qm(n,t)&&(n.input.lastKeyCode=t.keyCode,n.input.lastKeyCodeTime=Date.now(),!(cn&&vt&&t.keyCode==13)))if(t.keyCode!=229&&n.domObserver.forceFlush(),Bo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let r=Date.now();n.input.lastIOSEnter=r,n.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{n.input.lastIOSEnter==r&&(n.someProp("handleKeyDown",o=>o(n,Rr(13,"Enter"))),n.input.lastIOSEnter=0)},200)}else n.someProp("handleKeyDown",r=>r(n,t))||XE(n,t)?t.preventDefault():ur(n,"key")};Mt.keyup=(n,e)=>{e.keyCode==16&&(n.input.shiftKey=!1)};Mt.keypress=(n,e)=>{let t=e;if(qm(n,t)||!t.charCode||t.ctrlKey&&!t.altKey||qt&&t.metaKey)return;if(n.someProp("handleKeyPress",o=>o(n,t))){t.preventDefault();return}let r=n.state.selection;if(!(r instanceof Ue)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(t.charCode);!/[\r\n]/.test(o)&&!n.someProp("handleTextInput",s=>s(n,r.$from.pos,r.$to.pos,o))&&n.dispatch(n.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}};function Ka(n){return{left:n.clientX,top:n.clientY}}function uC(n,e){let t=e.x-n.clientX,r=e.y-n.clientY;return t*t+r*r<100}function Vu(n,e,t,r,o){if(r==-1)return!1;let s=n.state.doc.resolve(r);for(let i=s.depth+1;i>0;i--)if(n.someProp(e,l=>i>s.depth?l(n,t,s.nodeAfter,s.before(i),o,!0):l(n,t,s.node(i),s.before(i),o,!1)))return!0;return!1}function Oo(n,e,t){n.focused||n.focus();let r=n.state.tr.setSelection(e);t=="pointer"&&r.setMeta("pointer",!0),n.dispatch(r)}function dC(n,e){if(e==-1)return!1;let t=n.state.doc.resolve(e),r=t.nodeAfter;return r&&r.isAtom&&Le.isSelectable(r)?(Oo(n,new Le(t),"pointer"),!0):!1}function fC(n,e){if(e==-1)return!1;let t=n.state.selection,r,o;t instanceof Le&&(r=t.node);let s=n.state.doc.resolve(e);for(let i=s.depth+1;i>0;i--){let l=i>s.depth?s.nodeAfter:s.node(i);if(Le.isSelectable(l)){r&&t.$from.depth>0&&i>=t.$from.depth&&s.before(t.$from.depth+1)==t.$from.pos?o=s.before(t.$from.depth):o=s.before(i);break}}return o!=null?(Oo(n,Le.create(n.state.doc,o),"pointer"),!0):!1}function hC(n,e,t,r,o){return Vu(n,"handleClickOn",e,t,r)||n.someProp("handleClick",s=>s(n,e,r))||(o?fC(n,t):dC(n,t))}function pC(n,e,t,r){return Vu(n,"handleDoubleClickOn",e,t,r)||n.someProp("handleDoubleClick",o=>o(n,e,r))}function mC(n,e,t,r){return Vu(n,"handleTripleClickOn",e,t,r)||n.someProp("handleTripleClick",o=>o(n,e,r))||gC(n,t,r)}function gC(n,e,t){if(t.button!=0)return!1;let r=n.state.doc;if(e==-1)return r.inlineContent?(Oo(n,Ue.create(r,0,r.content.size),"pointer"),!0):!1;let o=r.resolve(e);for(let s=o.depth+1;s>0;s--){let i=s>o.depth?o.nodeAfter:o.node(s),l=o.before(s);if(i.inlineContent)Oo(n,Ue.create(r,l+1,l+1+i.content.size),"pointer");else if(Le.isSelectable(i))Oo(n,Le.create(r,l),"pointer");else continue;return!0}}function $u(n){return zi(n)}const Xm=qt?"metaKey":"ctrlKey";It.mousedown=(n,e)=>{let t=e;n.input.shiftKey=t.shiftKey;let r=$u(n),o=Date.now(),s="singleClick";o-n.input.lastClick.time<500&&uC(t,n.input.lastClick)&&!t[Xm]&&(n.input.lastClick.type=="singleClick"?s="doubleClick":n.input.lastClick.type=="doubleClick"&&(s="tripleClick")),n.input.lastClick={time:o,x:t.clientX,y:t.clientY,type:s};let i=n.posAtCoords(Ka(t));i&&(s=="singleClick"?(n.input.mouseDown&&n.input.mouseDown.done(),n.input.mouseDown=new vC(n,i,t,!!r)):(s=="doubleClick"?pC:mC)(n,i.pos,i.inside,t)?t.preventDefault():ur(n,"pointer"))};class vC{constructor(e,t,r,o){this.view=e,this.pos=t,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Xm],this.allowDefault=r.shiftKey;let s,i;if(t.inside>-1)s=e.state.doc.nodeAt(t.inside),i=t.inside;else{let d=e.state.doc.resolve(t.pos);s=d.parent,i=d.depth?d.before():0}const l=o?null:r.target,a=l?e.docView.nearestDesc(l,!0):null;this.target=a?a.dom:null;let{selection:u}=e.state;(r.button==0&&s.type.spec.draggable&&s.type.spec.selectable!==!1||u instanceof Le&&u.from<=i&&u.to>i)&&(this.mightDrag={node:s,pos:i,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&pn&&!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)),ur(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(()=>jn(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ka(e))),this.updateAllowDefault(e),this.allowDefault||!t?ur(this.view,"pointer"):hC(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Nt&&this.mightDrag&&!this.mightDrag.node.isAtom||vt&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Oo(this.view,$e.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):ur(this.view,"pointer")}move(e){this.updateAllowDefault(e),ur(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)}}It.touchstart=n=>{n.input.lastTouch=Date.now(),$u(n),ur(n,"pointer")};It.touchmove=n=>{n.input.lastTouch=Date.now(),ur(n,"pointer")};It.contextmenu=n=>$u(n);function qm(n,e){return n.composing?!0:Nt&&Math.abs(e.timeStamp-n.input.compositionEndedAt)<500?(n.input.compositionEndedAt=-2e8,!0):!1}const yC=cn?5e3:-1;Mt.compositionstart=Mt.compositionupdate=n=>{if(!n.composing){n.domObserver.flush();let{state:e}=n,t=e.selection.$from;if(e.selection.empty&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))n.markCursor=n.state.storedMarks||t.marks(),zi(n,!0),n.markCursor=null;else if(zi(n),pn&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let r=n.domSelectionRange();for(let o=r.focusNode,s=r.focusOffset;o&&o.nodeType==1&&s!=0;){let i=s<0?o.lastChild:o.childNodes[s-1];if(!i)break;if(i.nodeType==3){n.domSelection().collapse(i,i.nodeValue.length);break}else o=i,s=-1}}n.input.composing=!0}e0(n,yC)};Mt.compositionend=(n,e)=>{n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=e.timeStamp,n.input.compositionPendingChanges=n.domObserver.pendingRecords().length?n.input.compositionID:0,n.input.compositionPendingChanges&&Promise.resolve().then(()=>n.domObserver.flush()),n.input.compositionID++,e0(n,20))};function e0(n,e){clearTimeout(n.input.composingTimeout),e>-1&&(n.input.composingTimeout=setTimeout(()=>zi(n),e))}function t0(n){for(n.composing&&(n.input.composing=!1,n.input.compositionEndedAt=EC());n.input.compositionNodes.length>0;)n.input.compositionNodes.pop().markParentsDirty()}function EC(){let n=document.createEvent("Event");return n.initEvent("event",!0,!0),n.timeStamp}function zi(n,e=!1){if(!(cn&&n.domObserver.flushingSoon>=0)){if(n.domObserver.forceFlush(),t0(n),e||n.docView&&n.docView.dirty){let t=Bu(n);return t&&!t.eq(n.state.selection)?n.dispatch(n.state.tr.setSelection(t)):n.updateState(n.state),!0}return!1}}function CC(n,e){if(!n.dom.parentNode)return;let t=n.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),n.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),n.focus()},50)}const xs=Pt&&dr<15||Bo&&vE<604;It.copy=Mt.cut=(n,e)=>{let t=e,r=n.state.selection,o=t.type=="cut";if(r.empty)return;let s=xs?null:t.clipboardData,i=r.content(),{dom:l,text:a}=Wm(n,i);s?(t.preventDefault(),s.clearData(),s.setData("text/html",l.innerHTML),s.setData("text/plain",a)):CC(n,l),o&&n.dispatch(n.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function AC(n){return n.openStart==0&&n.openEnd==0&&n.content.childCount==1?n.content.firstChild:null}function bC(n,e){if(!n.dom.parentNode)return;let t=n.input.shiftKey||n.state.selection.$from.parent.type.spec.code,r=n.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=n.input.shiftKey&&n.input.lastKeyCode!=45;setTimeout(()=>{n.focus(),r.parentNode&&r.parentNode.removeChild(r),t?Ns(n,r.value,null,o,e):Ns(n,r.textContent,r.innerHTML,o,e)},50)}function Ns(n,e,t,r,o){let s=Km(n,e,t,r,n.state.selection.$from);if(n.someProp("handlePaste",a=>a(n,o,s||we.empty)))return!0;if(!s)return!1;let i=AC(s),l=i?n.state.tr.replaceSelectionWith(i,r):n.state.tr.replaceSelection(s);return n.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function n0(n){let e=n.getData("text/plain")||n.getData("Text");if(e)return e;let t=n.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}Mt.paste=(n,e)=>{let t=e;if(n.composing&&!cn)return;let r=xs?null:t.clipboardData,o=n.input.shiftKey&&n.input.lastKeyCode!=45;r&&Ns(n,n0(r),r.getData("text/html"),o,t)?t.preventDefault():bC(n,t)};class r0{constructor(e,t,r){this.slice=e,this.move=t,this.node=r}}const o0=qt?"altKey":"ctrlKey";It.dragstart=(n,e)=>{let t=e,r=n.input.mouseDown;if(r&&r.done(),!t.dataTransfer)return;let o=n.state.selection,s=o.empty?null:n.posAtCoords(Ka(t)),i;if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof Le?o.to-1:o.to))){if(r&&r.mightDrag)i=Le.create(n.state.doc,r.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let d=n.docView.nearestDesc(t.target,!0);d&&d.node.type.spec.draggable&&d!=n.docView&&(i=Le.create(n.state.doc,d.posBefore))}}let l=(i||n.state.selection).content(),{dom:a,text:u}=Wm(n,l);t.dataTransfer.clearData(),t.dataTransfer.setData(xs?"Text":"text/html",a.innerHTML),t.dataTransfer.effectAllowed="copyMove",xs||t.dataTransfer.setData("text/plain",u),n.dragging=new r0(l,!t[o0],i)};It.dragend=n=>{let e=n.dragging;window.setTimeout(()=>{n.dragging==e&&(n.dragging=null)},50)};Mt.dragover=Mt.dragenter=(n,e)=>e.preventDefault();Mt.drop=(n,e)=>{let t=e,r=n.dragging;if(n.dragging=null,!t.dataTransfer)return;let o=n.posAtCoords(Ka(t));if(!o)return;let s=n.state.doc.resolve(o.pos),i=r&&r.slice;i?n.someProp("transformPasted",m=>{i=m(i,n)}):i=Km(n,n0(t.dataTransfer),xs?null:t.dataTransfer.getData("text/html"),!1,s);let l=!!(r&&!t[o0]);if(n.someProp("handleDrop",m=>m(n,t,i||we.empty,l))){t.preventDefault();return}if(!i)return;t.preventDefault();let a=i?eE(n.state.doc,s.pos,i):s.pos;a==null&&(a=s.pos);let u=n.state.tr;if(l){let{node:m}=r;m?m.replace(u):u.deleteSelection()}let d=u.mapping.map(a),f=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,h=u.doc;if(f?u.replaceRangeWith(d,d,i.content.firstChild):u.replaceRange(d,d,i),u.doc.eq(h))return;let p=u.doc.resolve(d);if(f&&Le.isSelectable(i.content.firstChild)&&p.nodeAfter&&p.nodeAfter.sameMarkup(i.content.firstChild))u.setSelection(new Le(p));else{let m=u.mapping.map(a);u.mapping.maps[u.mapping.maps.length-1].forEach((g,v,C,b)=>m=b),u.setSelection(Pu(n,p,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))};It.focus=n=>{n.input.lastFocus=Date.now(),n.focused||(n.domObserver.stop(),n.dom.classList.add("ProseMirror-focused"),n.domObserver.start(),n.focused=!0,setTimeout(()=>{n.docView&&n.hasFocus()&&!n.domObserver.currentSelection.eq(n.domSelectionRange())&&jn(n)},20))};It.blur=(n,e)=>{let t=e;n.focused&&(n.domObserver.stop(),n.dom.classList.remove("ProseMirror-focused"),n.domObserver.start(),t.relatedTarget&&n.dom.contains(t.relatedTarget)&&n.domObserver.currentSelection.clear(),n.focused=!1)};It.beforeinput=(n,e)=>{if(vt&&cn&&e.inputType=="deleteContentBackward"){n.domObserver.flushSoon();let{domChangeCount:r}=n.input;setTimeout(()=>{if(n.input.domChangeCount!=r||(n.dom.blur(),n.focus(),n.someProp("handleKeyDown",s=>s(n,Rr(8,"Backspace")))))return;let{$cursor:o}=n.state.selection;o&&o.pos>0&&n.dispatch(n.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let n in Mt)It[n]=Mt[n];function Is(n,e){if(n==e)return!0;for(let t in n)if(n[t]!==e[t])return!1;for(let t in e)if(!(t in n))return!1;return!0}class Ui{constructor(e,t){this.toDOM=e,this.spec=t||Yr,this.side=this.spec.side||0}map(e,t,r,o){let{pos:s,deleted:i}=e.mapResult(t.from+o,this.side<0?-1:1);return i?null:new tn(s-r,s-r,this)}valid(){return!0}eq(e){return this==e||e instanceof Ui&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Is(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class hr{constructor(e,t){this.attrs=e,this.spec=t||Yr}map(e,t,r,o){let s=e.map(t.from+o,this.spec.inclusiveStart?-1:1)-r,i=e.map(t.to+o,this.spec.inclusiveEnd?1:-1)-r;return s>=i?null:new tn(s,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof hr&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}static is(e){return e.type instanceof hr}destroy(){}}class zu{constructor(e,t){this.attrs=e,this.spec=t||Yr}map(e,t,r,o){let s=e.mapResult(t.from+o,1);if(s.deleted)return null;let i=e.mapResult(t.to+o,-1);return i.deleted||i.pos<=s.pos?null:new tn(s.pos-r,i.pos-r,this)}valid(e,t){let{index:r,offset:o}=e.content.findIndex(t.from),s;return o==t.from&&!(s=e.child(r)).isText&&o+s.nodeSize==t.to}eq(e){return this==e||e instanceof zu&&Is(this.attrs,e.attrs)&&Is(this.spec,e.spec)}destroy(){}}class tn{constructor(e,t,r){this.from=e,this.to=t,this.type=r}copy(e,t){return new tn(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,r){return this.type.map(e,this,t,r)}static widget(e,t,r){return new tn(e,e,new Ui(t,r))}static inline(e,t,r,o){return new tn(e,t,new hr(r,o))}static node(e,t,r,o){return new tn(e,t,new zu(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof hr}get widget(){return this.type instanceof Ui}}const yo=[],Yr={};class it{constructor(e,t){this.local=e.length?e:yo,this.children=t.length?t:yo}static create(e,t){return t.length?Hi(t,e,0,Yr):gt}find(e,t,r){let o=[];return this.findInner(e??0,t??1e9,o,0,r),o}findInner(e,t,r,o,s){for(let i=0;i<this.local.length;i++){let l=this.local[i];l.from<=t&&l.to>=e&&(!s||s(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let l=this.children[i]+1;this.children[i+2].findInner(e-l,t-l,r,o+l,s)}}map(e,t,r){return this==gt||e.maps.length==0?this:this.mapInner(e,t,0,0,r||Yr)}mapInner(e,t,r,o,s){let i;for(let l=0;l<this.local.length;l++){let a=this.local[l].map(e,r,o);a&&a.type.valid(t,a)?(i||(i=[])).push(a):s.onRemove&&s.onRemove(this.local[l].spec)}return this.children.length?wC(this.children,i||[],e,t,r,o,s):i?new it(i.sort(Gr),yo):gt}add(e,t){return t.length?this==gt?it.create(e,t):this.addInner(e,t,0):this}addInner(e,t,r){let o,s=0;e.forEach((l,a)=>{let u=a+r,d;if(d=i0(t,l,u)){for(o||(o=this.children.slice());s<o.length&&o[s]<a;)s+=3;o[s]==a?o[s+2]=o[s+2].addInner(l,d,u+1):o.splice(s,0,a,a+l.nodeSize,Hi(d,l,u+1,Yr)),s+=3}});let i=s0(s?a0(t):t,-r);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||i.splice(l--,1);return new it(i.length?this.local.concat(i).sort(Gr):this.local,o||this.children)}remove(e){return e.length==0||this==gt?this:this.removeInner(e,0)}removeInner(e,t){let r=this.children,o=this.local;for(let s=0;s<r.length;s+=3){let i,l=r[s]+t,a=r[s+1]+t;for(let d=0,f;d<e.length;d++)(f=e[d])&&f.from>l&&f.to<a&&(e[d]=null,(i||(i=[])).push(f));if(!i)continue;r==this.children&&(r=this.children.slice());let u=r[s+2].removeInner(i,l+1);u!=gt?r[s+2]=u:(r.splice(s,3),s-=3)}if(o.length){for(let s=0,i;s<e.length;s++)if(i=e[s])for(let l=0;l<o.length;l++)o[l].eq(i,t)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new it(o,r):gt}forChild(e,t){if(this==gt)return this;if(t.isLeaf)return it.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let s=e+1,i=s+t.content.size;for(let l=0;l<this.local.length;l++){let a=this.local[l];if(a.from<i&&a.to>s&&a.type instanceof hr){let u=Math.max(s,a.from)-s,d=Math.min(i,a.to)-s;u<d&&(o||(o=[])).push(a.copy(u,d))}}if(o){let l=new it(o.sort(Gr),yo);return r?new ir([l,r]):l}return r||gt}eq(e){if(this==e)return!0;if(!(e instanceof it)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return Uu(this.localsInner(e))}localsInner(e){if(this==gt)return yo;if(e.inlineContent||!this.local.some(hr.is))return this.local;let t=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof hr||t.push(this.local[r]);return t}}it.empty=new it([],[]);it.removeOverlap=Uu;const gt=it.empty;class ir{constructor(e){this.members=e}map(e,t){const r=this.members.map(o=>o.map(e,t,Yr));return ir.from(r)}forChild(e,t){if(t.isLeaf)return it.empty;let r=[];for(let o=0;o<this.members.length;o++){let s=this.members[o].forChild(e,t);s!=gt&&(s instanceof ir?r=r.concat(s.members):r.push(s))}return ir.from(r)}eq(e){if(!(e instanceof ir)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,r=!0;for(let o=0;o<this.members.length;o++){let s=this.members[o].localsInner(e);if(s.length)if(!t)t=s;else{r&&(t=t.slice(),r=!1);for(let i=0;i<s.length;i++)t.push(s[i])}}return t?Uu(r?t:t.sort(Gr)):yo}static from(e){switch(e.length){case 0:return gt;case 1:return e[0];default:return new ir(e.every(t=>t instanceof it)?e:e.reduce((t,r)=>t.concat(r instanceof it?r:r.members),[]))}}}function wC(n,e,t,r,o,s,i){let l=n.slice();for(let u=0,d=s;u<t.maps.length;u++){let f=0;t.maps[u].forEach((h,p,m,g)=>{let v=g-m-(p-h);for(let C=0;C<l.length;C+=3){let b=l[C+1];if(b<0||h>b+d-f)continue;let E=l[C]+d-f;p>=E?l[C+1]=h<=E?-2:-1:m>=o&&v&&(l[C]+=v,l[C+1]+=v)}f+=v}),d=t.maps[u].map(d,-1)}let a=!1;for(let u=0;u<l.length;u+=3)if(l[u+1]<0){if(l[u+1]==-2){a=!0,l[u+1]=-1;continue}let d=t.map(n[u]+s),f=d-o;if(f<0||f>=r.content.size){a=!0;continue}let h=t.map(n[u+1]+s,-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 C=l[u+2].mapInner(t,v,d+1,n[u]+s+1,i);C!=gt?(l[u]=f,l[u+1]=p,l[u+2]=C):(l[u+1]=-2,a=!0)}else a=!0}if(a){let u=TC(l,n,e,t,o,s,i),d=Hi(u,r,0,i);e=d.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<d.children.length;f+=3){let p=d.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,d.children[f],d.children[f+1],d.children[f+2])}}return new it(e.sort(Gr),l)}function s0(n,e){if(!e||!n.length)return n;let t=[];for(let r=0;r<n.length;r++){let o=n[r];t.push(new tn(o.from+e,o.to+e,o.type))}return t}function TC(n,e,t,r,o,s,i){function l(a,u){for(let d=0;d<a.local.length;d++){let f=a.local[d].map(r,o,u);f?t.push(f):i.onRemove&&i.onRemove(a.local[d].spec)}for(let d=0;d<a.children.length;d+=3)l(a.children[d+2],a.children[d]+u+1)}for(let a=0;a<n.length;a+=3)n[a+1]==-1&&l(n[a+2],e[a]+s+1);return t}function i0(n,e,t){if(e.isLeaf)return null;let r=t+e.nodeSize,o=null;for(let s=0,i;s<n.length;s++)(i=n[s])&&i.from>t&&i.to<r&&((o||(o=[])).push(i),n[s]=null);return o}function a0(n){let e=[];for(let t=0;t<n.length;t++)n[t]!=null&&e.push(n[t]);return e}function Hi(n,e,t,r){let o=[],s=!1;e.forEach((l,a)=>{let u=i0(n,l,a+t);if(u){s=!0;let d=Hi(u,l,t+a+1,r);d!=gt&&o.push(a,a+l.nodeSize,d)}});let i=s0(s?a0(n):n,-t).sort(Gr);for(let l=0;l<i.length;l++)i[l].type.valid(e,i[l])||(r.onRemove&&r.onRemove(i[l].spec),i.splice(l--,1));return i.length||o.length?new it(i,o):gt}function Gr(n,e){return n.from-e.from||n.to-e.to}function Uu(n){let e=n;for(let t=0;t<e.length-1;t++){let r=e[t];if(r.from!=r.to)for(let o=t+1;o<e.length;o++){let s=e[o];if(s.from==r.from){s.to!=r.to&&(e==n&&(e=n.slice()),e[o]=s.copy(s.from,r.to),Vf(e,o+1,s.copy(r.to,s.to)));continue}else{s.from<r.to&&(e==n&&(e=n.slice()),e[t]=r.copy(r.from,s.from),Vf(e,o,r.copy(s.from,r.to)));break}}}return e}function Vf(n,e,t){for(;e<n.length&&Gr(t,n[e])>0;)e++;n.splice(e,0,t)}function Ll(n){let e=[];return n.someProp("decorations",t=>{let r=t(n.state);r&&r!=gt&&e.push(r)}),n.cursorWrapper&&e.push(it.create(n.state.doc,[n.cursorWrapper.deco])),ir.from(e)}const SC={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},kC=Pt&&dr<=11;class _C{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 xC{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new _C,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Pt&&dr<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():this.flush()}),kC&&(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,SC)),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 t=0;t<e.length;t++)this.queue.push(e[t]);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(Mf(this.view)){if(this.suppressingSelectionUpdates)return jn(this.view);if(Pt&&dr<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&qr(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 t=new Set,r;for(let s=e.focusNode;s;s=_s(s))t.add(s);for(let s=e.anchorNode;s;s=_s(s))if(t.has(s)){r=s;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 t=this.pendingRecords();t.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Mf(e)&&!this.ignoreSelectionChange(r),s=-1,i=-1,l=!1,a=[];if(e.editable)for(let d=0;d<t.length;d++){let f=this.registerMutation(t[d],a);f&&(s=s<0?f.from:Math.min(f.from,s),i=i<0?f.to:Math.max(f.to,i),f.typeOver&&(l=!0))}if(pn&&a.length>1){let d=a.filter(f=>f.nodeName=="BR");if(d.length==2){let f=d[0],h=d[1];f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}}let u=null;s<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ja(r)&&(u=Bu(e))&&u.eq($e.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,jn(e),this.currentSelection.set(r),e.scrollToSelection()):(s>-1||o)&&(s>-1&&(e.docView.markDirty(s,i),NC(e)),this.handleDOMChange(s,i,l,a),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||jn(e),this.currentSelection.set(r))}registerMutation(e,t){if(t.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 d=0;d<e.addedNodes.length;d++)t.push(e.addedNodes[d]);if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,s=e.nextSibling;if(Pt&&dr<=11&&e.addedNodes.length)for(let d=0;d<e.addedNodes.length;d++){let{previousSibling:f,nextSibling:h}=e.addedNodes[d];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(s=h)}let i=o&&o.parentNode==e.target?kt(o)+1:0,l=r.localPosFromDOM(e.target,i,-1),a=s&&s.parentNode==e.target?kt(s):e.target.childNodes.length,u=r.localPosFromDOM(e.target,a,1);return{from:l,to:u}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}}}let $f=new WeakMap,zf=!1;function NC(n){if(!$f.has(n)&&($f.set(n,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace)!==-1)){if(n.requiresGeckoHackNode=pn,zf)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."),zf=!0}}function IC(n){let e;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}n.dom.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",t,!0);let r=e.startContainer,o=e.startOffset,s=e.endContainer,i=e.endOffset,l=n.domAtPos(n.state.selection.anchor);return qr(l.node,l.offset,s,i)&&([r,o,s,i]=[s,i,r,o]),{anchorNode:r,anchorOffset:o,focusNode:s,focusOffset:i}}function MC(n,e,t){let{node:r,fromOffset:o,toOffset:s,from:i,to:l}=n.docView.parseRange(e,t),a=n.domSelectionRange(),u,d=a.anchorNode;if(d&&n.dom.contains(d.nodeType==1?d:d.parentNode)&&(u=[{node:d,offset:a.anchorOffset}],ja(a)||u.push({node:a.focusNode,offset:a.focusOffset})),vt&&n.input.lastKeyCode===8)for(let v=s;v>o;v--){let C=r.childNodes[v-1],b=C.pmViewDesc;if(C.nodeName=="BR"&&!b){s=v;break}if(!b||b.size)break}let f=n.state.doc,h=n.someProp("domParser")||Lo.fromSchema(n.state.schema),p=f.resolve(i),m=null,g=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:s,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:u,ruleFromNode:OC,context:p});if(u&&u[0].pos!=null){let v=u[0].pos,C=u[1]&&u[1].pos;C==null&&(C=v),m={anchor:v+i,head:C+i}}return{doc:g,sel:m,from:i,to:l}}function OC(n){let e=n.pmViewDesc;if(e)return e.parseRule();if(n.nodeName=="BR"&&n.parentNode){if(Nt&&/^(ul|ol)$/i.test(n.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(n.parentNode.lastChild==n||Nt&&/^(tr|table)$/i.test(n.parentNode.nodeName))return{ignore:!0}}else if(n.nodeName=="IMG"&&n.getAttribute("mark-placeholder"))return{ignore:!0};return null}const LC=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function DC(n,e,t,r,o){let s=n.input.compositionPendingChanges||(n.composing?n.input.compositionID:0);if(n.input.compositionPendingChanges=0,e<0){let L=n.input.lastSelectionTime>Date.now()-50?n.input.lastSelectionOrigin:null,$=Bu(n,L);if($&&!n.state.selection.eq($)){if(vt&&cn&&n.input.lastKeyCode===13&&Date.now()-100<n.input.lastKeyCodeTime&&n.someProp("handleKeyDown",z=>z(n,Rr(13,"Enter"))))return;let V=n.state.tr.setSelection($);L=="pointer"?V.setMeta("pointer",!0):L=="key"&&V.scrollIntoView(),s&&V.setMeta("composition",s),n.dispatch(V)}return}let i=n.state.doc.resolve(e),l=i.sharedDepth(t);e=i.before(l+1),t=n.state.doc.resolve(t).after(l+1);let a=n.state.selection,u=MC(n,e,t),d=n.state.doc,f=d.slice(u.from,u.to),h,p;n.input.lastKeyCode===8&&Date.now()-100<n.input.lastKeyCodeTime?(h=n.state.selection.to,p="end"):(h=n.state.selection.from,p="start"),n.input.lastKeyCode=null;let m=PC(f.content,u.doc.content,u.from,h,p);if((Bo&&n.input.lastIOSEnter>Date.now()-225||cn)&&o.some(L=>L.nodeType==1&&!LC.test(L.nodeName))&&(!m||m.endA>=m.endB)&&n.someProp("handleKeyDown",L=>L(n,Rr(13,"Enter")))){n.input.lastIOSEnter=0;return}if(!m)if(r&&a instanceof Ue&&!a.empty&&a.$head.sameParent(a.$anchor)&&!n.composing&&!(u.sel&&u.sel.anchor!=u.sel.head))m={start:a.from,endA:a.to,endB:a.to};else{if(u.sel){let L=Uf(n,n.state.doc,u.sel);if(L&&!L.eq(n.state.selection)){let $=n.state.tr.setSelection(L);s&&$.setMeta("composition",s),n.dispatch($)}}return}if(vt&&n.cursorWrapper&&u.sel&&u.sel.anchor==n.cursorWrapper.deco.from&&u.sel.head==u.sel.anchor){let L=m.endB-m.start;u.sel={anchor:u.sel.anchor+L,head:u.sel.anchor+L}}n.input.domChangeCount++,n.state.selection.from<n.state.selection.to&&m.start==m.endB&&n.state.selection instanceof Ue&&(m.start>n.state.selection.from&&m.start<=n.state.selection.from+2&&n.state.selection.from>=u.from?m.start=n.state.selection.from:m.endA<n.state.selection.to&&m.endA>=n.state.selection.to-2&&n.state.selection.to<=u.to&&(m.endB+=n.state.selection.to-m.endA,m.endA=n.state.selection.to)),Pt&&dr<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>u.from&&u.doc.textBetween(m.start-u.from-1,m.start-u.from+1)=="  "&&(m.start--,m.endA--,m.endB--);let g=u.doc.resolveNoCache(m.start-u.from),v=u.doc.resolveNoCache(m.endB-u.from),C=d.resolve(m.start),b=g.sameParent(v)&&g.parent.inlineContent&&C.end()>=m.endA,E;if((Bo&&n.input.lastIOSEnter>Date.now()-225&&(!b||o.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!b&&g.pos<u.doc.content.size&&!g.sameParent(v)&&(E=$e.findFrom(u.doc.resolve(g.pos+1),1,!0))&&E.head==v.pos)&&n.someProp("handleKeyDown",L=>L(n,Rr(13,"Enter")))){n.input.lastIOSEnter=0;return}if(n.state.selection.anchor>m.start&&BC(d,m.start,m.endA,g,v)&&n.someProp("handleKeyDown",L=>L(n,Rr(8,"Backspace")))){cn&&vt&&n.domObserver.suppressSelectionUpdates();return}vt&&cn&&m.endB==m.start&&(n.input.lastAndroidDelete=Date.now()),cn&&!b&&g.start()!=v.start()&&v.parentOffset==0&&g.depth==v.depth&&u.sel&&u.sel.anchor==u.sel.head&&u.sel.head==m.endA&&(m.endB-=2,v=u.doc.resolveNoCache(m.endB-u.from),setTimeout(()=>{n.someProp("handleKeyDown",function(L){return L(n,Rr(13,"Enter"))})},20));let y=m.start,x=m.endA,w,I,M;if(b){if(g.pos==v.pos)Pt&&dr<=11&&g.parentOffset==0&&(n.domObserver.suppressSelectionUpdates(),setTimeout(()=>jn(n),20)),w=n.state.tr.delete(y,x),I=d.resolve(m.start).marksAcross(d.resolve(m.endA));else if(m.endA==m.endB&&(M=RC(g.parent.content.cut(g.parentOffset,v.parentOffset),C.parent.content.cut(C.parentOffset,m.endA-C.start()))))w=n.state.tr,M.type=="add"?w.addMark(y,x,M.mark):w.removeMark(y,x,M.mark);else if(g.parent.child(g.index()).isText&&g.index()==v.index()-(v.textOffset?0:1)){let L=g.parent.textBetween(g.parentOffset,v.parentOffset);if(n.someProp("handleTextInput",$=>$(n,y,x,L)))return;w=n.state.tr.insertText(L,y,x)}}if(w||(w=n.state.tr.replace(y,x,u.doc.slice(m.start-u.from,m.endB-u.from))),u.sel){let L=Uf(n,w.doc,u.sel);L&&!(vt&&cn&&n.composing&&L.empty&&(m.start!=m.endB||n.input.lastAndroidDelete<Date.now()-100)&&(L.head==y||L.head==w.mapping.map(x)-1)||Pt&&L.empty&&L.head==y)&&w.setSelection(L)}I&&w.ensureMarks(I),s&&w.setMeta("composition",s),n.dispatch(w.scrollIntoView())}function Uf(n,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Pu(n,e.resolve(t.anchor),e.resolve(t.head))}function RC(n,e){let t=n.firstChild.marks,r=e.firstChild.marks,o=t,s=r,i,l,a;for(let d=0;d<r.length;d++)o=r[d].removeFromSet(o);for(let d=0;d<t.length;d++)s=t[d].removeFromSet(s);if(o.length==1&&s.length==0)l=o[0],i="add",a=d=>d.mark(l.addToSet(d.marks));else if(o.length==0&&s.length==1)l=s[0],i="remove",a=d=>d.mark(l.removeFromSet(d.marks));else return null;let u=[];for(let d=0;d<e.childCount;d++)u.push(a(e.child(d)));if(fe.from(u).eq(n))return{mark:l,type:i}}function BC(n,e,t,r,o){if(!r.parent.isTextblock||t-e<=o.pos-r.pos||Dl(r,!0,!1)<o.pos)return!1;let s=n.resolve(e);if(s.parentOffset<s.parent.content.size||!s.parent.isTextblock)return!1;let i=n.resolve(Dl(s,!0,!0));return!i.parent.isTextblock||i.pos>t||Dl(i,!0,!1)<t?!1:r.parent.content.cut(r.parentOffset).eq(i.parent.content)}function Dl(n,e,t){let r=n.depth,o=e?n.end():n.pos;for(;r>0&&(e||n.indexAfter(r)==n.node(r).childCount);)r--,o++,e=!1;if(t){let s=n.node(r).maybeChild(n.indexAfter(r));for(;s&&!s.isLeaf;)s=s.firstChild,o++}return o}function PC(n,e,t,r,o){let s=n.findDiffStart(e,t);if(s==null)return null;let{a:i,b:l}=n.findDiffEnd(e,t+n.size,t+e.size);if(o=="end"){let a=Math.max(0,s-Math.min(i,l));r-=i+a-s}if(i<s&&n.size<e.size){let a=r<=s&&r>=i?s-r:0;s-=a,s&&s<e.size&&Hf(e.textBetween(s-1,s+1))&&(s+=a?1:-1),l=s+(l-i),i=s}else if(l<s){let a=r<=s&&r>=l?s-r:0;s-=a,s&&s<n.size&&Hf(n.textBetween(s-1,s+1))&&(s+=a?1:-1),i=s+(i-l),l=s}return{start:s,endA:i,endB:l}}function Hf(n){if(n.length!=2)return!1;let e=n.charCodeAt(0),t=n.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class FC{constructor(e,t){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 sC,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Gf),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=Kf(this),Wf(this),this.nodeViews=Yf(this),this.docView=Sf(this.state.doc,jf(this),Ll(this),this.dom,this),this.domObserver=new xC(this,(r,o,s,i)=>DC(this,r,o,s,i)),this.domObserver.start(),iC(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&Ic(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Gf),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let r in this._props)t[r]=this._props[r];t.state=this.state;for(let r in e)t[r]=e[r];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var r;let o=this.state,s=!1,i=!1;e.storedMarks&&this.composing&&(t0(this),i=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let p=Yf(this);$C(p,this.nodeViews)&&(this.nodeViews=p,s=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&Ic(this),this.editable=Kf(this),Wf(this);let a=Ll(this),u=jf(this),d=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=s||!this.docView.matchesNode(e.doc,u,a);(f||!e.selection.eq(o.selection))&&(i=!0);let h=d=="preserve"&&i&&this.dom.style.overflowAnchor==null&&CE(this);if(i){this.domObserver.stop();let p=f&&(Pt||vt)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&VC(o.selection,e.selection);if(f){let m=vt?this.trackWrites=this.domSelectionRange().focusNode:null;(s||!this.docView.update(e.doc,u,a,this))&&(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=Sf(e.doc,u,a,this.dom,this)),m&&!this.trackWrites&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&WE(this))?jn(this,p):(Um(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),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():h&&AE(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof Le){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Ef(this,t.getBoundingClientRect(),e)}else Ef(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 t=0;t<this.directPlugins.length;t++){let r=this.directPlugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let r=this.state.plugins[t];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let r=this.pluginViews[t];r.update&&r.update(this,e)}}updateDraggedNode(e,t){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let s=r.from+(this.state.doc.content.size-t.doc.content.size);(s>0&&this.state.doc.nodeAt(s))==r.node&&(o=s)}this.dragging=new r0(e.slice,e.move,o<0?void 0:Le.create(this.state.doc,o))}someProp(e,t){let r=this._props&&this._props[e],o;if(r!=null&&(o=t?t(r):r))return o;for(let i=0;i<this.directPlugins.length;i++){let l=this.directPlugins[i].props[e];if(l!=null&&(o=t?t(l):l))return o}let s=this.state.plugins;if(s)for(let i=0;i<s.length;i++){let l=s[i].props[e];if(l!=null&&(o=t?t(l):l))return o}}hasFocus(){if(Pt){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&&bE(this.dom),jn(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return _E(this,e)}coordsAtPos(e,t=1){return Dm(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,r=-1){let o=this.docView.posFromDOM(e,t,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,t){return OE(this,t||this.state,e)}pasteHTML(e,t){return Ns(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return Ns(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(aC(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ll(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null)}get isDestroyed(){return this.docView==null}dispatchEvent(e){return cC(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){return Nt&&this.root.nodeType===11&&hE(this.dom.ownerDocument)==this.dom?IC(this):this.domSelection()}domSelection(){return this.root.getSelection()}}function jf(n){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(n.editable),n.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(n.state)),t)for(let r in t)r=="class"?e.class+=" "+t[r]:r=="style"?e.style=(e.style?e.style+";":"")+t[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(t[r]))}),e.translate||(e.translate="no"),[tn.node(0,n.state.doc.content.size,e)]}function Wf(n){if(n.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),n.cursorWrapper={dom:e,deco:tn.widget(n.state.selection.head,e,{raw:!0,marks:n.markCursor})}}else n.cursorWrapper=null}function Kf(n){return!n.someProp("editable",e=>e(n.state)===!1)}function VC(n,e){let t=Math.min(n.$anchor.sharedDepth(n.head),e.$anchor.sharedDepth(e.head));return n.$anchor.start(t)!=e.$anchor.start(t)}function Yf(n){let e=Object.create(null);function t(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return n.someProp("nodeViews",t),n.someProp("markViews",t),e}function $C(n,e){let t=0,r=0;for(let o in n){if(n[o]!=e[o])return!0;t++}for(let o in e)r++;return t!=r}function Gf(n){if(n.spec.state||n.spec.filterTransaction||n.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var mr={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:"'"},ji={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},zC=typeof navigator<"u"&&/Mac/.test(navigator.platform),UC=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var mt=0;mt<10;mt++)mr[48+mt]=mr[96+mt]=String(mt);for(var mt=1;mt<=24;mt++)mr[mt+111]="F"+mt;for(var mt=65;mt<=90;mt++)mr[mt]=String.fromCharCode(mt+32),ji[mt]=String.fromCharCode(mt);for(var Rl in mr)ji.hasOwnProperty(Rl)||(ji[Rl]=mr[Rl]);function HC(n){var e=zC&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||UC&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?ji:mr)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const jC=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function WC(n){let e=n.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let r,o,s,i;for(let l=0;l<e.length-1;l++){let a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!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))s=!0;else if(/^mod$/i.test(a))jC?i=!0:o=!0;else throw new Error("Unrecognized modifier name: "+a)}return r&&(t="Alt-"+t),o&&(t="Ctrl-"+t),i&&(t="Meta-"+t),s&&(t="Shift-"+t),t}function KC(n){let e=Object.create(null);for(let t in n)e[WC(t)]=n[t];return e}function Bl(n,e,t=!0){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t&&e.shiftKey&&(n="Shift-"+n),n}function YC(n){return new Ft({props:{handleKeyDown:GC(n)}})}function GC(n){let e=KC(n);return function(t,r){let o=HC(r),s,i=e[Bl(o,r)];if(i&&i(t.state,t.dispatch,t))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Bl(o,r,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(s=mr[r.keyCode])&&s!=o){let l=e[Bl(s,r)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const QC=(n,e)=>n.selection.empty?!1:(e&&e(n.tr.deleteSelection().scrollIntoView()),!0);function ZC(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("backward",n):t.parentOffset>0)?null:t}const JC=(n,e,t)=>{let r=ZC(n,t);if(!r)return!1;let o=l0(r);if(!o){let i=r.blockRange(),l=i&&Zo(i);return l==null?!1:(e&&e(n.tr.lift(i,l).scrollIntoView()),!0)}let s=o.nodeBefore;if(!s.type.spec.isolating&&d0(n,o,e))return!0;if(r.parent.content.size==0&&(Po(s,"end")||Le.isSelectable(s))){let i=Ou(n.doc,r.before(),r.after(),we.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=n.tr.step(i);l.setSelection(Po(s,"end")?$e.findFrom(l.doc.resolve(l.mapping.map(o.pos,-1)),-1):Le.create(l.doc,o.pos-s.nodeSize)),e(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos-s.nodeSize,o.pos).scrollIntoView()),!0):!1};function Po(n,e,t=!1){for(let r=n;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(t&&r.childCount!=1)return!1}return!1}const XC=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("backward",n):r.parentOffset>0)return!1;s=l0(r)}let i=s&&s.nodeBefore;return!i||!Le.isSelectable(i)?!1:(e&&e(n.tr.setSelection(Le.create(n.doc,s.pos-i.nodeSize)).scrollIntoView()),!0)};function l0(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){if(n.index(e)>0)return n.doc.resolve(n.before(e+1));if(n.node(e).type.spec.isolating)break}return null}function qC(n,e){let{$cursor:t}=n.selection;return!t||(e?!e.endOfTextblock("forward",n):t.parentOffset<t.parent.content.size)?null:t}const eA=(n,e,t)=>{let r=qC(n,t);if(!r)return!1;let o=c0(r);if(!o)return!1;let s=o.nodeAfter;if(d0(n,o,e))return!0;if(r.parent.content.size==0&&(Po(s,"start")||Le.isSelectable(s))){let i=Ou(n.doc,r.before(),r.after(),we.empty);if(i&&i.slice.size<i.to-i.from){if(e){let l=n.tr.step(i);l.setSelection(Po(s,"start")?$e.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):Le.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return s.isAtom&&o.depth==r.depth-1?(e&&e(n.tr.delete(o.pos,o.pos+s.nodeSize).scrollIntoView()),!0):!1},tA=(n,e,t)=>{let{$head:r,empty:o}=n.selection,s=r;if(!o)return!1;if(r.parent.isTextblock){if(t?!t.endOfTextblock("forward",n):r.parentOffset<r.parent.content.size)return!1;s=c0(r)}let i=s&&s.nodeAfter;return!i||!Le.isSelectable(i)?!1:(e&&e(n.tr.setSelection(Le.create(n.doc,s.pos)).scrollIntoView()),!0)};function c0(n){if(!n.parent.type.spec.isolating)for(let e=n.depth-1;e>=0;e--){let t=n.node(e);if(n.index(e)+1<t.childCount)return n.doc.resolve(n.after(e+1));if(t.type.spec.isolating)break}return null}const nA=(n,e)=>{let t=n.selection,r=t instanceof Le,o;if(r){if(t.node.isTextblock||!Cr(n.doc,t.from))return!1;o=t.from}else if(o=Ua(n.doc,t.from,-1),o==null)return!1;if(e){let s=n.tr.join(o);r&&s.setSelection(Le.create(s.doc,o-n.doc.resolve(o).nodeBefore.nodeSize)),e(s.scrollIntoView())}return!0},rA=(n,e)=>{let t=n.selection,r;if(t instanceof Le){if(t.node.isTextblock||!Cr(n.doc,t.to))return!1;r=t.to}else if(r=Ua(n.doc,t.to,1),r==null)return!1;return e&&e(n.tr.join(r).scrollIntoView()),!0},oA=(n,e)=>{let{$from:t,$to:r}=n.selection,o=t.blockRange(r),s=o&&Zo(o);return s==null?!1:(e&&e(n.tr.lift(o,s).scrollIntoView()),!0)},sA=(n,e)=>{let{$head:t,$anchor:r}=n.selection;return!t.parent.type.spec.code||!t.sameParent(r)?!1:(e&&e(n.tr.insertText(`
70
+ `).scrollIntoView()),!0)};function u0(n){for(let e=0;e<n.edgeCount;e++){let{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const iA=(n,e)=>{let{$head:t,$anchor:r}=n.selection;if(!t.parent.type.spec.code||!t.sameParent(r))return!1;let o=t.node(-1),s=t.indexAfter(-1),i=u0(o.contentMatchAt(s));if(!i||!o.canReplaceWith(s,s,i))return!1;if(e){let l=t.after(),a=n.tr.replaceWith(l,l,i.createAndFill());a.setSelection($e.near(a.doc.resolve(l),1)),e(a.scrollIntoView())}return!0},aA=(n,e)=>{let t=n.selection,{$from:r,$to:o}=t;if(t instanceof dn||r.parent.inlineContent||o.parent.inlineContent)return!1;let s=u0(o.parent.contentMatchAt(o.indexAfter()));if(!s||!s.isTextblock)return!1;if(e){let i=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=n.tr.insert(i,s.createAndFill());l.setSelection(Ue.create(l.doc,i+1)),e(l.scrollIntoView())}return!0},lA=(n,e)=>{let{$cursor:t}=n.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let s=t.before();if(Io(n.doc,s))return e&&e(n.tr.split(s).scrollIntoView()),!0}let r=t.blockRange(),o=r&&Zo(r);return o==null?!1:(e&&e(n.tr.lift(r,o).scrollIntoView()),!0)},cA=(n,e)=>{let{$from:t,to:r}=n.selection,o,s=t.sharedDepth(r);return s==0?!1:(o=t.before(s),e&&e(n.tr.setSelection(Le.create(n.doc,o))),!0)};function uA(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,s=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(s-1,s)?(t&&t(n.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(s,s+1)||!(o.isTextblock||Cr(n.doc,e.pos))?!1:(t&&t(n.tr.clearIncompatible(e.pos,r.type,r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()),!0)}function d0(n,e,t){let r=e.nodeBefore,o=e.nodeAfter,s,i;if(r.type.spec.isolating||o.type.spec.isolating)return!1;if(uA(n,e,t))return!0;let l=e.parent.canReplace(e.index(),e.index()+1);if(l&&(s=(i=r.contentMatchAt(r.childCount)).findWrapping(o.type))&&i.matchType(s[0]||o.type).validEnd){if(t){let f=e.pos+o.nodeSize,h=fe.empty;for(let g=s.length-1;g>=0;g--)h=fe.from(s[g].create(null,h));h=fe.from(r.copy(h));let p=n.tr.step(new ut(e.pos-1,f,e.pos,f,new we(h,1,0),s.length,!0)),m=f+2*s.length;Cr(p.doc,m)&&p.join(m),t(p.scrollIntoView())}return!0}let a=$e.findFrom(e,1),u=a&&a.$from.blockRange(a.$to),d=u&&Zo(u);if(d!=null&&d>=e.depth)return t&&t(n.tr.lift(u,d).scrollIntoView()),!0;if(l&&Po(o,"start",!0)&&Po(r,"end")){let f=r,h=[];for(;h.push(f),!f.isTextblock;)f=f.lastChild;let p=o,m=1;for(;!p.isTextblock;p=p.firstChild)m++;if(f.canReplace(f.childCount,f.childCount,p.content)){if(t){let g=fe.empty;for(let C=h.length-1;C>=0;C--)g=fe.from(h[C].copy(g));let v=n.tr.step(new ut(e.pos-h.length,e.pos+o.nodeSize,e.pos+m,e.pos+o.nodeSize-m,new we(g,h.length,0),0,!0));t(v.scrollIntoView())}return!0}}return!1}function f0(n){return function(e,t){let r=e.selection,o=n<0?r.$from:r.$to,s=o.depth;for(;o.node(s).isInline;){if(!s)return!1;s--}return o.node(s).isTextblock?(t&&t(e.tr.setSelection(Ue.create(e.doc,n<0?o.start(s):o.end(s)))),!0):!1}}const dA=f0(-1),fA=f0(1);function hA(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,i=o.blockRange(s),l=i&&Mu(i,n,e);return l?(r&&r(t.tr.wrap(i,l).scrollIntoView()),!0):!1}}function Qf(n,e=null){return function(t,r){let o=!1;for(let s=0;s<t.selection.ranges.length&&!o;s++){let{$from:{pos:i},$to:{pos:l}}=t.selection.ranges[s];t.doc.nodesBetween(i,l,(a,u)=>{if(o)return!1;if(!(!a.isTextblock||a.hasMarkup(n,e)))if(a.type==n)o=!0;else{let d=t.doc.resolve(u),f=d.index();o=d.parent.canReplaceWith(f,f+1,n)}})}if(!o)return!1;if(r){let s=t.tr;for(let i=0;i<t.selection.ranges.length;i++){let{$from:{pos:l},$to:{pos:a}}=t.selection.ranges[i];s.setBlockType(l,a,n,e)}r(s.scrollIntoView())}return!0}}typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function pA(n,e=null){return function(t,r){let{$from:o,$to:s}=t.selection,i=o.blockRange(s),l=!1,a=i;if(!i)return!1;if(i.depth>=2&&o.node(i.depth-1).type.compatibleContent(n)&&i.startIndex==0){if(o.index(i.depth-1)==0)return!1;let d=t.doc.resolve(i.start-2);a=new Bi(d,d,i.depth),i.endIndex<i.parent.childCount&&(i=new Bi(o,t.doc.resolve(s.end(i.depth)),i.depth)),l=!0}let u=Mu(a,n,e,i);return u?(r&&r(mA(t.tr,i,u,l,n).scrollIntoView()),!0):!1}}function mA(n,e,t,r,o){let s=fe.empty;for(let d=t.length-1;d>=0;d--)s=fe.from(t[d].type.create(t[d].attrs,s));n.step(new ut(e.start-(r?2:0),e.end,e.start,e.end,new we(s,0,0),t.length,!0));let i=0;for(let d=0;d<t.length;d++)t[d].type==o&&(i=d+1);let l=t.length-i,a=e.start+t.length-(r?2:0),u=e.parent;for(let d=e.startIndex,f=e.endIndex,h=!0;d<f;d++,h=!1)!h&&Io(n.doc,a,l)&&(n.split(a,l),a+=2*l),a+=u.child(d).nodeSize;return n}function gA(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,i=>i.childCount>0&&i.firstChild.type==n);return s?t?r.node(s.depth-1).type==n?vA(e,t,n,s):yA(e,t,s):!0:!1}}function vA(n,e,t,r){let o=n.tr,s=r.end,i=r.$to.end(r.depth);s<i&&(o.step(new ut(s-1,i,s,i,new we(fe.from(t.create(null,r.parent.copy())),1,0),1,!0)),r=new Bi(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const l=Zo(r);if(l==null)return!1;o.lift(r,l);let a=o.mapping.map(s,-1)-1;return Cr(o.doc,a)&&o.join(a),e(o.scrollIntoView()),!0}function yA(n,e,t){let r=n.tr,o=t.parent;for(let p=t.end,m=t.endIndex-1,g=t.startIndex;m>g;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let s=r.doc.resolve(t.start),i=s.nodeAfter;if(r.mapping.map(t.end)!=t.start+s.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,a=t.endIndex==o.childCount,u=s.node(-1),d=s.index(-1);if(!u.canReplace(d+(l?0:1),d+1,i.content.append(a?fe.empty:fe.from(o))))return!1;let f=s.pos,h=f+i.nodeSize;return r.step(new ut(f-(l?1:0),h+(a?1:0),f+1,h-1,new we((l?fe.empty:fe.from(o.copy(fe.empty))).append(a?fe.empty:fe.from(o.copy(fe.empty))),l?0:1,a?0:1),l?0:1)),e(r.scrollIntoView()),!0}function EA(n){return function(e,t){let{$from:r,$to:o}=e.selection,s=r.blockRange(o,u=>u.childCount>0&&u.firstChild.type==n);if(!s)return!1;let i=s.startIndex;if(i==0)return!1;let l=s.parent,a=l.child(i-1);if(a.type!=n)return!1;if(t){let u=a.lastChild&&a.lastChild.type==l.type,d=fe.from(u?n.create():null),f=new we(fe.from(n.create(null,fe.from(l.type.create(null,d)))),u?3:1,0),h=s.start,p=s.end;t(e.tr.step(new ut(h-(u?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}function Ya(n){const{state:e,transaction:t}=n;let{selection:r}=t,{doc:o}=t,{storedMarks:s}=t;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),filterTransaction:e.filterTransaction,plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return s},get selection(){return r},get doc(){return o},get tr(){return r=t.selection,o=t.doc,s=t.storedMarks,t}}}class Ga{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:r}=this,{view:o}=t,{tr:s}=r,i=this.buildProps(s);return Object.fromEntries(Object.entries(e).map(([l,a])=>[l,(...d)=>{const f=a(...d)(i);return!s.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(s),f}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l=[],a=!!e,u=e||s.tr,d=()=>(!a&&t&&!u.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(u),l.every(h=>h===!0)),f={...Object.fromEntries(Object.entries(r).map(([h,p])=>[h,(...g)=>{const v=this.buildProps(u,t),C=p(...g)(v);return l.push(C),f}])),run:d};return f}createCan(e){const{rawCommands:t,state:r}=this,o=!1,s=e||r.tr,i=this.buildProps(s,o);return{...Object.fromEntries(Object.entries(t).map(([a,u])=>[a,(...d)=>u(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(s,o)}}buildProps(e,t=!0){const{rawCommands:r,editor:o,state:s}=this,{view:i}=o,l={tr:e,editor:o,view:i,state:Ya({state:s,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(r).map(([a,u])=>[a,(...d)=>u(...d)(l)]))}};return l}}class CA{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const r=this.callbacks[e];return r&&r.forEach(o=>o.apply(this,t)),this}off(e,t){const r=this.callbacks[e];return r&&(t?this.callbacks[e]=r.filter(o=>o!==t):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function xe(n,e,t){return n.config[e]===void 0&&n.parent?xe(n.parent,e,t):typeof n.config[e]=="function"?n.config[e].bind({...t,parent:n.parent?xe(n.parent,e,t):null}):n.config[e]}function Qa(n){const e=n.filter(o=>o.type==="extension"),t=n.filter(o=>o.type==="node"),r=n.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:r}}function h0(n){const e=[],{nodeExtensions:t,markExtensions:r}=Qa(n),o=[...t,...r],s={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return n.forEach(i=>{const l={name:i.name,options:i.options,storage:i.storage},a=xe(i,"addGlobalAttributes",l);if(!a)return;a().forEach(d=>{d.types.forEach(f=>{Object.entries(d.attributes).forEach(([h,p])=>{e.push({type:f,name:h,attribute:{...s,...p}})})})})}),o.forEach(i=>{const l={name:i.name,options:i.options,storage:i.storage},a=xe(i,"addAttributes",l);if(!a)return;const u=a();Object.entries(u).forEach(([d,f])=>{const h={...s,...f};typeof(h==null?void 0:h.default)=="function"&&(h.default=h.default()),h!=null&&h.isRequired&&(h==null?void 0:h.default)===void 0&&delete h.default,e.push({type:i.name,name:d,attribute:h})})}),e}function dt(n,e){if(typeof n=="string"){if(!e.nodes[n])throw Error(`There is no node type named '${n}'. Maybe you forgot to add the extension?`);return e.nodes[n]}return n}function Ot(...n){return n.filter(e=>!!e).reduce((e,t)=>{const r={...e};return Object.entries(t).forEach(([o,s])=>{if(!r[o]){r[o]=s;return}if(o==="class"){const l=s?s.split(" "):[],a=r[o]?r[o].split(" "):[],u=l.filter(d=>!a.includes(d));r[o]=[...a,...u].join(" ")}else o==="style"?r[o]=[r[o],s].join("; "):r[o]=s}),r},{})}function Mc(n,e){return e.filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(n.attrs)||{}:{[t.name]:n.attrs[t.name]}).reduce((t,r)=>Ot(t,r),{})}function p0(n){return typeof n=="function"}function Ve(n,e=void 0,...t){return p0(n)?e?n.bind(e)(...t):n(...t):n}function AA(n={}){return Object.keys(n).length===0&&n.constructor===Object}function bA(n){return typeof n!="string"?n:n.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(n):n==="true"?!0:n==="false"?!1:n}function Zf(n,e){return n.style?n:{...n,getAttrs:t=>{const r=n.getAttrs?n.getAttrs(t):n.attrs;if(r===!1)return!1;const o=e.reduce((s,i)=>{const l=i.attribute.parseHTML?i.attribute.parseHTML(t):bA(t.getAttribute(i.name));return l==null?s:{...s,[i.name]:l}},{});return{...r,...o}}}}function Jf(n){return Object.fromEntries(Object.entries(n).filter(([e,t])=>e==="attrs"&&AA(t)?!1:t!=null))}function wA(n,e){var t;const r=h0(n),{nodeExtensions:o,markExtensions:s}=Qa(n),i=(t=o.find(u=>xe(u,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(o.map(u=>{const d=r.filter(C=>C.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:e},h=n.reduce((C,b)=>{const E=xe(b,"extendNodeSchema",f);return{...C,...E?E(u):{}}},{}),p=Jf({...h,content:Ve(xe(u,"content",f)),marks:Ve(xe(u,"marks",f)),group:Ve(xe(u,"group",f)),inline:Ve(xe(u,"inline",f)),atom:Ve(xe(u,"atom",f)),selectable:Ve(xe(u,"selectable",f)),draggable:Ve(xe(u,"draggable",f)),code:Ve(xe(u,"code",f)),defining:Ve(xe(u,"defining",f)),isolating:Ve(xe(u,"isolating",f)),attrs:Object.fromEntries(d.map(C=>{var b;return[C.name,{default:(b=C==null?void 0:C.attribute)===null||b===void 0?void 0:b.default}]}))}),m=Ve(xe(u,"parseHTML",f));m&&(p.parseDOM=m.map(C=>Zf(C,d)));const g=xe(u,"renderHTML",f);g&&(p.toDOM=C=>g({node:C,HTMLAttributes:Mc(C,d)}));const v=xe(u,"renderText",f);return v&&(p.toText=v),[u.name,p]})),a=Object.fromEntries(s.map(u=>{const d=r.filter(v=>v.type===u.name),f={name:u.name,options:u.options,storage:u.storage,editor:e},h=n.reduce((v,C)=>{const b=xe(C,"extendMarkSchema",f);return{...v,...b?b(u):{}}},{}),p=Jf({...h,inclusive:Ve(xe(u,"inclusive",f)),excludes:Ve(xe(u,"excludes",f)),group:Ve(xe(u,"group",f)),spanning:Ve(xe(u,"spanning",f)),code:Ve(xe(u,"code",f)),attrs:Object.fromEntries(d.map(v=>{var C;return[v.name,{default:(C=v==null?void 0:v.attribute)===null||C===void 0?void 0:C.default}]}))}),m=Ve(xe(u,"parseHTML",f));m&&(p.parseDOM=m.map(v=>Zf(v,d)));const g=xe(u,"renderHTML",f);return g&&(p.toDOM=v=>g({mark:v,HTMLAttributes:Mc(v,d)})),[u.name,p]}));return new M9({topNode:i,nodes:l,marks:a})}function Pl(n,e){return e.nodes[n]||e.marks[n]||null}function Xf(n,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===n.name):e}const TA=(n,e=500)=>{let t="";const r=n.parentOffset;return n.parent.nodesBetween(Math.max(0,r-e),r,(o,s,i,l)=>{var a,u;const d=((u=(a=o.type.spec).toText)===null||u===void 0?void 0:u.call(a,{node:o,pos:s,parent:i,index:l}))||o.textContent||"%leaf%";t+=d.slice(0,Math.max(0,r-s))}),t};function Hu(n){return Object.prototype.toString.call(n)==="[object RegExp]"}class m0{constructor(e){this.find=e.find,this.handler=e.handler}}const SA=(n,e)=>{if(Hu(e))return e.exec(n);const t=e(n);if(!t)return null;const r=[t.text];return r.index=t.index,r.input=n,r.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(t.replaceWith)),r};function Fl(n){var e;const{editor:t,from:r,to:o,text:s,rules:i,plugin:l}=n,{view:a}=t;if(a.composing)return!1;const u=a.state.doc.resolve(r);if(u.parent.type.spec.code||!((e=u.nodeBefore||u.nodeAfter)===null||e===void 0)&&e.marks.find(h=>h.type.spec.code))return!1;let d=!1;const f=TA(u)+s;return i.forEach(h=>{if(d)return;const p=SA(f,h.find);if(!p)return;const m=a.state.tr,g=Ya({state:a.state,transaction:m}),v={from:r-(p[0].length-s.length),to:o},{commands:C,chain:b,can:E}=new Ga({editor:t,state:g});h.handler({state:g,range:v,match:p,commands:C,chain:b,can:E})===null||!m.steps.length||(m.setMeta(l,{transform:m,from:r,to:o,text:s}),a.dispatch(m),d=!0)}),d}function kA(n){const{editor:e,rules:t}=n,r=new Ft({state:{init(){return null},apply(o,s){const i=o.getMeta(r);return i||(o.selectionSet||o.docChanged?null:s)}},props:{handleTextInput(o,s,i,l){return Fl({editor:e,from:s,to:i,text:l,rules:t,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:s}=o.state.selection;s&&Fl({editor:e,from:s.pos,to:s.pos,text:"",rules:t,plugin:r})}),!1)},handleKeyDown(o,s){if(s.key!=="Enter")return!1;const{$cursor:i}=o.state.selection;return i?Fl({editor:e,from:i.pos,to:i.pos,text:`
71
+ `,rules:t,plugin:r}):!1}},isInputRules:!0});return r}function _A(n){return typeof n=="number"}class xA{constructor(e){this.find=e.find,this.handler=e.handler}}const NA=(n,e)=>{if(Hu(e))return[...n.matchAll(e)];const t=e(n);return t?t.map(r=>{const o=[r.text];return o.index=r.index,o.input=n,o.data=r.data,r.replaceWith&&(r.text.includes(r.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(r.replaceWith)),o}):[]};function IA(n){const{editor:e,state:t,from:r,to:o,rule:s,pasteEvent:i,dropEvent:l}=n,{commands:a,chain:u,can:d}=new Ga({editor:e,state:t}),f=[];return t.doc.nodesBetween(r,o,(p,m)=>{if(!p.isTextblock||p.type.spec.code)return;const g=Math.max(r,m),v=Math.min(o,m+p.content.size),C=p.textBetween(g-m,v-m,void 0,"");NA(C,s.find).forEach(E=>{if(E.index===void 0)return;const y=g+E.index+1,x=y+E[0].length,w={from:t.tr.mapping.map(y),to:t.tr.mapping.map(x)},I=s.handler({state:t,range:w,match:E,commands:a,chain:u,can:d,pasteEvent:i,dropEvent:l});f.push(I)})}),f.every(p=>p!==null)}function MA(n){const{editor:e,rules:t}=n;let r=null,o=!1,s=!1,i=new ClipboardEvent("paste"),l=new DragEvent("drop");return t.map(u=>new Ft({view(d){const f=h=>{var p;r=!((p=d.dom.parentElement)===null||p===void 0)&&p.contains(h.target)?d.dom.parentElement:null};return window.addEventListener("dragstart",f),{destroy(){window.removeEventListener("dragstart",f)}}},props:{handleDOMEvents:{drop:(d,f)=>(s=r===d.dom.parentElement,l=f,!1),paste:(d,f)=>{var h;const p=(h=f.clipboardData)===null||h===void 0?void 0:h.getData("text/html");return i=f,o=!!(p!=null&&p.includes("data-pm-slice")),!1}}},appendTransaction:(d,f,h)=>{const p=d[0],m=p.getMeta("uiEvent")==="paste"&&!o,g=p.getMeta("uiEvent")==="drop"&&!s;if(!m&&!g)return;const v=f.doc.content.findDiffStart(h.doc.content),C=f.doc.content.findDiffEnd(h.doc.content);if(!_A(v)||!C||v===C.b)return;const b=h.tr,E=Ya({state:h,transaction:b});if(!(!IA({editor:e,state:E,from:Math.max(v-1,0),to:C.b-1,rule:u,pasteEvent:i,dropEvent:l})||!b.steps.length))return l=new DragEvent("drop"),i=new ClipboardEvent("paste"),b}}))}function OA(n){const e=n.filter((t,r)=>n.indexOf(t)!==r);return[...new Set(e)]}class _o{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=_o.resolve(e),this.schema=wA(this.extensions,t),this.extensions.forEach(r=>{var o;this.editor.extensionStorage[r.name]=r.storage;const s={name:r.name,options:r.options,storage:r.storage,editor:this.editor,type:Pl(r.name,this.schema)};r.type==="mark"&&(!((o=Ve(xe(r,"keepOnSplit",s)))!==null&&o!==void 0)||o)&&this.splittableMarks.push(r.name);const i=xe(r,"onBeforeCreate",s);i&&this.editor.on("beforeCreate",i);const l=xe(r,"onCreate",s);l&&this.editor.on("create",l);const a=xe(r,"onUpdate",s);a&&this.editor.on("update",a);const u=xe(r,"onSelectionUpdate",s);u&&this.editor.on("selectionUpdate",u);const d=xe(r,"onTransaction",s);d&&this.editor.on("transaction",d);const f=xe(r,"onFocus",s);f&&this.editor.on("focus",f);const h=xe(r,"onBlur",s);h&&this.editor.on("blur",h);const p=xe(r,"onDestroy",s);p&&this.editor.on("destroy",p)})}static resolve(e){const t=_o.sort(_o.flatten(e)),r=OA(t.map(o=>o.name));return r.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${r.map(o=>`'${o}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const r={name:t.name,options:t.options,storage:t.storage},o=xe(t,"addExtensions",r);return o?[t,...this.flatten(o())]:t}).flat(10)}static sort(e){return e.sort((r,o)=>{const s=xe(r,"priority")||100,i=xe(o,"priority")||100;return s>i?-1:s<i?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const r={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:Pl(t.name,this.schema)},o=xe(t,"addCommands",r);return o?{...e,...o()}:e},{})}get plugins(){const{editor:e}=this,t=_o.sort([...this.extensions].reverse()),r=[],o=[],s=t.map(i=>{const l={name:i.name,options:i.options,storage:i.storage,editor:e,type:Pl(i.name,this.schema)},a=[],u=xe(i,"addKeyboardShortcuts",l);let d={};if(i.type==="mark"&&i.config.exitable&&(d.ArrowRight=()=>On.handleExit({editor:e,mark:i})),u){const g=Object.fromEntries(Object.entries(u()).map(([v,C])=>[v,()=>C({editor:e})]));d={...d,...g}}const f=YC(d);a.push(f);const h=xe(i,"addInputRules",l);Xf(i,e.options.enableInputRules)&&h&&r.push(...h());const p=xe(i,"addPasteRules",l);Xf(i,e.options.enablePasteRules)&&p&&o.push(...p());const m=xe(i,"addProseMirrorPlugins",l);if(m){const g=m();a.push(...g)}return a}).flat();return[kA({editor:e,rules:r}),...MA({editor:e,rules:o}),...s]}get attributes(){return h0(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=Qa(this.extensions);return Object.fromEntries(t.filter(r=>!!xe(r,"addNodeView")).map(r=>{const o=this.attributes.filter(a=>a.type===r.name),s={name:r.name,options:r.options,storage:r.storage,editor:e,type:dt(r.name,this.schema)},i=xe(r,"addNodeView",s);if(!i)return[];const l=(a,u,d,f)=>{const h=Mc(a,o);return i()({editor:e,node:a,getPos:d,decorations:f,HTMLAttributes:h,extension:r})};return[r.name,l]}))}}function LA(n){return Object.prototype.toString.call(n).slice(8,-1)}function Vl(n){return LA(n)!=="Object"?!1:n.constructor===Object&&Object.getPrototypeOf(n)===Object.prototype}function Za(n,e){const t={...n};return Vl(n)&&Vl(e)&&Object.keys(e).forEach(r=>{Vl(e[r])?r in n?t[r]=Za(n[r],e[r]):Object.assign(t,{[r]:e[r]}):Object.assign(t,{[r]:e[r]})}),t}class rn{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new rn(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new rn(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}}function g0(n,e,t){const{from:r,to:o}=e,{blockSeparator:s=`
72
+
73
+ `,textSerializers:i={}}=t||{};let l="",a=!0;return n.nodesBetween(r,o,(u,d,f,h)=>{var p;const m=i==null?void 0:i[u.type.name];m?(u.isBlock&&!a&&(l+=s,a=!0),f&&(l+=m({node:u,pos:d,parent:f,index:h,range:e}))):u.isText?(l+=(p=u==null?void 0:u.text)===null||p===void 0?void 0:p.slice(Math.max(r,d)-d,o-d),a=!1):u.isBlock&&!a&&(l+=s,a=!0)}),l}function v0(n){return Object.fromEntries(Object.entries(n.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const DA=rn.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ft({key:new gn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:n}=this,{state:e,schema:t}=n,{doc:r,selection:o}=e,{ranges:s}=o,i=Math.min(...s.map(d=>d.$from.pos)),l=Math.max(...s.map(d=>d.$to.pos)),a=v0(t);return g0(r,{from:i,to:l},{textSerializers:a})}}})]}}),RA=()=>({editor:n,view:e})=>(requestAnimationFrame(()=>{var t;n.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),BA=(n=!1)=>({commands:e})=>e.setContent("",n),PA=()=>({state:n,tr:e,dispatch:t})=>{const{selection:r}=e,{ranges:o}=r;return t&&o.forEach(({$from:s,$to:i})=>{n.doc.nodesBetween(s.pos,i.pos,(l,a)=>{if(l.type.isText)return;const{doc:u,mapping:d}=e,f=u.resolve(d.map(a)),h=u.resolve(d.map(a+l.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Zo(p);if(l.type.isTextblock){const{defaultType:g}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,g)}(m||m===0)&&e.lift(p,m)})}),!0},FA=n=>e=>n(e),VA=()=>({state:n,dispatch:e})=>aA(n,e),$A=(n,e)=>({editor:t,tr:r})=>{const{state:o}=t,s=o.doc.slice(n.from,n.to);r.deleteRange(n.from,n.to);const i=r.mapping.map(e);return r.insert(i,s.content),r.setSelection(new Ue(r.doc.resolve(i-1))),!0},zA=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,r=t.$anchor.node();if(r.content.size>0)return!1;const o=n.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===r.type){if(e){const l=o.before(s),a=o.after(s);n.delete(l,a).scrollIntoView()}return!0}return!1},UA=n=>({tr:e,state:t,dispatch:r})=>{const o=dt(n,t.schema),s=e.selection.$anchor;for(let i=s.depth;i>0;i-=1)if(s.node(i).type===o){if(r){const a=s.before(i),u=s.after(i);e.delete(a,u).scrollIntoView()}return!0}return!1},HA=n=>({tr:e,dispatch:t})=>{const{from:r,to:o}=n;return t&&e.delete(r,o),!0},jA=()=>({state:n,dispatch:e})=>QC(n,e),WA=()=>({commands:n})=>n.keyboardShortcut("Enter"),KA=()=>({state:n,dispatch:e})=>iA(n,e);function Wi(n,e,t={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>t.strict?e[o]===n[o]:Hu(e[o])?e[o].test(n[o]):e[o]===n[o]):!0}function Oc(n,e,t={}){return n.find(r=>r.type===e&&Wi(r.attrs,t))}function YA(n,e,t={}){return!!Oc(n,e,t)}function ju(n,e,t={}){if(!n||!e)return;let r=n.parent.childAfter(n.parentOffset);if(n.parentOffset===r.offset&&r.offset!==0&&(r=n.parent.childBefore(n.parentOffset)),!r.node)return;const o=Oc([...r.node.marks],e,t);if(!o)return;let s=r.index,i=n.start()+r.offset,l=s+1,a=i+r.node.nodeSize;for(Oc([...r.node.marks],e,t);s>0&&o.isInSet(n.parent.child(s-1).marks);)s-=1,i-=n.parent.child(s).nodeSize;for(;l<n.parent.childCount&&YA([...n.parent.child(l).marks],e,t);)a+=n.parent.child(l).nodeSize,l+=1;return{from:i,to:a}}function br(n,e){if(typeof n=="string"){if(!e.marks[n])throw Error(`There is no mark type named '${n}'. Maybe you forgot to add the extension?`);return e.marks[n]}return n}const GA=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const s=br(n,r.schema),{doc:i,selection:l}=t,{$from:a,from:u,to:d}=l;if(o){const f=ju(a,s,e);if(f&&f.from<=u&&f.to>=d){const h=Ue.create(i,f.from,f.to);t.setSelection(h)}}return!0},QA=n=>e=>{const t=typeof n=="function"?n(e):n;for(let r=0;r<t.length;r+=1)if(t[r](e))return!0;return!1};function Wu(n){return n instanceof Ue}function Hn(n=0,e=0,t=0){return Math.min(Math.max(n,e),t)}function y0(n,e=null){if(!e)return null;const t=$e.atStart(n),r=$e.atEnd(n);if(e==="start"||e===!0)return t;if(e==="end")return r;const o=t.from,s=r.to;return e==="all"?Ue.create(n,Hn(0,o,s),Hn(n.content.size,o,s)):Ue.create(n,Hn(e,o,s),Hn(e,o,s))}function Ku(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const ZA=(n=null,e={})=>({editor:t,view:r,tr:o,dispatch:s})=>{e={scrollIntoView:!0,...e};const i=()=>{Ku()&&r.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(r.hasFocus()&&n===null||n===!1)return!0;if(s&&n===null&&!Wu(t.state.selection))return i(),!0;const l=y0(o.doc,n)||t.state.selection,a=t.state.selection.eq(l);return s&&(a||o.setSelection(l),a&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},JA=(n,e)=>t=>n.every((r,o)=>e(r,{...t,index:o})),XA=(n,e)=>({tr:t,commands:r})=>r.insertContentAt({from:t.selection.from,to:t.selection.to},n,e);function qf(n){const e=`<body>${n}</body>`;return new window.DOMParser().parseFromString(e,"text/html").body}function Ki(n,e,t){if(t={slice:!0,parseOptions:{},...t},typeof n=="object"&&n!==null)try{return Array.isArray(n)&&n.length>0?fe.fromArray(n.map(r=>e.nodeFromJSON(r))):e.nodeFromJSON(n)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",n,"Error:",r),Ki("",e,t)}if(typeof n=="string"){const r=Lo.fromSchema(e);return t.slice?r.parseSlice(qf(n),t.parseOptions).content:r.parse(qf(n),t.parseOptions)}return Ki("",e,t)}function qA(n,e,t){const r=n.steps.length-1;if(r<e)return;const o=n.steps[r];if(!(o instanceof pt||o instanceof ut))return;const s=n.mapping.maps[r];let i=0;s.forEach((l,a,u,d)=>{i===0&&(i=d)}),n.setSelection($e.near(n.doc.resolve(i),t))}const eb=n=>n.toString().startsWith("<"),tb=(n,e,t)=>({tr:r,dispatch:o,editor:s})=>{if(o){t={parseOptions:{},updateSelection:!0,...t};const i=Ki(e,s.schema,{parseOptions:{preserveWhitespace:"full",...t.parseOptions}});if(i.toString()==="<>")return!0;let{from:l,to:a}=typeof n=="number"?{from:n,to:n}:{from:n.from,to:n.to},u=!0,d=!0;if((eb(i)?i:[i]).forEach(h=>{h.check(),u=u?h.isText&&h.marks.length===0:!1,d=d?h.isBlock:!1}),l===a&&d){const{parent:h}=r.doc.resolve(l);h.isTextblock&&!h.type.spec.code&&!h.childCount&&(l-=1,a+=1)}u?Array.isArray(e)?r.insertText(e.map(h=>h.text||"").join(""),l,a):typeof e=="object"&&e&&e.text?r.insertText(e.text,l,a):r.insertText(e,l,a):r.replaceWith(l,a,i),t.updateSelection&&qA(r,r.steps.length-1,-1)}return!0},nb=()=>({state:n,dispatch:e})=>nA(n,e),rb=()=>({state:n,dispatch:e})=>rA(n,e),ob=()=>({state:n,dispatch:e})=>JC(n,e),sb=()=>({state:n,dispatch:e})=>eA(n,e),ib=()=>({tr:n,state:e,dispatch:t})=>{try{const r=Ua(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},ab=()=>({state:n,dispatch:e,tr:t})=>{try{const r=Ua(n.doc,n.selection.$from.pos,1);return r==null?!1:(t.join(r,2),e&&e(t),!0)}catch{return!1}};function E0(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function lb(n){const e=n.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let r,o,s,i;for(let l=0;l<e.length-1;l+=1){const a=e[l];if(/^(cmd|meta|m)$/i.test(a))i=!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))s=!0;else if(/^mod$/i.test(a))Ku()||E0()?i=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${a}`)}return r&&(t=`Alt-${t}`),o&&(t=`Ctrl-${t}`),i&&(t=`Meta-${t}`),s&&(t=`Shift-${t}`),t}const cb=n=>({editor:e,view:t,tr:r,dispatch:o})=>{const s=lb(n).split(/-(?!$)/),i=s.find(u=>!["Alt","Ctrl","Meta","Shift"].includes(u)),l=new KeyboardEvent("keydown",{key:i==="Space"?" ":i,altKey:s.includes("Alt"),ctrlKey:s.includes("Ctrl"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift"),bubbles:!0,cancelable:!0}),a=e.captureTransaction(()=>{t.someProp("handleKeyDown",u=>u(t,l))});return a==null||a.steps.forEach(u=>{const d=u.map(r.mapping);d&&o&&r.maybeStep(d)}),!0};function Ms(n,e,t={}){const{from:r,to:o,empty:s}=n.selection,i=e?dt(e,n.schema):null,l=[];n.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);l.push({node:f,from:p,to:m})});const a=o-r,u=l.filter(f=>i?i.name===f.node.type.name:!0).filter(f=>Wi(f.node.attrs,t,{strict:!1}));return s?!!u.length:u.reduce((f,h)=>f+h.to-h.from,0)>=a}const ub=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return Ms(t,o,e)?oA(t,r):!1},db=()=>({state:n,dispatch:e})=>lA(n,e),fb=n=>({state:e,dispatch:t})=>{const r=dt(n,e.schema);return gA(r)(e,t)},hb=()=>({state:n,dispatch:e})=>sA(n,e);function Ja(n,e){return e.nodes[n]?"node":e.marks[n]?"mark":null}function eh(n,e){const t=typeof e=="string"?[e]:e;return Object.keys(n).reduce((r,o)=>(t.includes(o)||(r[o]=n[o]),r),{})}const pb=(n,e)=>({tr:t,state:r,dispatch:o})=>{let s=null,i=null;const l=Ja(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=dt(n,r.schema)),l==="mark"&&(i=br(n,r.schema)),o&&t.selection.ranges.forEach(a=>{r.doc.nodesBetween(a.$from.pos,a.$to.pos,(u,d)=>{s&&s===u.type&&t.setNodeMarkup(d,void 0,eh(u.attrs,e)),i&&u.marks.length&&u.marks.forEach(f=>{i===f.type&&t.addMark(d,d+u.nodeSize,i.create(eh(f.attrs,e)))})})}),!0):!1},mb=()=>({tr:n,dispatch:e})=>(e&&n.scrollIntoView(),!0),gb=()=>({tr:n,commands:e})=>e.setTextSelection({from:0,to:n.doc.content.size}),vb=()=>({state:n,dispatch:e})=>XC(n,e),yb=()=>({state:n,dispatch:e})=>tA(n,e),Eb=()=>({state:n,dispatch:e})=>cA(n,e),Cb=()=>({state:n,dispatch:e})=>fA(n,e),Ab=()=>({state:n,dispatch:e})=>dA(n,e);function C0(n,e,t={}){return Ki(n,e,{slice:!1,parseOptions:t})}const bb=(n,e=!1,t={})=>({tr:r,editor:o,dispatch:s})=>{const{doc:i}=r,l=C0(n,o.schema,t);return s&&r.replaceWith(0,i.content.size,l).setMeta("preventUpdate",!e),!0};function Xa(n,e){const t=br(e,n.schema),{from:r,to:o,empty:s}=n.selection,i=[];s?(n.storedMarks&&i.push(...n.storedMarks),i.push(...n.selection.$head.marks())):n.doc.nodesBetween(r,o,a=>{i.push(...a.marks)});const l=i.find(a=>a.type.name===t.name);return l?{...l.attrs}:{}}function wb(n,e){const t=new km(n);return e.forEach(r=>{r.steps.forEach(o=>{t.step(o)})}),t}function Tb(n){for(let e=0;e<n.edgeCount;e+=1){const{type:t}=n.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function Sb(n,e,t){const r=[];return n.nodesBetween(e.from,e.to,(o,s)=>{t(o)&&r.push({node:o,pos:s})}),r}function kb(n,e){for(let t=n.depth;t>0;t-=1){const r=n.node(t);if(e(r))return{pos:t>0?n.before(t):0,start:n.start(t),depth:t,node:r}}}function Yu(n){return e=>kb(e.$from,n)}function _b(n,e){const t=Sn.fromSchema(e).serializeFragment(n),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(t),o.innerHTML}function xb(n,e){const t={from:0,to:n.content.size};return g0(n,t,e)}function Nb(n,e){const t=dt(e,n.schema),{from:r,to:o}=n.selection,s=[];n.doc.nodesBetween(r,o,l=>{s.push(l)});const i=s.reverse().find(l=>l.type.name===t.name);return i?{...i.attrs}:{}}function A0(n,e){const t=Ja(typeof e=="string"?e:e.name,n.schema);return t==="node"?Nb(n,e):t==="mark"?Xa(n,e):{}}function Ib(n,e=JSON.stringify){const t={};return n.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(t,o)?!1:t[o]=!0})}function Mb(n){const e=Ib(n);return e.length===1?e:e.filter((t,r)=>!e.filter((s,i)=>i!==r).some(s=>t.oldRange.from>=s.oldRange.from&&t.oldRange.to<=s.oldRange.to&&t.newRange.from>=s.newRange.from&&t.newRange.to<=s.newRange.to))}function Ob(n){const{mapping:e,steps:t}=n,r=[];return e.maps.forEach((o,s)=>{const i=[];if(o.ranges.length)o.forEach((l,a)=>{i.push({from:l,to:a})});else{const{from:l,to:a}=t[s];if(l===void 0||a===void 0)return;i.push({from:l,to:a})}i.forEach(({from:l,to:a})=>{const u=e.slice(s).map(l,-1),d=e.slice(s).map(a),f=e.invert().map(u,-1),h=e.invert().map(d);r.push({oldRange:{from:f,to:h},newRange:{from:u,to:d}})})}),Mb(r)}function Gu(n,e,t){const r=[];return n===e?t.resolve(n).marks().forEach(o=>{const s=t.resolve(n-1),i=ju(s,o.type);i&&r.push({mark:o,...i})}):t.nodesBetween(n,e,(o,s)=>{r.push(...o.marks.map(i=>({from:s,to:s+o.nodeSize,mark:i})))}),r}function bi(n,e,t){return Object.fromEntries(Object.entries(t).filter(([r])=>{const o=n.find(s=>s.type===e&&s.name===r);return o?o.attribute.keepOnSplit:!1}))}function Lc(n,e,t={}){const{empty:r,ranges:o}=n.selection,s=e?br(e,n.schema):null;if(r)return!!(n.storedMarks||n.selection.$from.marks()).filter(f=>s?s.name===f.type.name:!0).find(f=>Wi(f.attrs,t,{strict:!1}));let i=0;const l=[];if(o.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;n.doc.nodesBetween(p,m,(g,v)=>{if(!g.isText&&!g.marks.length)return;const C=Math.max(p,v),b=Math.min(m,v+g.nodeSize),E=b-C;i+=E,l.push(...g.marks.map(y=>({mark:y,from:C,to:b})))})}),i===0)return!1;const a=l.filter(f=>s?s.name===f.mark.type.name:!0).filter(f=>Wi(f.mark.attrs,t,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),u=l.filter(f=>s?f.mark.type!==s&&f.mark.type.excludes(s):!0).reduce((f,h)=>f+h.to-h.from,0);return(a>0?a+u:a)>=i}function Lb(n,e,t={}){if(!e)return Ms(n,null,t)||Lc(n,null,t);const r=Ja(e,n.schema);return r==="node"?Ms(n,e,t):r==="mark"?Lc(n,e,t):!1}function th(n,e){const{nodeExtensions:t}=Qa(e),r=t.find(i=>i.name===n);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},s=Ve(xe(r,"group",o));return typeof s!="string"?!1:s.split(" ").includes("list")}function Db(n){var e;const t=(e=n.type.createAndFill())===null||e===void 0?void 0:e.toJSON(),r=n.toJSON();return JSON.stringify(t)===JSON.stringify(r)}function Rb(n){return n instanceof Le}function b0(n,e,t){const o=n.state.doc.content.size,s=Hn(e,0,o),i=Hn(t,0,o),l=n.coordsAtPos(s),a=n.coordsAtPos(i,-1),u=Math.min(l.top,a.top),d=Math.max(l.bottom,a.bottom),f=Math.min(l.left,a.left),h=Math.max(l.right,a.right),p=h-f,m=d-u,C={top:u,bottom:d,left:f,right:h,width:p,height:m,x:f,y:u};return{...C,toJSON:()=>C}}function Bb(n,e,t){var r;const{selection:o}=e;let s=null;if(Wu(o)&&(s=o.$cursor),s){const l=(r=n.storedMarks)!==null&&r!==void 0?r:s.marks();return!!t.isInSet(l)||!l.some(a=>a.type.excludes(t))}const{ranges:i}=o;return i.some(({$from:l,$to:a})=>{let u=l.depth===0?n.doc.inlineContent&&n.doc.type.allowsMarkType(t):!1;return n.doc.nodesBetween(l.pos,a.pos,(d,f,h)=>{if(u)return!1;if(d.isInline){const p=!h||h.type.allowsMarkType(t),m=!!t.isInSet(d.marks)||!d.marks.some(g=>g.type.excludes(t));u=p&&m}return!u}),u})}const Pb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{const{selection:s}=t,{empty:i,ranges:l}=s,a=br(n,r.schema);if(o)if(i){const u=Xa(r,a);t.addStoredMark(a.create({...u,...e}))}else l.forEach(u=>{const d=u.$from.pos,f=u.$to.pos;r.doc.nodesBetween(d,f,(h,p)=>{const m=Math.max(p,d),g=Math.min(p+h.nodeSize,f);h.marks.find(C=>C.type===a)?h.marks.forEach(C=>{a===C.type&&t.addMark(m,g,a.create({...C.attrs,...e}))}):t.addMark(m,g,a.create(e))})});return Bb(r,t,a)},Fb=(n,e)=>({tr:t})=>(t.setMeta(n,e),!0),Vb=(n,e={})=>({state:t,dispatch:r,chain:o})=>{const s=dt(n,t.schema);return s.isTextblock?o().command(({commands:i})=>Qf(s,e)(t)?!0:i.clearNodes()).command(({state:i})=>Qf(s,e)(i,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},$b=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,o=Hn(n,0,r.content.size),s=Le.create(r,o);e.setSelection(s)}return!0},zb=n=>({tr:e,dispatch:t})=>{if(t){const{doc:r}=e,{from:o,to:s}=typeof n=="number"?{from:n,to:n}:n,i=Ue.atStart(r).from,l=Ue.atEnd(r).to,a=Hn(o,i,l),u=Hn(s,i,l),d=Ue.create(r,a,u);e.setSelection(d)}return!0},Ub=n=>({state:e,dispatch:t})=>{const r=dt(n,e.schema);return EA(r)(e,t)};function nh(n,e){const t=n.storedMarks||n.selection.$to.parentOffset&&n.selection.$from.marks();if(t){const r=t.filter(o=>e==null?void 0:e.includes(o.type.name));n.tr.ensureMarks(r)}}const Hb=({keepMarks:n=!0}={})=>({tr:e,state:t,dispatch:r,editor:o})=>{const{selection:s,doc:i}=e,{$from:l,$to:a}=s,u=o.extensionManager.attributes,d=bi(u,l.node().type.name,l.node().attrs);if(s instanceof Le&&s.node.isBlock)return!l.parentOffset||!Io(i,l.pos)?!1:(r&&(n&&nh(t,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const f=a.parentOffset===a.parent.content.size;s instanceof Ue&&e.deleteSelection();const h=l.depth===0?void 0:Tb(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=f&&h?[{type:h,attrs:d}]:void 0,m=Io(e.doc,e.mapping.map(l.pos),1,p);if(!p&&!m&&Io(e.doc,e.mapping.map(l.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:d}]:void 0),m&&(e.split(e.mapping.map(l.pos),1,p),h&&!f&&!l.parentOffset&&l.parent.type!==h)){const g=e.mapping.map(l.before()),v=e.doc.resolve(g);l.node(-1).canReplaceWith(v.index(),v.index()+1,h)&&e.setNodeMarkup(e.mapping.map(l.before()),h)}n&&nh(t,o.extensionManager.splittableMarks),e.scrollIntoView()}return!0},jb=n=>({tr:e,state:t,dispatch:r,editor:o})=>{var s;const i=dt(n,t.schema),{$from:l,$to:a}=t.selection,u=t.selection.node;if(u&&u.isBlock||l.depth<2||!l.sameParent(a))return!1;const d=l.node(-1);if(d.type!==i)return!1;const f=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let v=fe.empty;const C=l.index(-1)?1:l.index(-2)?2:3;for(let I=l.depth-C;I>=l.depth-3;I-=1)v=fe.from(l.node(I).copy(v));const b=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,E=bi(f,l.node().type.name,l.node().attrs),y=((s=i.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(E))||void 0;v=v.append(fe.from(i.createAndFill(null,y)||void 0));const x=l.before(l.depth-(C-1));e.replace(x,l.after(-b),new we(v,4-C,0));let w=-1;e.doc.nodesBetween(x,e.doc.content.size,(I,M)=>{if(w>-1)return!1;I.isTextblock&&I.content.size===0&&(w=M+1)}),w>-1&&e.setSelection(Ue.near(e.doc.resolve(w))),e.scrollIntoView()}return!0}const h=a.pos===l.end()?d.contentMatchAt(0).defaultType:null,p=bi(f,d.type.name,d.attrs),m=bi(f,l.node().type.name,l.node().attrs);e.delete(l.pos,a.pos);const g=h?[{type:i,attrs:p},{type:h,attrs:m}]:[{type:i,attrs:p}];if(!Io(e.doc,l.pos,2))return!1;if(r){const{selection:v,storedMarks:C}=t,{splittableMarks:b}=o.extensionManager,E=C||v.$to.parentOffset&&v.$from.marks();if(e.split(l.pos,2,g).scrollIntoView(),!E||!r)return!0;const y=E.filter(x=>b.includes(x.type.name));e.ensureMarks(y)}return!0},$l=(n,e)=>{const t=Yu(i=>i.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Cr(n.doc,t.pos)&&n.join(t.pos),!0},zl=(n,e)=>{const t=Yu(i=>i.type===e)(n.selection);if(!t)return!0;const r=n.doc.resolve(t.start).after(t.depth);if(r===void 0)return!0;const o=n.doc.nodeAt(r);return t.node.type===(o==null?void 0:o.type)&&Cr(n.doc,r)&&n.join(r),!0},Wb=(n,e,t,r={})=>({editor:o,tr:s,state:i,dispatch:l,chain:a,commands:u,can:d})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,p=dt(n,i.schema),m=dt(e,i.schema),{selection:g,storedMarks:v}=i,{$from:C,$to:b}=g,E=C.blockRange(b),y=v||g.$to.parentOffset&&g.$from.marks();if(!E)return!1;const x=Yu(w=>th(w.type.name,f))(g);if(E.depth>=1&&x&&E.depth-x.depth<=1){if(x.node.type===p)return u.liftListItem(m);if(th(x.node.type.name,f)&&p.validContent(x.node.content)&&l)return a().command(()=>(s.setNodeMarkup(x.pos,p),!0)).command(()=>$l(s,p)).command(()=>zl(s,p)).run()}return!t||!y||!l?a().command(()=>d().wrapInList(p,r)?!0:u.clearNodes()).wrapInList(p,r).command(()=>$l(s,p)).command(()=>zl(s,p)).run():a().command(()=>{const w=d().wrapInList(p,r),I=y.filter(M=>h.includes(M.type.name));return s.ensureMarks(I),w?!0:u.clearNodes()}).wrapInList(p,r).command(()=>$l(s,p)).command(()=>zl(s,p)).run()},Kb=(n,e={},t={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:s=!1}=t,i=br(n,r.schema);return Lc(r,i,e)?o.unsetMark(i,{extendEmptyMarkRange:s}):o.setMark(i,e)},Yb=(n,e,t={})=>({state:r,commands:o})=>{const s=dt(n,r.schema),i=dt(e,r.schema);return Ms(r,s,t)?o.setNode(i):o.setNode(s,t)},Gb=(n,e={})=>({state:t,commands:r})=>{const o=dt(n,t.schema);return Ms(t,o,e)?r.lift(o):r.wrapIn(o,e)},Qb=()=>({state:n,dispatch:e})=>{const t=n.plugins;for(let r=0;r<t.length;r+=1){const o=t[r];let s;if(o.spec.isInputRules&&(s=o.getState(n))){if(e){const i=n.tr,l=s.transform;for(let a=l.steps.length-1;a>=0;a-=1)i.step(l.steps[a].invert(l.docs[a]));if(s.text){const a=i.doc.resolve(s.from).marks();i.replaceWith(s.from,s.to,n.schema.text(s.text,a))}else i.delete(s.from,s.to)}return!0}}return!1},Zb=()=>({tr:n,dispatch:e})=>{const{selection:t}=n,{empty:r,ranges:o}=t;return r||e&&o.forEach(s=>{n.removeMark(s.$from.pos,s.$to.pos)}),!0},Jb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{var s;const{extendEmptyMarkRange:i=!1}=e,{selection:l}=t,a=br(n,r.schema),{$from:u,empty:d,ranges:f}=l;if(!o)return!0;if(d&&i){let{from:h,to:p}=l;const m=(s=u.marks().find(v=>v.type===a))===null||s===void 0?void 0:s.attrs,g=ju(u,a,m);g&&(h=g.from,p=g.to),t.removeMark(h,p,a)}else f.forEach(h=>{t.removeMark(h.$from.pos,h.$to.pos,a)});return t.removeStoredMark(a),!0},Xb=(n,e={})=>({tr:t,state:r,dispatch:o})=>{let s=null,i=null;const l=Ja(typeof n=="string"?n:n.name,r.schema);return l?(l==="node"&&(s=dt(n,r.schema)),l==="mark"&&(i=br(n,r.schema)),o&&t.selection.ranges.forEach(a=>{const u=a.$from.pos,d=a.$to.pos;r.doc.nodesBetween(u,d,(f,h)=>{s&&s===f.type&&t.setNodeMarkup(h,void 0,{...f.attrs,...e}),i&&f.marks.length&&f.marks.forEach(p=>{if(i===p.type){const m=Math.max(h,u),g=Math.min(h+f.nodeSize,d);t.addMark(m,g,i.create({...p.attrs,...e}))}})})}),!0):!1},qb=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return hA(o,e)(t,r)},ew=(n,e={})=>({state:t,dispatch:r})=>{const o=dt(n,t.schema);return pA(o,e)(t,r)};var tw=Object.freeze({__proto__:null,blur:RA,clearContent:BA,clearNodes:PA,command:FA,createParagraphNear:VA,cut:$A,deleteCurrentNode:zA,deleteNode:UA,deleteRange:HA,deleteSelection:jA,enter:WA,exitCode:KA,extendMarkRange:GA,first:QA,focus:ZA,forEach:JA,insertContent:XA,insertContentAt:tb,joinUp:nb,joinDown:rb,joinBackward:ob,joinForward:sb,joinItemBackward:ib,joinItemForward:ab,keyboardShortcut:cb,lift:ub,liftEmptyBlock:db,liftListItem:fb,newlineInCode:hb,resetAttributes:pb,scrollIntoView:mb,selectAll:gb,selectNodeBackward:vb,selectNodeForward:yb,selectParentNode:Eb,selectTextblockEnd:Cb,selectTextblockStart:Ab,setContent:bb,setMark:Pb,setMeta:Fb,setNode:Vb,setNodeSelection:$b,setTextSelection:zb,sinkListItem:Ub,splitBlock:Hb,splitListItem:jb,toggleList:Wb,toggleMark:Kb,toggleNode:Yb,toggleWrap:Gb,undoInputRule:Qb,unsetAllMarks:Zb,unsetMark:Jb,updateAttributes:Xb,wrapIn:qb,wrapInList:ew});const nw=rn.create({name:"commands",addCommands(){return{...tw}}}),rw=rn.create({name:"editable",addProseMirrorPlugins(){return[new Ft({key:new gn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),ow=rn.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:n}=this;return[new Ft({key:new gn("focusEvents"),props:{handleDOMEvents:{focus:(e,t)=>{n.isFocused=!0;const r=n.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,t)=>{n.isFocused=!1;const r=n.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),sw=rn.create({name:"keymap",addKeyboardShortcuts(){const n=()=>this.editor.commands.first(({commands:i})=>[()=>i.undoInputRule(),()=>i.command(({tr:l})=>{const{selection:a,doc:u}=l,{empty:d,$anchor:f}=a,{pos:h,parent:p}=f,m=f.parent.isTextblock?l.doc.resolve(h-1):f,g=m.parent.type.spec.isolating,v=f.pos-f.parentOffset,C=g&&m.parent.childCount===1?v===f.pos:$e.atStart(u).from===h;return!d||!C||!p.type.isTextblock||p.textContent.length?!1:i.clearNodes()}),()=>i.deleteSelection(),()=>i.joinBackward(),()=>i.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:i})=>[()=>i.deleteSelection(),()=>i.deleteCurrentNode(),()=>i.joinForward(),()=>i.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:i})=>[()=>i.newlineInCode(),()=>i.createParagraphNear(),()=>i.liftEmptyBlock(),()=>i.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:n,"Mod-Backspace":n,"Shift-Backspace":n,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},s={...r,"Ctrl-h":n,"Alt-Backspace":n,"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 Ku()||E0()?s:o},addProseMirrorPlugins(){return[new Ft({key:new gn("clearDocument"),appendTransaction:(n,e,t)=>{if(!(n.some(m=>m.docChanged)&&!e.doc.eq(t.doc)))return;const{empty:o,from:s,to:i}=e.selection,l=$e.atStart(e.doc).from,a=$e.atEnd(e.doc).to;if(o||!(s===l&&i===a)||!(t.doc.textBetween(0,t.doc.content.size," "," ").length===0))return;const f=t.tr,h=Ya({state:t,transaction:f}),{commands:p}=new Ga({editor:this.editor,state:h});if(p.clearNodes(),!!f.steps.length)return f}})]}}),iw=rn.create({name:"tabindex",addProseMirrorPlugins(){return[new Ft({key:new gn("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});var aw=Object.freeze({__proto__:null,ClipboardTextSerializer:DA,Commands:nw,Editable:rw,FocusEvents:ow,Keymap:sw,Tabindex:iw});const lw=`.ProseMirror {
74
74
  position: relative;
75
75
  }
76
76
 
@@ -144,22 +144,22 @@ img.ProseMirror-separator {
144
144
 
145
145
  .tippy-box[data-animation=fade][data-state=hidden] {
146
146
  opacity: 0
147
- }`;function cw(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),o.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(o),o}let uw=class extends CA{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=cw(lw,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=pm(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(e){if(this.isDestroyed)return;const t=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(aw):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new _o(t,this)}createCommandManager(){this.commandManager=new Ga({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=Cm(this.options.content,this.schema,this.options.parseOptions),t=ym(e,this.options.autofocus);this.view=new FC(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ko.create({doc:e,selection:t||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(i=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(i)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),s=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Am(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return Lb(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return _b(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
147
+ }`;function cw(n,e,t){const r=document.querySelector(`style[data-tiptap-style${t?`-${t}`:""}]`);if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute(`data-tiptap-style${t?`-${t}`:""}`,""),o.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(o),o}let uw=class extends CA{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))},0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=cw(lw,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const r=p0(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});this.view.updateState(o)}unregisterPlugin(e){if(this.isDestroyed)return;const t=typeof e=="string"?`${e}$`:e.key,r=this.state.reconfigure({plugins:this.state.plugins.filter(o=>!o.key.startsWith(t))});this.view.updateState(r)}createExtensionManager(){const t=[...this.options.enableCoreExtensions?Object.values(aw):[],...this.options.extensions].filter(r=>["extension","node","mark"].includes(r==null?void 0:r.type));this.extensionManager=new _o(t,this)}createCommandManager(){this.commandManager=new Ga({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){const e=C0(this.options.content,this.schema,this.options.parseOptions),t=y0(e,this.options.autofocus);this.view=new FC(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:ko.create({doc:e,selection:t||void 0})});const r=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(r),this.createNodeViews(),this.prependClass();const o=this.view.dom;o.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(i=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(i)});return}const t=this.state.apply(e),r=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const o=e.getMeta("focus"),s=e.getMeta("blur");o&&this.emit("focus",{editor:this,event:o.event,transaction:e}),s&&this.emit("blur",{editor:this,event:s.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return A0(this.state,e)}isActive(e,t){const r=typeof e=="string"?e:null,o=typeof e=="string"?t:e;return Lb(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return _b(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
148
148
 
149
- `,textSerializers:r={}}=e||{};return xb(this.state.doc,{blockSeparator:t,textSerializers:{...vm(this.schema),...r}})}get isEmpty(){return Db(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}};function Yi(n){return new mm({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Ve(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,i=r[r.length-1],l=r[0];if(i){const a=l.search(/\S/),u=t.from+l.indexOf(i),d=u+i.length;if(Gu(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;d<t.to&&s.delete(d,t.to),u>t.from&&s.delete(t.from+a,u);const h=t.from+a+i.length;s.addMark(t.from+a,h,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}function Gi(n){return new mm({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const s=Ve(n.getAttributes,void 0,r)||{},i=e.tr.delete(t.from,t.to),a=i.doc.resolve(t.from).blockRange(),u=a&&Mu(a,n.type,s);if(!u)return null;if(i.wrap(a,u),n.keepMarks&&n.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=n.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const g=m.filter(v=>p.includes(v.type.name));i.ensureMarks(g)}}if(n.keepAttributes){const f=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,s).run()}const d=i.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&Cr(i.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&i.join(t.from-1)}})}class On{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new On(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new On(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(u=>(u==null?void 0:u.type.name)===t.name))return!1;const a=i.find(u=>(u==null?void 0:u.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}let Gn=class Dc{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Dc(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Dc(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}};function Os(n){return new xA({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const s=Ve(n.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:i}=e,l=r[r.length-1],a=r[0];let u=t.to;if(l){const d=a.search(/\S/),f=t.from+a.indexOf(l),h=f+l.length;if(Gu(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===n.type&&v!==m.mark.type)).filter(m=>m.to>f).length)return null;h<t.to&&i.delete(h,t.to),f>t.from&&i.delete(t.from+d,f),u=t.from+d+l.length,i.addMark(t.from+d,u,n.type.create(s||{})),i.removeStoredMark(n.type)}}})}var _t="top",jt="bottom",Wt="right",xt="left",Ks="auto",Jo=[_t,jt,Wt,xt],to="start",Fo="end",wm="clippingParents",Qu="viewport",Eo="popper",Tm="reference",Rc=Jo.reduce(function(n,e){return n.concat([e+"-"+to,e+"-"+Fo])},[]),Zu=[].concat(Jo,[Ks]).reduce(function(n,e){return n.concat([e,e+"-"+to,e+"-"+Fo])},[]),Sm="beforeRead",km="read",_m="afterRead",xm="beforeMain",Nm="main",Im="afterMain",Mm="beforeWrite",Om="write",Lm="afterWrite",Qi=[Sm,km,_m,xm,Nm,Im,Mm,Om,Lm];function Ln(n){return n?(n.nodeName||"").toLowerCase():null}function Kt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function no(n){var e=Kt(n).Element;return n instanceof e||n instanceof Element}function Ht(n){var e=Kt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ju(n){if(typeof ShadowRoot>"u")return!1;var e=Kt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function dw(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},o=e.attributes[t]||{},s=e.elements[t];!Ht(s)||!Ln(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var l=o[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function fw(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],s=e.attributes[r]||{},i=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=i.reduce(function(a,u){return a[u]="",a},{});!Ht(o)||!Ln(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(a){o.removeAttribute(a)}))})}}const qa={name:"applyStyles",enabled:!0,phase:"write",fn:dw,effect:fw,requires:["computeStyles"]};function fn(n){return n.split("-")[0]}var Qr=Math.max,Zi=Math.min,Vo=Math.round;function Bc(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Dm(){return!/^((?!chrome|android).)*safari/i.test(Bc())}function $o(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),o=1,s=1;e&&Ht(n)&&(o=n.offsetWidth>0&&Vo(r.width)/n.offsetWidth||1,s=n.offsetHeight>0&&Vo(r.height)/n.offsetHeight||1);var i=no(n)?Kt(n):window,l=i.visualViewport,a=!Dm()&&t,u=(r.left+(a&&l?l.offsetLeft:0))/o,d=(r.top+(a&&l?l.offsetTop:0))/s,f=r.width/o,h=r.height/s;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function Xu(n){var e=$o(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function Rm(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ju(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mn(n){return Kt(n).getComputedStyle(n)}function hw(n){return["table","td","th"].indexOf(Ln(n))>=0}function wr(n){return((no(n)?n.ownerDocument:n.document)||window.document).documentElement}function el(n){return Ln(n)==="html"?n:n.assignedSlot||n.parentNode||(Ju(n)?n.host:null)||wr(n)}function rh(n){return!Ht(n)||mn(n).position==="fixed"?null:n.offsetParent}function pw(n){var e=/firefox/i.test(Bc()),t=/Trident/i.test(Bc());if(t&&Ht(n)){var r=mn(n);if(r.position==="fixed")return null}var o=el(n);for(Ju(o)&&(o=o.host);Ht(o)&&["html","body"].indexOf(Ln(o))<0;){var s=mn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ys(n){for(var e=Kt(n),t=rh(n);t&&hw(t)&&mn(t).position==="static";)t=rh(t);return t&&(Ln(t)==="html"||Ln(t)==="body"&&mn(t).position==="static")?e:t||pw(n)||e}function qu(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function vs(n,e,t){return Qr(n,Zi(e,t))}function mw(n,e,t){var r=vs(n,e,t);return r>t?t:r}function Bm(){return{top:0,right:0,bottom:0,left:0}}function Pm(n){return Object.assign({},Bm(),n)}function Fm(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var gw=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Pm(typeof e!="number"?e:Fm(e,Jo))};function vw(n){var e,t=n.state,r=n.name,o=n.options,s=t.elements.arrow,i=t.modifiersData.popperOffsets,l=fn(t.placement),a=qu(l),u=[xt,Wt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=gw(o.padding,t),h=Xu(s),p=a==="y"?_t:xt,m=a==="y"?jt:Wt,g=t.rects.reference[d]+t.rects.reference[a]-i[a]-t.rects.popper[d],v=i[a]-t.rects.reference[a],C=Ys(s),b=C?a==="y"?C.clientHeight||0:C.clientWidth||0:0,E=g/2-v/2,y=f[p],x=b-h[d]-f[m],w=b/2-h[d]/2+E,I=vs(y,w,x),M=a;t.modifiersData[r]=(e={},e[M]=I,e.centerOffset=I-w,e)}}function yw(n){var e=n.state,t=n.options,r=t.element,o=r===void 0?"[data-popper-arrow]":r;if(o!=null&&!(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o))){if(process.env.NODE_ENV!=="production"&&(Ht(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!Rm(e.elements.popper,o)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=o}}const Vm={name:"arrow",enabled:!0,phase:"main",fn:vw,effect:yw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zo(n){return n.split("-")[1]}var Ew={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Cw(n,e){var t=n.x,r=n.y,o=e.devicePixelRatio||1;return{x:Vo(t*o)/o||0,y:Vo(r*o)/o||0}}function oh(n){var e,t=n.popper,r=n.popperRect,o=n.placement,s=n.variation,i=n.offsets,l=n.position,a=n.gpuAcceleration,u=n.adaptive,d=n.roundOffsets,f=n.isFixed,h=i.x,p=h===void 0?0:h,m=i.y,g=m===void 0?0:m,v=typeof d=="function"?d({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var C=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),E=xt,y=_t,x=window;if(u){var w=Ys(t),I="clientHeight",M="clientWidth";if(w===Kt(t)&&(w=wr(t),mn(w).position!=="static"&&l==="absolute"&&(I="scrollHeight",M="scrollWidth")),w=w,o===_t||(o===xt||o===Wt)&&s===Fo){y=jt;var L=f&&w===x&&x.visualViewport?x.visualViewport.height:w[I];g-=L-r.height,g*=a?1:-1}if(o===xt||(o===_t||o===jt)&&s===Fo){E=Wt;var $=f&&w===x&&x.visualViewport?x.visualViewport.width:w[M];p-=$-r.width,p*=a?1:-1}}var V=Object.assign({position:l},u&&Ew),z=d===!0?Cw({x:p,y:g},Kt(t)):{x:p,y:g};if(p=z.x,g=z.y,a){var G;return Object.assign({},V,(G={},G[y]=b?"0":"",G[E]=C?"0":"",G.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",G))}return Object.assign({},V,(e={},e[y]=b?g+"px":"",e[E]=C?p+"px":"",e.transform="",e))}function Aw(n){var e=n.state,t=n.options,r=t.gpuAcceleration,o=r===void 0?!0:r,s=t.adaptive,i=s===void 0?!0:s,l=t.roundOffsets,a=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var u=mn(e.elements.popper).transitionProperty||"";i&&["transform","top","right","bottom","left"].some(function(f){return u.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
149
+ `,textSerializers:r={}}=e||{};return xb(this.state.doc,{blockSeparator:t,textSerializers:{...v0(this.schema),...r}})}get isEmpty(){return Db(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}};function Yi(n){return new m0({find:n.find,handler:({state:e,range:t,match:r})=>{const o=Ve(n.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:s}=e,i=r[r.length-1],l=r[0];if(i){const a=l.search(/\S/),u=t.from+l.indexOf(i),d=u+i.length;if(Gu(t.from,t.to,e.doc).filter(p=>p.mark.type.excluded.find(g=>g===n.type&&g!==p.mark.type)).filter(p=>p.to>u).length)return null;d<t.to&&s.delete(d,t.to),u>t.from&&s.delete(t.from+a,u);const h=t.from+a+i.length;s.addMark(t.from+a,h,n.type.create(o||{})),s.removeStoredMark(n.type)}}})}function Gi(n){return new m0({find:n.find,handler:({state:e,range:t,match:r,chain:o})=>{const s=Ve(n.getAttributes,void 0,r)||{},i=e.tr.delete(t.from,t.to),a=i.doc.resolve(t.from).blockRange(),u=a&&Mu(a,n.type,s);if(!u)return null;if(i.wrap(a,u),n.keepMarks&&n.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=n.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const g=m.filter(v=>p.includes(v.type.name));i.ensureMarks(g)}}if(n.keepAttributes){const f=n.type.name==="bulletList"||n.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,s).run()}const d=i.doc.resolve(t.from-1).nodeBefore;d&&d.type===n.type&&Cr(i.doc,t.from-1)&&(!n.joinPredicate||n.joinPredicate(r,d))&&i.join(t.from-1)}})}class On{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new On(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new On(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const i=o.marks();if(!!!i.find(u=>(u==null?void 0:u.type.name)===t.name))return!1;const a=i.find(u=>(u==null?void 0:u.type.name)===t.name);return a&&r.removeStoredMark(a),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}}let Gn=class Dc{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=Ve(xe(this,"addOptions",{name:this.name}))),this.storage=Ve(xe(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Dc(e)}configure(e={}){const t=this.extend();return t.options=Za(this.options,e),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Dc(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=Ve(xe(t,"addOptions",{name:t.name})),t.storage=Ve(xe(t,"addStorage",{name:t.name,options:t.options})),t}};function Os(n){return new xA({find:n.find,handler:({state:e,range:t,match:r,pasteEvent:o})=>{const s=Ve(n.getAttributes,void 0,r,o);if(s===!1||s===null)return null;const{tr:i}=e,l=r[r.length-1],a=r[0];let u=t.to;if(l){const d=a.search(/\S/),f=t.from+a.indexOf(l),h=f+l.length;if(Gu(t.from,t.to,e.doc).filter(m=>m.mark.type.excluded.find(v=>v===n.type&&v!==m.mark.type)).filter(m=>m.to>f).length)return null;h<t.to&&i.delete(h,t.to),f>t.from&&i.delete(t.from+d,f),u=t.from+d+l.length,i.addMark(t.from+d,u,n.type.create(s||{})),i.removeStoredMark(n.type)}}})}var _t="top",jt="bottom",Wt="right",xt="left",Ks="auto",Jo=[_t,jt,Wt,xt],to="start",Fo="end",w0="clippingParents",Qu="viewport",Eo="popper",T0="reference",Rc=Jo.reduce(function(n,e){return n.concat([e+"-"+to,e+"-"+Fo])},[]),Zu=[].concat(Jo,[Ks]).reduce(function(n,e){return n.concat([e,e+"-"+to,e+"-"+Fo])},[]),S0="beforeRead",k0="read",_0="afterRead",x0="beforeMain",N0="main",I0="afterMain",M0="beforeWrite",O0="write",L0="afterWrite",Qi=[S0,k0,_0,x0,N0,I0,M0,O0,L0];function Ln(n){return n?(n.nodeName||"").toLowerCase():null}function Kt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function no(n){var e=Kt(n).Element;return n instanceof e||n instanceof Element}function Ht(n){var e=Kt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ju(n){if(typeof ShadowRoot>"u")return!1;var e=Kt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function dw(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},o=e.attributes[t]||{},s=e.elements[t];!Ht(s)||!Ln(s)||(Object.assign(s.style,r),Object.keys(o).forEach(function(i){var l=o[i];l===!1?s.removeAttribute(i):s.setAttribute(i,l===!0?"":l)}))})}function fw(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var o=e.elements[r],s=e.attributes[r]||{},i=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),l=i.reduce(function(a,u){return a[u]="",a},{});!Ht(o)||!Ln(o)||(Object.assign(o.style,l),Object.keys(s).forEach(function(a){o.removeAttribute(a)}))})}}const qa={name:"applyStyles",enabled:!0,phase:"write",fn:dw,effect:fw,requires:["computeStyles"]};function fn(n){return n.split("-")[0]}var Qr=Math.max,Zi=Math.min,Vo=Math.round;function Bc(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function D0(){return!/^((?!chrome|android).)*safari/i.test(Bc())}function $o(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=n.getBoundingClientRect(),o=1,s=1;e&&Ht(n)&&(o=n.offsetWidth>0&&Vo(r.width)/n.offsetWidth||1,s=n.offsetHeight>0&&Vo(r.height)/n.offsetHeight||1);var i=no(n)?Kt(n):window,l=i.visualViewport,a=!D0()&&t,u=(r.left+(a&&l?l.offsetLeft:0))/o,d=(r.top+(a&&l?l.offsetTop:0))/s,f=r.width/o,h=r.height/s;return{width:f,height:h,top:d,right:u+f,bottom:d+h,left:u,x:u,y:d}}function Xu(n){var e=$o(n),t=n.offsetWidth,r=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:r}}function R0(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ju(t)){var r=e;do{if(r&&n.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function mn(n){return Kt(n).getComputedStyle(n)}function hw(n){return["table","td","th"].indexOf(Ln(n))>=0}function wr(n){return((no(n)?n.ownerDocument:n.document)||window.document).documentElement}function el(n){return Ln(n)==="html"?n:n.assignedSlot||n.parentNode||(Ju(n)?n.host:null)||wr(n)}function rh(n){return!Ht(n)||mn(n).position==="fixed"?null:n.offsetParent}function pw(n){var e=/firefox/i.test(Bc()),t=/Trident/i.test(Bc());if(t&&Ht(n)){var r=mn(n);if(r.position==="fixed")return null}var o=el(n);for(Ju(o)&&(o=o.host);Ht(o)&&["html","body"].indexOf(Ln(o))<0;){var s=mn(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ys(n){for(var e=Kt(n),t=rh(n);t&&hw(t)&&mn(t).position==="static";)t=rh(t);return t&&(Ln(t)==="html"||Ln(t)==="body"&&mn(t).position==="static")?e:t||pw(n)||e}function qu(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function vs(n,e,t){return Qr(n,Zi(e,t))}function mw(n,e,t){var r=vs(n,e,t);return r>t?t:r}function B0(){return{top:0,right:0,bottom:0,left:0}}function P0(n){return Object.assign({},B0(),n)}function F0(n,e){return e.reduce(function(t,r){return t[r]=n,t},{})}var gw=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,P0(typeof e!="number"?e:F0(e,Jo))};function vw(n){var e,t=n.state,r=n.name,o=n.options,s=t.elements.arrow,i=t.modifiersData.popperOffsets,l=fn(t.placement),a=qu(l),u=[xt,Wt].indexOf(l)>=0,d=u?"height":"width";if(!(!s||!i)){var f=gw(o.padding,t),h=Xu(s),p=a==="y"?_t:xt,m=a==="y"?jt:Wt,g=t.rects.reference[d]+t.rects.reference[a]-i[a]-t.rects.popper[d],v=i[a]-t.rects.reference[a],C=Ys(s),b=C?a==="y"?C.clientHeight||0:C.clientWidth||0:0,E=g/2-v/2,y=f[p],x=b-h[d]-f[m],w=b/2-h[d]/2+E,I=vs(y,w,x),M=a;t.modifiersData[r]=(e={},e[M]=I,e.centerOffset=I-w,e)}}function yw(n){var e=n.state,t=n.options,r=t.element,o=r===void 0?"[data-popper-arrow]":r;if(o!=null&&!(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o))){if(process.env.NODE_ENV!=="production"&&(Ht(o)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),!R0(e.elements.popper,o)){process.env.NODE_ENV!=="production"&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" "));return}e.elements.arrow=o}}const V0={name:"arrow",enabled:!0,phase:"main",fn:vw,effect:yw,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zo(n){return n.split("-")[1]}var Ew={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Cw(n,e){var t=n.x,r=n.y,o=e.devicePixelRatio||1;return{x:Vo(t*o)/o||0,y:Vo(r*o)/o||0}}function oh(n){var e,t=n.popper,r=n.popperRect,o=n.placement,s=n.variation,i=n.offsets,l=n.position,a=n.gpuAcceleration,u=n.adaptive,d=n.roundOffsets,f=n.isFixed,h=i.x,p=h===void 0?0:h,m=i.y,g=m===void 0?0:m,v=typeof d=="function"?d({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var C=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),E=xt,y=_t,x=window;if(u){var w=Ys(t),I="clientHeight",M="clientWidth";if(w===Kt(t)&&(w=wr(t),mn(w).position!=="static"&&l==="absolute"&&(I="scrollHeight",M="scrollWidth")),w=w,o===_t||(o===xt||o===Wt)&&s===Fo){y=jt;var L=f&&w===x&&x.visualViewport?x.visualViewport.height:w[I];g-=L-r.height,g*=a?1:-1}if(o===xt||(o===_t||o===jt)&&s===Fo){E=Wt;var $=f&&w===x&&x.visualViewport?x.visualViewport.width:w[M];p-=$-r.width,p*=a?1:-1}}var V=Object.assign({position:l},u&&Ew),z=d===!0?Cw({x:p,y:g},Kt(t)):{x:p,y:g};if(p=z.x,g=z.y,a){var G;return Object.assign({},V,(G={},G[y]=b?"0":"",G[E]=C?"0":"",G.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",G))}return Object.assign({},V,(e={},e[y]=b?g+"px":"",e[E]=C?p+"px":"",e.transform="",e))}function Aw(n){var e=n.state,t=n.options,r=t.gpuAcceleration,o=r===void 0?!0:r,s=t.adaptive,i=s===void 0?!0:s,l=t.roundOffsets,a=l===void 0?!0:l;if(process.env.NODE_ENV!=="production"){var u=mn(e.elements.popper).transitionProperty||"";i&&["transform","top","right","bottom","left"].some(function(f){return u.indexOf(f)>=0})&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',`
150
150
 
151
151
  `,'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.",`
152
152
 
153
- `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:fn(e.placement),variation:zo(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,oh(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oh(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 ed={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Aw,data:{}};var ai={passive:!0};function bw(n){var e=n.state,t=n.instance,r=n.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,a=Kt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",t.update,ai)}),l&&a.addEventListener("resize",t.update,ai),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",t.update,ai)}),l&&a.removeEventListener("resize",t.update,ai)}}const td={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bw,data:{}};var ww={left:"right",right:"left",bottom:"top",top:"bottom"};function wi(n){return n.replace(/left|right|bottom|top/g,function(e){return ww[e]})}var Tw={start:"end",end:"start"};function sh(n){return n.replace(/start|end/g,function(e){return Tw[e]})}function nd(n){var e=Kt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function rd(n){return $o(wr(n)).left+nd(n).scrollLeft}function Sw(n,e){var t=Kt(n),r=wr(n),o=t.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,a=0;if(o){s=o.width,i=o.height;var u=Dm();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:i,x:l+rd(n),y:a}}function kw(n){var e,t=wr(n),r=nd(n),o=(e=n.ownerDocument)==null?void 0:e.body,s=Qr(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Qr(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+rd(n),a=-r.scrollTop;return mn(o||t).direction==="rtl"&&(l+=Qr(t.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function od(n){var e=mn(n),t=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+r)}function $m(n){return["html","body","#document"].indexOf(Ln(n))>=0?n.ownerDocument.body:Ht(n)&&od(n)?n:$m(el(n))}function ys(n,e){var t;e===void 0&&(e=[]);var r=$m(n),o=r===((t=n.ownerDocument)==null?void 0:t.body),s=Kt(r),i=o?[s].concat(s.visualViewport||[],od(r)?r:[]):r,l=e.concat(i);return o?l:l.concat(ys(el(i)))}function Pc(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function _w(n,e){var t=$o(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function ih(n,e,t){return e===Qu?Pc(Sw(n,t)):no(e)?_w(e,t):Pc(kw(wr(n)))}function xw(n){var e=ys(el(n)),t=["absolute","fixed"].indexOf(mn(n).position)>=0,r=t&&Ht(n)?Ys(n):n;return no(r)?e.filter(function(o){return no(o)&&Rm(o,r)&&Ln(o)!=="body"}):[]}function Nw(n,e,t,r){var o=e==="clippingParents"?xw(n):[].concat(e),s=[].concat(o,[t]),i=s[0],l=s.reduce(function(a,u){var d=ih(n,u,r);return a.top=Qr(d.top,a.top),a.right=Zi(d.right,a.right),a.bottom=Zi(d.bottom,a.bottom),a.left=Qr(d.left,a.left),a},ih(n,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function zm(n){var e=n.reference,t=n.element,r=n.placement,o=r?fn(r):null,s=r?zo(r):null,i=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(o){case _t:a={x:i,y:e.y-t.height};break;case jt:a={x:i,y:e.y+e.height};break;case Wt:a={x:e.x+e.width,y:l};break;case xt:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?qu(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case to:a[u]=a[u]-(e[d]/2-t[d]/2);break;case Fo:a[u]=a[u]+(e[d]/2-t[d]/2);break}}return a}function Uo(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=r===void 0?n.placement:r,s=t.strategy,i=s===void 0?n.strategy:s,l=t.boundary,a=l===void 0?wm:l,u=t.rootBoundary,d=u===void 0?Qu:u,f=t.elementContext,h=f===void 0?Eo:f,p=t.altBoundary,m=p===void 0?!1:p,g=t.padding,v=g===void 0?0:g,C=Pm(typeof v!="number"?v:Fm(v,Jo)),b=h===Eo?Tm:Eo,E=n.rects.popper,y=n.elements[m?b:h],x=Nw(no(y)?y:y.contextElement||wr(n.elements.popper),a,d,i),w=$o(n.elements.reference),I=zm({reference:w,element:E,strategy:"absolute",placement:o}),M=Pc(Object.assign({},E,I)),L=h===Eo?M:w,$={top:x.top-L.top+C.top,bottom:L.bottom-x.bottom+C.bottom,left:x.left-L.left+C.left,right:L.right-x.right+C.right},V=n.modifiersData.offset;if(h===Eo&&V){var z=V[o];Object.keys($).forEach(function(G){var Y=[Wt,jt].indexOf(G)>=0?1:-1,K=[_t,jt].indexOf(G)>=0?"y":"x";$[G]+=z[K]*Y})}return $}function Iw(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=t.boundary,s=t.rootBoundary,i=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,u=a===void 0?Zu:a,d=zo(r),f=d?l?Rc:Rc.filter(function(m){return zo(m)===d}):Jo,h=f.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=f,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=h.reduce(function(m,g){return m[g]=Uo(n,{placement:g,boundary:o,rootBoundary:s,padding:i})[fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function Mw(n){if(fn(n)===Ks)return[];var e=wi(n);return[sh(n),e,sh(e)]}function Ow(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var o=t.mainAxis,s=o===void 0?!0:o,i=t.altAxis,l=i===void 0?!0:i,a=t.fallbackPlacements,u=t.padding,d=t.boundary,f=t.rootBoundary,h=t.altBoundary,p=t.flipVariations,m=p===void 0?!0:p,g=t.allowedAutoPlacements,v=e.options.placement,C=fn(v),b=C===v,E=a||(b||!m?[wi(v)]:Mw(v)),y=[v].concat(E).reduce(function(Te,ke){return Te.concat(fn(ke)===Ks?Iw(e,{placement:ke,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:g}):ke)},[]),x=e.rects.reference,w=e.rects.popper,I=new Map,M=!0,L=y[0],$=0;$<y.length;$++){var V=y[$],z=fn(V),G=zo(V)===to,Y=[_t,jt].indexOf(z)>=0,K=Y?"width":"height",W=Uo(e,{placement:V,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),J=Y?G?Wt:xt:G?jt:_t;x[K]>w[K]&&(J=wi(J));var U=wi(J),ee=[];if(s&&ee.push(W[z]<=0),l&&ee.push(W[J]<=0,W[U]<=0),ee.every(function(Te){return Te})){L=V,M=!1;break}I.set(V,ee)}if(M)for(var ne=m?3:1,ce=function(ke){var Ne=y.find(function(Ce){var D=I.get(Ce);if(D)return D.slice(0,ke).every(function(B){return B})});if(Ne)return L=Ne,"break"},me=ne;me>0;me--){var ve=ce(me);if(ve==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const Um={name:"flip",enabled:!0,phase:"main",fn:Ow,requiresIfExists:["offset"],data:{_skip:!1}};function ah(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function lh(n){return[_t,Wt,jt,xt].some(function(e){return n[e]>=0})}function Lw(n){var e=n.state,t=n.name,r=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,i=Uo(e,{elementContext:"reference"}),l=Uo(e,{altBoundary:!0}),a=ah(i,r),u=ah(l,o,s),d=lh(a),f=lh(u);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const Hm={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lw};function Dw(n,e,t){var r=fn(n),o=[xt,_t].indexOf(r)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[xt,Wt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function Rw(n){var e=n.state,t=n.options,r=n.name,o=t.offset,s=o===void 0?[0,0]:o,i=Zu.reduce(function(d,f){return d[f]=Dw(f,e.rects,s),d},{}),l=i[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=i}const jm={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Rw};function Bw(n){var e=n.state,t=n.name;e.modifiersData[t]=zm({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const sd={name:"popperOffsets",enabled:!0,phase:"read",fn:Bw,data:{}};function Pw(n){return n==="x"?"y":"x"}function Fw(n){var e=n.state,t=n.options,r=n.name,o=t.mainAxis,s=o===void 0?!0:o,i=t.altAxis,l=i===void 0?!1:i,a=t.boundary,u=t.rootBoundary,d=t.altBoundary,f=t.padding,h=t.tether,p=h===void 0?!0:h,m=t.tetherOffset,g=m===void 0?0:m,v=Uo(e,{boundary:a,rootBoundary:u,padding:f,altBoundary:d}),C=fn(e.placement),b=zo(e.placement),E=!b,y=qu(C),x=Pw(y),w=e.modifiersData.popperOffsets,I=e.rects.reference,M=e.rects.popper,L=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,$=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(w){if(s){var G,Y=y==="y"?_t:xt,K=y==="y"?jt:Wt,W=y==="y"?"height":"width",J=w[y],U=J+v[Y],ee=J-v[K],ne=p?-M[W]/2:0,ce=b===to?I[W]:M[W],me=b===to?-M[W]:-I[W],ve=e.elements.arrow,Te=p&&ve?Xu(ve):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Bm(),Ne=ke[Y],Ce=ke[K],D=vs(0,I[W],Te[W]),B=E?I[W]/2-ne-D-Ne-$.mainAxis:ce-D-Ne-$.mainAxis,N=E?-I[W]/2+ne+D+Ce+$.mainAxis:me+D+Ce+$.mainAxis,R=e.elements.arrow&&Ys(e.elements.arrow),A=R?y==="y"?R.clientTop||0:R.clientLeft||0:0,T=(G=V==null?void 0:V[y])!=null?G:0,_=J+B-T-A,O=J+N-T,H=vs(p?Zi(U,_):U,J,p?Qr(ee,O):ee);w[y]=H,z[y]=H-J}if(l){var j,Z=y==="x"?_t:xt,X=y==="x"?jt:Wt,S=w[x],k=x==="y"?"height":"width",F=S+v[Z],Q=S-v[X],ie=[_t,xt].indexOf(C)!==-1,he=(j=V==null?void 0:V[x])!=null?j:0,be=ie?F:S-I[k]-M[k]-he+$.altAxis,q=ie?S+I[k]+M[k]-he-$.altAxis:Q,se=p&&ie?mw(be,S,q):vs(p?be:F,S,p?q:Q);w[x]=se,z[x]=se-S}e.modifiersData[r]=z}}const Wm={name:"preventOverflow",enabled:!0,phase:"main",fn:Fw,requiresIfExists:["offset"]};function Vw(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function $w(n){return n===Kt(n)||!Ht(n)?nd(n):Vw(n)}function zw(n){var e=n.getBoundingClientRect(),t=Vo(e.width)/n.offsetWidth||1,r=Vo(e.height)/n.offsetHeight||1;return t!==1||r!==1}function Uw(n,e,t){t===void 0&&(t=!1);var r=Ht(e),o=Ht(e)&&zw(e),s=wr(e),i=$o(n,o,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((Ln(e)!=="body"||od(s))&&(l=$w(e)),Ht(e)?(a=$o(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):s&&(a.x=rd(s))),{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function Hw(n){var e=new Map,t=new Set,r=[];n.forEach(function(s){e.set(s.name,s)});function o(s){t.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&o(a)}}),r.push(s)}return n.forEach(function(s){t.has(s.name)||o(s)}),r}function jw(n){var e=Hw(n);return Qi.reduce(function(t,r){return t.concat(e.filter(function(o){return o.phase===r}))},[])}function Ww(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function qn(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return[].concat(t).reduce(function(o,s){return o.replace(/%s/,s)},n)}var Nr='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Kw='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',ch=["name","enabled","phase","fn","effect","requires","options"];function Yw(n){n.forEach(function(e){[].concat(Object.keys(e),ch).filter(function(t,r,o){return o.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(qn(Nr,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(qn(Nr,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Qi.indexOf(e.phase)<0&&console.error(qn(Nr,e.name,'"phase"',"either "+Qi.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(qn(Nr,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(qn(Nr,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(qn(Nr,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(qn(Nr,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+ch.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(r){n.find(function(o){return o.name===r})==null&&console.error(qn(Kw,String(e.name),r,r))})})})}function Gw(n,e){var t=new Set;return n.filter(function(r){var o=e(r);if(!t.has(o))return t.add(o),!0})}function Qw(n){var e=n.reduce(function(t,r){var o=t[r.name];return t[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var uh="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Zw="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",dh={placement:"bottom",modifiers:[],strategy:"absolute"};function fh(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function tl(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,o=e.defaultOptions,s=o===void 0?dh:o;return function(l,a,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},dh,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},f=[],h=!1,p={state:d,setOptions:function(C){var b=typeof C=="function"?C(d.options):C;g(),d.options=Object.assign({},s,d.options,b),d.scrollParents={reference:no(l)?ys(l):l.contextElement?ys(l.contextElement):[],popper:ys(a)};var E=jw(Qw([].concat(r,d.options.modifiers)));if(d.orderedModifiers=E.filter(function(V){return V.enabled}),process.env.NODE_ENV!=="production"){var y=Gw([].concat(E,d.options.modifiers),function(V){var z=V.name;return z});if(Yw(y),fn(d.options.placement)===Ks){var x=d.orderedModifiers.find(function(V){var z=V.name;return z==="flip"});x||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=mn(a),I=w.marginTop,M=w.marginRight,L=w.marginBottom,$=w.marginLeft;[I,M,L,$].some(function(V){return parseFloat(V)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return m(),p.update()},forceUpdate:function(){if(!h){var C=d.elements,b=C.reference,E=C.popper;if(!fh(b,E)){process.env.NODE_ENV!=="production"&&console.error(uh);return}d.rects={reference:Uw(b,Ys(E),d.options.strategy==="fixed"),popper:Xu(E)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(V){return d.modifiersData[V.name]=Object.assign({},V.data)});for(var y=0,x=0;x<d.orderedModifiers.length;x++){if(process.env.NODE_ENV!=="production"&&(y+=1,y>100)){console.error(Zw);break}if(d.reset===!0){d.reset=!1,x=-1;continue}var w=d.orderedModifiers[x],I=w.fn,M=w.options,L=M===void 0?{}:M,$=w.name;typeof I=="function"&&(d=I({state:d,options:L,name:$,instance:p})||d)}}},update:Ww(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){g(),h=!0}};if(!fh(l,a))return process.env.NODE_ENV!=="production"&&console.error(uh),p;p.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function m(){d.orderedModifiers.forEach(function(v){var C=v.name,b=v.options,E=b===void 0?{}:b,y=v.effect;if(typeof y=="function"){var x=y({state:d,name:C,instance:p,options:E}),w=function(){};f.push(x||w)}})}function g(){f.forEach(function(v){return v()}),f=[]}return p}}var Jw=tl(),Xw=[td,sd,ed,qa],qw=tl({defaultModifiers:Xw}),eT=[td,sd,ed,qa,jm,Um,Wm,Vm,Hm],nl=tl({defaultModifiers:eT});const Km=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Im,afterRead:_m,afterWrite:Lm,applyStyles:qa,arrow:Vm,auto:Ks,basePlacements:Jo,beforeMain:xm,beforeRead:Sm,beforeWrite:Mm,bottom:jt,clippingParents:wm,computeStyles:ed,createPopper:nl,createPopperBase:Jw,createPopperLite:qw,detectOverflow:Uo,end:Fo,eventListeners:td,flip:Um,hide:Hm,left:xt,main:Nm,modifierPhases:Qi,offset:jm,placements:Zu,popper:Eo,popperGenerator:tl,popperOffsets:sd,preventOverflow:Wm,read:km,reference:Tm,right:Wt,start:to,top:_t,variationPlacements:Rc,viewport:Qu,write:Om},Symbol.toStringTag,{value:"Module"}));var tT="tippy-box",Ym="tippy-content",nT="tippy-backdrop",Gm="tippy-arrow",Qm="tippy-svg-arrow",Or={passive:!0,capture:!0},Zm=function(){return document.body};function rT(n,e){return{}.hasOwnProperty.call(n,e)}function Ul(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function id(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function Jm(n,e){return typeof n=="function"?n.apply(void 0,e):n}function hh(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function oT(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function sT(n){return n.split(/\s+/).filter(Boolean)}function Co(n){return[].concat(n)}function ph(n,e){n.indexOf(e)===-1&&n.push(e)}function iT(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function aT(n){return n.split("-")[0]}function Ji(n){return[].slice.call(n)}function mh(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Es(){return document.createElement("div")}function Ls(n){return["Element","Fragment"].some(function(e){return id(n,e)})}function lT(n){return id(n,"NodeList")}function cT(n){return id(n,"MouseEvent")}function uT(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function dT(n){return Ls(n)?[n]:lT(n)?Ji(n):Array.isArray(n)?n:Ji(document.querySelectorAll(n))}function Hl(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function gh(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function fT(n){var e,t=Co(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function hT(n,e){var t=e.clientX,r=e.clientY;return n.every(function(o){var s=o.popperRect,i=o.popperState,l=o.props,a=l.interactiveBorder,u=aT(i.placement),d=i.modifiersData.offset;if(!d)return!0;var f=u==="bottom"?d.top.y:0,h=u==="top"?d.bottom.y:0,p=u==="right"?d.left.x:0,m=u==="left"?d.right.x:0,g=s.top-r+f>a,v=r-s.bottom-h>a,C=s.left-t+p>a,b=t-s.right-m>a;return g||v||C||b})}function jl(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,t)})}function vh(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var wn={isTouch:!1},yh=0;function pT(){wn.isTouch||(wn.isTouch=!0,window.performance&&document.addEventListener("mousemove",Xm))}function Xm(){var n=performance.now();n-yh<20&&(wn.isTouch=!1,document.removeEventListener("mousemove",Xm)),yh=n}function mT(){var n=document.activeElement;if(uT(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function gT(){document.addEventListener("touchstart",pT,Or),window.addEventListener("blur",mT)}var vT=typeof window<"u"&&typeof document<"u",yT=vT?!!window.msCrypto:!1;function ho(n){var e=n==="destroy"?"n already-":" ";return[n+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Eh(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function ET(n){return Eh(`
153
+ `,"We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var d={placement:fn(e.placement),variation:zo(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,oh(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:i,roundOffsets:a})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,oh(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 ed={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Aw,data:{}};var ai={passive:!0};function bw(n){var e=n.state,t=n.instance,r=n.options,o=r.scroll,s=o===void 0?!0:o,i=r.resize,l=i===void 0?!0:i,a=Kt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&u.forEach(function(d){d.addEventListener("scroll",t.update,ai)}),l&&a.addEventListener("resize",t.update,ai),function(){s&&u.forEach(function(d){d.removeEventListener("scroll",t.update,ai)}),l&&a.removeEventListener("resize",t.update,ai)}}const td={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:bw,data:{}};var ww={left:"right",right:"left",bottom:"top",top:"bottom"};function wi(n){return n.replace(/left|right|bottom|top/g,function(e){return ww[e]})}var Tw={start:"end",end:"start"};function sh(n){return n.replace(/start|end/g,function(e){return Tw[e]})}function nd(n){var e=Kt(n),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function rd(n){return $o(wr(n)).left+nd(n).scrollLeft}function Sw(n,e){var t=Kt(n),r=wr(n),o=t.visualViewport,s=r.clientWidth,i=r.clientHeight,l=0,a=0;if(o){s=o.width,i=o.height;var u=D0();(u||!u&&e==="fixed")&&(l=o.offsetLeft,a=o.offsetTop)}return{width:s,height:i,x:l+rd(n),y:a}}function kw(n){var e,t=wr(n),r=nd(n),o=(e=n.ownerDocument)==null?void 0:e.body,s=Qr(t.scrollWidth,t.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Qr(t.scrollHeight,t.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+rd(n),a=-r.scrollTop;return mn(o||t).direction==="rtl"&&(l+=Qr(t.clientWidth,o?o.clientWidth:0)-s),{width:s,height:i,x:l,y:a}}function od(n){var e=mn(n),t=e.overflow,r=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+o+r)}function $0(n){return["html","body","#document"].indexOf(Ln(n))>=0?n.ownerDocument.body:Ht(n)&&od(n)?n:$0(el(n))}function ys(n,e){var t;e===void 0&&(e=[]);var r=$0(n),o=r===((t=n.ownerDocument)==null?void 0:t.body),s=Kt(r),i=o?[s].concat(s.visualViewport||[],od(r)?r:[]):r,l=e.concat(i);return o?l:l.concat(ys(el(i)))}function Pc(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function _w(n,e){var t=$o(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function ih(n,e,t){return e===Qu?Pc(Sw(n,t)):no(e)?_w(e,t):Pc(kw(wr(n)))}function xw(n){var e=ys(el(n)),t=["absolute","fixed"].indexOf(mn(n).position)>=0,r=t&&Ht(n)?Ys(n):n;return no(r)?e.filter(function(o){return no(o)&&R0(o,r)&&Ln(o)!=="body"}):[]}function Nw(n,e,t,r){var o=e==="clippingParents"?xw(n):[].concat(e),s=[].concat(o,[t]),i=s[0],l=s.reduce(function(a,u){var d=ih(n,u,r);return a.top=Qr(d.top,a.top),a.right=Zi(d.right,a.right),a.bottom=Zi(d.bottom,a.bottom),a.left=Qr(d.left,a.left),a},ih(n,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function z0(n){var e=n.reference,t=n.element,r=n.placement,o=r?fn(r):null,s=r?zo(r):null,i=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,a;switch(o){case _t:a={x:i,y:e.y-t.height};break;case jt:a={x:i,y:e.y+e.height};break;case Wt:a={x:e.x+e.width,y:l};break;case xt:a={x:e.x-t.width,y:l};break;default:a={x:e.x,y:e.y}}var u=o?qu(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(s){case to:a[u]=a[u]-(e[d]/2-t[d]/2);break;case Fo:a[u]=a[u]+(e[d]/2-t[d]/2);break}}return a}function Uo(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=r===void 0?n.placement:r,s=t.strategy,i=s===void 0?n.strategy:s,l=t.boundary,a=l===void 0?w0:l,u=t.rootBoundary,d=u===void 0?Qu:u,f=t.elementContext,h=f===void 0?Eo:f,p=t.altBoundary,m=p===void 0?!1:p,g=t.padding,v=g===void 0?0:g,C=P0(typeof v!="number"?v:F0(v,Jo)),b=h===Eo?T0:Eo,E=n.rects.popper,y=n.elements[m?b:h],x=Nw(no(y)?y:y.contextElement||wr(n.elements.popper),a,d,i),w=$o(n.elements.reference),I=z0({reference:w,element:E,strategy:"absolute",placement:o}),M=Pc(Object.assign({},E,I)),L=h===Eo?M:w,$={top:x.top-L.top+C.top,bottom:L.bottom-x.bottom+C.bottom,left:x.left-L.left+C.left,right:L.right-x.right+C.right},V=n.modifiersData.offset;if(h===Eo&&V){var z=V[o];Object.keys($).forEach(function(G){var Y=[Wt,jt].indexOf(G)>=0?1:-1,K=[_t,jt].indexOf(G)>=0?"y":"x";$[G]+=z[K]*Y})}return $}function Iw(n,e){e===void 0&&(e={});var t=e,r=t.placement,o=t.boundary,s=t.rootBoundary,i=t.padding,l=t.flipVariations,a=t.allowedAutoPlacements,u=a===void 0?Zu:a,d=zo(r),f=d?l?Rc:Rc.filter(function(m){return zo(m)===d}):Jo,h=f.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=f,process.env.NODE_ENV!=="production"&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var p=h.reduce(function(m,g){return m[g]=Uo(n,{placement:g,boundary:o,rootBoundary:s,padding:i})[fn(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function Mw(n){if(fn(n)===Ks)return[];var e=wi(n);return[sh(n),e,sh(e)]}function Ow(n){var e=n.state,t=n.options,r=n.name;if(!e.modifiersData[r]._skip){for(var o=t.mainAxis,s=o===void 0?!0:o,i=t.altAxis,l=i===void 0?!0:i,a=t.fallbackPlacements,u=t.padding,d=t.boundary,f=t.rootBoundary,h=t.altBoundary,p=t.flipVariations,m=p===void 0?!0:p,g=t.allowedAutoPlacements,v=e.options.placement,C=fn(v),b=C===v,E=a||(b||!m?[wi(v)]:Mw(v)),y=[v].concat(E).reduce(function(Te,ke){return Te.concat(fn(ke)===Ks?Iw(e,{placement:ke,boundary:d,rootBoundary:f,padding:u,flipVariations:m,allowedAutoPlacements:g}):ke)},[]),x=e.rects.reference,w=e.rects.popper,I=new Map,M=!0,L=y[0],$=0;$<y.length;$++){var V=y[$],z=fn(V),G=zo(V)===to,Y=[_t,jt].indexOf(z)>=0,K=Y?"width":"height",W=Uo(e,{placement:V,boundary:d,rootBoundary:f,altBoundary:h,padding:u}),J=Y?G?Wt:xt:G?jt:_t;x[K]>w[K]&&(J=wi(J));var U=wi(J),ee=[];if(s&&ee.push(W[z]<=0),l&&ee.push(W[J]<=0,W[U]<=0),ee.every(function(Te){return Te})){L=V,M=!1;break}I.set(V,ee)}if(M)for(var ne=m?3:1,ce=function(ke){var Ne=y.find(function(Ce){var D=I.get(Ce);if(D)return D.slice(0,ke).every(function(B){return B})});if(Ne)return L=Ne,"break"},me=ne;me>0;me--){var ve=ce(me);if(ve==="break")break}e.placement!==L&&(e.modifiersData[r]._skip=!0,e.placement=L,e.reset=!0)}}const U0={name:"flip",enabled:!0,phase:"main",fn:Ow,requiresIfExists:["offset"],data:{_skip:!1}};function ah(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function lh(n){return[_t,Wt,jt,xt].some(function(e){return n[e]>=0})}function Lw(n){var e=n.state,t=n.name,r=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,i=Uo(e,{elementContext:"reference"}),l=Uo(e,{altBoundary:!0}),a=ah(i,r),u=ah(l,o,s),d=lh(a),f=lh(u);e.modifiersData[t]={referenceClippingOffsets:a,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:f},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":f})}const H0={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Lw};function Dw(n,e,t){var r=fn(n),o=[xt,_t].indexOf(r)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,i=s[0],l=s[1];return i=i||0,l=(l||0)*o,[xt,Wt].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function Rw(n){var e=n.state,t=n.options,r=n.name,o=t.offset,s=o===void 0?[0,0]:o,i=Zu.reduce(function(d,f){return d[f]=Dw(f,e.rects,s),d},{}),l=i[e.placement],a=l.x,u=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=a,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=i}const j0={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Rw};function Bw(n){var e=n.state,t=n.name;e.modifiersData[t]=z0({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const sd={name:"popperOffsets",enabled:!0,phase:"read",fn:Bw,data:{}};function Pw(n){return n==="x"?"y":"x"}function Fw(n){var e=n.state,t=n.options,r=n.name,o=t.mainAxis,s=o===void 0?!0:o,i=t.altAxis,l=i===void 0?!1:i,a=t.boundary,u=t.rootBoundary,d=t.altBoundary,f=t.padding,h=t.tether,p=h===void 0?!0:h,m=t.tetherOffset,g=m===void 0?0:m,v=Uo(e,{boundary:a,rootBoundary:u,padding:f,altBoundary:d}),C=fn(e.placement),b=zo(e.placement),E=!b,y=qu(C),x=Pw(y),w=e.modifiersData.popperOffsets,I=e.rects.reference,M=e.rects.popper,L=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,$=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,z={x:0,y:0};if(w){if(s){var G,Y=y==="y"?_t:xt,K=y==="y"?jt:Wt,W=y==="y"?"height":"width",J=w[y],U=J+v[Y],ee=J-v[K],ne=p?-M[W]/2:0,ce=b===to?I[W]:M[W],me=b===to?-M[W]:-I[W],ve=e.elements.arrow,Te=p&&ve?Xu(ve):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:B0(),Ne=ke[Y],Ce=ke[K],D=vs(0,I[W],Te[W]),B=E?I[W]/2-ne-D-Ne-$.mainAxis:ce-D-Ne-$.mainAxis,N=E?-I[W]/2+ne+D+Ce+$.mainAxis:me+D+Ce+$.mainAxis,R=e.elements.arrow&&Ys(e.elements.arrow),A=R?y==="y"?R.clientTop||0:R.clientLeft||0:0,T=(G=V==null?void 0:V[y])!=null?G:0,_=J+B-T-A,O=J+N-T,H=vs(p?Zi(U,_):U,J,p?Qr(ee,O):ee);w[y]=H,z[y]=H-J}if(l){var j,Z=y==="x"?_t:xt,X=y==="x"?jt:Wt,S=w[x],k=x==="y"?"height":"width",F=S+v[Z],Q=S-v[X],ie=[_t,xt].indexOf(C)!==-1,he=(j=V==null?void 0:V[x])!=null?j:0,be=ie?F:S-I[k]-M[k]-he+$.altAxis,q=ie?S+I[k]+M[k]-he-$.altAxis:Q,se=p&&ie?mw(be,S,q):vs(p?be:F,S,p?q:Q);w[x]=se,z[x]=se-S}e.modifiersData[r]=z}}const W0={name:"preventOverflow",enabled:!0,phase:"main",fn:Fw,requiresIfExists:["offset"]};function Vw(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function $w(n){return n===Kt(n)||!Ht(n)?nd(n):Vw(n)}function zw(n){var e=n.getBoundingClientRect(),t=Vo(e.width)/n.offsetWidth||1,r=Vo(e.height)/n.offsetHeight||1;return t!==1||r!==1}function Uw(n,e,t){t===void 0&&(t=!1);var r=Ht(e),o=Ht(e)&&zw(e),s=wr(e),i=$o(n,o,t),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(r||!r&&!t)&&((Ln(e)!=="body"||od(s))&&(l=$w(e)),Ht(e)?(a=$o(e,!0),a.x+=e.clientLeft,a.y+=e.clientTop):s&&(a.x=rd(s))),{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function Hw(n){var e=new Map,t=new Set,r=[];n.forEach(function(s){e.set(s.name,s)});function o(s){t.add(s.name);var i=[].concat(s.requires||[],s.requiresIfExists||[]);i.forEach(function(l){if(!t.has(l)){var a=e.get(l);a&&o(a)}}),r.push(s)}return n.forEach(function(s){t.has(s.name)||o(s)}),r}function jw(n){var e=Hw(n);return Qi.reduce(function(t,r){return t.concat(e.filter(function(o){return o.phase===r}))},[])}function Ww(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function qn(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return[].concat(t).reduce(function(o,s){return o.replace(/%s/,s)},n)}var Nr='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',Kw='Popper: modifier "%s" requires "%s", but "%s" modifier is not available',ch=["name","enabled","phase","fn","effect","requires","options"];function Yw(n){n.forEach(function(e){[].concat(Object.keys(e),ch).filter(function(t,r,o){return o.indexOf(t)===r}).forEach(function(t){switch(t){case"name":typeof e.name!="string"&&console.error(qn(Nr,String(e.name),'"name"','"string"','"'+String(e.name)+'"'));break;case"enabled":typeof e.enabled!="boolean"&&console.error(qn(Nr,e.name,'"enabled"','"boolean"','"'+String(e.enabled)+'"'));break;case"phase":Qi.indexOf(e.phase)<0&&console.error(qn(Nr,e.name,'"phase"',"either "+Qi.join(", "),'"'+String(e.phase)+'"'));break;case"fn":typeof e.fn!="function"&&console.error(qn(Nr,e.name,'"fn"','"function"','"'+String(e.fn)+'"'));break;case"effect":e.effect!=null&&typeof e.effect!="function"&&console.error(qn(Nr,e.name,'"effect"','"function"','"'+String(e.fn)+'"'));break;case"requires":e.requires!=null&&!Array.isArray(e.requires)&&console.error(qn(Nr,e.name,'"requires"','"array"','"'+String(e.requires)+'"'));break;case"requiresIfExists":Array.isArray(e.requiresIfExists)||console.error(qn(Nr,e.name,'"requiresIfExists"','"array"','"'+String(e.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+e.name+'" modifier, valid properties are '+ch.map(function(r){return'"'+r+'"'}).join(", ")+'; but "'+t+'" was provided.')}e.requires&&e.requires.forEach(function(r){n.find(function(o){return o.name===r})==null&&console.error(qn(Kw,String(e.name),r,r))})})})}function Gw(n,e){var t=new Set;return n.filter(function(r){var o=e(r);if(!t.has(o))return t.add(o),!0})}function Qw(n){var e=n.reduce(function(t,r){var o=t[r.name];return t[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var uh="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",Zw="Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.",dh={placement:"bottom",modifiers:[],strategy:"absolute"};function fh(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function tl(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,r=t===void 0?[]:t,o=e.defaultOptions,s=o===void 0?dh:o;return function(l,a,u){u===void 0&&(u=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},dh,s),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},f=[],h=!1,p={state:d,setOptions:function(C){var b=typeof C=="function"?C(d.options):C;g(),d.options=Object.assign({},s,d.options,b),d.scrollParents={reference:no(l)?ys(l):l.contextElement?ys(l.contextElement):[],popper:ys(a)};var E=jw(Qw([].concat(r,d.options.modifiers)));if(d.orderedModifiers=E.filter(function(V){return V.enabled}),process.env.NODE_ENV!=="production"){var y=Gw([].concat(E,d.options.modifiers),function(V){var z=V.name;return z});if(Yw(y),fn(d.options.placement)===Ks){var x=d.orderedModifiers.find(function(V){var z=V.name;return z==="flip"});x||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "))}var w=mn(a),I=w.marginTop,M=w.marginRight,L=w.marginBottom,$=w.marginLeft;[I,M,L,$].some(function(V){return parseFloat(V)})&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return m(),p.update()},forceUpdate:function(){if(!h){var C=d.elements,b=C.reference,E=C.popper;if(!fh(b,E)){process.env.NODE_ENV!=="production"&&console.error(uh);return}d.rects={reference:Uw(b,Ys(E),d.options.strategy==="fixed"),popper:Xu(E)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(V){return d.modifiersData[V.name]=Object.assign({},V.data)});for(var y=0,x=0;x<d.orderedModifiers.length;x++){if(process.env.NODE_ENV!=="production"&&(y+=1,y>100)){console.error(Zw);break}if(d.reset===!0){d.reset=!1,x=-1;continue}var w=d.orderedModifiers[x],I=w.fn,M=w.options,L=M===void 0?{}:M,$=w.name;typeof I=="function"&&(d=I({state:d,options:L,name:$,instance:p})||d)}}},update:Ww(function(){return new Promise(function(v){p.forceUpdate(),v(d)})}),destroy:function(){g(),h=!0}};if(!fh(l,a))return process.env.NODE_ENV!=="production"&&console.error(uh),p;p.setOptions(u).then(function(v){!h&&u.onFirstUpdate&&u.onFirstUpdate(v)});function m(){d.orderedModifiers.forEach(function(v){var C=v.name,b=v.options,E=b===void 0?{}:b,y=v.effect;if(typeof y=="function"){var x=y({state:d,name:C,instance:p,options:E}),w=function(){};f.push(x||w)}})}function g(){f.forEach(function(v){return v()}),f=[]}return p}}var Jw=tl(),Xw=[td,sd,ed,qa],qw=tl({defaultModifiers:Xw}),eT=[td,sd,ed,qa,j0,U0,W0,V0,H0],nl=tl({defaultModifiers:eT});const K0=Object.freeze(Object.defineProperty({__proto__:null,afterMain:I0,afterRead:_0,afterWrite:L0,applyStyles:qa,arrow:V0,auto:Ks,basePlacements:Jo,beforeMain:x0,beforeRead:S0,beforeWrite:M0,bottom:jt,clippingParents:w0,computeStyles:ed,createPopper:nl,createPopperBase:Jw,createPopperLite:qw,detectOverflow:Uo,end:Fo,eventListeners:td,flip:U0,hide:H0,left:xt,main:N0,modifierPhases:Qi,offset:j0,placements:Zu,popper:Eo,popperGenerator:tl,popperOffsets:sd,preventOverflow:W0,read:k0,reference:T0,right:Wt,start:to,top:_t,variationPlacements:Rc,viewport:Qu,write:O0},Symbol.toStringTag,{value:"Module"}));var tT="tippy-box",Y0="tippy-content",nT="tippy-backdrop",G0="tippy-arrow",Q0="tippy-svg-arrow",Or={passive:!0,capture:!0},Z0=function(){return document.body};function rT(n,e){return{}.hasOwnProperty.call(n,e)}function Ul(n,e,t){if(Array.isArray(n)){var r=n[e];return r??(Array.isArray(t)?t[e]:t)}return n}function id(n,e){var t={}.toString.call(n);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function J0(n,e){return typeof n=="function"?n.apply(void 0,e):n}function hh(n,e){if(e===0)return n;var t;return function(r){clearTimeout(t),t=setTimeout(function(){n(r)},e)}}function oT(n,e){var t=Object.assign({},n);return e.forEach(function(r){delete t[r]}),t}function sT(n){return n.split(/\s+/).filter(Boolean)}function Co(n){return[].concat(n)}function ph(n,e){n.indexOf(e)===-1&&n.push(e)}function iT(n){return n.filter(function(e,t){return n.indexOf(e)===t})}function aT(n){return n.split("-")[0]}function Ji(n){return[].slice.call(n)}function mh(n){return Object.keys(n).reduce(function(e,t){return n[t]!==void 0&&(e[t]=n[t]),e},{})}function Es(){return document.createElement("div")}function Ls(n){return["Element","Fragment"].some(function(e){return id(n,e)})}function lT(n){return id(n,"NodeList")}function cT(n){return id(n,"MouseEvent")}function uT(n){return!!(n&&n._tippy&&n._tippy.reference===n)}function dT(n){return Ls(n)?[n]:lT(n)?Ji(n):Array.isArray(n)?n:Ji(document.querySelectorAll(n))}function Hl(n,e){n.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function gh(n,e){n.forEach(function(t){t&&t.setAttribute("data-state",e)})}function fT(n){var e,t=Co(n),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function hT(n,e){var t=e.clientX,r=e.clientY;return n.every(function(o){var s=o.popperRect,i=o.popperState,l=o.props,a=l.interactiveBorder,u=aT(i.placement),d=i.modifiersData.offset;if(!d)return!0;var f=u==="bottom"?d.top.y:0,h=u==="top"?d.bottom.y:0,p=u==="right"?d.left.x:0,m=u==="left"?d.right.x:0,g=s.top-r+f>a,v=r-s.bottom-h>a,C=s.left-t+p>a,b=t-s.right-m>a;return g||v||C||b})}function jl(n,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(o){n[r](o,t)})}function vh(n,e){for(var t=e;t;){var r;if(n.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var wn={isTouch:!1},yh=0;function pT(){wn.isTouch||(wn.isTouch=!0,window.performance&&document.addEventListener("mousemove",X0))}function X0(){var n=performance.now();n-yh<20&&(wn.isTouch=!1,document.removeEventListener("mousemove",X0)),yh=n}function mT(){var n=document.activeElement;if(uT(n)){var e=n._tippy;n.blur&&!e.state.isVisible&&n.blur()}}function gT(){document.addEventListener("touchstart",pT,Or),window.addEventListener("blur",mT)}var vT=typeof window<"u"&&typeof document<"u",yT=vT?!!window.msCrypto:!1;function ho(n){var e=n==="destroy"?"n already-":" ";return[n+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Eh(n){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return n.replace(e," ").replace(t,"").trim()}function ET(n){return Eh(`
154
154
  %ctippy.js
155
155
 
156
156
  %c`+Eh(n)+`
157
157
 
158
158
  %c👷‍ This is a development-only message. It will be removed in production.
159
- `)}function qm(n){return[ET(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ds;process.env.NODE_ENV!=="production"&&CT();function CT(){Ds=new Set}function zn(n,e){if(n&&!Ds.has(e)){var t;Ds.add(e),(t=console).warn.apply(t,qm(e))}}function Fc(n,e){if(n&&!Ds.has(e)){var t;Ds.add(e),(t=console).error.apply(t,qm(e))}}function AT(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;Fc(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Fc(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var e2={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},bT={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},zt=Object.assign({appendTo:Zm,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},e2,bT),wT=Object.keys(zt),TT=function(e){process.env.NODE_ENV!=="production"&&n2(e,[]);var t=Object.keys(e);t.forEach(function(r){zt[r]=e[r]})};function t2(n){var e=n.plugins||[],t=e.reduce(function(r,o){var s=o.name,i=o.defaultValue;if(s){var l;r[s]=n[s]!==void 0?n[s]:(l=zt[s])!=null?l:i}return r},{});return Object.assign({},n,t)}function ST(n,e){var t=e?Object.keys(t2(Object.assign({},zt,{plugins:e}))):wT,r=t.reduce(function(o,s){var i=(n.getAttribute("data-tippy-"+s)||"").trim();if(!i)return o;if(s==="content")o[s]=i;else try{o[s]=JSON.parse(i)}catch{o[s]=i}return o},{});return r}function Ch(n,e){var t=Object.assign({},e,{content:Jm(e.content,[n])},e.ignoreAttributes?{}:ST(n,e.plugins));return t.aria=Object.assign({},zt.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function n2(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var o=oT(zt,Object.keys(e2)),s=!rT(o,r);s&&(s=e.filter(function(i){return i.name===r}).length===0),zn(s,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
159
+ `)}function q0(n){return[ET(n),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ds;process.env.NODE_ENV!=="production"&&CT();function CT(){Ds=new Set}function zn(n,e){if(n&&!Ds.has(e)){var t;Ds.add(e),(t=console).warn.apply(t,q0(e))}}function Fc(n,e){if(n&&!Ds.has(e)){var t;Ds.add(e),(t=console).error.apply(t,q0(e))}}function AT(n){var e=!n,t=Object.prototype.toString.call(n)==="[object Object]"&&!n.addEventListener;Fc(e,["tippy() was passed","`"+String(n)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Fc(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var e2={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},bT={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},zt=Object.assign({appendTo:Z0,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},e2,bT),wT=Object.keys(zt),TT=function(e){process.env.NODE_ENV!=="production"&&n2(e,[]);var t=Object.keys(e);t.forEach(function(r){zt[r]=e[r]})};function t2(n){var e=n.plugins||[],t=e.reduce(function(r,o){var s=o.name,i=o.defaultValue;if(s){var l;r[s]=n[s]!==void 0?n[s]:(l=zt[s])!=null?l:i}return r},{});return Object.assign({},n,t)}function ST(n,e){var t=e?Object.keys(t2(Object.assign({},zt,{plugins:e}))):wT,r=t.reduce(function(o,s){var i=(n.getAttribute("data-tippy-"+s)||"").trim();if(!i)return o;if(s==="content")o[s]=i;else try{o[s]=JSON.parse(i)}catch{o[s]=i}return o},{});return r}function Ch(n,e){var t=Object.assign({},e,{content:J0(e.content,[n])},e.ignoreAttributes?{}:ST(n,e.plugins));return t.aria=Object.assign({},zt.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function n2(n,e){n===void 0&&(n={}),e===void 0&&(e=[]);var t=Object.keys(n);t.forEach(function(r){var o=oT(zt,Object.keys(e2)),s=!rT(o,r);s&&(s=e.filter(function(i){return i.name===r}).length===0),zn(s,["`"+r+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
160
160
 
161
161
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
162
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var kT=function(){return"innerHTML"};function Vc(n,e){n[kT()]=e}function Ah(n){var e=Es();return n===!0?e.className=Gm:(e.className=Qm,Ls(n)?e.appendChild(n):Vc(e,n)),e}function bh(n,e){Ls(e.content)?(Vc(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Vc(n,e.content):n.textContent=e.content)}function $c(n){var e=n.firstElementChild,t=Ji(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Ym)}),arrow:t.find(function(r){return r.classList.contains(Gm)||r.classList.contains(Qm)}),backdrop:t.find(function(r){return r.classList.contains(nT)})}}function r2(n){var e=Es(),t=Es();t.className=tT,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Es();r.className=Ym,r.setAttribute("data-state","hidden"),bh(r,n.props),e.appendChild(t),t.appendChild(r),o(n.props,n.props);function o(s,i){var l=$c(e),a=l.box,u=l.content,d=l.arrow;i.theme?a.setAttribute("data-theme",i.theme):a.removeAttribute("data-theme"),typeof i.animation=="string"?a.setAttribute("data-animation",i.animation):a.removeAttribute("data-animation"),i.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?a.setAttribute("role",i.role):a.removeAttribute("role"),(s.content!==i.content||s.allowHTML!==i.allowHTML)&&bh(u,n.props),i.arrow?d?s.arrow!==i.arrow&&(a.removeChild(d),a.appendChild(Ah(i.arrow))):a.appendChild(Ah(i.arrow)):d&&a.removeChild(d)}return{popper:e,onUpdate:o}}r2.$$tippy=!0;var _T=1,li=[],Wl=[];function xT(n,e){var t=Ch(n,Object.assign({},zt,t2(mh(e)))),r,o,s,i=!1,l=!1,a=!1,u=!1,d,f,h,p=[],m=hh(_,t.interactiveDebounce),g,v=_T++,C=null,b=iT(t.plugins),E={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:n,popper:Es(),popperInstance:C,props:t,state:E,plugins:b,clearDelayTimeouts:be,setProps:q,setContent:se,show:Ae,hide:Be,hideWithInteractivity:Ze,enable:ie,disable:he,unmount:tt,destroy:Ct};if(!t.render)return process.env.NODE_ENV!=="production"&&Fc(!0,"render() function has not been supplied."),y;var x=t.render(y),w=x.popper,I=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,n._tippy=y,w._tippy=y;var M=b.map(function(te){return te.fn(y)}),L=n.hasAttribute("aria-expanded");return R(),ne(),J(),U("onCreate",[y]),t.showOnCreate&&F(),w.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",m)}),y;function $(){var te=y.props.touch;return Array.isArray(te)?te:[te,0]}function V(){return $()[0]==="hold"}function z(){var te;return!!((te=y.props.render)!=null&&te.$$tippy)}function G(){return g||n}function Y(){var te=G().parentNode;return te?fT(te):document}function K(){return $c(w)}function W(te){return y.state.isMounted&&!y.state.isVisible||wn.isTouch||d&&d.type==="focus"?0:Ul(y.props.delay,te?0:1,zt.delay)}function J(te){te===void 0&&(te=!1),w.style.pointerEvents=y.props.interactive&&!te?"":"none",w.style.zIndex=""+y.props.zIndex}function U(te,ge,pe){if(pe===void 0&&(pe=!0),M.forEach(function(De){De[te]&&De[te].apply(De,ge)}),pe){var Me;(Me=y.props)[te].apply(Me,ge)}}function ee(){var te=y.props.aria;if(te.content){var ge="aria-"+te.content,pe=w.id,Me=Co(y.props.triggerTarget||n);Me.forEach(function(De){var Je=De.getAttribute(ge);if(y.state.isVisible)De.setAttribute(ge,Je?Je+" "+pe:pe);else{var nt=Je&&Je.replace(pe,"").trim();nt?De.setAttribute(ge,nt):De.removeAttribute(ge)}})}}function ne(){if(!(L||!y.props.aria.expanded)){var te=Co(y.props.triggerTarget||n);te.forEach(function(ge){y.props.interactive?ge.setAttribute("aria-expanded",y.state.isVisible&&ge===G()?"true":"false"):ge.removeAttribute("aria-expanded")})}}function ce(){Y().removeEventListener("mousemove",m),li=li.filter(function(te){return te!==m})}function me(te){if(!(wn.isTouch&&(a||te.type==="mousedown"))){var ge=te.composedPath&&te.composedPath()[0]||te.target;if(!(y.props.interactive&&vh(w,ge))){if(Co(y.props.triggerTarget||n).some(function(pe){return vh(pe,ge)})){if(wn.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[y,te]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),l=!0,setTimeout(function(){l=!1}),y.state.isMounted||Ne())}}}function ve(){a=!0}function Te(){a=!1}function ke(){var te=Y();te.addEventListener("mousedown",me,!0),te.addEventListener("touchend",me,Or),te.addEventListener("touchstart",Te,Or),te.addEventListener("touchmove",ve,Or)}function Ne(){var te=Y();te.removeEventListener("mousedown",me,!0),te.removeEventListener("touchend",me,Or),te.removeEventListener("touchstart",Te,Or),te.removeEventListener("touchmove",ve,Or)}function Ce(te,ge){B(te,function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&ge()})}function D(te,ge){B(te,ge)}function B(te,ge){var pe=K().box;function Me(De){De.target===pe&&(jl(pe,"remove",Me),ge())}if(te===0)return ge();jl(pe,"remove",f),jl(pe,"add",Me),f=Me}function N(te,ge,pe){pe===void 0&&(pe=!1);var Me=Co(y.props.triggerTarget||n);Me.forEach(function(De){De.addEventListener(te,ge,pe),p.push({node:De,eventType:te,handler:ge,options:pe})})}function R(){V()&&(N("touchstart",T,{passive:!0}),N("touchend",O,{passive:!0})),sT(y.props.trigger).forEach(function(te){if(te!=="manual")switch(N(te,T),te){case"mouseenter":N("mouseleave",O);break;case"focus":N(yT?"focusout":"blur",H);break;case"focusin":N("focusout",H);break}})}function A(){p.forEach(function(te){var ge=te.node,pe=te.eventType,Me=te.handler,De=te.options;ge.removeEventListener(pe,Me,De)}),p=[]}function T(te){var ge,pe=!1;if(!(!y.state.isEnabled||j(te)||l)){var Me=((ge=d)==null?void 0:ge.type)==="focus";d=te,g=te.currentTarget,ne(),!y.state.isVisible&&cT(te)&&li.forEach(function(De){return De(te)}),te.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||i)&&y.props.hideOnClick!==!1&&y.state.isVisible?pe=!0:F(te),te.type==="click"&&(i=!pe),pe&&!Me&&Q(te)}}function _(te){var ge=te.target,pe=G().contains(ge)||w.contains(ge);if(!(te.type==="mousemove"&&pe)){var Me=k().concat(w).map(function(De){var Je,nt=De._tippy,At=(Je=nt.popperInstance)==null?void 0:Je.state;return At?{popperRect:De.getBoundingClientRect(),popperState:At,props:t}:null}).filter(Boolean);hT(Me,te)&&(ce(),Q(te))}}function O(te){var ge=j(te)||y.props.trigger.indexOf("click")>=0&&i;if(!ge){if(y.props.interactive){y.hideWithInteractivity(te);return}Q(te)}}function H(te){y.props.trigger.indexOf("focusin")<0&&te.target!==G()||y.props.interactive&&te.relatedTarget&&w.contains(te.relatedTarget)||Q(te)}function j(te){return wn.isTouch?V()!==te.type.indexOf("touch")>=0:!1}function Z(){X();var te=y.props,ge=te.popperOptions,pe=te.placement,Me=te.offset,De=te.getReferenceClientRect,Je=te.moveTransition,nt=z()?$c(w).arrow:null,At=De?{getBoundingClientRect:De,contextElement:De.contextElement||G()}:n,bt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var Vt=Xn.state;if(z()){var Yt=K(),co=Yt.box;["placement","reference-hidden","escaped"].forEach(function(Gt){Gt==="placement"?co.setAttribute("data-placement",Vt.placement):Vt.attributes.popper["data-popper-"+Gt]?co.setAttribute("data-"+Gt,""):co.removeAttribute("data-"+Gt)}),Vt.attributes.popper={}}}},ft=[{name:"offset",options:{offset:Me}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Je}},bt];z()&&nt&&ft.push({name:"arrow",options:{element:nt,padding:3}}),ft.push.apply(ft,(ge==null?void 0:ge.modifiers)||[]),y.popperInstance=nl(At,w,Object.assign({},ge,{placement:pe,onFirstUpdate:h,modifiers:ft}))}function X(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function S(){var te=y.props.appendTo,ge,pe=G();y.props.interactive&&te===Zm||te==="parent"?ge=pe.parentNode:ge=Jm(te,[pe]),ge.contains(w)||ge.appendChild(w),y.state.isMounted=!0,Z(),process.env.NODE_ENV!=="production"&&zn(y.props.interactive&&te===zt.appendTo&&pe.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
162
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var kT=function(){return"innerHTML"};function Vc(n,e){n[kT()]=e}function Ah(n){var e=Es();return n===!0?e.className=G0:(e.className=Q0,Ls(n)?e.appendChild(n):Vc(e,n)),e}function bh(n,e){Ls(e.content)?(Vc(n,""),n.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Vc(n,e.content):n.textContent=e.content)}function $c(n){var e=n.firstElementChild,t=Ji(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Y0)}),arrow:t.find(function(r){return r.classList.contains(G0)||r.classList.contains(Q0)}),backdrop:t.find(function(r){return r.classList.contains(nT)})}}function r2(n){var e=Es(),t=Es();t.className=tT,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=Es();r.className=Y0,r.setAttribute("data-state","hidden"),bh(r,n.props),e.appendChild(t),t.appendChild(r),o(n.props,n.props);function o(s,i){var l=$c(e),a=l.box,u=l.content,d=l.arrow;i.theme?a.setAttribute("data-theme",i.theme):a.removeAttribute("data-theme"),typeof i.animation=="string"?a.setAttribute("data-animation",i.animation):a.removeAttribute("data-animation"),i.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth=typeof i.maxWidth=="number"?i.maxWidth+"px":i.maxWidth,i.role?a.setAttribute("role",i.role):a.removeAttribute("role"),(s.content!==i.content||s.allowHTML!==i.allowHTML)&&bh(u,n.props),i.arrow?d?s.arrow!==i.arrow&&(a.removeChild(d),a.appendChild(Ah(i.arrow))):a.appendChild(Ah(i.arrow)):d&&a.removeChild(d)}return{popper:e,onUpdate:o}}r2.$$tippy=!0;var _T=1,li=[],Wl=[];function xT(n,e){var t=Ch(n,Object.assign({},zt,t2(mh(e)))),r,o,s,i=!1,l=!1,a=!1,u=!1,d,f,h,p=[],m=hh(_,t.interactiveDebounce),g,v=_T++,C=null,b=iT(t.plugins),E={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:v,reference:n,popper:Es(),popperInstance:C,props:t,state:E,plugins:b,clearDelayTimeouts:be,setProps:q,setContent:se,show:Ae,hide:Be,hideWithInteractivity:Ze,enable:ie,disable:he,unmount:tt,destroy:Ct};if(!t.render)return process.env.NODE_ENV!=="production"&&Fc(!0,"render() function has not been supplied."),y;var x=t.render(y),w=x.popper,I=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,n._tippy=y,w._tippy=y;var M=b.map(function(te){return te.fn(y)}),L=n.hasAttribute("aria-expanded");return R(),ne(),J(),U("onCreate",[y]),t.showOnCreate&&F(),w.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&Y().addEventListener("mousemove",m)}),y;function $(){var te=y.props.touch;return Array.isArray(te)?te:[te,0]}function V(){return $()[0]==="hold"}function z(){var te;return!!((te=y.props.render)!=null&&te.$$tippy)}function G(){return g||n}function Y(){var te=G().parentNode;return te?fT(te):document}function K(){return $c(w)}function W(te){return y.state.isMounted&&!y.state.isVisible||wn.isTouch||d&&d.type==="focus"?0:Ul(y.props.delay,te?0:1,zt.delay)}function J(te){te===void 0&&(te=!1),w.style.pointerEvents=y.props.interactive&&!te?"":"none",w.style.zIndex=""+y.props.zIndex}function U(te,ge,pe){if(pe===void 0&&(pe=!0),M.forEach(function(De){De[te]&&De[te].apply(De,ge)}),pe){var Me;(Me=y.props)[te].apply(Me,ge)}}function ee(){var te=y.props.aria;if(te.content){var ge="aria-"+te.content,pe=w.id,Me=Co(y.props.triggerTarget||n);Me.forEach(function(De){var Je=De.getAttribute(ge);if(y.state.isVisible)De.setAttribute(ge,Je?Je+" "+pe:pe);else{var nt=Je&&Je.replace(pe,"").trim();nt?De.setAttribute(ge,nt):De.removeAttribute(ge)}})}}function ne(){if(!(L||!y.props.aria.expanded)){var te=Co(y.props.triggerTarget||n);te.forEach(function(ge){y.props.interactive?ge.setAttribute("aria-expanded",y.state.isVisible&&ge===G()?"true":"false"):ge.removeAttribute("aria-expanded")})}}function ce(){Y().removeEventListener("mousemove",m),li=li.filter(function(te){return te!==m})}function me(te){if(!(wn.isTouch&&(a||te.type==="mousedown"))){var ge=te.composedPath&&te.composedPath()[0]||te.target;if(!(y.props.interactive&&vh(w,ge))){if(Co(y.props.triggerTarget||n).some(function(pe){return vh(pe,ge)})){if(wn.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else U("onClickOutside",[y,te]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),l=!0,setTimeout(function(){l=!1}),y.state.isMounted||Ne())}}}function ve(){a=!0}function Te(){a=!1}function ke(){var te=Y();te.addEventListener("mousedown",me,!0),te.addEventListener("touchend",me,Or),te.addEventListener("touchstart",Te,Or),te.addEventListener("touchmove",ve,Or)}function Ne(){var te=Y();te.removeEventListener("mousedown",me,!0),te.removeEventListener("touchend",me,Or),te.removeEventListener("touchstart",Te,Or),te.removeEventListener("touchmove",ve,Or)}function Ce(te,ge){B(te,function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&ge()})}function D(te,ge){B(te,ge)}function B(te,ge){var pe=K().box;function Me(De){De.target===pe&&(jl(pe,"remove",Me),ge())}if(te===0)return ge();jl(pe,"remove",f),jl(pe,"add",Me),f=Me}function N(te,ge,pe){pe===void 0&&(pe=!1);var Me=Co(y.props.triggerTarget||n);Me.forEach(function(De){De.addEventListener(te,ge,pe),p.push({node:De,eventType:te,handler:ge,options:pe})})}function R(){V()&&(N("touchstart",T,{passive:!0}),N("touchend",O,{passive:!0})),sT(y.props.trigger).forEach(function(te){if(te!=="manual")switch(N(te,T),te){case"mouseenter":N("mouseleave",O);break;case"focus":N(yT?"focusout":"blur",H);break;case"focusin":N("focusout",H);break}})}function A(){p.forEach(function(te){var ge=te.node,pe=te.eventType,Me=te.handler,De=te.options;ge.removeEventListener(pe,Me,De)}),p=[]}function T(te){var ge,pe=!1;if(!(!y.state.isEnabled||j(te)||l)){var Me=((ge=d)==null?void 0:ge.type)==="focus";d=te,g=te.currentTarget,ne(),!y.state.isVisible&&cT(te)&&li.forEach(function(De){return De(te)}),te.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||i)&&y.props.hideOnClick!==!1&&y.state.isVisible?pe=!0:F(te),te.type==="click"&&(i=!pe),pe&&!Me&&Q(te)}}function _(te){var ge=te.target,pe=G().contains(ge)||w.contains(ge);if(!(te.type==="mousemove"&&pe)){var Me=k().concat(w).map(function(De){var Je,nt=De._tippy,At=(Je=nt.popperInstance)==null?void 0:Je.state;return At?{popperRect:De.getBoundingClientRect(),popperState:At,props:t}:null}).filter(Boolean);hT(Me,te)&&(ce(),Q(te))}}function O(te){var ge=j(te)||y.props.trigger.indexOf("click")>=0&&i;if(!ge){if(y.props.interactive){y.hideWithInteractivity(te);return}Q(te)}}function H(te){y.props.trigger.indexOf("focusin")<0&&te.target!==G()||y.props.interactive&&te.relatedTarget&&w.contains(te.relatedTarget)||Q(te)}function j(te){return wn.isTouch?V()!==te.type.indexOf("touch")>=0:!1}function Z(){X();var te=y.props,ge=te.popperOptions,pe=te.placement,Me=te.offset,De=te.getReferenceClientRect,Je=te.moveTransition,nt=z()?$c(w).arrow:null,At=De?{getBoundingClientRect:De,contextElement:De.contextElement||G()}:n,bt={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Xn){var Vt=Xn.state;if(z()){var Yt=K(),co=Yt.box;["placement","reference-hidden","escaped"].forEach(function(Gt){Gt==="placement"?co.setAttribute("data-placement",Vt.placement):Vt.attributes.popper["data-popper-"+Gt]?co.setAttribute("data-"+Gt,""):co.removeAttribute("data-"+Gt)}),Vt.attributes.popper={}}}},ft=[{name:"offset",options:{offset:Me}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!Je}},bt];z()&&nt&&ft.push({name:"arrow",options:{element:nt,padding:3}}),ft.push.apply(ft,(ge==null?void 0:ge.modifiers)||[]),y.popperInstance=nl(At,w,Object.assign({},ge,{placement:pe,onFirstUpdate:h,modifiers:ft}))}function X(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function S(){var te=y.props.appendTo,ge,pe=G();y.props.interactive&&te===Z0||te==="parent"?ge=pe.parentNode:ge=J0(te,[pe]),ge.contains(w)||ge.appendChild(w),y.state.isMounted=!0,Z(),process.env.NODE_ENV!=="production"&&zn(y.props.interactive&&te===zt.appendTo&&pe.nextElementSibling!==w,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
163
163
 
164
164
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
165
165
 
@@ -170,38 +170,38 @@ img.ProseMirror-separator {
170
170
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
171
171
 
172
172
  `,`1) content: element.innerHTML
173
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce(function(a,u){var d=u&&xT(u,r);return d&&a.push(d),a},[]);return Ls(n)?l[0]:l}Xo.defaultProps=zt;Xo.setDefaultProps=TT;Xo.currentInput=wn;Object.assign({},qa,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});Xo.setDefaultProps({render:r2});class NT{constructor({editor:e,element:t,view:r,tippyOptions:o={},updateDelay:s=250,shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:u,to:d})=>{const{doc:f,selection:h}=a,{empty:p}=h,m=!f.textBetween(u,d).length&&Wu(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||p||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const u=!(a!=null&&a.selection.eq(l.state.selection)),d=!(a!=null&&a.doc.eq(l.state.doc));!u&&!d||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,u,d,a)},this.updateDelay))},this.updateHandler=(l,a,u,d)=>{var f,h,p;const{state:m,composing:g}=l,{selection:v}=m;if(g||!a&&!u)return;this.createTooltip();const{ranges:b}=v,E=Math.min(...b.map(w=>w.$from.pos)),y=Math.max(...b.map(w=>w.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:l,state:m,oldState:d,from:E,to:y}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(Rb(m.selection)){let w=l.nodeDOM(E);const I=w.dataset.nodeViewWrapper?w:w.querySelector("[data-node-view-wrapper]");if(I&&(w=I.firstChild),w)return w.getBoundingClientRect()}return bm(l,E,y)})}),this.show()},this.editor=e,this.element=t,this.view=r,this.updateDelay=s,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Xo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:r}=e,o=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&o){this.handleDebouncedUpdate(e,t);return}const s=!(t!=null&&t.selection.eq(e.state.selection)),i=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,s,i,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const o2=n=>new Ft({key:typeof n.pluginKey=="string"?new gn(n.pluginKey):n.pluginKey,view:e=>new NT({view:e,...n})});rn.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[o2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class IT{constructor({editor:e,element:t,view:r,tippyOptions:o={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:i,state:l})=>{const{selection:a}=l,{$anchor:u,empty:d}=a,f=u.depth===1,h=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent;return!(!i.hasFocus()||!d||!f||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:i})=>{var l;if(this.preventHide){this.preventHide=!1;return}i!=null&&i.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(i.relatedTarget))||this.hide()},this.tippyBlurHandler=i=>{this.blurHandler({event:i})},this.editor=e,this.element=t,this.view=r,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Xo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var r,o,s;const{state:i}=e,{doc:l,selection:a}=i,{from:u,to:d}=a;if(t&&t.doc.eq(l)&&t.selection.eq(a))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:i,oldState:t}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>bm(e,u,d))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const s2=n=>new Ft({key:typeof n.pluginKey=="string"?new gn(n.pluginKey):n.pluginKey,view:e=>new IT({view:e,...n})});rn.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[s2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});c.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=c.ref(null);return c.onMounted(()=>{const{updateDelay:r,editor:o,pluginKey:s,shouldShow:i,tippyOptions:l}=n;o.registerPlugin(o2({updateDelay:r,editor:o,element:t.value,pluginKey:s,shouldShow:i,tippyOptions:l}))}),c.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return c.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function wh(n){return c.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class MT extends uw{constructor(e={}){return super(e),this.vueRenderers=c.reactive(new Map),this.contentComponent=null,this.reactiveState=wh(this.view.state),this.reactiveExtensionStorage=wh(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),c.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const OT=c.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=c.ref(),t=c.getCurrentInstance();return c.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&c.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const o=c.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),c.onBeforeUnmount(()=>{const r=n.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:e}},render(){const n=[];return this.editor&&this.editor.vueRenderers.forEach(e=>{const t=c.h(c.Teleport,{to:e.teleportElement,key:e.id},c.h(e.component,{ref:e.id,...e.props}));n.push(t)}),c.h("div",{ref:e=>{this.rootEl=e}},...n)}});c.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=c.ref(null);return c.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:s,shouldShow:i}=n;o.registerPlugin(s2({pluginKey:r,editor:o,element:t.value,tippyOptions:s,shouldShow:i}))}),c.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return c.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});c.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return c.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});c.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return c.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(n=this.$slots).default)===null||e===void 0?void 0:e.call(n))}});const LT=(n={})=>{const e=c.shallowRef();return c.onMounted(()=>{e.value=new MT(n)}),c.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},DT=Gn.create({name:"doc",topNode:!0,content:"block+"}),RT=Gn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),BT=Gn.create({name:"text",group:"inline"}),PT="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",FT="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Ho=(n,e)=>{for(const t in e)n[t]=e[t];return n},zc="numeric",Uc="ascii",Hc="alpha",Ti="asciinumeric",ci="alphanumeric",jc="domain",i2="emoji",VT="scheme",$T="slashscheme",Th="whitespace";function zT(n,e){return n in e||(e[n]=[]),e[n]}function Vr(n,e,t){e[zc]&&(e[Ti]=!0,e[ci]=!0),e[Uc]&&(e[Ti]=!0,e[Hc]=!0),e[Ti]&&(e[ci]=!0),e[Hc]&&(e[ci]=!0),e[ci]&&(e[jc]=!0),e[i2]&&(e[jc]=!0);for(const r in e){const o=zT(r,t);o.indexOf(n)<0&&o.push(n)}}function UT(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function Rt(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}Rt.groups={};Rt.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(n))return s}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||Rt.groups;let o;return e&&e.j?o=e:(o=new Rt(e),t&&r&&Vr(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const s=n.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(n[i]);return o.tt(n[s-1],e,t,r)},tt(n,e,t,r){r=r||Rt.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const s=e;let i,l=o.go(n);if(l?(i=new Rt,Ho(i.j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new Rt,s){if(r)if(i.t&&typeof i.t=="string"){const a=Ho(UT(i.t,r),t);Vr(s,a,r)}else t&&Vr(s,t,r);i.t=s}return o.j[n]=i,i}};const Pe=(n,e,t,r,o)=>n.ta(e,t,r,o),Jt=(n,e,t,r,o)=>n.tr(e,t,r,o),Sh=(n,e,t,r,o)=>n.ts(e,t,r,o),ye=(n,e,t,r,o)=>n.tt(e,t,r,o),Vn="WORD",Wc="UWORD",Rs="LOCALHOST",Kc="TLD",Yc="UTLD",Si="SCHEME",Ao="SLASH_SCHEME",ad="NUM",a2="WS",ld="NL",Cs="OPENBRACE",As="CLOSEBRACE",Xi="OPENBRACKET",qi="CLOSEBRACKET",ea="OPENPAREN",ta="CLOSEPAREN",na="OPENANGLEBRACKET",ra="CLOSEANGLEBRACKET",oa="FULLWIDTHLEFTPAREN",sa="FULLWIDTHRIGHTPAREN",ia="LEFTCORNERBRACKET",aa="RIGHTCORNERBRACKET",la="LEFTWHITECORNERBRACKET",ca="RIGHTWHITECORNERBRACKET",ua="FULLWIDTHLESSTHAN",da="FULLWIDTHGREATERTHAN",fa="AMPERSAND",ha="APOSTROPHE",pa="ASTERISK",sr="AT",ma="BACKSLASH",ga="BACKTICK",va="CARET",ar="COLON",cd="COMMA",ya="DOLLAR",Cn="DOT",Ea="EQUALS",ud="EXCLAMATION",An="HYPHEN",Ca="PERCENT",Aa="PIPE",ba="PLUS",wa="POUND",Ta="QUERY",dd="QUOTE",fd="SEMI",bn="SLASH",bs="TILDE",Sa="UNDERSCORE",l2="EMOJI",ka="SYM";var c2=Object.freeze({__proto__:null,WORD:Vn,UWORD:Wc,LOCALHOST:Rs,TLD:Kc,UTLD:Yc,SCHEME:Si,SLASH_SCHEME:Ao,NUM:ad,WS:a2,NL:ld,OPENBRACE:Cs,CLOSEBRACE:As,OPENBRACKET:Xi,CLOSEBRACKET:qi,OPENPAREN:ea,CLOSEPAREN:ta,OPENANGLEBRACKET:na,CLOSEANGLEBRACKET:ra,FULLWIDTHLEFTPAREN:oa,FULLWIDTHRIGHTPAREN:sa,LEFTCORNERBRACKET:ia,RIGHTCORNERBRACKET:aa,LEFTWHITECORNERBRACKET:la,RIGHTWHITECORNERBRACKET:ca,FULLWIDTHLESSTHAN:ua,FULLWIDTHGREATERTHAN:da,AMPERSAND:fa,APOSTROPHE:ha,ASTERISK:pa,AT:sr,BACKSLASH:ma,BACKTICK:ga,CARET:va,COLON:ar,COMMA:cd,DOLLAR:ya,DOT:Cn,EQUALS:Ea,EXCLAMATION:ud,HYPHEN:An,PERCENT:Ca,PIPE:Aa,PLUS:ba,POUND:wa,QUERY:Ta,QUOTE:dd,SEMI:fd,SLASH:bn,TILDE:bs,UNDERSCORE:Sa,EMOJI:l2,SYM:ka});const po=/[a-z]/,Kl=/\p{L}/u,Yl=/\p{Emoji}/u,Gl=/\d/,kh=/\s/,_h=`
173
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=o.reduce(function(a,u){var d=u&&xT(u,r);return d&&a.push(d),a},[]);return Ls(n)?l[0]:l}Xo.defaultProps=zt;Xo.setDefaultProps=TT;Xo.currentInput=wn;Object.assign({},qa,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}});Xo.setDefaultProps({render:r2});class NT{constructor({editor:e,element:t,view:r,tippyOptions:o={},updateDelay:s=250,shouldShow:i}){this.preventHide=!1,this.shouldShow=({view:l,state:a,from:u,to:d})=>{const{doc:f,selection:h}=a,{empty:p}=h,m=!f.textBetween(u,d).length&&Wu(a.selection),g=this.element.contains(document.activeElement);return!(!(l.hasFocus()||g)||p||m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var a;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(l.relatedTarget))||this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,a)=>{const u=!(a!=null&&a.selection.eq(l.state.selection)),d=!(a!=null&&a.doc.eq(l.state.doc));!u&&!d||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,u,d,a)},this.updateDelay))},this.updateHandler=(l,a,u,d)=>{var f,h,p;const{state:m,composing:g}=l,{selection:v}=m;if(g||!a&&!u)return;this.createTooltip();const{ranges:b}=v,E=Math.min(...b.map(w=>w.$from.pos)),y=Math.max(...b.map(w=>w.$to.pos));if(!((f=this.shouldShow)===null||f===void 0?void 0:f.call(this,{editor:this.editor,view:l,state:m,oldState:d,from:E,to:y}))){this.hide();return}(h=this.tippy)===null||h===void 0||h.setProps({getReferenceClientRect:((p=this.tippyOptions)===null||p===void 0?void 0:p.getReferenceClientRect)||(()=>{if(Rb(m.selection)){let w=l.nodeDOM(E);const I=w.dataset.nodeViewWrapper?w:w.querySelector("[data-node-view-wrapper]");if(I&&(w=I.firstChild),w)return w.getBoundingClientRect()}return b0(l,E,y)})}),this.show()},this.editor=e,this.element=t,this.view=r,this.updateDelay=s,i&&(this.shouldShow=i),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Xo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:r}=e,o=r.selection.$from.pos!==r.selection.$to.pos;if(this.updateDelay>0&&o){this.handleDebouncedUpdate(e,t);return}const s=!(t!=null&&t.selection.eq(e.state.selection)),i=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,s,i,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const o2=n=>new Ft({key:typeof n.pluginKey=="string"?new gn(n.pluginKey):n.pluginKey,view:e=>new NT({view:e,...n})});rn.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[o2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class IT{constructor({editor:e,element:t,view:r,tippyOptions:o={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:i,state:l})=>{const{selection:a}=l,{$anchor:u,empty:d}=a,f=u.depth===1,h=u.parent.isTextblock&&!u.parent.type.spec.code&&!u.parent.textContent;return!(!i.hasFocus()||!d||!f||!h||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:i})=>{var l;if(this.preventHide){this.preventHide=!1;return}i!=null&&i.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(i.relatedTarget))||this.hide()},this.tippyBlurHandler=i=>{this.blurHandler({event:i})},this.editor=e,this.element=t,this.view=r,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=o,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.tippy||!t||(this.tippy=Xo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var r,o,s;const{state:i}=e,{doc:l,selection:a}=i,{from:u,to:d}=a;if(t&&t.doc.eq(l)&&t.selection.eq(a))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:i,oldState:t}))){this.hide();return}(o=this.tippy)===null||o===void 0||o.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>b0(e,u,d))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const s2=n=>new Ft({key:typeof n.pluginKey=="string"?new gn(n.pluginKey):n.pluginKey,view:e=>new IT({view:e,...n})});rn.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[s2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});c.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=c.ref(null);return c.onMounted(()=>{const{updateDelay:r,editor:o,pluginKey:s,shouldShow:i,tippyOptions:l}=n;o.registerPlugin(o2({updateDelay:r,editor:o,element:t.value,pluginKey:s,shouldShow:i,tippyOptions:l}))}),c.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return c.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function wh(n){return c.customRef((e,t)=>({get(){return e(),n},set(r){n=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class MT extends uw{constructor(e={}){return super(e),this.vueRenderers=c.reactive(new Map),this.contentComponent=null,this.reactiveState=wh(this.view.state),this.reactiveExtensionStorage=wh(this.extensionStorage),this.on("transaction",()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage}),c.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const OT=c.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(n){const e=c.ref(),t=c.getCurrentInstance();return c.watchEffect(()=>{const r=n.editor;r&&r.options.element&&e.value&&c.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const o=c.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=t.ctx._,r.setOptions({element:o}),r.createNodeViews()})}),c.onBeforeUnmount(()=>{const r=n.editor;if(!r||(r.isDestroyed||r.view.setProps({nodeViews:{}}),r.contentComponent=null,!r.options.element.firstChild))return;const o=document.createElement("div");o.append(...r.options.element.childNodes),r.setOptions({element:o})}),{rootEl:e}},render(){const n=[];return this.editor&&this.editor.vueRenderers.forEach(e=>{const t=c.h(c.Teleport,{to:e.teleportElement,key:e.id},c.h(e.component,{ref:e.id,...e.props}));n.push(t)}),c.h("div",{ref:e=>{this.rootEl=e}},...n)}});c.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(n,{slots:e}){const t=c.ref(null);return c.onMounted(()=>{const{pluginKey:r,editor:o,tippyOptions:s,shouldShow:i}=n;o.registerPlugin(s2({pluginKey:r,editor:o,element:t.value,tippyOptions:s,shouldShow:i}))}),c.onBeforeUnmount(()=>{const{pluginKey:r,editor:o}=n;o.unregisterPlugin(r)}),()=>{var r;return c.h("div",{ref:t},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});c.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return c.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});c.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var n,e;return c.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(n=this.$slots).default)===null||e===void 0?void 0:e.call(n))}});const LT=(n={})=>{const e=c.shallowRef();return c.onMounted(()=>{e.value=new MT(n)}),c.onBeforeUnmount(()=>{var t;(t=e.value)===null||t===void 0||t.destroy()}),e},DT=Gn.create({name:"doc",topNode:!0,content:"block+"}),RT=Gn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),BT=Gn.create({name:"text",group:"inline"}),PT="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",FT="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Ho=(n,e)=>{for(const t in e)n[t]=e[t];return n},zc="numeric",Uc="ascii",Hc="alpha",Ti="asciinumeric",ci="alphanumeric",jc="domain",i2="emoji",VT="scheme",$T="slashscheme",Th="whitespace";function zT(n,e){return n in e||(e[n]=[]),e[n]}function Vr(n,e,t){e[zc]&&(e[Ti]=!0,e[ci]=!0),e[Uc]&&(e[Ti]=!0,e[Hc]=!0),e[Ti]&&(e[ci]=!0),e[Hc]&&(e[ci]=!0),e[ci]&&(e[jc]=!0),e[i2]&&(e[jc]=!0);for(const r in e){const o=zT(r,t);o.indexOf(n)<0&&o.push(n)}}function UT(n,e){const t={};for(const r in e)e[r].indexOf(n)>=0&&(t[r]=!0);return t}function Rt(n){n===void 0&&(n=null),this.j={},this.jr=[],this.jd=null,this.t=n}Rt.groups={};Rt.prototype={accepts(){return!!this.t},go(n){const e=this,t=e.j[n];if(t)return t;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],s=e.jr[r][1];if(s&&o.test(n))return s}return e.jd},has(n,e){return e===void 0&&(e=!1),e?n in this.j:!!this.go(n)},ta(n,e,t,r){for(let o=0;o<n.length;o++)this.tt(n[o],e,t,r)},tr(n,e,t,r){r=r||Rt.groups;let o;return e&&e.j?o=e:(o=new Rt(e),t&&r&&Vr(e,t,r)),this.jr.push([n,o]),o},ts(n,e,t,r){let o=this;const s=n.length;if(!s)return o;for(let i=0;i<s-1;i++)o=o.tt(n[i]);return o.tt(n[s-1],e,t,r)},tt(n,e,t,r){r=r||Rt.groups;const o=this;if(e&&e.j)return o.j[n]=e,e;const s=e;let i,l=o.go(n);if(l?(i=new Rt,Ho(i.j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new Rt,s){if(r)if(i.t&&typeof i.t=="string"){const a=Ho(UT(i.t,r),t);Vr(s,a,r)}else t&&Vr(s,t,r);i.t=s}return o.j[n]=i,i}};const Pe=(n,e,t,r,o)=>n.ta(e,t,r,o),Jt=(n,e,t,r,o)=>n.tr(e,t,r,o),Sh=(n,e,t,r,o)=>n.ts(e,t,r,o),ye=(n,e,t,r,o)=>n.tt(e,t,r,o),Vn="WORD",Wc="UWORD",Rs="LOCALHOST",Kc="TLD",Yc="UTLD",Si="SCHEME",Ao="SLASH_SCHEME",ad="NUM",a2="WS",ld="NL",Cs="OPENBRACE",As="CLOSEBRACE",Xi="OPENBRACKET",qi="CLOSEBRACKET",ea="OPENPAREN",ta="CLOSEPAREN",na="OPENANGLEBRACKET",ra="CLOSEANGLEBRACKET",oa="FULLWIDTHLEFTPAREN",sa="FULLWIDTHRIGHTPAREN",ia="LEFTCORNERBRACKET",aa="RIGHTCORNERBRACKET",la="LEFTWHITECORNERBRACKET",ca="RIGHTWHITECORNERBRACKET",ua="FULLWIDTHLESSTHAN",da="FULLWIDTHGREATERTHAN",fa="AMPERSAND",ha="APOSTROPHE",pa="ASTERISK",sr="AT",ma="BACKSLASH",ga="BACKTICK",va="CARET",ar="COLON",cd="COMMA",ya="DOLLAR",Cn="DOT",Ea="EQUALS",ud="EXCLAMATION",An="HYPHEN",Ca="PERCENT",Aa="PIPE",ba="PLUS",wa="POUND",Ta="QUERY",dd="QUOTE",fd="SEMI",bn="SLASH",bs="TILDE",Sa="UNDERSCORE",l2="EMOJI",ka="SYM";var c2=Object.freeze({__proto__:null,WORD:Vn,UWORD:Wc,LOCALHOST:Rs,TLD:Kc,UTLD:Yc,SCHEME:Si,SLASH_SCHEME:Ao,NUM:ad,WS:a2,NL:ld,OPENBRACE:Cs,CLOSEBRACE:As,OPENBRACKET:Xi,CLOSEBRACKET:qi,OPENPAREN:ea,CLOSEPAREN:ta,OPENANGLEBRACKET:na,CLOSEANGLEBRACKET:ra,FULLWIDTHLEFTPAREN:oa,FULLWIDTHRIGHTPAREN:sa,LEFTCORNERBRACKET:ia,RIGHTCORNERBRACKET:aa,LEFTWHITECORNERBRACKET:la,RIGHTWHITECORNERBRACKET:ca,FULLWIDTHLESSTHAN:ua,FULLWIDTHGREATERTHAN:da,AMPERSAND:fa,APOSTROPHE:ha,ASTERISK:pa,AT:sr,BACKSLASH:ma,BACKTICK:ga,CARET:va,COLON:ar,COMMA:cd,DOLLAR:ya,DOT:Cn,EQUALS:Ea,EXCLAMATION:ud,HYPHEN:An,PERCENT:Ca,PIPE:Aa,PLUS:ba,POUND:wa,QUERY:Ta,QUOTE:dd,SEMI:fd,SLASH:bn,TILDE:bs,UNDERSCORE:Sa,EMOJI:l2,SYM:ka});const po=/[a-z]/,Kl=/\p{L}/u,Yl=/\p{Emoji}/u,Gl=/\d/,kh=/\s/,_h=`
174
174
  `,HT="️",jT="‍";let ui=null,di=null;function WT(n){n===void 0&&(n=[]);const e={};Rt.groups=e;const t=new Rt;ui==null&&(ui=xh(PT)),di==null&&(di=xh(FT)),ye(t,"'",ha),ye(t,"{",Cs),ye(t,"}",As),ye(t,"[",Xi),ye(t,"]",qi),ye(t,"(",ea),ye(t,")",ta),ye(t,"<",na),ye(t,">",ra),ye(t,"(",oa),ye(t,")",sa),ye(t,"「",ia),ye(t,"」",aa),ye(t,"『",la),ye(t,"』",ca),ye(t,"<",ua),ye(t,">",da),ye(t,"&",fa),ye(t,"*",pa),ye(t,"@",sr),ye(t,"`",ga),ye(t,"^",va),ye(t,":",ar),ye(t,",",cd),ye(t,"$",ya),ye(t,".",Cn),ye(t,"=",Ea),ye(t,"!",ud),ye(t,"-",An),ye(t,"%",Ca),ye(t,"|",Aa),ye(t,"+",ba),ye(t,"#",wa),ye(t,"?",Ta),ye(t,'"',dd),ye(t,"/",bn),ye(t,";",fd),ye(t,"~",bs),ye(t,"_",Sa),ye(t,"\\",ma);const r=Jt(t,Gl,ad,{[zc]:!0});Jt(r,Gl,r);const o=Jt(t,po,Vn,{[Uc]:!0});Jt(o,po,o);const s=Jt(t,Kl,Wc,{[Hc]:!0});Jt(s,po),Jt(s,Kl,s);const i=Jt(t,kh,a2,{[Th]:!0});ye(t,_h,ld,{[Th]:!0}),ye(i,_h),Jt(i,kh,i);const l=Jt(t,Yl,l2,{[i2]:!0});Jt(l,Yl,l),ye(l,HT,l);const a=ye(l,jT);Jt(a,Yl,l);const u=[[po,o]],d=[[po,null],[Kl,s]];for(let f=0;f<ui.length;f++)er(t,ui[f],Kc,Vn,u);for(let f=0;f<di.length;f++)er(t,di[f],Yc,Wc,d);Vr(Kc,{tld:!0,ascii:!0},e),Vr(Yc,{utld:!0,alpha:!0},e),er(t,"file",Si,Vn,u),er(t,"mailto",Si,Vn,u),er(t,"http",Ao,Vn,u),er(t,"https",Ao,Vn,u),er(t,"ftp",Ao,Vn,u),er(t,"ftps",Ao,Vn,u),Vr(Si,{scheme:!0,ascii:!0},e),Vr(Ao,{slashscheme:!0,ascii:!0},e),n=n.sort((f,h)=>f[0]>h[0]?1:-1);for(let f=0;f<n.length;f++){const h=n[f][0],m=n[f][1]?{[VT]:!0}:{[$T]:!0};h.indexOf("-")>=0?m[jc]=!0:po.test(h)?Gl.test(h)?m[Ti]=!0:m[Uc]=!0:m[zc]=!0,Sh(t,h,h,m)}return Sh(t,"localhost",Rs,{ascii:!0}),t.jd=new Rt(ka),{start:t,tokens:Ho({groups:e},c2)}}function KT(n,e){const t=YT(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,o=[];let s=0,i=0;for(;i<r;){let l=n,a=null,u=0,d=null,f=-1,h=-1;for(;i<r&&(a=l.go(t[i]));)l=a,l.accepts()?(f=0,h=0,d=l):f>=0&&(f+=t[i].length,h++),u+=t[i].length,s+=t[i].length,i++;s-=f,i-=h,u-=f,o.push({t:d.t,v:e.slice(s-u,s),s:s-u,e:s})}return o}function YT(n){const e=[],t=n.length;let r=0;for(;r<t;){let o=n.charCodeAt(r),s,i=o<55296||o>56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(i),r+=i.length}return e}function er(n,e,t,r,o){let s;const i=e.length;for(let l=0;l<i-1;l++){const a=e[l];n.j[a]?s=n.j[a]:(s=new Rt(r),s.jr=o.slice(),n.j[a]=s),n=s}return s=new Rt(t),s.jr=o.slice(),n.j[e[i-1]]=s,s}function xh(n){const e=[],t=[];let r=0,o="0123456789";for(;r<n.length;){let s=0;for(;o.indexOf(n[r+s])>=0;)s++;if(s>0){e.push(t.join(""));for(let i=parseInt(n.substring(r,r+s),10);i>0;i--)t.pop();r+=s}else t.push(n[r]),r++}return e}const Bs={defaultProtocol:"http",events:null,format:Nh,formatHref:Nh,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function hd(n,e){e===void 0&&(e=null);let t=Ho({},Bs);n&&(t=Ho(t,n instanceof hd?n.o:n));const r=t.ignoreTags,o=[];for(let s=0;s<r.length;s++)o.push(r[s].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=o}hd.prototype={o:Bs,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let o=this.o[n];return o&&(typeof o=="object"?(o=t.t in o?o[t.t]:Bs[n],typeof o=="function"&&r&&(o=o(e,t))):typeof o=="function"&&r&&(o=o(e,t.t,t)),o)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function Nh(n){return n}function u2(n,e){this.t="token",this.v=n,this.tk=e}u2.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=Bs.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),o=n.get("tagName",t,e),s=this.toFormattedString(n),i={},l=n.get("className",t,e),a=n.get("target",t,e),u=n.get("rel",t,e),d=n.getObj("attributes",t,e),f=n.getObj("events",t,e);return i.href=r,l&&(i.class=l),a&&(i.target=a),u&&(i.rel=u),d&&Ho(i,d),{tagName:o,attributes:i,content:s,eventListeners:f}}};function rl(n,e){class t extends u2{constructor(o,s){super(o,s),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const Ih=rl("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Mh=rl("text"),GT=rl("nl"),fi=rl("url",{isLink:!0,toHref(n){return n===void 0&&(n=Bs.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==Rs&&n[1].t===ar}}),Xt=n=>new Rt(n);function QT(n){let{groups:e}=n;const t=e.domain.concat([fa,pa,sr,ma,ga,va,ya,Ea,An,ad,Ca,Aa,ba,wa,bn,ka,bs,Sa]),r=[ha,ar,cd,Cn,ud,Ta,dd,fd,na,ra,Cs,As,qi,Xi,ea,ta,oa,sa,ia,aa,la,ca,ua,da],o=[fa,ha,pa,ma,ga,va,ya,Ea,An,Cs,As,Ca,Aa,ba,wa,Ta,bn,ka,bs,Sa],s=Xt(),i=ye(s,bs);Pe(i,o,i),Pe(i,e.domain,i);const l=Xt(),a=Xt(),u=Xt();Pe(s,e.domain,l),Pe(s,e.scheme,a),Pe(s,e.slashscheme,u),Pe(l,o,i),Pe(l,e.domain,l);const d=ye(l,sr);ye(i,sr,d),ye(a,sr,d),ye(u,sr,d);const f=ye(i,Cn);Pe(f,o,i),Pe(f,e.domain,i);const h=Xt();Pe(d,e.domain,h),Pe(h,e.domain,h);const p=ye(h,Cn);Pe(p,e.domain,h);const m=Xt(Ih);Pe(p,e.tld,m),Pe(p,e.utld,m),ye(d,Rs,m);const g=ye(h,An);Pe(g,e.domain,h),Pe(m,e.domain,h),ye(m,Cn,p),ye(m,An,g);const v=ye(m,ar);Pe(v,e.numeric,Ih);const C=ye(l,An),b=ye(l,Cn);Pe(C,e.domain,l),Pe(b,o,i),Pe(b,e.domain,l);const E=Xt(fi);Pe(b,e.tld,E),Pe(b,e.utld,E),Pe(E,e.domain,l),Pe(E,o,i),ye(E,Cn,b),ye(E,An,C),ye(E,sr,d);const y=ye(E,ar),x=Xt(fi);Pe(y,e.numeric,x);const w=Xt(fi),I=Xt();Pe(w,t,w),Pe(w,r,I),Pe(I,t,w),Pe(I,r,I),ye(E,bn,w),ye(x,bn,w);const M=ye(a,ar),L=ye(u,ar),$=ye(L,bn),V=ye($,bn);Pe(a,e.domain,l),ye(a,Cn,b),ye(a,An,C),Pe(u,e.domain,l),ye(u,Cn,b),ye(u,An,C),Pe(M,e.domain,w),ye(M,bn,w),Pe(V,e.domain,w),Pe(V,t,w),ye(V,bn,w);const z=[[Cs,As],[Xi,qi],[ea,ta],[na,ra],[oa,sa],[ia,aa],[la,ca],[ua,da]];for(let G=0;G<z.length;G++){const[Y,K]=z[G],W=ye(w,Y);ye(I,Y,W),ye(W,K,w);const J=Xt(fi);Pe(W,t,J);const U=Xt();Pe(W,r),Pe(J,t,J),Pe(J,r,U),Pe(U,t,J),Pe(U,r,U),ye(J,K,w),ye(U,K,w)}return ye(s,Rs,E),ye(s,ld,GT),{start:s,tokens:c2}}function ZT(n,e,t){let r=t.length,o=0,s=[],i=[];for(;o<r;){let l=n,a=null,u=null,d=0,f=null,h=-1;for(;o<r&&!(a=l.go(t[o].t));)i.push(t[o++]);for(;o<r&&(u=a||l.go(t[o].t));)a=null,l=u,l.accepts()?(h=0,f=l):h>=0&&h++,o++,d++;if(h<0)o-=d,o<r&&(i.push(t[o]),o++);else{i.length>0&&(s.push(Ql(Mh,e,i)),i=[]),o-=h,d-=h;const p=f.t,m=t.slice(o-d,o);s.push(Ql(p,e,m))}}return i.length>0&&s.push(Ql(Mh,e,i)),s}function Ql(n,e,t){const r=t[0].s,o=t[t.length-1].e,s=e.slice(r,o);return new n(s,t)}const JT=typeof console<"u"&&console&&console.warn||(()=>{}),XT="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",qe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function qT(){Rt.groups={},qe.scanner=null,qe.parser=null,qe.tokenQueue=[],qe.pluginQueue=[],qe.customSchemes=[],qe.initialized=!1}function Oh(n,e){if(e===void 0&&(e=!1),qe.initialized&&JT(`linkifyjs: already initialized - will not register custom scheme "${n}" ${XT}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
175
175
  1. Must only contain digits, lowercase ASCII letters or "-"
176
176
  2. Cannot start or end with "-"
177
- 3. "-" cannot repeat`);qe.customSchemes.push([n,e])}function eS(){qe.scanner=WT(qe.customSchemes);for(let n=0;n<qe.tokenQueue.length;n++)qe.tokenQueue[n][1]({scanner:qe.scanner});qe.parser=QT(qe.scanner.tokens);for(let n=0;n<qe.pluginQueue.length;n++)qe.pluginQueue[n][1]({scanner:qe.scanner,parser:qe.parser});qe.initialized=!0}function tS(n){return qe.initialized||eS(),ZT(qe.parser.start,n,KT(qe.scanner.start,n))}function pd(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new hd(t),o=tS(n),s=[];for(let i=0;i<o.length;i++){const l=o[i];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function nS(n){return new Ft({key:new gn("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(u=>u.docChanged)&&!t.doc.eq(r.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,l=wb(t.doc,[...e]);if(Ob(l).forEach(({newRange:u})=>{const d=Sb(r.doc,u,p=>p.isTextblock);let f,h;if(d.length>1?(f=d[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=d[0],h=r.doc.textBetween(f.pos,u.to,void 0," ")),f&&h){const p=h.split(" ").filter(v=>v!=="");if(p.length<=0)return!1;const m=p[p.length-1],g=f.pos+h.lastIndexOf(m);if(!m)return!1;pd(m).filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>n.validate?n.validate(v.value):!0).forEach(v=>{Gu(v.from,v.to,r.doc).some(C=>C.mark.type===n.type)||i.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),!!i.steps.length)return i}})}function rS(n){return new Ft({key:new gn("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,s;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Am(e.state,n.type.name),a=r.target,u=(o=a==null?void 0:a.href)!==null&&o!==void 0?o:l.href,d=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:l.target;return a&&u?(e.editable&&window.open(u,d),!0):!1}}})}function oS(n){return new Ft({key:new gn("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var o;const{state:s}=e,{selection:i}=s,{empty:l}=i;if(l)return!1;let a="";r.content.forEach(m=>{a+=m.textContent});const u=pd(a).find(m=>m.isLink&&m.value===a);if(!a||!u)return!1;const d=(o=t.clipboardData)===null||o===void 0?void 0:o.getData("text/html"),f=/href="([^"]*)"/,h=d==null?void 0:d.match(f),p=h?h[1]:u.href;return n.editor.commands.setMark(n.type,{href:p}),!0}}})}const sS=On.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Oh(n);return}Oh(n.scheme,n.optionalSlashes)})},onDestroy(){qT()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Os({find:n=>pd(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const o=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),s=/href="([^"]*)"/,i=o==null?void 0:o.match(s);return i?{href:i[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(nS({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(rS({type:this.type})),this.options.linkOnPaste&&n.push(oS({editor:this.editor,type:this.type})),n}}),iS=sS.extend({addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>({title:e.title})}}}}),aS=rn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ft({key:new gn("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!t)return null;const s=n.type.createAndFill(),i=(s==null?void 0:s.sameMarkup(n))&&s.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const u=r>=a&&r<=a+l.nodeSize,d=!l.isLeaf&&!l.childCount;if((u||!this.options.showOnlyCurrent)&&d){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const h=tn.node(a,a+l.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:u}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),it.create(n,o)}}})]}}),lS=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,cS=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,uS=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,dS=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,fS=On.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Yi({find:lS,type:this.type}),Yi({find:uS,type:this.type})]},addPasteRules(){return[Os({find:cS,type:this.type}),Os({find:dS,type:this.type})]}}),hS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,pS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,mS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,gS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,vS=On.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Yi({find:hS,type:this.type}),Yi({find:mS,type:this.type})]},addPasteRules(){return[Os({find:pS,type:this.type}),Os({find:gS,type:this.type})]}}),yS=On.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),ES=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),CS=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Lh=On.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Xa(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Dh=/^\s*([-+*])\s$/,AS=Gn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(CS.name,this.editor.getAttributes(Lh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Gi({find:Dh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Gi({find:Dh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Lh.name),editor:this.editor})),[n]}}),bS=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Rh=On.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Xa(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Bh=/^(\d+)\.\s$/,wS=Gn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",Ot(this.options.HTMLAttributes,t),0]:["ol",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bS.name,this.editor.getAttributes(Rh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Gi({find:Bh,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Gi({find:Bh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Rh.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),TS=Gn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",Ot(this.options.HTMLAttributes,n)]},renderText(){return`
177
+ 3. "-" cannot repeat`);qe.customSchemes.push([n,e])}function eS(){qe.scanner=WT(qe.customSchemes);for(let n=0;n<qe.tokenQueue.length;n++)qe.tokenQueue[n][1]({scanner:qe.scanner});qe.parser=QT(qe.scanner.tokens);for(let n=0;n<qe.pluginQueue.length;n++)qe.pluginQueue[n][1]({scanner:qe.scanner,parser:qe.parser});qe.initialized=!0}function tS(n){return qe.initialized||eS(),ZT(qe.parser.start,n,KT(qe.scanner.start,n))}function pd(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new hd(t),o=tS(n),s=[];for(let i=0;i<o.length;i++){const l=o[i];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function nS(n){return new Ft({key:new gn("autolink"),appendTransaction:(e,t,r)=>{const o=e.some(u=>u.docChanged)&&!t.doc.eq(r.doc),s=e.some(u=>u.getMeta("preventAutolink"));if(!o||s)return;const{tr:i}=r,l=wb(t.doc,[...e]);if(Ob(l).forEach(({newRange:u})=>{const d=Sb(r.doc,u,p=>p.isTextblock);let f,h;if(d.length>1?(f=d[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):d.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=d[0],h=r.doc.textBetween(f.pos,u.to,void 0," ")),f&&h){const p=h.split(" ").filter(v=>v!=="");if(p.length<=0)return!1;const m=p[p.length-1],g=f.pos+h.lastIndexOf(m);if(!m)return!1;pd(m).filter(v=>v.isLink).map(v=>({...v,from:g+v.start+1,to:g+v.end+1})).filter(v=>r.schema.marks.code?!r.doc.rangeHasMark(v.from,v.to,r.schema.marks.code):!0).filter(v=>n.validate?n.validate(v.value):!0).forEach(v=>{Gu(v.from,v.to,r.doc).some(C=>C.mark.type===n.type)||i.addMark(v.from,v.to,n.type.create({href:v.href}))})}}),!!i.steps.length)return i}})}function rS(n){return new Ft({key:new gn("handleClickLink"),props:{handleClick:(e,t,r)=>{var o,s;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=A0(e.state,n.type.name),a=r.target,u=(o=a==null?void 0:a.href)!==null&&o!==void 0?o:l.href,d=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:l.target;return a&&u?(e.editable&&window.open(u,d),!0):!1}}})}function oS(n){return new Ft({key:new gn("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var o;const{state:s}=e,{selection:i}=s,{empty:l}=i;if(l)return!1;let a="";r.content.forEach(m=>{a+=m.textContent});const u=pd(a).find(m=>m.isLink&&m.value===a);if(!a||!u)return!1;const d=(o=t.clipboardData)===null||o===void 0?void 0:o.getData("text/html"),f=/href="([^"]*)"/,h=d==null?void 0:d.match(f),p=h?h[1]:u.href;return n.editor.commands.setMark(n.type,{href:p}),!0}}})}const sS=On.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){Oh(n);return}Oh(n.scheme,n.optionalSlashes)})},onDestroy(){qT()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){return["a",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Os({find:n=>pd(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const o=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),s=/href="([^"]*)"/,i=o==null?void 0:o.match(s);return i?{href:i[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(nS({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(rS({type:this.type})),this.options.linkOnPaste&&n.push(oS({editor:this.editor,type:this.type})),n}}),iS=sS.extend({addAttributes(){var n;return{...(n=this.parent)==null?void 0:n.call(this),title:{default:null,parseHTML:e=>e.getAttribute("title"),renderHTML:e=>({title:e.title})}}}}),aS=rn.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Ft({key:new gn("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,o=[];if(!t)return null;const s=n.type.createAndFill(),i=(s==null?void 0:s.sameMarkup(n))&&s.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const u=r>=a&&r<=a+l.nodeSize,d=!l.isLeaf&&!l.childCount;if((u||!this.options.showOnlyCurrent)&&d){const f=[this.options.emptyNodeClass];i&&f.push(this.options.emptyEditorClass);const h=tn.node(a,a+l.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:u}):this.options.placeholder});o.push(h)}return this.options.includeChildren}),it.create(n,o)}}})]}}),lS=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))$/,cS=/(?:^|\s)((?:\*\*)((?:[^*]+))(?:\*\*))/g,uS=/(?:^|\s)((?:__)((?:[^__]+))(?:__))$/,dS=/(?:^|\s)((?:__)((?:[^__]+))(?:__))/g,fS=On.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:n=>n.style.fontWeight!=="normal"&&null},{style:"font-weight",getAttrs:n=>/^(bold(er)?|[5-9]\d{2,})$/.test(n)&&null}]},renderHTML({HTMLAttributes:n}){return["strong",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setBold:()=>({commands:n})=>n.setMark(this.name),toggleBold:()=>({commands:n})=>n.toggleMark(this.name),unsetBold:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[Yi({find:lS,type:this.type}),Yi({find:uS,type:this.type})]},addPasteRules(){return[Os({find:cS,type:this.type}),Os({find:dS,type:this.type})]}}),hS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))$/,pS=/(?:^|\s)((?:\*)((?:[^*]+))(?:\*))/g,mS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))$/,gS=/(?:^|\s)((?:_)((?:[^_]+))(?:_))/g,vS=On.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:n=>n.style.fontStyle!=="normal"&&null},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:n}){return["em",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setItalic:()=>({commands:n})=>n.setMark(this.name),toggleItalic:()=>({commands:n})=>n.toggleMark(this.name),unsetItalic:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Yi({find:hS,type:this.type}),Yi({find:mS,type:this.type})]},addPasteRules(){return[Os({find:pS,type:this.type}),Os({find:gS,type:this.type})]}}),yS=On.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),ES=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),CS=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Lh=On.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Xa(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Dh=/^\s*([-+*])\s$/,AS=Gn.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:n}){return["ul",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleBulletList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(CS.name,this.editor.getAttributes(Lh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let n=Gi({find:Dh,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Gi({find:Dh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Lh.name),editor:this.editor})),[n]}}),bS=Gn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Ot(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Rh=On.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Xa(n,this.type);return Object.entries(t).some(([,o])=>!!o)?!0:e.unsetMark(this.name)}}}}),Bh=/^(\d+)\.\s$/,wS=Gn.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",Ot(this.options.HTMLAttributes,t),0]:["ol",Ot(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(bS.name,this.editor.getAttributes(Rh.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Gi({find:Bh,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=Gi({find:Bh,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Rh.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),TS=Gn.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",Ot(this.options.HTMLAttributes,n)]},renderText(){return`
178
178
  `},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:o,storedMarks:s}=t;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:l}=r.extensionManager,a=s||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:u,dispatch:d})=>{if(d&&a&&i){const f=a.filter(h=>l.includes(h.type.name));u.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Zl={BASIC:"basic",FULL:"full"},SS={class:"attachment-list"},kS={class:"attachment-link"},_S={key:1,class:"attachment-no-download"},xS=["href"],ol=c.defineComponent({__name:"BDAttachmentPreviewList",props:{files:{default:[]},showDelete:{type:Boolean,default:!1},noDownload:{type:Boolean,default:!1}},emits:["delete"],setup(n,{emit:e}){const t=r=>{e("delete",r)};return(r,o)=>(c.openBlock(),c.createElementBlock("ul",SS,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.files,s=>(c.openBlock(),c.createElementBlock("li",{class:"attachment-list__item",key:s.CorrelationId},[c.createElementVNode("div",kS,[r.showDelete?(c.openBlock(),c.createBlock(Qe,{key:0,variant:"remove",onClick:i=>t(s),"aria-label":"verwijder"},{default:c.withCtx(()=>[c.createVNode(c.unref(Us))]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),r.noDownload?(c.openBlock(),c.createElementBlock("div",_S,[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(s.Naam.trim()),1)])):(c.openBlock(),c.createElementBlock("a",{key:2,href:s.downloadUrl},[c.createVNode(c.unref(Jr)),c.createTextVNode(" "+c.toDisplayString(s.Naam.trim()),1)],8,xS))])]))),128))]))}}),NS={class:"attachment-list"},IS={class:"attachment"},MS=["onClick"],OS=["src","alt"],LS=["onClick"],DS=["href"],RS={class:"btn btn-light download-button-image"},BS=["src","alt"],sl=c.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(n,{emit:e}){const t=n,r=s=>{e("delete",s)},o=(s,i)=>{s.target&&s.target.className==="img-preview"&&e("show",i)};return(s,i)=>(c.openBlock(),c.createElementBlock("ul",NS,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(s.files,l=>(c.openBlock(),c.createElementBlock("li",{class:"attachment-list__item",key:l.CorrelationId},[c.createElementVNode("div",IS,[s.showDelete?(c.openBlock(),c.createBlock(Qe,{key:0,variant:"remove","aria-label":"verwijder",onClick:c.withModifiers(a=>r(l),["prevent"])},{default:c.withCtx(()=>[c.createVNode(c.unref(Us))]),_:2},1032,["onClick"])):c.createCommentVNode("",!0),t.noDownload?(c.openBlock(),c.createElementBlock("div",{key:1,onClick:a=>o(a,l)},[c.createElementVNode("img",{src:l.previewUrl,class:"img-preview",alt:l.altName,loading:"lazy"},null,8,OS)],8,MS)):(c.openBlock(),c.createElementBlock("div",{key:2,onClick:a=>o(a,l)},[t.fastDownload?(c.openBlock(),c.createElementBlock("a",{key:0,href:l.downloadUrl,class:"download-link"},[c.createElementVNode("button",RS,[c.createVNode(c.unref(mu))])],8,DS)):c.createCommentVNode("",!0),c.createElementVNode("img",{src:l.previewUrl,alt:l.altName,class:"img-preview",loading:"lazy"},null,8,BS)],8,LS))])]))),128))]))}}),Ph=n=>n.Naam.toLowerCase().endsWith(".png")||n.Naam.toLowerCase().endsWith(".jpg")||n.Naam.toLowerCase().endsWith(".jpeg")||n.Naam.toLowerCase().endsWith(".gif"),PS=n=>n.DownloadUrl?n.DownloadUrl:n.identifier?`/Collega/api/Conversation/GetConversationAttachment?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:n.url?n.url:n.Id?"/Portaal/DownloadBerichtBijlage/"+n.Id:n.FileId?`/Portaal/DownloadStandardMessageAttachment/${n.StandardAttachmentId}/${n.FileId}`:"/Portaal/DownloadBerichtStagingBijlage/"+n.CorrelationId,FS=n=>n.ThumbnailUrl?n.ThumbnailUrl:n.identifier?`/Collega/api/Conversation/GetConversationAttachmentThumbnail?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:n.url?n.url:n.Id?"/Portaal/DownloadBerichtBijlageThumbnail/"+n.Id:n.StandardAttachmentId||n.standardAttachmentId?`/Portaal/DownloadStandardMessageAttachmentThumbnail/${n.StandardAttachmentId}/${n.FileId}`:"/Portaal/DownloadBerichtStagingBijlageThumbnail/"+n.CorrelationId,VS=n=>n.identifier?`/Collega/api/Conversation/GetConversationAttachment?conversationId=${n.conversationId}&fileMetadataId=${n.identifier}`:null,$S=(n,e)=>e?Ph(n):!Ph(n),_a=(n,e)=>n===void 0?void 0:n.filter(r=>$S(r,e)).map(r=>{const o=typeof r.CorrelationId=="string"?r.CorrelationId:r.CorrelationId!=null?r.CorrelationId.toString():"";return{downloadUrl:PS(r),previewUrl:FS(r),fullImageUrl:VS(r),altName:`${r.Naam}`,...r,CorrelationId:o}});/*!
179
179
  * Bootstrap v5.3.0 (https://getbootstrap.com/)
180
180
  * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
181
181
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
182
- */const tr=new Map,Jl={set(n,e,t){tr.has(n)||tr.set(n,new Map);const r=tr.get(n);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,t)},get(n,e){return tr.has(n)&&tr.get(n).get(e)||null},remove(n,e){if(!tr.has(n))return;const t=tr.get(n);t.delete(e),t.size===0&&tr.delete(n)}},zS=1e6,US=1e3,Gc="transitionend",d2=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),HS=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),jS=n=>{do n+=Math.floor(Math.random()*zS);while(document.getElementById(n));return n},WS=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),o=Number.parseFloat(t);return!r&&!o?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*US)},f2=n=>{n.dispatchEvent(new Event(Gc))},Wn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),gr=n=>Wn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(d2(n)):null,qo=n=>{if(!Wn(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},vr=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",h2=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?h2(n.parentNode):null},xa=()=>{},Gs=n=>{n.offsetHeight},p2=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Xl=[],KS=n=>{document.readyState==="loading"?(Xl.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Xl)e()}),Xl.push(n)):n()},on=()=>document.documentElement.dir==="rtl",an=n=>{KS(()=>{const e=p2();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},Bt=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,m2=(n,e,t=!0)=>{if(!t){Bt(n);return}const r=5,o=WS(e)+r;let s=!1;const i=({target:l})=>{l===e&&(s=!0,e.removeEventListener(Gc,i),Bt(n))};e.addEventListener(Gc,i),setTimeout(()=>{s||f2(e)},o)},md=(n,e,t,r)=>{const o=n.length;let s=n.indexOf(e);return s===-1?!t&&r?n[o-1]:n[0]:(s+=t?1:-1,r&&(s=(s+o)%o),n[Math.max(0,Math.min(s,o-1))])},YS=/[^.]*(?=\..*)\.|.*/,GS=/\..*/,QS=/::\d+$/,ql={};let Fh=1;const g2={mouseenter:"mouseover",mouseleave:"mouseout"},ZS=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 v2(n,e){return e&&`${e}::${Fh++}`||n.uidEvent||Fh++}function y2(n){const e=v2(n);return n.uidEvent=e,ql[e]=ql[e]||{},ql[e]}function JS(n,e){return function t(r){return gd(r,{delegateTarget:n}),t.oneOff&&le.off(n,r.type,e),e.apply(n,[r])}}function XS(n,e,t){return function r(o){const s=n.querySelectorAll(e);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(const l of s)if(l===i)return gd(o,{delegateTarget:i}),r.oneOff&&le.off(n,o.type,e,t),t.apply(i,[o])}}function E2(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function C2(n,e,t){const r=typeof e=="string",o=r?t:e||t;let s=A2(n);return ZS.has(s)||(s=n),[r,o,s]}function Vh(n,e,t,r,o){if(typeof e!="string"||!n)return;let[s,i,l]=C2(e,t,r);e in g2&&(i=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(i));const a=y2(n),u=a[l]||(a[l]={}),d=E2(u,i,s?t:null);if(d){d.oneOff=d.oneOff&&o;return}const f=v2(i,e.replace(YS,"")),h=s?XS(n,t,i):JS(n,i);h.delegationSelector=s?t:null,h.callable=i,h.oneOff=o,h.uidEvent=f,u[f]=h,n.addEventListener(l,h,s)}function Qc(n,e,t,r,o){const s=E2(e[t],r,o);s&&(n.removeEventListener(t,s,!!o),delete e[t][s.uidEvent])}function qS(n,e,t,r){const o=e[t]||{};for(const[s,i]of Object.entries(o))s.includes(r)&&Qc(n,e,t,i.callable,i.delegationSelector)}function A2(n){return n=n.replace(GS,""),g2[n]||n}const le={on(n,e,t,r){Vh(n,e,t,r,!1)},one(n,e,t,r){Vh(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;const[o,s,i]=C2(e,t,r),l=i!==e,a=y2(n),u=a[i]||{},d=e.startsWith(".");if(typeof s<"u"){if(!Object.keys(u).length)return;Qc(n,a,i,s,o?t:null);return}if(d)for(const f of Object.keys(a))qS(n,a,f,e.slice(1));for(const[f,h]of Object.entries(u)){const p=f.replace(QS,"");(!l||e.includes(p))&&Qc(n,a,i,h.callable,h.delegationSelector)}},trigger(n,e,t){if(typeof e!="string"||!n)return null;const r=p2(),o=A2(e),s=e!==o;let i=null,l=!0,a=!0,u=!1;s&&r&&(i=r.Event(e,t),r(n).trigger(i),l=!i.isPropagationStopped(),a=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());const d=gd(new Event(e,{bubbles:l,cancelable:!0}),t);return u&&d.preventDefault(),a&&n.dispatchEvent(d),d.defaultPrevented&&i&&i.preventDefault(),d}};function gd(n,e={}){for(const[t,r]of Object.entries(e))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}function $h(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function ec(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Kn={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${ec(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${ec(e)}`)},getDataAttributes(n){if(!n)return{};const e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of t){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),e[o]=$h(n.dataset[r])}return e},getDataAttribute(n,e){return $h(n.getAttribute(`data-bs-${ec(e)}`))}};class Qs{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,t){const r=Wn(t)?Kn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...Wn(t)?Kn.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,o]of Object.entries(t)){const s=e[r],i=Wn(s)?"element":HS(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${i}" but expected type "${o}".`)}}}const ek="5.3.0";class vn extends Qs{constructor(e,t){super(),e=gr(e),e&&(this._element=e,this._config=this._getConfig(t),Jl.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Jl.remove(this._element,this.constructor.DATA_KEY),le.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){m2(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Jl.get(gr(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return ek}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 tc=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return d2(e)},Ie={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){const t=[];let r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!vr(t)&&qo(t))},getSelectorFromElement(n){const e=tc(n);return e&&Ie.findOne(e)?e:null},getElementFromSelector(n){const e=tc(n);return e?Ie.findOne(e):null},getMultipleElementsFromSelector(n){const e=tc(n);return e?Ie.find(e):[]}},il=(n,e="hide")=>{const t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;le.on(document,t,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),vr(this))return;const s=Ie.getElementFromSelector(this)||this.closest(`.${r}`);n.getOrCreateInstance(s)[e]()})},tk="alert",nk="bs.alert",b2=`.${nk}`,rk=`close${b2}`,ok=`closed${b2}`,sk="fade",ik="show";class al extends vn{static get NAME(){return tk}close(){if(le.trigger(this._element,rk).defaultPrevented)return;this._element.classList.remove(ik);const t=this._element.classList.contains(sk);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),le.trigger(this._element,ok),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=al.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}il(al,"close");an(al);const ak="button",lk="bs.button",ck=`.${lk}`,uk=".data-api",dk="active",zh='[data-bs-toggle="button"]',fk=`click${ck}${uk}`;class ll extends vn{static get NAME(){return ak}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(dk))}static jQueryInterface(e){return this.each(function(){const t=ll.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}le.on(document,fk,zh,n=>{n.preventDefault();const e=n.target.closest(zh);ll.getOrCreateInstance(e).toggle()});an(ll);const hk="swipe",es=".bs.swipe",pk=`touchstart${es}`,mk=`touchmove${es}`,gk=`touchend${es}`,vk=`pointerdown${es}`,yk=`pointerup${es}`,Ek="touch",Ck="pen",Ak="pointer-event",bk=40,wk={endCallback:null,leftCallback:null,rightCallback:null},Tk={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Na extends Qs{constructor(e,t){super(),this._element=e,!(!e||!Na.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return wk}static get DefaultType(){return Tk}static get NAME(){return hk}dispose(){le.off(this._element,es)}_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(),Bt(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<=bk)return;const t=e/this._deltaX;this._deltaX=0,t&&Bt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(le.on(this._element,vk,e=>this._start(e)),le.on(this._element,yk,e=>this._end(e)),this._element.classList.add(Ak)):(le.on(this._element,pk,e=>this._start(e)),le.on(this._element,mk,e=>this._move(e)),le.on(this._element,gk,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Ck||e.pointerType===Ek)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Sk="carousel",kk="bs.carousel",Tr=`.${kk}`,w2=".data-api",_k="ArrowLeft",xk="ArrowRight",Nk=500,ss="next",mo="prev",bo="left",ki="right",Ik=`slide${Tr}`,nc=`slid${Tr}`,Mk=`keydown${Tr}`,Ok=`mouseenter${Tr}`,Lk=`mouseleave${Tr}`,Dk=`dragstart${Tr}`,Rk=`load${Tr}${w2}`,Bk=`click${Tr}${w2}`,T2="carousel",hi="active",Pk="slide",Fk="carousel-item-end",Vk="carousel-item-start",$k="carousel-item-next",zk="carousel-item-prev",S2=".active",k2=".carousel-item",Uk=S2+k2,Hk=".carousel-item img",jk=".carousel-indicators",Wk="[data-bs-slide], [data-bs-slide-to]",Kk='[data-bs-ride="carousel"]',Yk={[_k]:ki,[xk]:bo},Gk={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Qk={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Zs extends vn{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ie.findOne(jk,this._element),this._addEventListeners(),this._config.ride===T2&&this.cycle()}static get Default(){return Gk}static get DefaultType(){return Qk}static get NAME(){return Sk}next(){this._slide(ss)}nextWhenVisible(){!document.hidden&&qo(this._element)&&this.next()}prev(){this._slide(mo)}pause(){this._isSliding&&f2(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){le.one(this._element,nc,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){le.one(this._element,nc,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?ss:mo;this._slide(o,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&le.on(this._element,Mk,e=>this._keydown(e)),this._config.pause==="hover"&&(le.on(this._element,Ok,()=>this.pause()),le.on(this._element,Lk,()=>this._maybeEnableCycle())),this._config.touch&&Na.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ie.find(Hk,this._element))le.on(r,Dk,o=>o.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(bo)),rightCallback:()=>this._slide(this._directionToOrder(ki)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Nk+this._config.interval))}};this._swipeHelper=new Na(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Yk[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ie.findOne(S2,this._indicatorsElement);t.classList.remove(hi),t.removeAttribute("aria-current");const r=Ie.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(hi),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const r=this._getActive(),o=e===ss,s=t||md(this._getItems(),r,o,this._config.wrap);if(s===r)return;const i=this._getItemIndex(s),l=p=>le.trigger(this._element,p,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:i});if(l(Ik).defaultPrevented||!r||!s)return;const u=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(i),this._activeElement=s;const d=o?Vk:Fk,f=o?$k:zk;s.classList.add(f),Gs(s),r.classList.add(d),s.classList.add(d);const h=()=>{s.classList.remove(d,f),s.classList.add(hi),r.classList.remove(hi,f,d),this._isSliding=!1,l(nc)};this._queueCallback(h,r,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(Pk)}_getActive(){return Ie.findOne(Uk,this._element)}_getItems(){return Ie.find(k2,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return on()?e===bo?mo:ss:e===bo?ss:mo}_orderToDirection(e){return on()?e===mo?bo:ki:e===mo?ki:bo}static jQueryInterface(e){return this.each(function(){const t=Zs.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(document,Bk,Wk,function(n){const e=Ie.getElementFromSelector(this);if(!e||!e.classList.contains(T2))return;n.preventDefault();const t=Zs.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(Kn.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});le.on(window,Rk,()=>{const n=Ie.find(Kk);for(const e of n)Zs.getOrCreateInstance(e)});an(Zs);const Zk="collapse",Jk="bs.collapse",Js=`.${Jk}`,Xk=".data-api",qk=`show${Js}`,e_=`shown${Js}`,t_=`hide${Js}`,n_=`hidden${Js}`,r_=`click${Js}${Xk}`,rc="show",xo="collapse",pi="collapsing",o_="collapsed",s_=`:scope .${xo} .${xo}`,i_="collapse-horizontal",a_="width",l_="height",c_=".collapse.show, .collapse.collapsing",Zc='[data-bs-toggle="collapse"]',u_={parent:null,toggle:!0},d_={parent:"(null|element)",toggle:"boolean"};class Ps extends vn{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const r=Ie.find(Zc);for(const o of r){const s=Ie.getSelectorFromElement(o),i=Ie.find(s).filter(l=>l===this._element);s!==null&&i.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 u_}static get DefaultType(){return d_}static get NAME(){return Zk}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(c_).filter(l=>l!==this._element).map(l=>Ps.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||le.trigger(this._element,qk).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(xo),this._element.classList.add(pi),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(xo,rc),this._element.style[r]="",le.trigger(this._element,e_)},i=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||le.trigger(this._element,t_).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Gs(this._element),this._element.classList.add(pi),this._element.classList.remove(xo,rc);for(const o of this._triggerArray){const s=Ie.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(xo),le.trigger(this._element,n_)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(rc)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=gr(e.parent),e}_getDimension(){return this._element.classList.contains(i_)?a_:l_}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Zc);for(const t of e){const r=Ie.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){const t=Ie.find(s_,this._config.parent);return Ie.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle(o_,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=Ps.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}le.on(document,r_,Zc,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const e of Ie.getMultipleElementsFromSelector(this))Ps.getOrCreateInstance(e,{toggle:!1}).toggle()});an(Ps);const Uh="dropdown",f_="bs.dropdown",ao=`.${f_}`,vd=".data-api",h_="Escape",Hh="Tab",p_="ArrowUp",jh="ArrowDown",m_=2,g_=`hide${ao}`,v_=`hidden${ao}`,y_=`show${ao}`,E_=`shown${ao}`,_2=`click${ao}${vd}`,x2=`keydown${ao}${vd}`,C_=`keyup${ao}${vd}`,wo="show",A_="dropup",b_="dropend",w_="dropstart",T_="dropup-center",S_="dropdown-center",$r='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',k_=`${$r}.${wo}`,_i=".dropdown-menu",__=".navbar",x_=".navbar-nav",N_=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",I_=on()?"top-end":"top-start",M_=on()?"top-start":"top-end",O_=on()?"bottom-end":"bottom-start",L_=on()?"bottom-start":"bottom-end",D_=on()?"left-start":"right-start",R_=on()?"right-start":"left-start",B_="top",P_="bottom",F_={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},V_={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Nn extends vn{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ie.next(this._element,_i)[0]||Ie.prev(this._element,_i)[0]||Ie.findOne(_i,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return F_}static get DefaultType(){return V_}static get NAME(){return Uh}toggle(){return this._isShown()?this.hide():this.show()}show(){if(vr(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!le.trigger(this._element,y_,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(x_))for(const r of[].concat(...document.body.children))le.on(r,"mouseover",xa);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(wo),this._element.classList.add(wo),le.trigger(this._element,E_,e)}}hide(){if(vr(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(!le.trigger(this._element,g_,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))le.off(r,"mouseover",xa);this._popper&&this._popper.destroy(),this._menu.classList.remove(wo),this._element.classList.remove(wo),this._element.setAttribute("aria-expanded","false"),Kn.removeDataAttribute(this._menu,"popper"),le.trigger(this._element,v_,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Wn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Uh.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof Km>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Wn(this._config.reference)?e=gr(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=nl(e,this._menu,t)}_isShown(){return this._menu.classList.contains(wo)}_getPlacement(){const e=this._parent;if(e.classList.contains(b_))return D_;if(e.classList.contains(w_))return R_;if(e.classList.contains(T_))return B_;if(e.classList.contains(S_))return P_;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(A_)?t?M_:I_:t?L_:O_}_detectNavbar(){return this._element.closest(__)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,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")&&(Kn.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Bt(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const r=Ie.find(N_,this._menu).filter(o=>qo(o));r.length&&md(r,t,e===jh,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Nn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===m_||e.type==="keyup"&&e.key!==Hh)return;const t=Ie.find(k_);for(const r of t){const o=Nn.getInstance(r);if(!o||o._config.autoClose===!1)continue;const s=e.composedPath(),i=s.includes(o._menu);if(s.includes(o._element)||o._config.autoClose==="inside"&&!i||o._config.autoClose==="outside"&&i||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Hh||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:o._element};e.type==="click"&&(l.clickEvent=e),o._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),r=e.key===h_,o=[p_,jh].includes(e.key);if(!o&&!r||t&&!r)return;e.preventDefault();const s=this.matches($r)?this:Ie.prev(this,$r)[0]||Ie.next(this,$r)[0]||Ie.findOne($r,e.delegateTarget.parentNode),i=Nn.getOrCreateInstance(s);if(o){e.stopPropagation(),i.show(),i._selectMenuItem(e);return}i._isShown()&&(e.stopPropagation(),i.hide(),s.focus())}}le.on(document,x2,$r,Nn.dataApiKeydownHandler);le.on(document,x2,_i,Nn.dataApiKeydownHandler);le.on(document,_2,Nn.clearMenus);le.on(document,C_,Nn.clearMenus);le.on(document,_2,$r,function(n){n.preventDefault(),Nn.getOrCreateInstance(this).toggle()});an(Nn);const N2="backdrop",$_="fade",Wh="show",Kh=`mousedown.bs.${N2}`,z_={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},U_={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class I2 extends Qs{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return z_}static get DefaultType(){return U_}static get NAME(){return N2}show(e){if(!this._config.isVisible){Bt(e);return}this._append();const t=this._getElement();this._config.isAnimated&&Gs(t),t.classList.add(Wh),this._emulateAnimation(()=>{Bt(e)})}hide(e){if(!this._config.isVisible){Bt(e);return}this._getElement().classList.remove(Wh),this._emulateAnimation(()=>{this.dispose(),Bt(e)})}dispose(){this._isAppended&&(le.off(this._element,Kh),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($_),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=gr(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),le.on(e,Kh,()=>{Bt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){m2(e,this._getElement(),this._config.isAnimated)}}const H_="focustrap",j_="bs.focustrap",Ia=`.${j_}`,W_=`focusin${Ia}`,K_=`keydown.tab${Ia}`,Y_="Tab",G_="forward",Yh="backward",Q_={autofocus:!0,trapElement:null},Z_={autofocus:"boolean",trapElement:"element"};class M2 extends Qs{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Q_}static get DefaultType(){return Z_}static get NAME(){return H_}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),le.off(document,Ia),le.on(document,W_,e=>this._handleFocusin(e)),le.on(document,K_,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,le.off(document,Ia))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const r=Ie.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===Yh?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===Y_&&(this._lastTabNavDirection=e.shiftKey?Yh:G_)}}const Gh=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Qh=".sticky-top",mi="padding-right",Zh="margin-right";class Jc{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,mi,t=>t+e),this._setElementAttributes(Gh,mi,t=>t+e),this._setElementAttributes(Qh,Zh,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,mi),this._resetElementAttributes(Gh,mi),this._resetElementAttributes(Qh,Zh)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const o=this.getWidth(),s=i=>{if(i!==this._element&&window.innerWidth>i.clientWidth+o)return;this._saveInitialAttribute(i,t);const l=window.getComputedStyle(i).getPropertyValue(t);i.style.setProperty(t,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,s)}_saveInitialAttribute(e,t){const r=e.style.getPropertyValue(t);r&&Kn.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){const r=o=>{const s=Kn.getDataAttribute(o,t);if(s===null){o.style.removeProperty(t);return}Kn.removeDataAttribute(o,t),o.style.setProperty(t,s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(Wn(e)){t(e);return}for(const r of Ie.find(e,this._element))t(r)}}const J_="modal",X_="bs.modal",sn=`.${X_}`,q_=".data-api",ex="Escape",tx=`hide${sn}`,nx=`hidePrevented${sn}`,O2=`hidden${sn}`,L2=`show${sn}`,rx=`shown${sn}`,ox=`resize${sn}`,sx=`click.dismiss${sn}`,ix=`mousedown.dismiss${sn}`,ax=`keydown.dismiss${sn}`,lx=`click${sn}${q_}`,Jh="modal-open",cx="fade",Xh="show",oc="modal-static",ux=".modal.show",dx=".modal-dialog",fx=".modal-body",hx='[data-bs-toggle="modal"]',px={backdrop:!0,focus:!0,keyboard:!0},mx={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class yr extends vn{constructor(e,t){super(e,t),this._dialog=Ie.findOne(dx,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Jc,this._addEventListeners()}static get Default(){return px}static get DefaultType(){return mx}static get NAME(){return J_}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||le.trigger(this._element,L2,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Jh),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||le.trigger(this._element,tx).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xh),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){le.off(window,sn),le.off(this._dialog,sn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new I2({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new M2({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 t=Ie.findOne(fx,this._dialog);t&&(t.scrollTop=0),Gs(this._element),this._element.classList.add(Xh);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,le.trigger(this._element,rx,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){le.on(this._element,ax,e=>{if(e.key===ex){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),le.on(window,ox,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),le.on(this._element,ix,e=>{le.one(this._element,sx,t=>{if(!(this._element!==e.target||this._element!==t.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(Jh),this._resetAdjustments(),this._scrollBar.reset(),le.trigger(this._element,O2)})}_isAnimated(){return this._element.classList.contains(cx)}_triggerBackdropTransition(){if(le.trigger(this._element,nx).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(oc)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(oc),this._queueCallback(()=>{this._element.classList.remove(oc),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const o=on()?"paddingLeft":"paddingRight";this._element.style[o]=`${t}px`}if(!r&&e){const o=on()?"paddingRight":"paddingLeft";this._element.style[o]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}}le.on(document,lx,hx,function(n){const e=Ie.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),le.one(e,L2,o=>{o.defaultPrevented||le.one(e,O2,()=>{qo(this)&&this.focus()})});const t=Ie.findOne(ux);t&&yr.getInstance(t).hide(),yr.getOrCreateInstance(e).toggle(this)});il(yr);an(yr);const gx="offcanvas",vx="bs.offcanvas",Qn=`.${vx}`,D2=".data-api",yx=`load${Qn}${D2}`,Ex="Escape",qh="show",ep="showing",tp="hiding",Cx="offcanvas-backdrop",R2=".offcanvas.show",Ax=`show${Qn}`,bx=`shown${Qn}`,wx=`hide${Qn}`,np=`hidePrevented${Qn}`,B2=`hidden${Qn}`,Tx=`resize${Qn}`,Sx=`click${Qn}${D2}`,kx=`keydown.dismiss${Qn}`,_x='[data-bs-toggle="offcanvas"]',xx={backdrop:!0,keyboard:!0,scroll:!1},Nx={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Er extends vn{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return xx}static get DefaultType(){return Nx}static get NAME(){return gx}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||le.trigger(this._element,Ax,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Jc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ep);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(qh),this._element.classList.remove(ep),le.trigger(this._element,bx,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||le.trigger(this._element,wx).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(tp),this._backdrop.hide();const t=()=>{this._element.classList.remove(qh,tp),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Jc().reset(),le.trigger(this._element,B2)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){le.trigger(this._element,np);return}this.hide()},t=!!this._config.backdrop;return new I2({className:Cx,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new M2({trapElement:this._element})}_addEventListeners(){le.on(this._element,kx,e=>{if(e.key===Ex){if(this._config.keyboard){this.hide();return}le.trigger(this._element,np)}})}static jQueryInterface(e){return this.each(function(){const t=Er.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}le.on(document,Sx,_x,function(n){const e=Ie.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),vr(this))return;le.one(e,B2,()=>{qo(this)&&this.focus()});const t=Ie.findOne(R2);t&&t!==e&&Er.getInstance(t).hide(),Er.getOrCreateInstance(e).toggle(this)});le.on(window,yx,()=>{for(const n of Ie.find(R2))Er.getOrCreateInstance(n).show()});le.on(window,Tx,()=>{for(const n of Ie.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&Er.getOrCreateInstance(n).hide()});il(Er);an(Er);const Ix=/^aria-[\w-]*$/i,P2={"*":["class","dir","id","lang","role",Ix],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],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:[]},Mx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ox=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Lx=(n,e)=>{const t=n.nodeName.toLowerCase();return e.includes(t)?Mx.has(t)?!!Ox.test(n.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function Dx(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);const o=new window.DOMParser().parseFromString(n,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(const i of s){const l=i.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){i.remove();continue}const a=[].concat(...i.attributes),u=[].concat(e["*"]||[],e[l]||[]);for(const d of a)Lx(d,u)||i.removeAttribute(d.nodeName)}return o.body.innerHTML}const Rx="TemplateFactory",Bx={allowList:P2,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Px={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Fx={entry:"(string|element|function|null)",selector:"(string|element)"};class Vx extends Qs{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Bx}static get DefaultType(){return Px}static get NAME(){return Rx}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,s]of Object.entries(this._config.content))this._setContent(e,s,o);const t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},Fx)}_setContent(e,t,r){const o=Ie.findOne(r,e);if(o){if(t=this._resolvePossibleFunction(t),!t){o.remove();return}if(Wn(t)){this._putElementInTemplate(gr(t),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(t);return}o.textContent=t}}_maybeSanitize(e){return this._config.sanitize?Dx(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Bt(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const $x="tooltip",zx=new Set(["sanitize","allowList","sanitizeFn"]),sc="fade",Ux="modal",gi="show",Hx=".tooltip-inner",rp=`.${Ux}`,op="hide.bs.modal",is="hover",ic="focus",jx="click",Wx="manual",Kx="hide",Yx="hidden",Gx="show",Qx="shown",Zx="inserted",Jx="click",Xx="focusin",qx="focusout",eN="mouseenter",tN="mouseleave",nN={AUTO:"auto",TOP:"top",RIGHT:on()?"left":"right",BOTTOM:"bottom",LEFT:on()?"right":"left"},rN={allowList:P2,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"},oN={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 _n extends vn{constructor(e,t){if(typeof Km>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),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 rN}static get DefaultType(){return oN}static get NAME(){return $x}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),le.off(this._element.closest(rp),op,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=le.trigger(this._element,this.constructor.eventName(Gx)),r=(h2(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:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),le.trigger(this._element,this.constructor.eventName(Zx))),this._popper=this._createPopper(o),o.classList.add(gi),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))le.on(l,"mouseover",xa);const i=()=>{le.trigger(this._element,this.constructor.eventName(Qx)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||le.trigger(this._element,this.constructor.eventName(Kx)).defaultPrevented)return;if(this._getTipElement().classList.remove(gi),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))le.off(o,"mouseover",xa);this._activeTrigger[jx]=!1,this._activeTrigger[ic]=!1,this._activeTrigger[is]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),le.trigger(this._element,this.constructor.eventName(Yx)))};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 t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(sc,gi),t.classList.add(`bs-${this.constructor.NAME}-auto`);const r=jS(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(sc),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Vx({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Hx]: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(sc)}_isShown(){return this.tip&&this.tip.classList.contains(gi)}_createPopper(e){const t=Bt(this._config.placement,[this,e,this._element]),r=nN[t.toUpperCase()];return nl(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Bt(e,[this._element])}_getPopperConfig(e){const t={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{...t,...Bt(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")le.on(this._element,this.constructor.eventName(Jx),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==Wx){const r=t===is?this.constructor.eventName(eN):this.constructor.eventName(Xx),o=t===is?this.constructor.eventName(tN):this.constructor.eventName(qx);le.on(this._element,r,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?ic:is]=!0,i._enter()}),le.on(this._element,o,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?ic:is]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},le.on(this._element.closest(rp),op,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,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Kn.getDataAttributes(this._element);for(const r of Object.keys(t))zx.has(r)&&delete t[r];return e={...t,...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:gr(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[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=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 t=_n.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}an(_n);const sN="popover",iN=".popover-header",aN=".popover-body",lN={..._n.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"},cN={..._n.DefaultType,content:"(null|string|element|function)"};class zr extends _n{static get Default(){return lN}static get DefaultType(){return cN}static get NAME(){return sN}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[iN]:this._getTitle(),[aN]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=zr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}an(zr);const uN="scrollspy",dN="bs.scrollspy",yd=`.${dN}`,fN=".data-api",hN=`activate${yd}`,sp=`click${yd}`,pN=`load${yd}${fN}`,mN="dropdown-item",go="active",gN='[data-bs-spy="scroll"]',ac="[href]",vN=".nav, .list-group",ip=".nav-link",yN=".nav-item",EN=".list-group-item",CN=`${ip}, ${yN} > ${ip}, ${EN}`,AN=".dropdown",bN=".dropdown-toggle",wN={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},TN={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class cl extends vn{constructor(e,t){super(e,t),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 wN}static get DefaultType(){return TN}static get NAME(){return uN}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=gr(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(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(le.off(this._config.target,sp),le.on(this._config.target,sp,ac,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const r=this._rootElement||window,o=t.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(t=>this._observerCallback(t),e)}_observerCallback(e){const t=i=>this._targetLinks.get(`#${i.target.id}`),r=i=>{this._previousScrollData.visibleEntryTop=i.target.offsetTop,this._process(t(i))},o=(this._rootElement||document.documentElement).scrollTop,s=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const i of e){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(i));continue}const l=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&l){if(r(i),!o)return;continue}!s&&!l&&r(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ie.find(ac,this._config.target);for(const t of e){if(!t.hash||vr(t))continue;const r=Ie.findOne(decodeURI(t.hash),this._element);qo(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(go),this._activateParents(e),le.trigger(this._element,hN,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(mN)){Ie.findOne(bN,e.closest(AN)).classList.add(go);return}for(const t of Ie.parents(e,vN))for(const r of Ie.prev(t,CN))r.classList.add(go)}_clearActiveClass(e){e.classList.remove(go);const t=Ie.find(`${ac}.${go}`,e);for(const r of t)r.classList.remove(go)}static jQueryInterface(e){return this.each(function(){const t=cl.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(window,pN,()=>{for(const n of Ie.find(gN))cl.getOrCreateInstance(n)});an(cl);const SN="tab",kN="bs.tab",lo=`.${kN}`,_N=`hide${lo}`,xN=`hidden${lo}`,NN=`show${lo}`,IN=`shown${lo}`,MN=`click${lo}`,ON=`keydown${lo}`,LN=`load${lo}`,DN="ArrowLeft",ap="ArrowRight",RN="ArrowUp",lp="ArrowDown",Ur="active",cp="fade",lc="show",BN="dropdown",PN=".dropdown-toggle",FN=".dropdown-menu",cc=":not(.dropdown-toggle)",VN='.list-group, .nav, [role="tablist"]',$N=".nav-item, .list-group-item",zN=`.nav-link${cc}, .list-group-item${cc}, [role="tab"]${cc}`,F2='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',uc=`${zN}, ${F2}`,UN=`.${Ur}[data-bs-toggle="tab"], .${Ur}[data-bs-toggle="pill"], .${Ur}[data-bs-toggle="list"]`;class jo extends vn{constructor(e){super(e),this._parent=this._element.closest(VN),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),le.on(this._element,ON,t=>this._keydown(t)))}static get NAME(){return SN}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),r=t?le.trigger(t,_N,{relatedTarget:e}):null;le.trigger(e,NN,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Ur),this._activate(Ie.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(lc);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),le.trigger(e,IN,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(cp))}_deactivate(e,t){if(!e)return;e.classList.remove(Ur),e.blur(),this._deactivate(Ie.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(lc);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),le.trigger(e,xN,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(cp))}_keydown(e){if(![DN,ap,RN,lp].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[ap,lp].includes(e.key),r=md(this._getChildren().filter(o=>!vr(o)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),jo.getOrCreateInstance(r).show())}_getChildren(){return Ie.find(uc,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ie.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const r=this._getOuterElement(e);if(!r.classList.contains(BN))return;const o=(s,i)=>{const l=Ie.findOne(s,r);l&&l.classList.toggle(i,t)};o(PN,Ur),o(FN,lc),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(Ur)}_getInnerElement(e){return e.matches(uc)?e:Ie.findOne(uc,e)}_getOuterElement(e){return e.closest($N)||e}static jQueryInterface(e){return this.each(function(){const t=jo.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(document,MN,F2,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!vr(this)&&jo.getOrCreateInstance(this).show()});le.on(window,LN,()=>{for(const n of Ie.find(UN))jo.getOrCreateInstance(n)});an(jo);const HN="toast",jN="bs.toast",Sr=`.${jN}`,WN=`mouseover${Sr}`,KN=`mouseout${Sr}`,YN=`focusin${Sr}`,GN=`focusout${Sr}`,QN=`hide${Sr}`,ZN=`hidden${Sr}`,JN=`show${Sr}`,XN=`shown${Sr}`,qN="fade",up="hide",vi="show",yi="showing",eI={animation:"boolean",autohide:"boolean",delay:"number"},tI={animation:!0,autohide:!0,delay:5e3};class ts extends vn{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return tI}static get DefaultType(){return eI}static get NAME(){return HN}show(){if(le.trigger(this._element,JN).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(qN);const t=()=>{this._element.classList.remove(yi),le.trigger(this._element,XN),this._maybeScheduleHide()};this._element.classList.remove(up),Gs(this._element),this._element.classList.add(vi,yi),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||le.trigger(this._element,QN).defaultPrevented)return;const t=()=>{this._element.classList.add(up),this._element.classList.remove(yi,vi),le.trigger(this._element,ZN)};this._element.classList.add(yi),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(vi),super.dispose()}isShown(){return this._element.classList.contains(vi)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){le.on(this._element,WN,e=>this._onInteraction(e,!0)),le.on(this._element,KN,e=>this._onInteraction(e,!1)),le.on(this._element,YN,e=>this._onInteraction(e,!0)),le.on(this._element,GN,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=ts.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}il(ts);an(ts);function dp(n,e){return e.value||n.getAttribute("title")||""}const Xs={mounted:(n,e)=>{const t=dp(n,e);t&&n.setAttribute("title",t),new _n(n)},updated:(n,e)=>{const t=_n.getInstance(n);t&&t.dispose();const r=dp(n,e);r&&n.setAttribute("title",r),new _n(n)},unmounted:n=>{const e=_n.getInstance(n);e&&e.dispose()}},nI={key:0,class:"pills-list__wrapper"},rI={class:"pills-list__ul"},oI={class:"bd-markdown-editor__menu-bottom"},sI={key:0,class:"vr"},V2=c.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:[Boolean,null],default:null},variant:{default:Zl.BASIC},files:{default:void 0},pills:{default:void 0},modelValue:{}},emits:["update:modelValue","upload","action"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=io(t,"modelValue",e),s=[DT,RT,BT,aS.configure({placeholder:t.placeholder}),TS,iS.configure({openOnClick:!1,validate:I=>/^https?:\/\//i.test(I)})];t.variant===Zl.FULL&&s.push(fS,vS,yS,ES,AS,wS);const i=LT({content:o.value,extensions:s,onUpdate:({editor:I})=>{const{view:M,state:L}=I,{from:$,to:V}=M.state.selection;if(L.doc.textBetween($-1,V,"")==" "&&I.getAttributes("link").href!=null&&I.chain().setTextSelection({from:$-1,to:V}).toggleLink({href:I.getAttributes("link").href}).setTextSelection({from:V,to:V}).run(),I.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",I.getHTML())}});c.watch(()=>t.modelValue,I=>{i.value.getHTML()!==I&&i.value.commands.setContent(I,!0,{preserveWhitespace:"full"})});const l=c.computed(()=>t.state===!1?"is-invalid":null),a=c.computed(()=>g("bold")),u=c.computed(()=>g("italic")),d=c.computed(()=>g("underline")),f=c.computed(()=>g("bulletList")),h=c.computed(()=>g("orderedList")),p=c.computed(()=>g("link")),m=c.computed(()=>t.variant===Zl.FULL),g=I=>i.value&&i.value.isActive(I)?"active":null,v=c.computed(()=>t.files&&t.files.length>0?_a(t.files,!1):null),C=c.computed(()=>t.files&&t.files.length>0?_a(t.files,!0):null),b=I=>{e("action",{name:"delete-attachment",obj:I})},E=I=>{e("action",{name:"image-attachment",obj:I})},y=c.computed(()=>{if(!i.value)return!1;const{from:I,to:M}=i.value.state.selection;return I!==M}),x=c.computed(()=>y.value?"Voeg een link toe":"Selecteer eerst tekst"),w=()=>{const I=i.value.getAttributes("link").href,M=window.prompt("Voeg link toe",I);if(M!==null){if(M===""){i.value.chain().focus().unsetLink().run();return}i.value.chain().focus().toggleLink({href:M}).run()}};return(I,M)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["bd-markdown-editor",l.value])},[c.createVNode(c.unref(OT),{editor:c.unref(i)},null,8,["editor"]),I.pills?(c.openBlock(),c.createElementBlock("div",nI,[c.createElementVNode("ul",rI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(I.pills,(L,$)=>(c.openBlock(),c.createElementBlock("li",{key:$,class:"pills-list__li"},[c.createVNode($a,c.normalizeProps(c.guardReactiveProps(L)),null,16)]))),128))])])):c.createCommentVNode("",!0),c.renderSlot(I.$slots,"default"),v.value?(c.openBlock(),c.createBlock(ol,{key:1,files:v.value,"no-download":!0,"show-delete":!0,onDelete:b},null,8,["files"])):c.createCommentVNode("",!0),C.value?(c.openBlock(),c.createBlock(sl,{key:2,files:C.value,"no-download":!0,"show-delete":!0,onDelete:b,onShow:E},null,8,["files"])):c.createCommentVNode("",!0),c.createElementVNode("div",oI,[c.createVNode(Qe,{variant:"light",type:"button",onClick:r},{default:c.withCtx(()=>[c.createVNode(c.unref(Jr))]),_:1}),m.value?(c.openBlock(),c.createElementBlock("div",sI)):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:1,variant:"light",type:"button",class:c.normalizeClass(a.value),onClick:M[0]||(M[0]=L=>c.unref(i).chain().focus().toggleBold().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(cu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:2,variant:"light",type:"button",class:c.normalizeClass(u.value),onClick:M[1]||(M[1]=L=>c.unref(i).chain().focus().toggleItalic().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(vu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:3,variant:"light",type:"button",class:c.normalizeClass(d.value),onClick:M[2]||(M[2]=L=>c.unref(i).chain().focus().toggleUnderline().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(Tu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:4,variant:"light",type:"button",class:c.normalizeClass(f.value),onClick:M[3]||(M[3]=L=>c.unref(i).chain().focus().toggleBulletList().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(uu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:5,variant:"light",type:"button",class:c.normalizeClass(h.value),onClick:M[4]||(M[4]=L=>c.unref(i).chain().focus().toggleOrderedList().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(Eu))]),_:1},8,["class"])):c.createCommentVNode("",!0),c.withDirectives((c.openBlock(),c.createElementBlock("span",null,[m.value?(c.openBlock(),c.createBlock(Qe,{key:0,variant:"light",type:"button",class:c.normalizeClass(p.value),onClick:w,disabled:!y.value},{default:c.withCtx(()=>[c.createVNode(c.unref(Ba))]),_:1},8,["class","disabled"])):c.createCommentVNode("",!0)])),[[c.unref(Xs),x.value]])])],2),c.createVNode(Va,{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),iI={class:"header"},aI=c.createElementVNode("div",null,"Menu",-1),lI={class:"icon-close-wrapper"},cI={class:"navbar"},uI={class:"nav navbar-nav w-100"},dI={class:"nav-item"},fI={class:"nav-item"},Ed=c.defineComponent({__name:"BDMobileMenu",props:{active:{type:Boolean,default:void 0},options:{}},emits:["hide","signout"],setup(n,{emit:e}){const t=n,r=c.computed(()=>({active:t.active===!0,inactive:t.active===!1})),o=()=>e("hide"),s=()=>e("signout");return(i,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["bd-mobile-menu",r.value])},[c.createElementVNode("div",iI,[aI,c.createElementVNode("div",lI,[c.createVNode(Da,{onClick:o})])]),c.createElementVNode("nav",cI,[c.createElementVNode("ul",uI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.options,a=>(c.openBlock(),c.createElementBlock("li",dI,[c.createVNode(Zr,c.mergeProps({class:"nav-link"},a,{onClick:o}),null,16)]))),256)),c.renderSlot(i.$slots,"special-options"),c.createElementVNode("li",fI,[c.createVNode(Zr,{class:"nav-link",text:"Uitloggen",onClick:s})])])])],2))}}),hI={class:"bd-user"},pI={class:"bd-user__information"},mI={class:"text-break"},gI={class:"overflow-x-hidden"},$2=c.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=c.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(c.openBlock(),c.createElementBlock("div",hI,[e.hideImage?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Hs,c.mergeProps({key:0},e.img,{size:"sm"}),null,16)),c.createElementVNode("div",pI,[c.createElementVNode("header",null,[c.createElementVNode("h5",mI,c.toDisplayString(e.name),1),c.renderSlot(r.$slots,"header-extra")]),c.createElementVNode("span",gI,c.toDisplayString(t.value),1)])]))}}),vI={class:"bd-chat-cloud-card"},yI={class:"bd-chat-cloud-card__header"},EI={class:"bd-chat-cloud-card__body"},CI=["innerHTML"],AI={class:"bd-chat-cloud-card__footer"},bI={key:0,class:"pills-list__wrapper"},wI={class:"pills-list__ul"},z2=c.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}},emits:["show-attachment","action"],setup(n,{emit:e}){const t=n,r=c.computed(()=>t.isSender?"sender":Fe),o=c.computed(()=>_a(t.files,!1)),s=c.computed(()=>_a(t.files,!0)),i=()=>{e("action","copy-message")},l=a=>{e("show-attachment",a)};return(a,u)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["bd-chat-cloud",r.value])},[c.createVNode(Hs,{src:t.src,username:t.username,size:"sm"},null,8,["src","username"]),c.createElementVNode("div",vI,[c.createElementVNode("div",yI,[c.renderSlot(a.$slots,"header",{},()=>[c.createTextVNode(c.toDisplayString(a.headerTitle),1)]),c.createVNode(Qe,{variant:"outline-primary-dark",size:"sm",onClick:i},{default:c.withCtx(()=>[c.createTextVNode(" kopieer ")]),_:1})]),c.createElementVNode("div",EI,[c.renderSlot(a.$slots,"body",{},()=>[c.createElementVNode("div",{class:"bd-chat-cloud-card__message",innerHTML:t.message},null,8,CI)])]),c.createElementVNode("div",AI,[c.renderSlot(a.$slots,"footer",{},()=>[a.pills?(c.openBlock(),c.createElementBlock("div",bI,[c.createElementVNode("ul",wI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.pills,(d,f)=>(c.openBlock(),c.createElementBlock("li",{key:f,class:"pills-list__li"},[c.createVNode($a,c.normalizeProps(c.guardReactiveProps(d)),null,16)]))),128))])])):c.createCommentVNode("",!0),o.value&&o.value.length>0?(c.openBlock(),c.createBlock(ol,{key:1,files:o.value},null,8,["files"])):c.createCommentVNode("",!0),s.value&&s.value.length>0?(c.openBlock(),c.createBlock(sl,{key:2,"fast-download":!0,files:s.value,onShow:l},null,8,["files"])):c.createCommentVNode("",!0)])])])],2))}}),TI=c.defineComponent({__name:"BDTableSortHeader",props:["active","label","sortDesc"],emits:["sortAsc","sortDesc"],setup(n,{emit:e}){const t=n,r=c.ref(t.sortDesc),o=()=>{t.active&&(r.value=!r.value)},s=()=>{if(!t.active)return;const l=r.value?"sortDesc":"sortAsc";e(l)},i=c.computed(()=>({"bd-table-sort":!0,active:t.active}));return c.watch(()=>t.active,(l,a)=>{l&&!a&&(r.value=!1,e("sortAsc"))}),s(),(l,a)=>(c.openBlock(),c.createElementBlock("th",{class:c.normalizeClass(i.value),onClick:a[0]||(a[0]=u=>{o(),s()})},[c.createElementVNode("span",null,c.toDisplayString(t.label),1),t.active&&!r.value?(c.openBlock(),c.createBlock(c.unref(Cu),{key:0})):t.active&&r.value?(c.openBlock(),c.createBlock(c.unref(Au),{key:1})):(c.openBlock(),c.createBlock(c.unref(bu),{key:2}))],2))}}),SI={class:"bd-table"},kI={key:0,class:"table"},_I={key:1},xI=["onClick"],NI={key:0},II={key:1,class:"empty-text"},U2=c.defineComponent({__name:"BDTable",props:["fields","items","sortBy","sortDesc","tbodyTrClass","emptyText"],emits:["row-click","sort-changed"],setup(n,{expose:e,emit:t}){const r=n,o=c.ref(r.items),s=c.ref(r.sortBy),i=f=>s.value=f,l=(f,h,p)=>{const m=h[f],g=p[f];if(m==null)return 1;if(g==null)return-1;const v=m.toString(),C=g.toString();return v.localeCompare(C,void 0,{numeric:!0})},a=f=>{o.value=o.value.sort((p,m)=>l(f,p,m)),t("sort-changed",{sortBy:f,sortDesc:!1})},u=f=>{o.value=o.value.sort((p,m)=>l(f,m,p)),t("sort-changed",{sortBy:f,sortDesc:!0})},d=()=>{o.value=r.items};return c.watch(()=>r.items,f=>{o.value=f}),e({Refresh:d}),(f,h)=>(c.openBlock(),c.createElementBlock("div",SI,[r.items&&r.items.length>0?(c.openBlock(),c.createElementBlock("table",kI,[c.createElementVNode("thead",null,[c.createElementVNode("tr",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.fields,p=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[p.isVisible?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[p.sortable?(c.openBlock(),c.createBlock(TI,{key:0,label:p.label,active:p.key==s.value,sortDesc:r.sortDesc,onClick:m=>i(p.key),onSortAsc:m=>a(p.key),onSortDesc:m=>u(p.key)},null,8,["label","active","sortDesc","onClick","onSortAsc","onSortDesc"])):(c.openBlock(),c.createElementBlock("th",_I,c.toDisplayString(p.label),1))],64)):c.createCommentVNode("",!0)],64))),256))])]),c.createElementVNode("tbody",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,p=>(c.openBlock(),c.createElementBlock("tr",{class:c.normalizeClass(r.tbodyTrClass&&r.tbodyTrClass(p)),onClick:m=>t("row-click",p)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.fields,m=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[m.isVisible?(c.openBlock(),c.createElementBlock("td",NI,[f.$slots.hasOwnProperty(m.key)?c.renderSlot(f.$slots,m.key,{key:0,row:p,item:p,value:p[m.key]}):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(p[m.key]),1)],64))])):c.createCommentVNode("",!0)],64))),256))],10,xI))),256))])])):(c.openBlock(),c.createElementBlock("p",II,c.toDisplayString(r.emptyText),1))]))}}),MI=["id"],OI={key:0,class:"toast-body__title"},LI={class:"actions"},DI=["textContent"],RI=["textContent"],BI={class:"icon-wrapper"},PI=["textContent"],FI=["textContent"],fp=3e4,hp=5e3,H2=c.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(n,{emit:e}){const t=n;let r=c.ref(!1),o=c.ref(!1),s=null,i=null;const l=c.computed(()=>{let b="video-call-toast";return t.id&&(b+=`-${t.id}`),b}),a=c.computed(()=>r.value?[r.value?"is-handled":Fe,o.value?"is-handled--success":Fe,t.canceled?"is-handled--canceled":Fe].join(" "):Fe),u=c.computed(()=>t.canceled?t.localization.videoCallCanceled:o.value?t.localization.videoCallAccepted:t.localization.videoCallRejected),d=c.computed(()=>t.canceled?`${t.firstNameSender}${t.localization.notifyCallerWhenCanceled}`:t.isSender?t.contactInfoReceiver?`${t.contactInfoReceiver.name}${t.localization.notifyCallerWhenRejected}`:t.localization.notifyCallerWhenRejected:o.value?t.localization.openNewTabWhenAccepted:`${t.localization.notifyReceiverWhenRejected.start}${t.firstNameSender}${t.localization.notifyReceiverWhenRejected.end}`.replace(/\s\s+/g," "));c.watch(()=>t.canceled,()=>{r.value=!0});const f=()=>{const b=l.value,E=document.querySelector(`#${b}`);if(E){E.addEventListener("hide.bs.toast",C);var y={autohide:!0,delay:fp+hp};i=ts.getOrCreateInstance(E,y),i.show(),s=window.setTimeout(h,fp)}};c.onMounted(f);const h=()=>{r.value||m()},p=()=>{m(),v()},m=()=>{r.value||(r.value=!0,e("reject-video-call",t.id))},g=()=>{r.value=!0,o.value=!0,e("accept-video-call",t.id),v()},v=()=>{window.clearTimeout(s),window.setTimeout(()=>i.hide(),hp)},C=()=>{r.value=!1,o.value=!1};return(b,E)=>(c.openBlock(),c.createElementBlock("div",{id:l.value,class:"toast bd-video-call-toast",role:"alert","aria-live":"assertive","aria-atomic":"true"},[c.unref(r)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",OI,c.toDisplayString(t.localization.incomingVideoCall),1)),c.createElementVNode("div",{class:c.normalizeClass(["toast-body__main",a.value])},[c.unref(r)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",BI,[c.createVNode(Ii)]),c.createElementVNode("div",null,[c.createElementVNode("p",{textContent:c.toDisplayString(u.value),class:"title"},null,8,PI),c.createElementVNode("p",{textContent:c.toDisplayString(d.value)},null,8,FI)])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(_u,{value:b.contactInfoReceiver},null,8,["value"]),c.createElementVNode("div",LI,[c.createVNode(Qe,{variant:"danger",class:"text-center",onClick:p},{default:c.withCtx(()=>[c.createVNode(du),c.createElementVNode("span",{textContent:c.toDisplayString(t.localization.rejectVideoCall)},null,8,DI)]),_:1}),c.createVNode(Qe,{variant:"success",class:"text-center",onClick:g},{default:c.withCtx(()=>[c.createVNode(Ii),c.createElementVNode("span",{textContent:c.toDisplayString(t.localization.acceptVideoCall)},null,8,RI)]),_:1})])],64))],2)],8,MI))}}),Cd=c.defineComponent({__name:"BDDropdown",props:{size:{default:Tt.MD},variant:{default:Pa.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(n){const e=n,{uniqueIdentifier:t}=Qo(),r=`__BD__DROPDOWN__${t.value}`,o=c.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})),s=c.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),i=c.computed(()=>({"aria-labelledby":r})),l=c.ref(),a=c.ref(),u=()=>{l.value.classList.remove("show"),a.value.classList.remove("show"),a.value.removeAttribute("aria-expanded")};return(d,f)=>(c.openBlock(),c.createElementBlock("div",{class:"bd-dropdown dropdown",onClick:f[0]||(f[0]=c.withModifiers(()=>{},["stop"]))},[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.toggleTag),c.mergeProps({ref_key:"dropdownToggle",ref:a,class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(e.text),1)]),_:1},16)),c.createElementVNode("ul",c.mergeProps({ref_key:"dropdownMenu",ref:l,class:["dropdown-menu",s.value]},i.value,{onClick:u}),[c.renderSlot(d.$slots,"default")],16)]))}}),VI={class:"row bd-header"},$I={class:"col logo-mix"},zI=["src","alt"],UI=c.createElementVNode("div",null,"Menu",-1),HI={key:0,class:"col header-options"},jI={class:"col bd-btn-settings"},Ad=c.defineComponent({__name:"BDHeader",props:{dropdownMenuTitle:{},dropdownOptions:{},headerOptions:{},profileImageSrc:{},profileImageAlt:{},organizationLogoSrc:{},organizationLogoAlt:{}},emits:["click-logo","signout"],setup(n,{emit:e}){const t=n,r=c.computed(()=>{let u=[];return t.headerOptions&&(u=u.concat(t.headerOptions)),t.dropdownOptions&&(u=u.concat(t.dropdownOptions)),u}),o=c.ref(void 0),s=()=>e("click-logo"),i=()=>e("signout"),l=()=>o.value=!0,a=()=>o.value=!1;return(u,d)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("nav",VI,[c.createElementVNode("div",$I,[c.createVNode(lu,{viewBox:"0 0 351 61",class:"logo bd-logo",onClick:s}),t.organizationLogoSrc?(c.openBlock(),c.createElementBlock("img",{key:0,class:"logo organization-logo",src:t.organizationLogoSrc,alt:t.organizationLogoAlt},null,8,zI)):c.createCommentVNode("",!0)]),c.createElementVNode("div",{class:"col bd-hamburger",onClick:l},[UI,c.createVNode(yu)]),t.headerOptions&&t.headerOptions.length!==0?(c.openBlock(),c.createElementBlock("div",HI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.headerOptions,f=>(c.openBlock(),c.createBlock(Qe,{class:"btn-header",to:f.to,variant:"neutral"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(f.text),1)]),_:2},1032,["to"]))),256))])):c.createCommentVNode("",!0),c.createElementVNode("div",jI,[c.renderSlot(u.$slots,"profile-side"),t.profileImageSrc?(c.openBlock(),c.createBlock(Hs,{key:0,src:t.profileImageSrc,alt:t.profileImageAlt,size:"sm"},null,8,["src","alt"])):c.createCommentVNode("",!0),c.createVNode(Cd,{text:t.dropdownMenuTitle,variant:"primary",toggleTag:"a",right:!0},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.dropdownOptions,(f,h)=>(c.openBlock(),c.createBlock(Oi,c.mergeProps({key:h},f),null,16))),128)),c.createVNode(Oi,{text:"Uitloggen",onClick:i})]),_:1},8,["text"])])]),c.createVNode(Ed,{active:o.value,options:r.value,onHide:a,onSignout:i},{"special-options":c.withCtx(()=>[c.renderSlot(u.$slots,"mobile-menu-special-options")]),_:3},8,["active","options"])],64))}});/*!
182
+ */const tr=new Map,Jl={set(n,e,t){tr.has(n)||tr.set(n,new Map);const r=tr.get(n);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,t)},get(n,e){return tr.has(n)&&tr.get(n).get(e)||null},remove(n,e){if(!tr.has(n))return;const t=tr.get(n);t.delete(e),t.size===0&&tr.delete(n)}},zS=1e6,US=1e3,Gc="transitionend",d2=n=>(n&&window.CSS&&window.CSS.escape&&(n=n.replace(/#([^\s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),n),HS=n=>n==null?`${n}`:Object.prototype.toString.call(n).match(/\s([a-z]+)/i)[1].toLowerCase(),jS=n=>{do n+=Math.floor(Math.random()*zS);while(document.getElementById(n));return n},WS=n=>{if(!n)return 0;let{transitionDuration:e,transitionDelay:t}=window.getComputedStyle(n);const r=Number.parseFloat(e),o=Number.parseFloat(t);return!r&&!o?0:(e=e.split(",")[0],t=t.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(t))*US)},f2=n=>{n.dispatchEvent(new Event(Gc))},Wn=n=>!n||typeof n!="object"?!1:(typeof n.jquery<"u"&&(n=n[0]),typeof n.nodeType<"u"),gr=n=>Wn(n)?n.jquery?n[0]:n:typeof n=="string"&&n.length>0?document.querySelector(d2(n)):null,qo=n=>{if(!Wn(n)||n.getClientRects().length===0)return!1;const e=getComputedStyle(n).getPropertyValue("visibility")==="visible",t=n.closest("details:not([open])");if(!t)return e;if(t!==n){const r=n.closest("summary");if(r&&r.parentNode!==t||r===null)return!1}return e},vr=n=>!n||n.nodeType!==Node.ELEMENT_NODE||n.classList.contains("disabled")?!0:typeof n.disabled<"u"?n.disabled:n.hasAttribute("disabled")&&n.getAttribute("disabled")!=="false",h2=n=>{if(!document.documentElement.attachShadow)return null;if(typeof n.getRootNode=="function"){const e=n.getRootNode();return e instanceof ShadowRoot?e:null}return n instanceof ShadowRoot?n:n.parentNode?h2(n.parentNode):null},xa=()=>{},Gs=n=>{n.offsetHeight},p2=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Xl=[],KS=n=>{document.readyState==="loading"?(Xl.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Xl)e()}),Xl.push(n)):n()},on=()=>document.documentElement.dir==="rtl",an=n=>{KS(()=>{const e=p2();if(e){const t=n.NAME,r=e.fn[t];e.fn[t]=n.jQueryInterface,e.fn[t].Constructor=n,e.fn[t].noConflict=()=>(e.fn[t]=r,n.jQueryInterface)}})},Bt=(n,e=[],t=n)=>typeof n=="function"?n(...e):t,m2=(n,e,t=!0)=>{if(!t){Bt(n);return}const r=5,o=WS(e)+r;let s=!1;const i=({target:l})=>{l===e&&(s=!0,e.removeEventListener(Gc,i),Bt(n))};e.addEventListener(Gc,i),setTimeout(()=>{s||f2(e)},o)},md=(n,e,t,r)=>{const o=n.length;let s=n.indexOf(e);return s===-1?!t&&r?n[o-1]:n[0]:(s+=t?1:-1,r&&(s=(s+o)%o),n[Math.max(0,Math.min(s,o-1))])},YS=/[^.]*(?=\..*)\.|.*/,GS=/\..*/,QS=/::\d+$/,ql={};let Fh=1;const g2={mouseenter:"mouseover",mouseleave:"mouseout"},ZS=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 v2(n,e){return e&&`${e}::${Fh++}`||n.uidEvent||Fh++}function y2(n){const e=v2(n);return n.uidEvent=e,ql[e]=ql[e]||{},ql[e]}function JS(n,e){return function t(r){return gd(r,{delegateTarget:n}),t.oneOff&&le.off(n,r.type,e),e.apply(n,[r])}}function XS(n,e,t){return function r(o){const s=n.querySelectorAll(e);for(let{target:i}=o;i&&i!==this;i=i.parentNode)for(const l of s)if(l===i)return gd(o,{delegateTarget:i}),r.oneOff&&le.off(n,o.type,e,t),t.apply(i,[o])}}function E2(n,e,t=null){return Object.values(n).find(r=>r.callable===e&&r.delegationSelector===t)}function C2(n,e,t){const r=typeof e=="string",o=r?t:e||t;let s=A2(n);return ZS.has(s)||(s=n),[r,o,s]}function Vh(n,e,t,r,o){if(typeof e!="string"||!n)return;let[s,i,l]=C2(e,t,r);e in g2&&(i=(m=>function(g){if(!g.relatedTarget||g.relatedTarget!==g.delegateTarget&&!g.delegateTarget.contains(g.relatedTarget))return m.call(this,g)})(i));const a=y2(n),u=a[l]||(a[l]={}),d=E2(u,i,s?t:null);if(d){d.oneOff=d.oneOff&&o;return}const f=v2(i,e.replace(YS,"")),h=s?XS(n,t,i):JS(n,i);h.delegationSelector=s?t:null,h.callable=i,h.oneOff=o,h.uidEvent=f,u[f]=h,n.addEventListener(l,h,s)}function Qc(n,e,t,r,o){const s=E2(e[t],r,o);s&&(n.removeEventListener(t,s,!!o),delete e[t][s.uidEvent])}function qS(n,e,t,r){const o=e[t]||{};for(const[s,i]of Object.entries(o))s.includes(r)&&Qc(n,e,t,i.callable,i.delegationSelector)}function A2(n){return n=n.replace(GS,""),g2[n]||n}const le={on(n,e,t,r){Vh(n,e,t,r,!1)},one(n,e,t,r){Vh(n,e,t,r,!0)},off(n,e,t,r){if(typeof e!="string"||!n)return;const[o,s,i]=C2(e,t,r),l=i!==e,a=y2(n),u=a[i]||{},d=e.startsWith(".");if(typeof s<"u"){if(!Object.keys(u).length)return;Qc(n,a,i,s,o?t:null);return}if(d)for(const f of Object.keys(a))qS(n,a,f,e.slice(1));for(const[f,h]of Object.entries(u)){const p=f.replace(QS,"");(!l||e.includes(p))&&Qc(n,a,i,h.callable,h.delegationSelector)}},trigger(n,e,t){if(typeof e!="string"||!n)return null;const r=p2(),o=A2(e),s=e!==o;let i=null,l=!0,a=!0,u=!1;s&&r&&(i=r.Event(e,t),r(n).trigger(i),l=!i.isPropagationStopped(),a=!i.isImmediatePropagationStopped(),u=i.isDefaultPrevented());const d=gd(new Event(e,{bubbles:l,cancelable:!0}),t);return u&&d.preventDefault(),a&&n.dispatchEvent(d),d.defaultPrevented&&i&&i.preventDefault(),d}};function gd(n,e={}){for(const[t,r]of Object.entries(e))try{n[t]=r}catch{Object.defineProperty(n,t,{configurable:!0,get(){return r}})}return n}function $h(n){if(n==="true")return!0;if(n==="false")return!1;if(n===Number(n).toString())return Number(n);if(n===""||n==="null")return null;if(typeof n!="string")return n;try{return JSON.parse(decodeURIComponent(n))}catch{return n}}function ec(n){return n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Kn={setDataAttribute(n,e,t){n.setAttribute(`data-bs-${ec(e)}`,t)},removeDataAttribute(n,e){n.removeAttribute(`data-bs-${ec(e)}`)},getDataAttributes(n){if(!n)return{};const e={},t=Object.keys(n.dataset).filter(r=>r.startsWith("bs")&&!r.startsWith("bsConfig"));for(const r of t){let o=r.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),e[o]=$h(n.dataset[r])}return e},getDataAttribute(n,e){return $h(n.getAttribute(`data-bs-${ec(e)}`))}};class Qs{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,t){const r=Wn(t)?Kn.getDataAttribute(t,"config"):{};return{...this.constructor.Default,...typeof r=="object"?r:{},...Wn(t)?Kn.getDataAttributes(t):{},...typeof e=="object"?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(const[r,o]of Object.entries(t)){const s=e[r],i=Wn(s)?"element":HS(s);if(!new RegExp(o).test(i))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${r}" provided type "${i}" but expected type "${o}".`)}}}const ek="5.3.0";class vn extends Qs{constructor(e,t){super(),e=gr(e),e&&(this._element=e,this._config=this._getConfig(t),Jl.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Jl.remove(this._element,this.constructor.DATA_KEY),le.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,r=!0){m2(e,t,r)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return Jl.get(gr(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t=="object"?t:null)}static get VERSION(){return ek}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 tc=n=>{let e=n.getAttribute("data-bs-target");if(!e||e==="#"){let t=n.getAttribute("href");if(!t||!t.includes("#")&&!t.startsWith("."))return null;t.includes("#")&&!t.startsWith("#")&&(t=`#${t.split("#")[1]}`),e=t&&t!=="#"?t.trim():null}return d2(e)},Ie={find(n,e=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(e,n))},findOne(n,e=document.documentElement){return Element.prototype.querySelector.call(e,n)},children(n,e){return[].concat(...n.children).filter(t=>t.matches(e))},parents(n,e){const t=[];let r=n.parentNode.closest(e);for(;r;)t.push(r),r=r.parentNode.closest(e);return t},prev(n,e){let t=n.previousElementSibling;for(;t;){if(t.matches(e))return[t];t=t.previousElementSibling}return[]},next(n,e){let t=n.nextElementSibling;for(;t;){if(t.matches(e))return[t];t=t.nextElementSibling}return[]},focusableChildren(n){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,n).filter(t=>!vr(t)&&qo(t))},getSelectorFromElement(n){const e=tc(n);return e&&Ie.findOne(e)?e:null},getElementFromSelector(n){const e=tc(n);return e?Ie.findOne(e):null},getMultipleElementsFromSelector(n){const e=tc(n);return e?Ie.find(e):[]}},il=(n,e="hide")=>{const t=`click.dismiss${n.EVENT_KEY}`,r=n.NAME;le.on(document,t,`[data-bs-dismiss="${r}"]`,function(o){if(["A","AREA"].includes(this.tagName)&&o.preventDefault(),vr(this))return;const s=Ie.getElementFromSelector(this)||this.closest(`.${r}`);n.getOrCreateInstance(s)[e]()})},tk="alert",nk="bs.alert",b2=`.${nk}`,rk=`close${b2}`,ok=`closed${b2}`,sk="fade",ik="show";class al extends vn{static get NAME(){return tk}close(){if(le.trigger(this._element,rk).defaultPrevented)return;this._element.classList.remove(ik);const t=this._element.classList.contains(sk);this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),le.trigger(this._element,ok),this.dispose()}static jQueryInterface(e){return this.each(function(){const t=al.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}il(al,"close");an(al);const ak="button",lk="bs.button",ck=`.${lk}`,uk=".data-api",dk="active",zh='[data-bs-toggle="button"]',fk=`click${ck}${uk}`;class ll extends vn{static get NAME(){return ak}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(dk))}static jQueryInterface(e){return this.each(function(){const t=ll.getOrCreateInstance(this);e==="toggle"&&t[e]()})}}le.on(document,fk,zh,n=>{n.preventDefault();const e=n.target.closest(zh);ll.getOrCreateInstance(e).toggle()});an(ll);const hk="swipe",es=".bs.swipe",pk=`touchstart${es}`,mk=`touchmove${es}`,gk=`touchend${es}`,vk=`pointerdown${es}`,yk=`pointerup${es}`,Ek="touch",Ck="pen",Ak="pointer-event",bk=40,wk={endCallback:null,leftCallback:null,rightCallback:null},Tk={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Na extends Qs{constructor(e,t){super(),this._element=e,!(!e||!Na.isSupported())&&(this._config=this._getConfig(t),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return wk}static get DefaultType(){return Tk}static get NAME(){return hk}dispose(){le.off(this._element,es)}_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(),Bt(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<=bk)return;const t=e/this._deltaX;this._deltaX=0,t&&Bt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(le.on(this._element,vk,e=>this._start(e)),le.on(this._element,yk,e=>this._end(e)),this._element.classList.add(Ak)):(le.on(this._element,pk,e=>this._start(e)),le.on(this._element,mk,e=>this._move(e)),le.on(this._element,gk,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Ck||e.pointerType===Ek)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Sk="carousel",kk="bs.carousel",Tr=`.${kk}`,w2=".data-api",_k="ArrowLeft",xk="ArrowRight",Nk=500,ss="next",mo="prev",bo="left",ki="right",Ik=`slide${Tr}`,nc=`slid${Tr}`,Mk=`keydown${Tr}`,Ok=`mouseenter${Tr}`,Lk=`mouseleave${Tr}`,Dk=`dragstart${Tr}`,Rk=`load${Tr}${w2}`,Bk=`click${Tr}${w2}`,T2="carousel",hi="active",Pk="slide",Fk="carousel-item-end",Vk="carousel-item-start",$k="carousel-item-next",zk="carousel-item-prev",S2=".active",k2=".carousel-item",Uk=S2+k2,Hk=".carousel-item img",jk=".carousel-indicators",Wk="[data-bs-slide], [data-bs-slide-to]",Kk='[data-bs-ride="carousel"]',Yk={[_k]:ki,[xk]:bo},Gk={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Qk={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Zs extends vn{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Ie.findOne(jk,this._element),this._addEventListeners(),this._config.ride===T2&&this.cycle()}static get Default(){return Gk}static get DefaultType(){return Qk}static get NAME(){return Sk}next(){this._slide(ss)}nextWhenVisible(){!document.hidden&&qo(this._element)&&this.next()}prev(){this._slide(mo)}pause(){this._isSliding&&f2(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){le.one(this._element,nc,()=>this.cycle());return}this.cycle()}}to(e){const t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){le.one(this._element,nc,()=>this.to(e));return}const r=this._getItemIndex(this._getActive());if(r===e)return;const o=e>r?ss:mo;this._slide(o,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&le.on(this._element,Mk,e=>this._keydown(e)),this._config.pause==="hover"&&(le.on(this._element,Ok,()=>this.pause()),le.on(this._element,Lk,()=>this._maybeEnableCycle())),this._config.touch&&Na.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const r of Ie.find(Hk,this._element))le.on(r,Dk,o=>o.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(bo)),rightCallback:()=>this._slide(this._directionToOrder(ki)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Nk+this._config.interval))}};this._swipeHelper=new Na(this._element,t)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;const t=Yk[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;const t=Ie.findOne(S2,this._indicatorsElement);t.classList.remove(hi),t.removeAttribute("aria-current");const r=Ie.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);r&&(r.classList.add(hi),r.setAttribute("aria-current","true"))}_updateInterval(){const e=this._activeElement||this._getActive();if(!e)return;const t=Number.parseInt(e.getAttribute("data-bs-interval"),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;const r=this._getActive(),o=e===ss,s=t||md(this._getItems(),r,o,this._config.wrap);if(s===r)return;const i=this._getItemIndex(s),l=p=>le.trigger(this._element,p,{relatedTarget:s,direction:this._orderToDirection(e),from:this._getItemIndex(r),to:i});if(l(Ik).defaultPrevented||!r||!s)return;const u=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(i),this._activeElement=s;const d=o?Vk:Fk,f=o?$k:zk;s.classList.add(f),Gs(s),r.classList.add(d),s.classList.add(d);const h=()=>{s.classList.remove(d,f),s.classList.add(hi),r.classList.remove(hi,f,d),this._isSliding=!1,l(nc)};this._queueCallback(h,r,this._isAnimated()),u&&this.cycle()}_isAnimated(){return this._element.classList.contains(Pk)}_getActive(){return Ie.findOne(Uk,this._element)}_getItems(){return Ie.find(k2,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(e){return on()?e===bo?mo:ss:e===bo?ss:mo}_orderToDirection(e){return on()?e===mo?bo:ki:e===mo?ki:bo}static jQueryInterface(e){return this.each(function(){const t=Zs.getOrCreateInstance(this,e);if(typeof e=="number"){t.to(e);return}if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(document,Bk,Wk,function(n){const e=Ie.getElementFromSelector(this);if(!e||!e.classList.contains(T2))return;n.preventDefault();const t=Zs.getOrCreateInstance(e),r=this.getAttribute("data-bs-slide-to");if(r){t.to(r),t._maybeEnableCycle();return}if(Kn.getDataAttribute(this,"slide")==="next"){t.next(),t._maybeEnableCycle();return}t.prev(),t._maybeEnableCycle()});le.on(window,Rk,()=>{const n=Ie.find(Kk);for(const e of n)Zs.getOrCreateInstance(e)});an(Zs);const Zk="collapse",Jk="bs.collapse",Js=`.${Jk}`,Xk=".data-api",qk=`show${Js}`,e_=`shown${Js}`,t_=`hide${Js}`,n_=`hidden${Js}`,r_=`click${Js}${Xk}`,rc="show",xo="collapse",pi="collapsing",o_="collapsed",s_=`:scope .${xo} .${xo}`,i_="collapse-horizontal",a_="width",l_="height",c_=".collapse.show, .collapse.collapsing",Zc='[data-bs-toggle="collapse"]',u_={parent:null,toggle:!0},d_={parent:"(null|element)",toggle:"boolean"};class Ps extends vn{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];const r=Ie.find(Zc);for(const o of r){const s=Ie.getSelectorFromElement(o),i=Ie.find(s).filter(l=>l===this._element);s!==null&&i.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 u_}static get DefaultType(){return d_}static get NAME(){return Zk}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e=[];if(this._config.parent&&(e=this._getFirstLevelChildren(c_).filter(l=>l!==this._element).map(l=>Ps.getOrCreateInstance(l,{toggle:!1}))),e.length&&e[0]._isTransitioning||le.trigger(this._element,qk).defaultPrevented)return;for(const l of e)l.hide();const r=this._getDimension();this._element.classList.remove(xo),this._element.classList.add(pi),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(xo,rc),this._element.style[r]="",le.trigger(this._element,e_)},i=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback(o,this._element,!0),this._element.style[r]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||le.trigger(this._element,t_).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Gs(this._element),this._element.classList.add(pi),this._element.classList.remove(xo,rc);for(const o of this._triggerArray){const s=Ie.getElementFromSelector(o);s&&!this._isShown(s)&&this._addAriaAndCollapsedClass([o],!1)}this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(pi),this._element.classList.add(xo),le.trigger(this._element,n_)};this._element.style[t]="",this._queueCallback(r,this._element,!0)}_isShown(e=this._element){return e.classList.contains(rc)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=gr(e.parent),e}_getDimension(){return this._element.classList.contains(i_)?a_:l_}_initializeChildren(){if(!this._config.parent)return;const e=this._getFirstLevelChildren(Zc);for(const t of e){const r=Ie.getElementFromSelector(t);r&&this._addAriaAndCollapsedClass([t],this._isShown(r))}}_getFirstLevelChildren(e){const t=Ie.find(s_,this._config.parent);return Ie.find(e,this._config.parent).filter(r=>!t.includes(r))}_addAriaAndCollapsedClass(e,t){if(e.length)for(const r of e)r.classList.toggle(o_,!t),r.setAttribute("aria-expanded",t)}static jQueryInterface(e){const t={};return typeof e=="string"&&/show|hide/.test(e)&&(t.toggle=!1),this.each(function(){const r=Ps.getOrCreateInstance(this,t);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e]()}})}}le.on(document,r_,Zc,function(n){(n.target.tagName==="A"||n.delegateTarget&&n.delegateTarget.tagName==="A")&&n.preventDefault();for(const e of Ie.getMultipleElementsFromSelector(this))Ps.getOrCreateInstance(e,{toggle:!1}).toggle()});an(Ps);const Uh="dropdown",f_="bs.dropdown",ao=`.${f_}`,vd=".data-api",h_="Escape",Hh="Tab",p_="ArrowUp",jh="ArrowDown",m_=2,g_=`hide${ao}`,v_=`hidden${ao}`,y_=`show${ao}`,E_=`shown${ao}`,_2=`click${ao}${vd}`,x2=`keydown${ao}${vd}`,C_=`keyup${ao}${vd}`,wo="show",A_="dropup",b_="dropend",w_="dropstart",T_="dropup-center",S_="dropdown-center",$r='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',k_=`${$r}.${wo}`,_i=".dropdown-menu",__=".navbar",x_=".navbar-nav",N_=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",I_=on()?"top-end":"top-start",M_=on()?"top-start":"top-end",O_=on()?"bottom-end":"bottom-start",L_=on()?"bottom-start":"bottom-end",D_=on()?"left-start":"right-start",R_=on()?"right-start":"left-start",B_="top",P_="bottom",F_={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},V_={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Nn extends vn{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=Ie.next(this._element,_i)[0]||Ie.prev(this._element,_i)[0]||Ie.findOne(_i,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return F_}static get DefaultType(){return V_}static get NAME(){return Uh}toggle(){return this._isShown()?this.hide():this.show()}show(){if(vr(this._element)||this._isShown())return;const e={relatedTarget:this._element};if(!le.trigger(this._element,y_,e).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(x_))for(const r of[].concat(...document.body.children))le.on(r,"mouseover",xa);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(wo),this._element.classList.add(wo),le.trigger(this._element,E_,e)}}hide(){if(vr(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(!le.trigger(this._element,g_,e).defaultPrevented){if("ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))le.off(r,"mouseover",xa);this._popper&&this._popper.destroy(),this._menu.classList.remove(wo),this._element.classList.remove(wo),this._element.setAttribute("aria-expanded","false"),Kn.removeDataAttribute(this._menu,"popper"),le.trigger(this._element,v_,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference=="object"&&!Wn(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${Uh.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(typeof K0>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;this._config.reference==="parent"?e=this._parent:Wn(this._config.reference)?e=gr(this._config.reference):typeof this._config.reference=="object"&&(e=this._config.reference);const t=this._getPopperConfig();this._popper=nl(e,this._menu,t)}_isShown(){return this._menu.classList.contains(wo)}_getPlacement(){const e=this._parent;if(e.classList.contains(b_))return D_;if(e.classList.contains(w_))return R_;if(e.classList.contains(T_))return B_;if(e.classList.contains(S_))return P_;const t=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(A_)?t?M_:I_:t?L_:O_}_detectNavbar(){return this._element.closest(__)!==null}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,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")&&(Kn.setDataAttribute(this._menu,"popper","static"),e.modifiers=[{name:"applyStyles",enabled:!1}]),{...e,...Bt(this._config.popperConfig,[e])}}_selectMenuItem({key:e,target:t}){const r=Ie.find(N_,this._menu).filter(o=>qo(o));r.length&&md(r,t,e===jh,!r.includes(t)).focus()}static jQueryInterface(e){return this.each(function(){const t=Nn.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}static clearMenus(e){if(e.button===m_||e.type==="keyup"&&e.key!==Hh)return;const t=Ie.find(k_);for(const r of t){const o=Nn.getInstance(r);if(!o||o._config.autoClose===!1)continue;const s=e.composedPath(),i=s.includes(o._menu);if(s.includes(o._element)||o._config.autoClose==="inside"&&!i||o._config.autoClose==="outside"&&i||o._menu.contains(e.target)&&(e.type==="keyup"&&e.key===Hh||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;const l={relatedTarget:o._element};e.type==="click"&&(l.clickEvent=e),o._completeHide(l)}}static dataApiKeydownHandler(e){const t=/input|textarea/i.test(e.target.tagName),r=e.key===h_,o=[p_,jh].includes(e.key);if(!o&&!r||t&&!r)return;e.preventDefault();const s=this.matches($r)?this:Ie.prev(this,$r)[0]||Ie.next(this,$r)[0]||Ie.findOne($r,e.delegateTarget.parentNode),i=Nn.getOrCreateInstance(s);if(o){e.stopPropagation(),i.show(),i._selectMenuItem(e);return}i._isShown()&&(e.stopPropagation(),i.hide(),s.focus())}}le.on(document,x2,$r,Nn.dataApiKeydownHandler);le.on(document,x2,_i,Nn.dataApiKeydownHandler);le.on(document,_2,Nn.clearMenus);le.on(document,C_,Nn.clearMenus);le.on(document,_2,$r,function(n){n.preventDefault(),Nn.getOrCreateInstance(this).toggle()});an(Nn);const N2="backdrop",$_="fade",Wh="show",Kh=`mousedown.bs.${N2}`,z_={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},U_={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class I2 extends Qs{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return z_}static get DefaultType(){return U_}static get NAME(){return N2}show(e){if(!this._config.isVisible){Bt(e);return}this._append();const t=this._getElement();this._config.isAnimated&&Gs(t),t.classList.add(Wh),this._emulateAnimation(()=>{Bt(e)})}hide(e){if(!this._config.isVisible){Bt(e);return}this._getElement().classList.remove(Wh),this._emulateAnimation(()=>{this.dispose(),Bt(e)})}dispose(){this._isAppended&&(le.off(this._element,Kh),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($_),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=gr(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),le.on(e,Kh,()=>{Bt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){m2(e,this._getElement(),this._config.isAnimated)}}const H_="focustrap",j_="bs.focustrap",Ia=`.${j_}`,W_=`focusin${Ia}`,K_=`keydown.tab${Ia}`,Y_="Tab",G_="forward",Yh="backward",Q_={autofocus:!0,trapElement:null},Z_={autofocus:"boolean",trapElement:"element"};class M2 extends Qs{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Q_}static get DefaultType(){return Z_}static get NAME(){return H_}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),le.off(document,Ia),le.on(document,W_,e=>this._handleFocusin(e)),le.on(document,K_,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,le.off(document,Ia))}_handleFocusin(e){const{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;const r=Ie.focusableChildren(t);r.length===0?t.focus():this._lastTabNavDirection===Yh?r[r.length-1].focus():r[0].focus()}_handleKeydown(e){e.key===Y_&&(this._lastTabNavDirection=e.shiftKey?Yh:G_)}}const Gh=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Qh=".sticky-top",mi="padding-right",Zh="margin-right";class Jc{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,mi,t=>t+e),this._setElementAttributes(Gh,mi,t=>t+e),this._setElementAttributes(Qh,Zh,t=>t-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,mi),this._resetElementAttributes(Gh,mi),this._resetElementAttributes(Qh,Zh)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,r){const o=this.getWidth(),s=i=>{if(i!==this._element&&window.innerWidth>i.clientWidth+o)return;this._saveInitialAttribute(i,t);const l=window.getComputedStyle(i).getPropertyValue(t);i.style.setProperty(t,`${r(Number.parseFloat(l))}px`)};this._applyManipulationCallback(e,s)}_saveInitialAttribute(e,t){const r=e.style.getPropertyValue(t);r&&Kn.setDataAttribute(e,t,r)}_resetElementAttributes(e,t){const r=o=>{const s=Kn.getDataAttribute(o,t);if(s===null){o.style.removeProperty(t);return}Kn.removeDataAttribute(o,t),o.style.setProperty(t,s)};this._applyManipulationCallback(e,r)}_applyManipulationCallback(e,t){if(Wn(e)){t(e);return}for(const r of Ie.find(e,this._element))t(r)}}const J_="modal",X_="bs.modal",sn=`.${X_}`,q_=".data-api",ex="Escape",tx=`hide${sn}`,nx=`hidePrevented${sn}`,O2=`hidden${sn}`,L2=`show${sn}`,rx=`shown${sn}`,ox=`resize${sn}`,sx=`click.dismiss${sn}`,ix=`mousedown.dismiss${sn}`,ax=`keydown.dismiss${sn}`,lx=`click${sn}${q_}`,Jh="modal-open",cx="fade",Xh="show",oc="modal-static",ux=".modal.show",dx=".modal-dialog",fx=".modal-body",hx='[data-bs-toggle="modal"]',px={backdrop:!0,focus:!0,keyboard:!0},mx={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class yr extends vn{constructor(e,t){super(e,t),this._dialog=Ie.findOne(dx,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Jc,this._addEventListeners()}static get Default(){return px}static get DefaultType(){return mx}static get NAME(){return J_}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||le.trigger(this._element,L2,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Jh),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||le.trigger(this._element,tx).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Xh),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){le.off(window,sn),le.off(this._dialog,sn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new I2({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new M2({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 t=Ie.findOne(fx,this._dialog);t&&(t.scrollTop=0),Gs(this._element),this._element.classList.add(Xh);const r=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,le.trigger(this._element,rx,{relatedTarget:e})};this._queueCallback(r,this._dialog,this._isAnimated())}_addEventListeners(){le.on(this._element,ax,e=>{if(e.key===ex){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),le.on(window,ox,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),le.on(this._element,ix,e=>{le.one(this._element,sx,t=>{if(!(this._element!==e.target||this._element!==t.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(Jh),this._resetAdjustments(),this._scrollBar.reset(),le.trigger(this._element,O2)})}_isAnimated(){return this._element.classList.contains(cx)}_triggerBackdropTransition(){if(le.trigger(this._element,nx).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,r=this._element.style.overflowY;r==="hidden"||this._element.classList.contains(oc)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(oc),this._queueCallback(()=>{this._element.classList.remove(oc),this._queueCallback(()=>{this._element.style.overflowY=r},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),r=t>0;if(r&&!e){const o=on()?"paddingLeft":"paddingRight";this._element.style[o]=`${t}px`}if(!r&&e){const o=on()?"paddingRight":"paddingLeft";this._element.style[o]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,t){return this.each(function(){const r=yr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof r[e]>"u")throw new TypeError(`No method named "${e}"`);r[e](t)}})}}le.on(document,lx,hx,function(n){const e=Ie.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&n.preventDefault(),le.one(e,L2,o=>{o.defaultPrevented||le.one(e,O2,()=>{qo(this)&&this.focus()})});const t=Ie.findOne(ux);t&&yr.getInstance(t).hide(),yr.getOrCreateInstance(e).toggle(this)});il(yr);an(yr);const gx="offcanvas",vx="bs.offcanvas",Qn=`.${vx}`,D2=".data-api",yx=`load${Qn}${D2}`,Ex="Escape",qh="show",ep="showing",tp="hiding",Cx="offcanvas-backdrop",R2=".offcanvas.show",Ax=`show${Qn}`,bx=`shown${Qn}`,wx=`hide${Qn}`,np=`hidePrevented${Qn}`,B2=`hidden${Qn}`,Tx=`resize${Qn}`,Sx=`click${Qn}${D2}`,kx=`keydown.dismiss${Qn}`,_x='[data-bs-toggle="offcanvas"]',xx={backdrop:!0,keyboard:!0,scroll:!1},Nx={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Er extends vn{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return xx}static get DefaultType(){return Nx}static get NAME(){return gx}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||le.trigger(this._element,Ax,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Jc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(ep);const r=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(qh),this._element.classList.remove(ep),le.trigger(this._element,bx,{relatedTarget:e})};this._queueCallback(r,this._element,!0)}hide(){if(!this._isShown||le.trigger(this._element,wx).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(tp),this._backdrop.hide();const t=()=>{this._element.classList.remove(qh,tp),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Jc().reset(),le.trigger(this._element,B2)};this._queueCallback(t,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const e=()=>{if(this._config.backdrop==="static"){le.trigger(this._element,np);return}this.hide()},t=!!this._config.backdrop;return new I2({className:Cx,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new M2({trapElement:this._element})}_addEventListeners(){le.on(this._element,kx,e=>{if(e.key===Ex){if(this._config.keyboard){this.hide();return}le.trigger(this._element,np)}})}static jQueryInterface(e){return this.each(function(){const t=Er.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}le.on(document,Sx,_x,function(n){const e=Ie.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),vr(this))return;le.one(e,B2,()=>{qo(this)&&this.focus()});const t=Ie.findOne(R2);t&&t!==e&&Er.getInstance(t).hide(),Er.getOrCreateInstance(e).toggle(this)});le.on(window,yx,()=>{for(const n of Ie.find(R2))Er.getOrCreateInstance(n).show()});le.on(window,Tx,()=>{for(const n of Ie.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(n).position!=="fixed"&&Er.getOrCreateInstance(n).hide()});il(Er);an(Er);const Ix=/^aria-[\w-]*$/i,P2={"*":["class","dir","id","lang","role",Ix],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],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:[]},Mx=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Ox=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Lx=(n,e)=>{const t=n.nodeName.toLowerCase();return e.includes(t)?Mx.has(t)?!!Ox.test(n.nodeValue):!0:e.filter(r=>r instanceof RegExp).some(r=>r.test(t))};function Dx(n,e,t){if(!n.length)return n;if(t&&typeof t=="function")return t(n);const o=new window.DOMParser().parseFromString(n,"text/html"),s=[].concat(...o.body.querySelectorAll("*"));for(const i of s){const l=i.nodeName.toLowerCase();if(!Object.keys(e).includes(l)){i.remove();continue}const a=[].concat(...i.attributes),u=[].concat(e["*"]||[],e[l]||[]);for(const d of a)Lx(d,u)||i.removeAttribute(d.nodeName)}return o.body.innerHTML}const Rx="TemplateFactory",Bx={allowList:P2,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},Px={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Fx={entry:"(string|element|function|null)",selector:"(string|element)"};class Vx extends Qs{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Bx}static get DefaultType(){return Px}static get NAME(){return Rx}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,s]of Object.entries(this._config.content))this._setContent(e,s,o);const t=e.children[0],r=this._resolvePossibleFunction(this._config.extraClass);return r&&t.classList.add(...r.split(" ")),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[t,r]of Object.entries(e))super._typeCheckConfig({selector:t,entry:r},Fx)}_setContent(e,t,r){const o=Ie.findOne(r,e);if(o){if(t=this._resolvePossibleFunction(t),!t){o.remove();return}if(Wn(t)){this._putElementInTemplate(gr(t),o);return}if(this._config.html){o.innerHTML=this._maybeSanitize(t);return}o.textContent=t}}_maybeSanitize(e){return this._config.sanitize?Dx(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Bt(e,[this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML="",t.append(e);return}t.textContent=e.textContent}}const $x="tooltip",zx=new Set(["sanitize","allowList","sanitizeFn"]),sc="fade",Ux="modal",gi="show",Hx=".tooltip-inner",rp=`.${Ux}`,op="hide.bs.modal",is="hover",ic="focus",jx="click",Wx="manual",Kx="hide",Yx="hidden",Gx="show",Qx="shown",Zx="inserted",Jx="click",Xx="focusin",qx="focusout",eN="mouseenter",tN="mouseleave",nN={AUTO:"auto",TOP:"top",RIGHT:on()?"left":"right",BOTTOM:"bottom",LEFT:on()?"right":"left"},rN={allowList:P2,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"},oN={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 _n extends vn{constructor(e,t){if(typeof K0>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,t),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 rN}static get DefaultType(){return oN}static get NAME(){return $x}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),le.off(this._element.closest(rp),op,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=le.trigger(this._element,this.constructor.eventName(Gx)),r=(h2(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:s}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(s.append(o),le.trigger(this._element,this.constructor.eventName(Zx))),this._popper=this._createPopper(o),o.classList.add(gi),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))le.on(l,"mouseover",xa);const i=()=>{le.trigger(this._element,this.constructor.eventName(Qx)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(i,this.tip,this._isAnimated())}hide(){if(!this._isShown()||le.trigger(this._element,this.constructor.eventName(Kx)).defaultPrevented)return;if(this._getTipElement().classList.remove(gi),"ontouchstart"in document.documentElement)for(const o of[].concat(...document.body.children))le.off(o,"mouseover",xa);this._activeTrigger[jx]=!1,this._activeTrigger[ic]=!1,this._activeTrigger[is]=!1,this._isHovered=null;const r=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),le.trigger(this._element,this.constructor.eventName(Yx)))};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 t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(sc,gi),t.classList.add(`bs-${this.constructor.NAME}-auto`);const r=jS(this.constructor.NAME).toString();return t.setAttribute("id",r),this._isAnimated()&&t.classList.add(sc),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new Vx({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Hx]: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(sc)}_isShown(){return this.tip&&this.tip.classList.contains(gi)}_createPopper(e){const t=Bt(this._config.placement,[this,e,this._element]),r=nN[t.toUpperCase()];return nl(this._element,e,this._getPopperConfig(r))}_getOffset(){const{offset:e}=this._config;return typeof e=="string"?e.split(",").map(t=>Number.parseInt(t,10)):typeof e=="function"?t=>e(t,this._element):e}_resolvePossibleFunction(e){return Bt(e,[this._element])}_getPopperConfig(e){const t={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{...t,...Bt(this._config.popperConfig,[t])}}_setListeners(){const e=this._config.trigger.split(" ");for(const t of e)if(t==="click")le.on(this._element,this.constructor.eventName(Jx),this._config.selector,r=>{this._initializeOnDelegatedTarget(r).toggle()});else if(t!==Wx){const r=t===is?this.constructor.eventName(eN):this.constructor.eventName(Xx),o=t===is?this.constructor.eventName(tN):this.constructor.eventName(qx);le.on(this._element,r,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusin"?ic:is]=!0,i._enter()}),le.on(this._element,o,this._config.selector,s=>{const i=this._initializeOnDelegatedTarget(s);i._activeTrigger[s.type==="focusout"?ic:is]=i._element.contains(s.relatedTarget),i._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},le.on(this._element.closest(rp),op,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,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const t=Kn.getDataAttributes(this._element);for(const r of Object.keys(t))zx.has(r)&&delete t[r];return e={...t,...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:gr(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[t,r]of Object.entries(this._config))this.constructor.Default[t]!==r&&(e[t]=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 t=_n.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}an(_n);const sN="popover",iN=".popover-header",aN=".popover-body",lN={..._n.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"},cN={..._n.DefaultType,content:"(null|string|element|function)"};class zr extends _n{static get Default(){return lN}static get DefaultType(){return cN}static get NAME(){return sN}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[iN]:this._getTitle(),[aN]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(e){return this.each(function(){const t=zr.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e]()}})}}an(zr);const uN="scrollspy",dN="bs.scrollspy",yd=`.${dN}`,fN=".data-api",hN=`activate${yd}`,sp=`click${yd}`,pN=`load${yd}${fN}`,mN="dropdown-item",go="active",gN='[data-bs-spy="scroll"]',ac="[href]",vN=".nav, .list-group",ip=".nav-link",yN=".nav-item",EN=".list-group-item",CN=`${ip}, ${yN} > ${ip}, ${EN}`,AN=".dropdown",bN=".dropdown-toggle",wN={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},TN={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class cl extends vn{constructor(e,t){super(e,t),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 wN}static get DefaultType(){return TN}static get NAME(){return uN}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=gr(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(t=>Number.parseFloat(t))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(le.off(this._config.target,sp),le.on(this._config.target,sp,ac,e=>{const t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();const r=this._rootElement||window,o=t.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(t=>this._observerCallback(t),e)}_observerCallback(e){const t=i=>this._targetLinks.get(`#${i.target.id}`),r=i=>{this._previousScrollData.visibleEntryTop=i.target.offsetTop,this._process(t(i))},o=(this._rootElement||document.documentElement).scrollTop,s=o>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=o;for(const i of e){if(!i.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(i));continue}const l=i.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&l){if(r(i),!o)return;continue}!s&&!l&&r(i)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const e=Ie.find(ac,this._config.target);for(const t of e){if(!t.hash||vr(t))continue;const r=Ie.findOne(decodeURI(t.hash),this._element);qo(r)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,r))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(go),this._activateParents(e),le.trigger(this._element,hN,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(mN)){Ie.findOne(bN,e.closest(AN)).classList.add(go);return}for(const t of Ie.parents(e,vN))for(const r of Ie.prev(t,CN))r.classList.add(go)}_clearActiveClass(e){e.classList.remove(go);const t=Ie.find(`${ac}.${go}`,e);for(const r of t)r.classList.remove(go)}static jQueryInterface(e){return this.each(function(){const t=cl.getOrCreateInstance(this,e);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(window,pN,()=>{for(const n of Ie.find(gN))cl.getOrCreateInstance(n)});an(cl);const SN="tab",kN="bs.tab",lo=`.${kN}`,_N=`hide${lo}`,xN=`hidden${lo}`,NN=`show${lo}`,IN=`shown${lo}`,MN=`click${lo}`,ON=`keydown${lo}`,LN=`load${lo}`,DN="ArrowLeft",ap="ArrowRight",RN="ArrowUp",lp="ArrowDown",Ur="active",cp="fade",lc="show",BN="dropdown",PN=".dropdown-toggle",FN=".dropdown-menu",cc=":not(.dropdown-toggle)",VN='.list-group, .nav, [role="tablist"]',$N=".nav-item, .list-group-item",zN=`.nav-link${cc}, .list-group-item${cc}, [role="tab"]${cc}`,F2='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',uc=`${zN}, ${F2}`,UN=`.${Ur}[data-bs-toggle="tab"], .${Ur}[data-bs-toggle="pill"], .${Ur}[data-bs-toggle="list"]`;class jo extends vn{constructor(e){super(e),this._parent=this._element.closest(VN),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),le.on(this._element,ON,t=>this._keydown(t)))}static get NAME(){return SN}show(){const e=this._element;if(this._elemIsActive(e))return;const t=this._getActiveElem(),r=t?le.trigger(t,_N,{relatedTarget:e}):null;le.trigger(e,NN,{relatedTarget:t}).defaultPrevented||r&&r.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){if(!e)return;e.classList.add(Ur),this._activate(Ie.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.add(lc);return}e.removeAttribute("tabindex"),e.setAttribute("aria-selected",!0),this._toggleDropDown(e,!0),le.trigger(e,IN,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(cp))}_deactivate(e,t){if(!e)return;e.classList.remove(Ur),e.blur(),this._deactivate(Ie.getElementFromSelector(e));const r=()=>{if(e.getAttribute("role")!=="tab"){e.classList.remove(lc);return}e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"),this._toggleDropDown(e,!1),le.trigger(e,xN,{relatedTarget:t})};this._queueCallback(r,e,e.classList.contains(cp))}_keydown(e){if(![DN,ap,RN,lp].includes(e.key))return;e.stopPropagation(),e.preventDefault();const t=[ap,lp].includes(e.key),r=md(this._getChildren().filter(o=>!vr(o)),e.target,t,!0);r&&(r.focus({preventScroll:!0}),jo.getOrCreateInstance(r).show())}_getChildren(){return Ie.find(uc,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,"role","tablist");for(const r of t)this._setInitialAttributesOnChild(r)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);const t=this._elemIsActive(e),r=this._getOuterElement(e);e.setAttribute("aria-selected",t),r!==e&&this._setAttributeIfNotExists(r,"role","presentation"),t||e.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(e,"role","tab"),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){const t=Ie.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,"role","tabpanel"),e.id&&this._setAttributeIfNotExists(t,"aria-labelledby",`${e.id}`))}_toggleDropDown(e,t){const r=this._getOuterElement(e);if(!r.classList.contains(BN))return;const o=(s,i)=>{const l=Ie.findOne(s,r);l&&l.classList.toggle(i,t)};o(PN,Ur),o(FN,lc),r.setAttribute("aria-expanded",t)}_setAttributeIfNotExists(e,t,r){e.hasAttribute(t)||e.setAttribute(t,r)}_elemIsActive(e){return e.classList.contains(Ur)}_getInnerElement(e){return e.matches(uc)?e:Ie.findOne(uc,e)}_getOuterElement(e){return e.closest($N)||e}static jQueryInterface(e){return this.each(function(){const t=jo.getOrCreateInstance(this);if(typeof e=="string"){if(t[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);t[e]()}})}}le.on(document,MN,F2,function(n){["A","AREA"].includes(this.tagName)&&n.preventDefault(),!vr(this)&&jo.getOrCreateInstance(this).show()});le.on(window,LN,()=>{for(const n of Ie.find(UN))jo.getOrCreateInstance(n)});an(jo);const HN="toast",jN="bs.toast",Sr=`.${jN}`,WN=`mouseover${Sr}`,KN=`mouseout${Sr}`,YN=`focusin${Sr}`,GN=`focusout${Sr}`,QN=`hide${Sr}`,ZN=`hidden${Sr}`,JN=`show${Sr}`,XN=`shown${Sr}`,qN="fade",up="hide",vi="show",yi="showing",eI={animation:"boolean",autohide:"boolean",delay:"number"},tI={animation:!0,autohide:!0,delay:5e3};class ts extends vn{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return tI}static get DefaultType(){return eI}static get NAME(){return HN}show(){if(le.trigger(this._element,JN).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(qN);const t=()=>{this._element.classList.remove(yi),le.trigger(this._element,XN),this._maybeScheduleHide()};this._element.classList.remove(up),Gs(this._element),this._element.classList.add(vi,yi),this._queueCallback(t,this._element,this._config.animation)}hide(){if(!this.isShown()||le.trigger(this._element,QN).defaultPrevented)return;const t=()=>{this._element.classList.add(up),this._element.classList.remove(yi,vi),le.trigger(this._element,ZN)};this._element.classList.add(yi),this._queueCallback(t,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(vi),super.dispose()}isShown(){return this._element.classList.contains(vi)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=t;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=t;break}}if(t){this._clearTimeout();return}const r=e.relatedTarget;this._element===r||this._element.contains(r)||this._maybeScheduleHide()}_setListeners(){le.on(this._element,WN,e=>this._onInteraction(e,!0)),le.on(this._element,KN,e=>this._onInteraction(e,!1)),le.on(this._element,YN,e=>this._onInteraction(e,!0)),le.on(this._element,GN,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){const t=ts.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof t[e]>"u")throw new TypeError(`No method named "${e}"`);t[e](this)}})}}il(ts);an(ts);function dp(n,e){return e.value||n.getAttribute("title")||""}const Xs={mounted:(n,e)=>{const t=dp(n,e);t&&n.setAttribute("title",t),new _n(n)},updated:(n,e)=>{const t=_n.getInstance(n);t&&t.dispose();const r=dp(n,e);r&&n.setAttribute("title",r),new _n(n)},unmounted:n=>{const e=_n.getInstance(n);e&&e.dispose()}},nI={key:0,class:"pills-list__wrapper"},rI={class:"pills-list__ul"},oI={class:"bd-markdown-editor__menu-bottom"},sI={key:0,class:"vr"},V2=c.defineComponent({__name:"BDMarkdownEditor",props:{placeholder:{default:"Typ een bericht"},errorText:{default:"er is iets fout gegaan"},state:{type:[Boolean,null],default:null},variant:{default:Zl.BASIC},files:{default:void 0},pills:{default:void 0},modelValue:{}},emits:["update:modelValue","upload","action"],setup(n,{emit:e}){const t=n,r=()=>{e("upload")},o=io(t,"modelValue",e),s=[DT,RT,BT,aS.configure({placeholder:t.placeholder}),TS,iS.configure({openOnClick:!1,validate:I=>/^https?:\/\//i.test(I)})];t.variant===Zl.FULL&&s.push(fS,vS,yS,ES,AS,wS);const i=LT({content:o.value,extensions:s,onUpdate:({editor:I})=>{const{view:M,state:L}=I,{from:$,to:V}=M.state.selection;if(L.doc.textBetween($-1,V,"")==" "&&I.getAttributes("link").href!=null&&I.chain().setTextSelection({from:$-1,to:V}).toggleLink({href:I.getAttributes("link").href}).setTextSelection({from:V,to:V}).run(),I.getText().trim()===""){e("update:modelValue","");return}e("update:modelValue",I.getHTML())}});c.watch(()=>t.modelValue,I=>{i.value.getHTML()!==I&&i.value.commands.setContent(I,!0,{preserveWhitespace:"full"})});const l=c.computed(()=>t.state===!1?"is-invalid":null),a=c.computed(()=>g("bold")),u=c.computed(()=>g("italic")),d=c.computed(()=>g("underline")),f=c.computed(()=>g("bulletList")),h=c.computed(()=>g("orderedList")),p=c.computed(()=>g("link")),m=c.computed(()=>t.variant===Zl.FULL),g=I=>i.value&&i.value.isActive(I)?"active":null,v=c.computed(()=>t.files&&t.files.length>0?_a(t.files,!1):null),C=c.computed(()=>t.files&&t.files.length>0?_a(t.files,!0):null),b=I=>{e("action",{name:"delete-attachment",obj:I})},E=I=>{e("action",{name:"image-attachment",obj:I})},y=c.computed(()=>{if(!i.value)return!1;const{from:I,to:M}=i.value.state.selection;return I!==M}),x=c.computed(()=>y.value?"Voeg een link toe":"Selecteer eerst tekst"),w=()=>{const I=i.value.getAttributes("link").href,M=window.prompt("Voeg link toe",I);if(M!==null){if(M===""){i.value.chain().focus().unsetLink().run();return}i.value.chain().focus().toggleLink({href:M}).run()}};return(I,M)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("div",{class:c.normalizeClass(["bd-markdown-editor",l.value])},[c.createVNode(c.unref(OT),{editor:c.unref(i)},null,8,["editor"]),I.pills?(c.openBlock(),c.createElementBlock("div",nI,[c.createElementVNode("ul",rI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(I.pills,(L,$)=>(c.openBlock(),c.createElementBlock("li",{key:$,class:"pills-list__li"},[c.createVNode($a,c.normalizeProps(c.guardReactiveProps(L)),null,16)]))),128))])])):c.createCommentVNode("",!0),c.renderSlot(I.$slots,"default"),v.value?(c.openBlock(),c.createBlock(ol,{key:1,files:v.value,"no-download":!0,"show-delete":!0,onDelete:b},null,8,["files"])):c.createCommentVNode("",!0),C.value?(c.openBlock(),c.createBlock(sl,{key:2,files:C.value,"no-download":!0,"show-delete":!0,onDelete:b,onShow:E},null,8,["files"])):c.createCommentVNode("",!0),c.createElementVNode("div",oI,[c.createVNode(Qe,{variant:"light",type:"button",onClick:r},{default:c.withCtx(()=>[c.createVNode(c.unref(Jr))]),_:1}),m.value?(c.openBlock(),c.createElementBlock("div",sI)):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:1,variant:"light",type:"button",class:c.normalizeClass(a.value),onClick:M[0]||(M[0]=L=>c.unref(i).chain().focus().toggleBold().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(cu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:2,variant:"light",type:"button",class:c.normalizeClass(u.value),onClick:M[1]||(M[1]=L=>c.unref(i).chain().focus().toggleItalic().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(vu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:3,variant:"light",type:"button",class:c.normalizeClass(d.value),onClick:M[2]||(M[2]=L=>c.unref(i).chain().focus().toggleUnderline().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(Tu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:4,variant:"light",type:"button",class:c.normalizeClass(f.value),onClick:M[3]||(M[3]=L=>c.unref(i).chain().focus().toggleBulletList().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(uu))]),_:1},8,["class"])):c.createCommentVNode("",!0),m.value?(c.openBlock(),c.createBlock(Qe,{key:5,variant:"light",type:"button",class:c.normalizeClass(h.value),onClick:M[4]||(M[4]=L=>c.unref(i).chain().focus().toggleOrderedList().run())},{default:c.withCtx(()=>[c.createVNode(c.unref(Eu))]),_:1},8,["class"])):c.createCommentVNode("",!0),c.withDirectives((c.openBlock(),c.createElementBlock("span",null,[m.value?(c.openBlock(),c.createBlock(Qe,{key:0,variant:"light",type:"button",class:c.normalizeClass(p.value),onClick:w,disabled:!y.value},{default:c.withCtx(()=>[c.createVNode(c.unref(Ba))]),_:1},8,["class","disabled"])):c.createCommentVNode("",!0)])),[[c.unref(Xs),x.value]])])],2),c.createVNode(Va,{text:t.errorText,state:t.state},null,8,["text","state"])],64))}}),iI={class:"header"},aI=c.createElementVNode("div",null,"Menu",-1),lI={class:"icon-close-wrapper"},cI={class:"navbar"},uI={class:"nav navbar-nav w-100"},dI={class:"nav-item"},fI={class:"nav-item"},Ed=c.defineComponent({__name:"BDMobileMenu",props:{active:{type:Boolean,default:void 0},options:{}},emits:["hide","signout"],setup(n,{emit:e}){const t=n,r=c.computed(()=>({active:t.active===!0,inactive:t.active===!1})),o=()=>e("hide"),s=()=>e("signout");return(i,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["bd-mobile-menu",r.value])},[c.createElementVNode("div",iI,[aI,c.createElementVNode("div",lI,[c.createVNode(Da,{onClick:o})])]),c.createElementVNode("nav",cI,[c.createElementVNode("ul",uI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.options,a=>(c.openBlock(),c.createElementBlock("li",dI,[c.createVNode(Zr,c.mergeProps({class:"nav-link"},a,{onClick:o}),null,16)]))),256)),c.renderSlot(i.$slots,"special-options"),c.createElementVNode("li",fI,[c.createVNode(Zr,{class:"nav-link",text:"Uitloggen",onClick:s})])])])],2))}}),hI={class:"bd-user"},pI={class:"bd-user__information"},mI={class:"text-break"},gI={class:"overflow-x-hidden"},$2=c.defineComponent({__name:"BDUser",props:{name:{default:""},img:{default:void 0},details:{default:void 0},hideImage:{type:Boolean,default:!1}},setup(n){const e=n,t=c.computed(()=>{var r;return typeof e.details=="string"?e.details:(r=e.details)==null?void 0:r.join(" • ")});return(r,o)=>(c.openBlock(),c.createElementBlock("div",hI,[e.hideImage?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Hs,c.mergeProps({key:0},e.img,{size:"sm"}),null,16)),c.createElementVNode("div",pI,[c.createElementVNode("header",null,[c.createElementVNode("h5",mI,c.toDisplayString(e.name),1),c.renderSlot(r.$slots,"header-extra")]),c.createElementVNode("span",gI,c.toDisplayString(t.value),1)])]))}}),vI={class:"bd-chat-cloud-card"},yI={class:"bd-chat-cloud-card__header"},EI={class:"bd-chat-cloud-card__body"},CI=["innerHTML"],AI={class:"bd-chat-cloud-card__footer"},bI={key:0,class:"pills-list__wrapper"},wI={class:"pills-list__ul"},z2=c.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}},emits:["show-attachment","action"],setup(n,{emit:e}){const t=n,r=c.computed(()=>t.isSender?"sender":Fe),o=c.computed(()=>_a(t.files,!1)),s=c.computed(()=>_a(t.files,!0)),i=()=>{e("action","copy-message")},l=a=>{e("show-attachment",a)};return(a,u)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(["bd-chat-cloud",r.value])},[c.createVNode(Hs,{src:t.src,username:t.username,size:"sm"},null,8,["src","username"]),c.createElementVNode("div",vI,[c.createElementVNode("div",yI,[c.renderSlot(a.$slots,"header",{},()=>[c.createTextVNode(c.toDisplayString(a.headerTitle),1)]),c.createVNode(Qe,{variant:"outline-primary-dark",size:"sm",onClick:i},{default:c.withCtx(()=>[c.createTextVNode(" kopieer ")]),_:1})]),c.createElementVNode("div",EI,[c.renderSlot(a.$slots,"body",{},()=>[c.createElementVNode("div",{class:"bd-chat-cloud-card__message",innerHTML:t.message},null,8,CI)])]),c.createElementVNode("div",AI,[c.renderSlot(a.$slots,"footer",{},()=>[a.pills?(c.openBlock(),c.createElementBlock("div",bI,[c.createElementVNode("ul",wI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(a.pills,(d,f)=>(c.openBlock(),c.createElementBlock("li",{key:f,class:"pills-list__li"},[c.createVNode($a,c.normalizeProps(c.guardReactiveProps(d)),null,16)]))),128))])])):c.createCommentVNode("",!0),o.value&&o.value.length>0?(c.openBlock(),c.createBlock(ol,{key:1,files:o.value},null,8,["files"])):c.createCommentVNode("",!0),s.value&&s.value.length>0?(c.openBlock(),c.createBlock(sl,{key:2,"fast-download":!0,files:s.value,onShow:l},null,8,["files"])):c.createCommentVNode("",!0)])])])],2))}}),TI=c.defineComponent({__name:"BDTableSortHeader",props:["active","label","sortDesc"],emits:["sortAsc","sortDesc"],setup(n,{emit:e}){const t=n,r=c.ref(t.sortDesc),o=()=>{t.active&&(r.value=!r.value)},s=()=>{if(!t.active)return;const l=r.value?"sortDesc":"sortAsc";e(l)},i=c.computed(()=>({"bd-table-sort":!0,active:t.active}));return c.watch(()=>t.active,(l,a)=>{l&&!a&&(r.value=!1,e("sortAsc"))}),s(),(l,a)=>(c.openBlock(),c.createElementBlock("th",{class:c.normalizeClass(i.value),onClick:a[0]||(a[0]=u=>{o(),s()})},[c.createElementVNode("span",null,c.toDisplayString(t.label),1),t.active&&!r.value?(c.openBlock(),c.createBlock(c.unref(Cu),{key:0})):t.active&&r.value?(c.openBlock(),c.createBlock(c.unref(Au),{key:1})):(c.openBlock(),c.createBlock(c.unref(bu),{key:2}))],2))}}),SI={class:"bd-table"},kI={key:0,class:"table"},_I={key:1},xI=["onClick"],NI={key:0},II={key:1,class:"empty-text"},U2=c.defineComponent({__name:"BDTable",props:["fields","items","sortBy","sortDesc","tbodyTrClass","emptyText"],emits:["row-click","sort-changed"],setup(n,{expose:e,emit:t}){const r=n,o=c.ref(r.items),s=c.ref(r.sortBy),i=f=>s.value=f,l=(f,h,p)=>{const m=h[f],g=p[f];if(m==null)return 1;if(g==null)return-1;const v=m.toString(),C=g.toString();return v.localeCompare(C,void 0,{numeric:!0})},a=f=>{o.value=o.value.sort((p,m)=>l(f,p,m)),t("sort-changed",{sortBy:f,sortDesc:!1})},u=f=>{o.value=o.value.sort((p,m)=>l(f,m,p)),t("sort-changed",{sortBy:f,sortDesc:!0})},d=()=>{o.value=r.items};return c.watch(()=>r.items,f=>{o.value=f}),e({Refresh:d}),(f,h)=>(c.openBlock(),c.createElementBlock("div",SI,[r.items&&r.items.length>0?(c.openBlock(),c.createElementBlock("table",kI,[c.createElementVNode("thead",null,[c.createElementVNode("tr",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(r.fields,p=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[p.isVisible?(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[p.sortable?(c.openBlock(),c.createBlock(TI,{key:0,label:p.label,active:p.key==s.value,sortDesc:r.sortDesc,onClick:m=>i(p.key),onSortAsc:m=>a(p.key),onSortDesc:m=>u(p.key)},null,8,["label","active","sortDesc","onClick","onSortAsc","onSortDesc"])):(c.openBlock(),c.createElementBlock("th",_I,c.toDisplayString(p.label),1))],64)):c.createCommentVNode("",!0)],64))),256))])]),c.createElementVNode("tbody",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(o.value,p=>(c.openBlock(),c.createElementBlock("tr",{class:c.normalizeClass(r.tbodyTrClass&&r.tbodyTrClass(p)),onClick:m=>t("row-click",p)},[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.fields,m=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[m.isVisible?(c.openBlock(),c.createElementBlock("td",NI,[f.$slots.hasOwnProperty(m.key)?c.renderSlot(f.$slots,m.key,{key:0,row:p,item:p,value:p[m.key]}):(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createTextVNode(c.toDisplayString(p[m.key]),1)],64))])):c.createCommentVNode("",!0)],64))),256))],10,xI))),256))])])):(c.openBlock(),c.createElementBlock("p",II,c.toDisplayString(r.emptyText),1))]))}}),MI=["id"],OI={key:0,class:"toast-body__title"},LI={class:"actions"},DI=["textContent"],RI=["textContent"],BI={class:"icon-wrapper"},PI=["textContent"],FI=["textContent"],fp=3e4,hp=5e3,H2=c.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(n,{emit:e}){const t=n;let r=c.ref(!1),o=c.ref(!1),s=null,i=null;const l=c.computed(()=>{let b="video-call-toast";return t.id&&(b+=`-${t.id}`),b}),a=c.computed(()=>r.value?[r.value?"is-handled":Fe,o.value?"is-handled--success":Fe,t.canceled?"is-handled--canceled":Fe].join(" "):Fe),u=c.computed(()=>t.canceled?t.localization.videoCallCanceled:o.value?t.localization.videoCallAccepted:t.localization.videoCallRejected),d=c.computed(()=>t.canceled?`${t.firstNameSender}${t.localization.notifyCallerWhenCanceled}`:t.isSender?t.contactInfoReceiver?`${t.contactInfoReceiver.name}${t.localization.notifyCallerWhenRejected}`:t.localization.notifyCallerWhenRejected:o.value?t.localization.openNewTabWhenAccepted:`${t.localization.notifyReceiverWhenRejected.start}${t.firstNameSender}${t.localization.notifyReceiverWhenRejected.end}`.replace(/\s\s+/g," "));c.watch(()=>t.canceled,()=>{r.value=!0});const f=()=>{const b=l.value,E=document.querySelector(`#${b}`);if(E){E.addEventListener("hide.bs.toast",C);var y={autohide:!0,delay:fp+hp};i=ts.getOrCreateInstance(E,y),i.show(),s=window.setTimeout(h,fp)}};c.onMounted(f);const h=()=>{r.value||m()},p=()=>{m(),v()},m=()=>{r.value||(r.value=!0,e("reject-video-call",t.id))},g=()=>{r.value=!0,o.value=!0,e("accept-video-call",t.id),v()},v=()=>{window.clearTimeout(s),window.setTimeout(()=>i.hide(),hp)},C=()=>{r.value=!1,o.value=!1};return(b,E)=>(c.openBlock(),c.createElementBlock("div",{id:l.value,class:"toast bd-video-call-toast",role:"alert","aria-live":"assertive","aria-atomic":"true"},[c.unref(r)?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",OI,c.toDisplayString(t.localization.incomingVideoCall),1)),c.createElementVNode("div",{class:c.normalizeClass(["toast-body__main",a.value])},[c.unref(r)?(c.openBlock(),c.createElementBlock(c.Fragment,{key:1},[c.createElementVNode("div",BI,[c.createVNode(Ii)]),c.createElementVNode("div",null,[c.createElementVNode("p",{textContent:c.toDisplayString(u.value),class:"title"},null,8,PI),c.createElementVNode("p",{textContent:c.toDisplayString(d.value)},null,8,FI)])],64)):(c.openBlock(),c.createElementBlock(c.Fragment,{key:0},[c.createVNode(_u,{value:b.contactInfoReceiver},null,8,["value"]),c.createElementVNode("div",LI,[c.createVNode(Qe,{variant:"danger",class:"text-center",onClick:p},{default:c.withCtx(()=>[c.createVNode(du),c.createElementVNode("span",{textContent:c.toDisplayString(t.localization.rejectVideoCall)},null,8,DI)]),_:1}),c.createVNode(Qe,{variant:"success",class:"text-center",onClick:g},{default:c.withCtx(()=>[c.createVNode(Ii),c.createElementVNode("span",{textContent:c.toDisplayString(t.localization.acceptVideoCall)},null,8,RI)]),_:1})])],64))],2)],8,MI))}}),Cd=c.defineComponent({__name:"BDDropdown",props:{size:{default:Tt.MD},variant:{default:Pa.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(n){const e=n,{uniqueIdentifier:t}=Qo(),r=`__BD__DROPDOWN__${t.value}`,o=c.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})),s=c.computed(()=>({"dropdown-menu-end":e.right,"dropdown-menu-action":e.actionToggle})),i=c.computed(()=>({"aria-labelledby":r})),l=c.ref(),a=c.ref(),u=()=>{l.value.classList.remove("show"),a.value.classList.remove("show"),a.value.removeAttribute("aria-expanded")};return(d,f)=>(c.openBlock(),c.createElementBlock("div",{class:"bd-dropdown dropdown",onClick:f[0]||(f[0]=c.withModifiers(()=>{},["stop"]))},[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(e.toggleTag),c.mergeProps({ref_key:"dropdownToggle",ref:a,class:"dropdown-toggle",target:"_self",role:"button","data-bs-toggle":"dropdown"},o.value),{default:c.withCtx(()=>[c.createElementVNode("span",null,c.toDisplayString(e.text),1)]),_:1},16)),c.createElementVNode("ul",c.mergeProps({ref_key:"dropdownMenu",ref:l,class:["dropdown-menu",s.value]},i.value,{onClick:u}),[c.renderSlot(d.$slots,"default")],16)]))}}),VI={class:"row bd-header"},$I={class:"col logo-mix"},zI=["src","alt"],UI=c.createElementVNode("div",null,"Menu",-1),HI={key:1,class:"col header-options"},jI={class:"col bd-btn-settings"},WI={key:2},Ad=c.defineComponent({__name:"BDHeader",props:{isEmbedded:{type:Boolean},dropdownMenuTitle:{},dropdownOptions:{},headerOptions:{},profileImageSrc:{},profileImageAlt:{},organizationLogoSrc:{},organizationLogoAlt:{},hasLogoutOption:{type:Boolean,default:!0}},emits:["click-logo","signout"],setup(n,{emit:e}){const t=n,r=c.computed(()=>{let d=[];return t.isEmbedded||(t.headerOptions&&(d=d.concat(t.headerOptions)),t.dropdownOptions&&(d=d.concat(t.dropdownOptions))),d}),o=c.computed(()=>!t.isEmbedded&&t.headerOptions&&t.headerOptions.length!==0),s=c.ref(void 0),i=()=>{t.isEmbedded||e("click-logo")},l=()=>e("signout"),a=()=>s.value=!0,u=()=>s.value=!1;return(d,f)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.createElementVNode("nav",VI,[c.createElementVNode("div",$I,[c.createVNode(lu,{viewBox:"0 0 351 61",class:"logo bd-logo",onClick:i}),t.organizationLogoSrc?(c.openBlock(),c.createElementBlock("img",{key:0,class:"logo organization-logo",src:t.organizationLogoSrc,alt:t.organizationLogoAlt},null,8,zI)):c.createCommentVNode("",!0)]),t.isEmbedded?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",{key:0,class:"col bd-hamburger",onClick:a},[UI,c.createVNode(yu)])),o.value?(c.openBlock(),c.createElementBlock("div",HI,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.headerOptions,h=>(c.openBlock(),c.createBlock(Qe,{class:"btn-header",to:h.to,variant:"neutral"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(h.text),1)]),_:2},1032,["to"]))),256))])):c.createCommentVNode("",!0),c.createElementVNode("div",jI,[t.isEmbedded?c.createCommentVNode("",!0):c.renderSlot(d.$slots,"profile-side",{key:0}),t.profileImageSrc?(c.openBlock(),c.createBlock(Hs,{key:1,src:t.profileImageSrc,alt:t.profileImageAlt,size:"sm"},null,8,["src","alt"])):c.createCommentVNode("",!0),t.isEmbedded?(c.openBlock(),c.createElementBlock("span",WI,c.toDisplayString(t.dropdownMenuTitle),1)):c.createCommentVNode("",!0),t.isEmbedded?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Cd,{key:3,text:t.dropdownMenuTitle,variant:"primary",toggleTag:"a",right:!0},{default:c.withCtx(()=>[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(t.dropdownOptions,(h,p)=>(c.openBlock(),c.createBlock(Oi,c.mergeProps({key:p},h),null,16))),128)),t.hasLogoutOption?(c.openBlock(),c.createBlock(Oi,{key:0,text:"Uitloggen",onClick:l})):c.createCommentVNode("",!0)]),_:1},8,["text"]))])]),t.isEmbedded?c.createCommentVNode("",!0):(c.openBlock(),c.createBlock(Ed,{key:0,active:s.value,options:r.value,onHide:u,onSignout:l},{"special-options":c.withCtx(()=>[c.renderSlot(d.$slots,"mobile-menu-special-options")]),_:3},8,["active","options"]))],64))}});/*!
183
183
  * shared v9.14.4
184
184
  * (c) 2025 kazuya kawaguchi
185
185
  * Released under the MIT License.
186
- */const Yn=typeof window<"u";let Ut,ro;if(process.env.NODE_ENV!=="production"){const n=Yn&&window.performance;n&&n.mark&&n.measure&&n.clearMarks&&n.clearMeasures&&(Ut=e=>{n.mark(e)},ro=(e,t,r)=>{n.measure(e,t,r),n.clearMarks(t),n.clearMarks(r)})}const WI=/\{([0-9a-zA-Z]+)\}/g;function bd(n,...e){return e.length===1&&He(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(WI,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const Zn=(n,e=!1)=>e?Symbol.for(n):Symbol(n),KI=(n,e,t)=>YI({l:n,k:e,s:t}),YI=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ct=n=>typeof n=="number"&&isFinite(n),GI=n=>W2(n)==="[object Date]",Wo=n=>W2(n)==="[object RegExp]",ul=n=>ze(n)&&Object.keys(n).length===0,yt=Object.assign,QI=Object.create,Ke=(n=null)=>QI(n);let pp;const Un=()=>pp||(pp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ke());function mp(n){return n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const ZI=Object.prototype.hasOwnProperty;function un(n,e){return ZI.call(n,e)}const st=Array.isArray,Ge=n=>typeof n=="function",Se=n=>typeof n=="string",Ye=n=>typeof n=="boolean",He=n=>n!==null&&typeof n=="object",JI=n=>He(n)&&Ge(n.then)&&Ge(n.catch),j2=Object.prototype.toString,W2=n=>j2.call(n),ze=n=>{if(!He(n))return!1;const e=Object.getPrototypeOf(n);return e===null||e.constructor===Object},XI=n=>n==null?"":st(n)||ze(n)&&n.toString===j2?JSON.stringify(n,null,2):String(n);function qI(n,e=""){return n.reduce((t,r,o)=>o===0?t+r:t+e+r,"")}const gp=2;function eM(n,e=0,t=n.length){const r=n.split(/\r?\n/);let o=0;const s=[];for(let i=0;i<r.length;i++)if(o+=r[i].length+1,o>=e){for(let l=i-gp;l<=i+gp||t>o;l++){if(l<0||l>=r.length)continue;const a=l+1;s.push(`${a}${" ".repeat(3-String(a).length)}| ${r[l]}`);const u=r[l].length;if(l===i){const d=e-(o-u)+1,f=Math.max(1,t>o?u-d:t-e);s.push(" | "+" ".repeat(d)+"^".repeat(f))}else if(l>i){if(t>o){const d=Math.max(Math.min(t-o,u),1);s.push(" | "+"^".repeat(d))}o+=u+1}}break}return s.join(`
187
- `)}function dl(n){let e=n;return()=>++e}function Jn(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const vp={};function K2(n){vp[n]||(vp[n]=!0,Jn(n))}function tM(){const n=new Map;return{events:n,on(t,r){const o=n.get(t);o&&o.push(r)||n.set(t,[r])},off(t,r){const o=n.get(t);o&&o.splice(o.indexOf(r)>>>0,1)},emit(t,r){(n.get(t)||[]).slice().map(o=>o(r)),(n.get("*")||[]).slice().map(o=>o(t,r))}}}const Ei=n=>!He(n)||st(n);function xi(n,e){if(Ei(n)||Ei(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:r,des:o}=t.pop();Object.keys(r).forEach(s=>{s!=="__proto__"&&(He(r[s])&&!He(o[s])&&(o[s]=Array.isArray(r[s])?[]:Ke()),Ei(o[s])||Ei(r[s])?o[s]=r[s]:t.push({src:r[s],des:o[s]}))})}}/*!
186
+ */const Yn=typeof window<"u";let Ut,ro;if(process.env.NODE_ENV!=="production"){const n=Yn&&window.performance;n&&n.mark&&n.measure&&n.clearMarks&&n.clearMeasures&&(Ut=e=>{n.mark(e)},ro=(e,t,r)=>{n.measure(e,t,r),n.clearMarks(t),n.clearMarks(r)})}const KI=/\{([0-9a-zA-Z]+)\}/g;function bd(n,...e){return e.length===1&&He(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(KI,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const Zn=(n,e=!1)=>e?Symbol.for(n):Symbol(n),YI=(n,e,t)=>GI({l:n,k:e,s:t}),GI=n=>JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),ct=n=>typeof n=="number"&&isFinite(n),QI=n=>W2(n)==="[object Date]",Wo=n=>W2(n)==="[object RegExp]",ul=n=>ze(n)&&Object.keys(n).length===0,yt=Object.assign,ZI=Object.create,Ke=(n=null)=>ZI(n);let pp;const Un=()=>pp||(pp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ke());function mp(n){return n.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const JI=Object.prototype.hasOwnProperty;function un(n,e){return JI.call(n,e)}const st=Array.isArray,Ge=n=>typeof n=="function",Se=n=>typeof n=="string",Ye=n=>typeof n=="boolean",He=n=>n!==null&&typeof n=="object",XI=n=>He(n)&&Ge(n.then)&&Ge(n.catch),j2=Object.prototype.toString,W2=n=>j2.call(n),ze=n=>{if(!He(n))return!1;const e=Object.getPrototypeOf(n);return e===null||e.constructor===Object},qI=n=>n==null?"":st(n)||ze(n)&&n.toString===j2?JSON.stringify(n,null,2):String(n);function eM(n,e=""){return n.reduce((t,r,o)=>o===0?t+r:t+e+r,"")}const gp=2;function tM(n,e=0,t=n.length){const r=n.split(/\r?\n/);let o=0;const s=[];for(let i=0;i<r.length;i++)if(o+=r[i].length+1,o>=e){for(let l=i-gp;l<=i+gp||t>o;l++){if(l<0||l>=r.length)continue;const a=l+1;s.push(`${a}${" ".repeat(3-String(a).length)}| ${r[l]}`);const u=r[l].length;if(l===i){const d=e-(o-u)+1,f=Math.max(1,t>o?u-d:t-e);s.push(" | "+" ".repeat(d)+"^".repeat(f))}else if(l>i){if(t>o){const d=Math.max(Math.min(t-o,u),1);s.push(" | "+"^".repeat(d))}o+=u+1}}break}return s.join(`
187
+ `)}function dl(n){let e=n;return()=>++e}function Jn(n,e){typeof console<"u"&&(console.warn("[intlify] "+n),e&&console.warn(e.stack))}const vp={};function K2(n){vp[n]||(vp[n]=!0,Jn(n))}function nM(){const n=new Map;return{events:n,on(t,r){const o=n.get(t);o&&o.push(r)||n.set(t,[r])},off(t,r){const o=n.get(t);o&&o.splice(o.indexOf(r)>>>0,1)},emit(t,r){(n.get(t)||[]).slice().map(o=>o(r)),(n.get("*")||[]).slice().map(o=>o(t,r))}}}const Ei=n=>!He(n)||st(n);function xi(n,e){if(Ei(n)||Ei(e))throw new Error("Invalid value");const t=[{src:n,des:e}];for(;t.length;){const{src:r,des:o}=t.pop();Object.keys(r).forEach(s=>{s!=="__proto__"&&(He(r[s])&&!He(o[s])&&(o[s]=Array.isArray(r[s])?[]:Ke()),Ei(o[s])||Ei(r[s])?o[s]=r[s]:t.push({src:r[s],des:o[s]}))})}}/*!
188
188
  * message-compiler v9.14.4
189
189
  * (c) 2025 kazuya kawaguchi
190
190
  * Released under the MIT License.
191
- */function nM(n,e,t){return{line:n,column:e,offset:t}}function Ma(n,e,t){const r={start:n,end:e};return t!=null&&(r.source=t),r}const rM=/\{([0-9a-zA-Z]+)\}/g;function Y2(n,...e){return e.length===1&&oM(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(rM,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const G2=Object.assign,yp=n=>typeof n=="string",oM=n=>n!==null&&typeof n=="object";function Q2(n,e=""){return n.reduce((t,r,o)=>o===0?t+r:t+e+r,"")}const fl={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},sM={[fl.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function iM(n,e,...t){const r=Y2(sM[n]||"",...t||[]),o={message:String(r),code:n};return e&&(o.location=e),o}const Oe={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},aM={[Oe.EXPECTED_TOKEN]:"Expected token: '{0}'",[Oe.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Oe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Oe.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Oe.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Oe.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Oe.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Oe.EMPTY_PLACEHOLDER]:"Empty placeholder",[Oe.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Oe.INVALID_LINKED_FORMAT]:"Invalid linked format",[Oe.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Oe.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Oe.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Oe.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Oe.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Oe.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ns(n,e,t={}){const{domain:r,messages:o,args:s}=t,i=Y2((o||aM)[n]||"",...s||[]),l=new SyntaxError(String(i));return l.code=n,e&&(l.location=e),l.domain=r,l}function lM(n){throw n}const cM=/<\/?[\w\s="/.':;#-\/]+>/,uM=n=>cM.test(n),Pn=" ",dM="\r",wt=`
192
- `,fM=String.fromCharCode(8232),hM=String.fromCharCode(8233);function pM(n){const e=n;let t=0,r=1,o=1,s=0;const i=I=>e[I]===dM&&e[I+1]===wt,l=I=>e[I]===wt,a=I=>e[I]===hM,u=I=>e[I]===fM,d=I=>i(I)||l(I)||a(I)||u(I),f=()=>t,h=()=>r,p=()=>o,m=()=>s,g=I=>i(I)||a(I)||u(I)?wt:e[I],v=()=>g(t),C=()=>g(t+s);function b(){return s=0,d(t)&&(r++,o=0),i(t)&&t++,t++,o++,e[t]}function E(){return i(t+s)&&s++,s++,e[t+s]}function y(){t=0,r=1,o=1,s=0}function x(I=0){s=I}function w(){const I=t+s;for(;I!==t;)b();s=0}return{index:f,line:h,column:p,peekOffset:m,charAt:g,currentChar:v,currentPeek:C,next:b,peek:E,reset:y,resetPeek:x,skipToPeek:w}}const nr=void 0,mM=".",Ep="'",gM="tokenizer";function vM(n,e={}){const t=e.location!==!1,r=pM(n),o=()=>r.index(),s=()=>nM(r.line(),r.column(),r.index()),i=s(),l=o(),a={currentType:14,offset:l,startLoc:i,endLoc:i,lastType:14,lastOffset:l,lastStartLoc:i,lastEndLoc:i,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:d}=e;function f(S,k,F,...Q){const ie=u();if(k.column+=F,k.offset+=F,d){const he=t?Ma(ie.startLoc,k):null,be=ns(S,he,{domain:gM,args:Q});d(be)}}function h(S,k,F){S.endLoc=s(),S.currentType=k;const Q={type:k};return t&&(Q.loc=Ma(S.startLoc,S.endLoc)),F!=null&&(Q.value=F),Q}const p=S=>h(S,14);function m(S,k){return S.currentChar()===k?(S.next(),k):(f(Oe.EXPECTED_TOKEN,s(),0,k),"")}function g(S){let k="";for(;S.currentPeek()===Pn||S.currentPeek()===wt;)k+=S.currentPeek(),S.peek();return k}function v(S){const k=g(S);return S.skipToPeek(),k}function C(S){if(S===nr)return!1;const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function b(S){if(S===nr)return!1;const k=S.charCodeAt(0);return k>=48&&k<=57}function E(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=C(S.currentPeek());return S.resetPeek(),Q}function y(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=S.currentPeek()==="-"?S.peek():S.currentPeek(),ie=b(Q);return S.resetPeek(),ie}function x(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=S.currentPeek()===Ep;return S.resetPeek(),Q}function w(S,k){const{currentType:F}=k;if(F!==8)return!1;g(S);const Q=S.currentPeek()===".";return S.resetPeek(),Q}function I(S,k){const{currentType:F}=k;if(F!==9)return!1;g(S);const Q=C(S.currentPeek());return S.resetPeek(),Q}function M(S,k){const{currentType:F}=k;if(!(F===8||F===12))return!1;g(S);const Q=S.currentPeek()===":";return S.resetPeek(),Q}function L(S,k){const{currentType:F}=k;if(F!==10)return!1;const Q=()=>{const he=S.currentPeek();return he==="{"?C(S.peek()):he==="@"||he==="%"||he==="|"||he===":"||he==="."||he===Pn||!he?!1:he===wt?(S.peek(),Q()):z(S,!1)},ie=Q();return S.resetPeek(),ie}function $(S){g(S);const k=S.currentPeek()==="|";return S.resetPeek(),k}function V(S){const k=g(S),F=S.currentPeek()==="%"&&S.peek()==="{";return S.resetPeek(),{isModulo:F,hasSpace:k.length>0}}function z(S,k=!0){const F=(ie=!1,he="",be=!1)=>{const q=S.currentPeek();return q==="{"?he==="%"?!1:ie:q==="@"||!q?he==="%"?!0:ie:q==="%"?(S.peek(),F(ie,"%",!0)):q==="|"?he==="%"||be?!0:!(he===Pn||he===wt):q===Pn?(S.peek(),F(!0,Pn,be)):q===wt?(S.peek(),F(!0,wt,be)):!0},Q=F();return k&&S.resetPeek(),Q}function G(S,k){const F=S.currentChar();return F===nr?nr:k(F)?(S.next(),F):null}function Y(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function K(S){return G(S,Y)}function W(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function J(S){return G(S,W)}function U(S){const k=S.charCodeAt(0);return k>=48&&k<=57}function ee(S){return G(S,U)}function ne(S){const k=S.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function ce(S){return G(S,ne)}function me(S){let k="",F="";for(;k=ee(S);)F+=k;return F}function ve(S){v(S);const k=S.currentChar();return k!=="%"&&f(Oe.EXPECTED_TOKEN,s(),0,k),S.next(),"%"}function Te(S){let k="";for(;;){const F=S.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F==="%")if(z(S))k+=F,S.next();else break;else if(F===Pn||F===wt)if(z(S))k+=F,S.next();else{if($(S))break;k+=F,S.next()}else k+=F,S.next()}return k}function ke(S){v(S);let k="",F="";for(;k=J(S);)F+=k;return S.currentChar()===nr&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F}function Ne(S){v(S);let k="";return S.currentChar()==="-"?(S.next(),k+=`-${me(S)}`):k+=me(S),S.currentChar()===nr&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),k}function Ce(S){return S!==Ep&&S!==wt}function D(S){v(S),m(S,"'");let k="",F="";for(;k=G(S,Ce);)k==="\\"?F+=B(S):F+=k;const Q=S.currentChar();return Q===wt||Q===nr?(f(Oe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),Q===wt&&(S.next(),m(S,"'")),F):(m(S,"'"),F)}function B(S){const k=S.currentChar();switch(k){case"\\":case"'":return S.next(),`\\${k}`;case"u":return N(S,k,4);case"U":return N(S,k,6);default:return f(Oe.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function N(S,k,F){m(S,k);let Q="";for(let ie=0;ie<F;ie++){const he=ce(S);if(!he){f(Oe.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${Q}${S.currentChar()}`);break}Q+=he}return`\\${k}${Q}`}function R(S){return S!=="{"&&S!=="}"&&S!==Pn&&S!==wt}function A(S){v(S);let k="",F="";for(;k=G(S,R);)F+=k;return F}function T(S){let k="",F="";for(;k=K(S);)F+=k;return F}function _(S){const k=F=>{const Q=S.currentChar();return Q==="{"||Q==="%"||Q==="@"||Q==="|"||Q==="("||Q===")"||!Q||Q===Pn?F:(F+=Q,S.next(),k(F))};return k("")}function O(S){v(S);const k=m(S,"|");return v(S),k}function H(S,k){let F=null;switch(S.currentChar()){case"{":return k.braceNest>=1&&f(Oe.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),S.next(),F=h(k,2,"{"),v(S),k.braceNest++,F;case"}":return k.braceNest>0&&k.currentType===2&&f(Oe.EMPTY_PLACEHOLDER,s(),0),S.next(),F=h(k,3,"}"),k.braceNest--,k.braceNest>0&&v(S),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),F;case"@":return k.braceNest>0&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F=j(S,k)||p(k),k.braceNest=0,F;default:{let ie=!0,he=!0,be=!0;if($(S))return k.braceNest>0&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,F;if(k.braceNest>0&&(k.currentType===5||k.currentType===6||k.currentType===7))return f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,Z(S,k);if(ie=E(S,k))return F=h(k,5,ke(S)),v(S),F;if(he=y(S,k))return F=h(k,6,Ne(S)),v(S),F;if(be=x(S,k))return F=h(k,7,D(S)),v(S),F;if(!ie&&!he&&!be)return F=h(k,13,A(S)),f(Oe.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,F.value),v(S),F;break}}return F}function j(S,k){const{currentType:F}=k;let Q=null;const ie=S.currentChar();switch((F===8||F===9||F===12||F===10)&&(ie===wt||ie===Pn)&&f(Oe.INVALID_LINKED_FORMAT,s(),0),ie){case"@":return S.next(),Q=h(k,8,"@"),k.inLinked=!0,Q;case".":return v(S),S.next(),h(k,9,".");case":":return v(S),S.next(),h(k,10,":");default:return $(S)?(Q=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,Q):w(S,k)||M(S,k)?(v(S),j(S,k)):I(S,k)?(v(S),h(k,12,T(S))):L(S,k)?(v(S),ie==="{"?H(S,k)||Q:h(k,11,_(S))):(F===8&&f(Oe.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,Z(S,k))}}function Z(S,k){let F={type:14};if(k.braceNest>0)return H(S,k)||p(k);if(k.inLinked)return j(S,k)||p(k);switch(S.currentChar()){case"{":return H(S,k)||p(k);case"}":return f(Oe.UNBALANCED_CLOSING_BRACE,s(),0),S.next(),h(k,3,"}");case"@":return j(S,k)||p(k);default:{if($(S))return F=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,F;const{isModulo:ie,hasSpace:he}=V(S);if(ie)return he?h(k,0,Te(S)):h(k,4,ve(S));if(z(S))return h(k,0,Te(S));break}}return F}function X(){const{currentType:S,offset:k,startLoc:F,endLoc:Q}=a;return a.lastType=S,a.lastOffset=k,a.lastStartLoc=F,a.lastEndLoc=Q,a.offset=o(),a.startLoc=s(),r.currentChar()===nr?h(a,14):Z(r,a)}return{nextToken:X,currentOffset:o,currentPosition:s,context:u}}const yM="parser",EM=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function CM(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||t,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function AM(n={}){const e=n.location!==!1,{onError:t,onWarn:r}=n;function o(E,y,x,w,...I){const M=E.currentPosition();if(M.offset+=w,M.column+=w,t){const L=e?Ma(x,M):null,$=ns(y,L,{domain:yM,args:I});t($)}}function s(E,y,x,w,...I){const M=E.currentPosition();if(M.offset+=w,M.column+=w,r){const L=e?Ma(x,M):null;r(iM(y,L,I))}}function i(E,y,x){const w={type:E};return e&&(w.start=y,w.end=y,w.loc={start:x,end:x}),w}function l(E,y,x,w){w&&(E.type=w),e&&(E.end=y,E.loc&&(E.loc.end=x))}function a(E,y){const x=E.context(),w=i(3,x.offset,x.startLoc);return w.value=y,l(w,E.currentOffset(),E.currentPosition()),w}function u(E,y){const x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(5,w,I);return M.index=parseInt(y,10),E.nextToken(),l(M,E.currentOffset(),E.currentPosition()),M}function d(E,y,x){const w=E.context(),{lastOffset:I,lastStartLoc:M}=w,L=i(4,I,M);return L.key=y,x===!0&&(L.modulo=!0),E.nextToken(),l(L,E.currentOffset(),E.currentPosition()),L}function f(E,y){const x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(9,w,I);return M.value=y.replace(EM,CM),E.nextToken(),l(M,E.currentOffset(),E.currentPosition()),M}function h(E){const y=E.nextToken(),x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(8,w,I);return y.type!==12?(o(E,Oe.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),M.value="",l(M,w,I),{nextConsumeToken:y,node:M}):(y.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,ln(y)),M.value=y.value||"",l(M,E.currentOffset(),E.currentPosition()),{node:M})}function p(E,y){const x=E.context(),w=i(7,x.offset,x.startLoc);return w.value=y,l(w,E.currentOffset(),E.currentPosition()),w}function m(E){const y=E.context(),x=i(6,y.offset,y.startLoc);let w=E.nextToken();if(w.type===9){const I=h(E);x.modifier=I.node,w=I.nextConsumeToken||E.nextToken()}switch(w.type!==10&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),w=E.nextToken(),w.type===2&&(w=E.nextToken()),w.type){case 11:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=p(E,w.value||"");break;case 5:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=d(E,w.value||"");break;case 6:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=u(E,w.value||"");break;case 7:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=f(E,w.value||"");break;default:{o(E,Oe.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const I=E.context(),M=i(7,I.offset,I.startLoc);return M.value="",l(M,I.offset,I.startLoc),x.key=M,l(x,I.offset,I.startLoc),{nextConsumeToken:w,node:x}}}return l(x,E.currentOffset(),E.currentPosition()),{node:x}}function g(E){const y=E.context(),x=y.currentType===1?E.currentOffset():y.offset,w=y.currentType===1?y.endLoc:y.startLoc,I=i(2,x,w);I.items=[];let M=null,L=null;do{const z=M||E.nextToken();switch(M=null,z.type){case 0:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(a(E,z.value||""));break;case 6:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(u(E,z.value||""));break;case 4:L=!0;break;case 5:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(d(E,z.value||"",!!L)),L&&(s(E,fl.USE_MODULO_SYNTAX,y.lastStartLoc,0,ln(z)),L=null);break;case 7:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(f(E,z.value||""));break;case 8:{const G=m(E);I.items.push(G.node),M=G.nextConsumeToken||null;break}}}while(y.currentType!==14&&y.currentType!==1);const $=y.currentType===1?y.lastOffset:E.currentOffset(),V=y.currentType===1?y.lastEndLoc:E.currentPosition();return l(I,$,V),I}function v(E,y,x,w){const I=E.context();let M=w.items.length===0;const L=i(1,y,x);L.cases=[],L.cases.push(w);do{const $=g(E);M||(M=$.items.length===0),L.cases.push($)}while(I.currentType!==14);return M&&o(E,Oe.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),l(L,E.currentOffset(),E.currentPosition()),L}function C(E){const y=E.context(),{offset:x,startLoc:w}=y,I=g(E);return y.currentType===14?I:v(E,x,w,I)}function b(E){const y=vM(E,G2({},n)),x=y.context(),w=i(0,x.offset,x.startLoc);return e&&w.loc&&(w.loc.source=E),w.body=C(y),n.onCacheKey&&(w.cacheKey=n.onCacheKey(E)),x.currentType!==14&&o(y,Oe.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,E[x.offset]||""),l(w,y.currentOffset(),y.currentPosition()),w}return{parse:b}}function ln(n){if(n.type===14)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function bM(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:s=>(t.helpers.add(s),s)}}function Cp(n,e){for(let t=0;t<n.length;t++)wd(n[t],e)}function wd(n,e){switch(n.type){case 1:Cp(n.cases,e),e.helper("plural");break;case 2:Cp(n.items,e);break;case 6:{wd(n.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 wM(n,e={}){const t=bM(n);t.helper("normalize"),n.body&&wd(n.body,t);const r=t.context();n.helpers=Array.from(r.helpers)}function TM(n){const e=n.body;return e.type===2?Ap(e):e.cases.forEach(t=>Ap(t)),n}function Ap(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<n.items.length;t++){const r=n.items[t];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===n.items.length){n.static=Q2(e);for(let t=0;t<n.items.length;t++){const r=n.items[t];(r.type===3||r.type===9)&&delete r.value}}}}const SM="minifier";function To(n){switch(n.t=n.type,n.type){case 0:{const e=n;To(e.body),e.b=e.body,delete e.body;break}case 1:{const e=n,t=e.cases;for(let r=0;r<t.length;r++)To(t[r]);e.c=t,delete e.cases;break}case 2:{const e=n,t=e.items;for(let r=0;r<t.length;r++)To(t[r]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=n;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=n;To(e.key),e.k=e.key,delete e.key,e.modifier&&(To(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=n;e.i=e.index,delete e.index;break}case 4:{const e=n;e.k=e.key,delete e.key;break}default:throw ns(Oe.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:SM,args:[n.type]})}delete n.type}const kM="parser";function _M(n,e){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:s}=e,i=e.location!==!1,l={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};i&&n.loc&&(l.source=n.loc.source);const a=()=>l;function u(v,C){l.code+=v}function d(v,C=!0){const b=C?o:"";u(s?b+" ".repeat(v):b)}function f(v=!0){const C=++l.indentLevel;v&&d(C)}function h(v=!0){const C=--l.indentLevel;v&&d(C)}function p(){d(l.indentLevel)}return{context:a,push:u,indent:f,deindent:h,newline:p,helper:v=>`_${v}`,needIndent:()=>l.needIndent}}function xM(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ko(n,e.key),e.modifier?(n.push(", "),Ko(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function NM(n,e){const{helper:t,needIndent:r}=n;n.push(`${t("normalize")}([`),n.indent(r());const o=e.items.length;for(let s=0;s<o&&(Ko(n,e.items[s]),s!==o-1);s++)n.push(", ");n.deindent(r()),n.push("])")}function IM(n,e){const{helper:t,needIndent:r}=n;if(e.cases.length>1){n.push(`${t("plural")}([`),n.indent(r());const o=e.cases.length;for(let s=0;s<o&&(Ko(n,e.cases[s]),s!==o-1);s++)n.push(", ");n.deindent(r()),n.push("])")}}function MM(n,e){e.body?Ko(n,e.body):n.push("null")}function Ko(n,e){const{helper:t}=n;switch(e.type){case 0:MM(n,e);break;case 1:IM(n,e);break;case 2:NM(n,e);break;case 6:xM(n,e);break;case 8:n.push(JSON.stringify(e.value),e);break;case 7:n.push(JSON.stringify(e.value),e);break;case 5:n.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:n.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:n.push(JSON.stringify(e.value),e);break;case 3:n.push(JSON.stringify(e.value),e);break;default:throw ns(Oe.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:kM,args:[e.type]})}}const OM=(n,e={})=>{const t=yp(e.mode)?e.mode:"normal",r=yp(e.filename)?e.filename:"message.intl",o=!!e.sourceMap,s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
193
- `,i=e.needIndent?e.needIndent:t!=="arrow",l=n.helpers||[],a=_M(n,{mode:t,filename:r,sourceMap:o,breakLineCode:s,needIndent:i});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(i),l.length>0&&(a.push(`const { ${Q2(l.map(f=>`${f}: _${f}`),", ")} } = ctx`),a.newline()),a.push("return "),Ko(a,n),a.deindent(i),a.push("}"),delete n.helpers;const{code:u,map:d}=a.context();return{ast:n,code:u,map:d?d.toJSON():void 0}};function LM(n,e={}){const t=G2({},e),r=!!t.jit,o=!!t.minify,s=t.optimize==null?!0:t.optimize,l=AM(t).parse(n);return r?(s&&TM(l),o&&To(l),{ast:l,code:""}):(wM(l,t),OM(l,t))}/*!
191
+ */function rM(n,e,t){return{line:n,column:e,offset:t}}function Ma(n,e,t){const r={start:n,end:e};return t!=null&&(r.source=t),r}const oM=/\{([0-9a-zA-Z]+)\}/g;function Y2(n,...e){return e.length===1&&sM(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),n.replace(oM,(t,r)=>e.hasOwnProperty(r)?e[r]:"")}const G2=Object.assign,yp=n=>typeof n=="string",sM=n=>n!==null&&typeof n=="object";function Q2(n,e=""){return n.reduce((t,r,o)=>o===0?t+r:t+e+r,"")}const fl={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},iM={[fl.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};function aM(n,e,...t){const r=Y2(iM[n]||"",...t||[]),o={message:String(r),code:n};return e&&(o.location=e),o}const Oe={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},lM={[Oe.EXPECTED_TOKEN]:"Expected token: '{0}'",[Oe.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[Oe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[Oe.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[Oe.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[Oe.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[Oe.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[Oe.EMPTY_PLACEHOLDER]:"Empty placeholder",[Oe.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[Oe.INVALID_LINKED_FORMAT]:"Invalid linked format",[Oe.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[Oe.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[Oe.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[Oe.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[Oe.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[Oe.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ns(n,e,t={}){const{domain:r,messages:o,args:s}=t,i=Y2((o||lM)[n]||"",...s||[]),l=new SyntaxError(String(i));return l.code=n,e&&(l.location=e),l.domain=r,l}function cM(n){throw n}const uM=/<\/?[\w\s="/.':;#-\/]+>/,dM=n=>uM.test(n),Pn=" ",fM="\r",wt=`
192
+ `,hM=String.fromCharCode(8232),pM=String.fromCharCode(8233);function mM(n){const e=n;let t=0,r=1,o=1,s=0;const i=I=>e[I]===fM&&e[I+1]===wt,l=I=>e[I]===wt,a=I=>e[I]===pM,u=I=>e[I]===hM,d=I=>i(I)||l(I)||a(I)||u(I),f=()=>t,h=()=>r,p=()=>o,m=()=>s,g=I=>i(I)||a(I)||u(I)?wt:e[I],v=()=>g(t),C=()=>g(t+s);function b(){return s=0,d(t)&&(r++,o=0),i(t)&&t++,t++,o++,e[t]}function E(){return i(t+s)&&s++,s++,e[t+s]}function y(){t=0,r=1,o=1,s=0}function x(I=0){s=I}function w(){const I=t+s;for(;I!==t;)b();s=0}return{index:f,line:h,column:p,peekOffset:m,charAt:g,currentChar:v,currentPeek:C,next:b,peek:E,reset:y,resetPeek:x,skipToPeek:w}}const nr=void 0,gM=".",Ep="'",vM="tokenizer";function yM(n,e={}){const t=e.location!==!1,r=mM(n),o=()=>r.index(),s=()=>rM(r.line(),r.column(),r.index()),i=s(),l=o(),a={currentType:14,offset:l,startLoc:i,endLoc:i,lastType:14,lastOffset:l,lastStartLoc:i,lastEndLoc:i,braceNest:0,inLinked:!1,text:""},u=()=>a,{onError:d}=e;function f(S,k,F,...Q){const ie=u();if(k.column+=F,k.offset+=F,d){const he=t?Ma(ie.startLoc,k):null,be=ns(S,he,{domain:vM,args:Q});d(be)}}function h(S,k,F){S.endLoc=s(),S.currentType=k;const Q={type:k};return t&&(Q.loc=Ma(S.startLoc,S.endLoc)),F!=null&&(Q.value=F),Q}const p=S=>h(S,14);function m(S,k){return S.currentChar()===k?(S.next(),k):(f(Oe.EXPECTED_TOKEN,s(),0,k),"")}function g(S){let k="";for(;S.currentPeek()===Pn||S.currentPeek()===wt;)k+=S.currentPeek(),S.peek();return k}function v(S){const k=g(S);return S.skipToPeek(),k}function C(S){if(S===nr)return!1;const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function b(S){if(S===nr)return!1;const k=S.charCodeAt(0);return k>=48&&k<=57}function E(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=C(S.currentPeek());return S.resetPeek(),Q}function y(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=S.currentPeek()==="-"?S.peek():S.currentPeek(),ie=b(Q);return S.resetPeek(),ie}function x(S,k){const{currentType:F}=k;if(F!==2)return!1;g(S);const Q=S.currentPeek()===Ep;return S.resetPeek(),Q}function w(S,k){const{currentType:F}=k;if(F!==8)return!1;g(S);const Q=S.currentPeek()===".";return S.resetPeek(),Q}function I(S,k){const{currentType:F}=k;if(F!==9)return!1;g(S);const Q=C(S.currentPeek());return S.resetPeek(),Q}function M(S,k){const{currentType:F}=k;if(!(F===8||F===12))return!1;g(S);const Q=S.currentPeek()===":";return S.resetPeek(),Q}function L(S,k){const{currentType:F}=k;if(F!==10)return!1;const Q=()=>{const he=S.currentPeek();return he==="{"?C(S.peek()):he==="@"||he==="%"||he==="|"||he===":"||he==="."||he===Pn||!he?!1:he===wt?(S.peek(),Q()):z(S,!1)},ie=Q();return S.resetPeek(),ie}function $(S){g(S);const k=S.currentPeek()==="|";return S.resetPeek(),k}function V(S){const k=g(S),F=S.currentPeek()==="%"&&S.peek()==="{";return S.resetPeek(),{isModulo:F,hasSpace:k.length>0}}function z(S,k=!0){const F=(ie=!1,he="",be=!1)=>{const q=S.currentPeek();return q==="{"?he==="%"?!1:ie:q==="@"||!q?he==="%"?!0:ie:q==="%"?(S.peek(),F(ie,"%",!0)):q==="|"?he==="%"||be?!0:!(he===Pn||he===wt):q===Pn?(S.peek(),F(!0,Pn,be)):q===wt?(S.peek(),F(!0,wt,be)):!0},Q=F();return k&&S.resetPeek(),Q}function G(S,k){const F=S.currentChar();return F===nr?nr:k(F)?(S.next(),F):null}function Y(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function K(S){return G(S,Y)}function W(S){const k=S.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function J(S){return G(S,W)}function U(S){const k=S.charCodeAt(0);return k>=48&&k<=57}function ee(S){return G(S,U)}function ne(S){const k=S.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function ce(S){return G(S,ne)}function me(S){let k="",F="";for(;k=ee(S);)F+=k;return F}function ve(S){v(S);const k=S.currentChar();return k!=="%"&&f(Oe.EXPECTED_TOKEN,s(),0,k),S.next(),"%"}function Te(S){let k="";for(;;){const F=S.currentChar();if(F==="{"||F==="}"||F==="@"||F==="|"||!F)break;if(F==="%")if(z(S))k+=F,S.next();else break;else if(F===Pn||F===wt)if(z(S))k+=F,S.next();else{if($(S))break;k+=F,S.next()}else k+=F,S.next()}return k}function ke(S){v(S);let k="",F="";for(;k=J(S);)F+=k;return S.currentChar()===nr&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F}function Ne(S){v(S);let k="";return S.currentChar()==="-"?(S.next(),k+=`-${me(S)}`):k+=me(S),S.currentChar()===nr&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),k}function Ce(S){return S!==Ep&&S!==wt}function D(S){v(S),m(S,"'");let k="",F="";for(;k=G(S,Ce);)k==="\\"?F+=B(S):F+=k;const Q=S.currentChar();return Q===wt||Q===nr?(f(Oe.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),Q===wt&&(S.next(),m(S,"'")),F):(m(S,"'"),F)}function B(S){const k=S.currentChar();switch(k){case"\\":case"'":return S.next(),`\\${k}`;case"u":return N(S,k,4);case"U":return N(S,k,6);default:return f(Oe.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function N(S,k,F){m(S,k);let Q="";for(let ie=0;ie<F;ie++){const he=ce(S);if(!he){f(Oe.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${Q}${S.currentChar()}`);break}Q+=he}return`\\${k}${Q}`}function R(S){return S!=="{"&&S!=="}"&&S!==Pn&&S!==wt}function A(S){v(S);let k="",F="";for(;k=G(S,R);)F+=k;return F}function T(S){let k="",F="";for(;k=K(S);)F+=k;return F}function _(S){const k=F=>{const Q=S.currentChar();return Q==="{"||Q==="%"||Q==="@"||Q==="|"||Q==="("||Q===")"||!Q||Q===Pn?F:(F+=Q,S.next(),k(F))};return k("")}function O(S){v(S);const k=m(S,"|");return v(S),k}function H(S,k){let F=null;switch(S.currentChar()){case"{":return k.braceNest>=1&&f(Oe.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),S.next(),F=h(k,2,"{"),v(S),k.braceNest++,F;case"}":return k.braceNest>0&&k.currentType===2&&f(Oe.EMPTY_PLACEHOLDER,s(),0),S.next(),F=h(k,3,"}"),k.braceNest--,k.braceNest>0&&v(S),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),F;case"@":return k.braceNest>0&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F=j(S,k)||p(k),k.braceNest=0,F;default:{let ie=!0,he=!0,be=!0;if($(S))return k.braceNest>0&&f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),F=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,F;if(k.braceNest>0&&(k.currentType===5||k.currentType===6||k.currentType===7))return f(Oe.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,Z(S,k);if(ie=E(S,k))return F=h(k,5,ke(S)),v(S),F;if(he=y(S,k))return F=h(k,6,Ne(S)),v(S),F;if(be=x(S,k))return F=h(k,7,D(S)),v(S),F;if(!ie&&!he&&!be)return F=h(k,13,A(S)),f(Oe.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,F.value),v(S),F;break}}return F}function j(S,k){const{currentType:F}=k;let Q=null;const ie=S.currentChar();switch((F===8||F===9||F===12||F===10)&&(ie===wt||ie===Pn)&&f(Oe.INVALID_LINKED_FORMAT,s(),0),ie){case"@":return S.next(),Q=h(k,8,"@"),k.inLinked=!0,Q;case".":return v(S),S.next(),h(k,9,".");case":":return v(S),S.next(),h(k,10,":");default:return $(S)?(Q=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,Q):w(S,k)||M(S,k)?(v(S),j(S,k)):I(S,k)?(v(S),h(k,12,T(S))):L(S,k)?(v(S),ie==="{"?H(S,k)||Q:h(k,11,_(S))):(F===8&&f(Oe.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,Z(S,k))}}function Z(S,k){let F={type:14};if(k.braceNest>0)return H(S,k)||p(k);if(k.inLinked)return j(S,k)||p(k);switch(S.currentChar()){case"{":return H(S,k)||p(k);case"}":return f(Oe.UNBALANCED_CLOSING_BRACE,s(),0),S.next(),h(k,3,"}");case"@":return j(S,k)||p(k);default:{if($(S))return F=h(k,1,O(S)),k.braceNest=0,k.inLinked=!1,F;const{isModulo:ie,hasSpace:he}=V(S);if(ie)return he?h(k,0,Te(S)):h(k,4,ve(S));if(z(S))return h(k,0,Te(S));break}}return F}function X(){const{currentType:S,offset:k,startLoc:F,endLoc:Q}=a;return a.lastType=S,a.lastOffset=k,a.lastStartLoc=F,a.lastEndLoc=Q,a.offset=o(),a.startLoc=s(),r.currentChar()===nr?h(a,14):Z(r,a)}return{nextToken:X,currentOffset:o,currentPosition:s,context:u}}const EM="parser",CM=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function AM(n,e,t){switch(n){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||t,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function bM(n={}){const e=n.location!==!1,{onError:t,onWarn:r}=n;function o(E,y,x,w,...I){const M=E.currentPosition();if(M.offset+=w,M.column+=w,t){const L=e?Ma(x,M):null,$=ns(y,L,{domain:EM,args:I});t($)}}function s(E,y,x,w,...I){const M=E.currentPosition();if(M.offset+=w,M.column+=w,r){const L=e?Ma(x,M):null;r(aM(y,L,I))}}function i(E,y,x){const w={type:E};return e&&(w.start=y,w.end=y,w.loc={start:x,end:x}),w}function l(E,y,x,w){w&&(E.type=w),e&&(E.end=y,E.loc&&(E.loc.end=x))}function a(E,y){const x=E.context(),w=i(3,x.offset,x.startLoc);return w.value=y,l(w,E.currentOffset(),E.currentPosition()),w}function u(E,y){const x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(5,w,I);return M.index=parseInt(y,10),E.nextToken(),l(M,E.currentOffset(),E.currentPosition()),M}function d(E,y,x){const w=E.context(),{lastOffset:I,lastStartLoc:M}=w,L=i(4,I,M);return L.key=y,x===!0&&(L.modulo=!0),E.nextToken(),l(L,E.currentOffset(),E.currentPosition()),L}function f(E,y){const x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(9,w,I);return M.value=y.replace(CM,AM),E.nextToken(),l(M,E.currentOffset(),E.currentPosition()),M}function h(E){const y=E.nextToken(),x=E.context(),{lastOffset:w,lastStartLoc:I}=x,M=i(8,w,I);return y.type!==12?(o(E,Oe.UNEXPECTED_EMPTY_LINKED_MODIFIER,x.lastStartLoc,0),M.value="",l(M,w,I),{nextConsumeToken:y,node:M}):(y.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,ln(y)),M.value=y.value||"",l(M,E.currentOffset(),E.currentPosition()),{node:M})}function p(E,y){const x=E.context(),w=i(7,x.offset,x.startLoc);return w.value=y,l(w,E.currentOffset(),E.currentPosition()),w}function m(E){const y=E.context(),x=i(6,y.offset,y.startLoc);let w=E.nextToken();if(w.type===9){const I=h(E);x.modifier=I.node,w=I.nextConsumeToken||E.nextToken()}switch(w.type!==10&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),w=E.nextToken(),w.type===2&&(w=E.nextToken()),w.type){case 11:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=p(E,w.value||"");break;case 5:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=d(E,w.value||"");break;case 6:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=u(E,w.value||"");break;case 7:w.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(w)),x.key=f(E,w.value||"");break;default:{o(E,Oe.UNEXPECTED_EMPTY_LINKED_KEY,y.lastStartLoc,0);const I=E.context(),M=i(7,I.offset,I.startLoc);return M.value="",l(M,I.offset,I.startLoc),x.key=M,l(x,I.offset,I.startLoc),{nextConsumeToken:w,node:x}}}return l(x,E.currentOffset(),E.currentPosition()),{node:x}}function g(E){const y=E.context(),x=y.currentType===1?E.currentOffset():y.offset,w=y.currentType===1?y.endLoc:y.startLoc,I=i(2,x,w);I.items=[];let M=null,L=null;do{const z=M||E.nextToken();switch(M=null,z.type){case 0:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(a(E,z.value||""));break;case 6:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(u(E,z.value||""));break;case 4:L=!0;break;case 5:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(d(E,z.value||"",!!L)),L&&(s(E,fl.USE_MODULO_SYNTAX,y.lastStartLoc,0,ln(z)),L=null);break;case 7:z.value==null&&o(E,Oe.UNEXPECTED_LEXICAL_ANALYSIS,y.lastStartLoc,0,ln(z)),I.items.push(f(E,z.value||""));break;case 8:{const G=m(E);I.items.push(G.node),M=G.nextConsumeToken||null;break}}}while(y.currentType!==14&&y.currentType!==1);const $=y.currentType===1?y.lastOffset:E.currentOffset(),V=y.currentType===1?y.lastEndLoc:E.currentPosition();return l(I,$,V),I}function v(E,y,x,w){const I=E.context();let M=w.items.length===0;const L=i(1,y,x);L.cases=[],L.cases.push(w);do{const $=g(E);M||(M=$.items.length===0),L.cases.push($)}while(I.currentType!==14);return M&&o(E,Oe.MUST_HAVE_MESSAGES_IN_PLURAL,x,0),l(L,E.currentOffset(),E.currentPosition()),L}function C(E){const y=E.context(),{offset:x,startLoc:w}=y,I=g(E);return y.currentType===14?I:v(E,x,w,I)}function b(E){const y=yM(E,G2({},n)),x=y.context(),w=i(0,x.offset,x.startLoc);return e&&w.loc&&(w.loc.source=E),w.body=C(y),n.onCacheKey&&(w.cacheKey=n.onCacheKey(E)),x.currentType!==14&&o(y,Oe.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,E[x.offset]||""),l(w,y.currentOffset(),y.currentPosition()),w}return{parse:b}}function ln(n){if(n.type===14)return"EOF";const e=(n.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function wM(n,e={}){const t={ast:n,helpers:new Set};return{context:()=>t,helper:s=>(t.helpers.add(s),s)}}function Cp(n,e){for(let t=0;t<n.length;t++)wd(n[t],e)}function wd(n,e){switch(n.type){case 1:Cp(n.cases,e),e.helper("plural");break;case 2:Cp(n.items,e);break;case 6:{wd(n.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 TM(n,e={}){const t=wM(n);t.helper("normalize"),n.body&&wd(n.body,t);const r=t.context();n.helpers=Array.from(r.helpers)}function SM(n){const e=n.body;return e.type===2?Ap(e):e.cases.forEach(t=>Ap(t)),n}function Ap(n){if(n.items.length===1){const e=n.items[0];(e.type===3||e.type===9)&&(n.static=e.value,delete e.value)}else{const e=[];for(let t=0;t<n.items.length;t++){const r=n.items[t];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===n.items.length){n.static=Q2(e);for(let t=0;t<n.items.length;t++){const r=n.items[t];(r.type===3||r.type===9)&&delete r.value}}}}const kM="minifier";function To(n){switch(n.t=n.type,n.type){case 0:{const e=n;To(e.body),e.b=e.body,delete e.body;break}case 1:{const e=n,t=e.cases;for(let r=0;r<t.length;r++)To(t[r]);e.c=t,delete e.cases;break}case 2:{const e=n,t=e.items;for(let r=0;r<t.length;r++)To(t[r]);e.i=t,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=n;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=n;To(e.key),e.k=e.key,delete e.key,e.modifier&&(To(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=n;e.i=e.index,delete e.index;break}case 4:{const e=n;e.k=e.key,delete e.key;break}default:throw ns(Oe.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:kM,args:[n.type]})}delete n.type}const _M="parser";function xM(n,e){const{sourceMap:t,filename:r,breakLineCode:o,needIndent:s}=e,i=e.location!==!1,l={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:s,indentLevel:0};i&&n.loc&&(l.source=n.loc.source);const a=()=>l;function u(v,C){l.code+=v}function d(v,C=!0){const b=C?o:"";u(s?b+" ".repeat(v):b)}function f(v=!0){const C=++l.indentLevel;v&&d(C)}function h(v=!0){const C=--l.indentLevel;v&&d(C)}function p(){d(l.indentLevel)}return{context:a,push:u,indent:f,deindent:h,newline:p,helper:v=>`_${v}`,needIndent:()=>l.needIndent}}function NM(n,e){const{helper:t}=n;n.push(`${t("linked")}(`),Ko(n,e.key),e.modifier?(n.push(", "),Ko(n,e.modifier),n.push(", _type")):n.push(", undefined, _type"),n.push(")")}function IM(n,e){const{helper:t,needIndent:r}=n;n.push(`${t("normalize")}([`),n.indent(r());const o=e.items.length;for(let s=0;s<o&&(Ko(n,e.items[s]),s!==o-1);s++)n.push(", ");n.deindent(r()),n.push("])")}function MM(n,e){const{helper:t,needIndent:r}=n;if(e.cases.length>1){n.push(`${t("plural")}([`),n.indent(r());const o=e.cases.length;for(let s=0;s<o&&(Ko(n,e.cases[s]),s!==o-1);s++)n.push(", ");n.deindent(r()),n.push("])")}}function OM(n,e){e.body?Ko(n,e.body):n.push("null")}function Ko(n,e){const{helper:t}=n;switch(e.type){case 0:OM(n,e);break;case 1:MM(n,e);break;case 2:IM(n,e);break;case 6:NM(n,e);break;case 8:n.push(JSON.stringify(e.value),e);break;case 7:n.push(JSON.stringify(e.value),e);break;case 5:n.push(`${t("interpolate")}(${t("list")}(${e.index}))`,e);break;case 4:n.push(`${t("interpolate")}(${t("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:n.push(JSON.stringify(e.value),e);break;case 3:n.push(JSON.stringify(e.value),e);break;default:throw ns(Oe.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:_M,args:[e.type]})}}const LM=(n,e={})=>{const t=yp(e.mode)?e.mode:"normal",r=yp(e.filename)?e.filename:"message.intl",o=!!e.sourceMap,s=e.breakLineCode!=null?e.breakLineCode:t==="arrow"?";":`
193
+ `,i=e.needIndent?e.needIndent:t!=="arrow",l=n.helpers||[],a=xM(n,{mode:t,filename:r,sourceMap:o,breakLineCode:s,needIndent:i});a.push(t==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(i),l.length>0&&(a.push(`const { ${Q2(l.map(f=>`${f}: _${f}`),", ")} } = ctx`),a.newline()),a.push("return "),Ko(a,n),a.deindent(i),a.push("}"),delete n.helpers;const{code:u,map:d}=a.context();return{ast:n,code:u,map:d?d.toJSON():void 0}};function DM(n,e={}){const t=G2({},e),r=!!t.jit,o=!!t.minify,s=t.optimize==null?!0:t.optimize,l=bM(t).parse(n);return r?(s&&SM(l),o&&To(l),{ast:l,code:""}):(TM(l,t),LM(l,t))}/*!
194
194
  * core-base v9.14.4
195
195
  * (c) 2025 kazuya kawaguchi
196
196
  * Released under the MIT License.
197
- */function DM(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Un().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Un().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Un().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function hn(n){return He(n)&&Td(n)===0&&(un(n,"b")||un(n,"body"))}const Z2=["b","body"];function RM(n){return kr(n,Z2)}const J2=["c","cases"];function BM(n){return kr(n,J2,[])}const X2=["s","static"];function PM(n){return kr(n,X2)}const q2=["i","items"];function FM(n){return kr(n,q2,[])}const eg=["t","type"];function Td(n){return kr(n,eg)}const tg=["v","value"];function Ci(n,e){const t=kr(n,tg);if(t!=null)return t;throw Fs(e)}const ng=["m","modifier"];function VM(n){return kr(n,ng)}const rg=["k","key"];function $M(n){const e=kr(n,rg);if(e)return e;throw Fs(6)}function kr(n,e,t){for(let r=0;r<e.length;r++){const o=e[r];if(un(n,o)&&n[o]!=null)return n[o]}return t}const og=[...Z2,...J2,...X2,...q2,...rg,...ng,...tg,...eg];function Fs(n){return new Error(`unhandled node type: ${n}`)}const _r=[];_r[0]={w:[0],i:[3,0],"[":[4],o:[7]};_r[1]={w:[1],".":[2],"[":[4],o:[7]};_r[2]={w:[2],i:[3,0],0:[3,0]};_r[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};_r[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};_r[5]={"'":[4,0],o:8,l:[5,0]};_r[6]={'"':[4,0],o:8,l:[6,0]};const zM=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function UM(n){return zM.test(n)}function HM(n){const e=n.charCodeAt(0),t=n.charCodeAt(n.length-1);return e===t&&(e===34||e===39)?n.slice(1,-1):n}function jM(n){if(n==null)return"o";switch(n.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return n;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 WM(n){const e=n.trim();return n.charAt(0)==="0"&&isNaN(parseInt(n))?!1:UM(e)?HM(e):"*"+e}function KM(n){const e=[];let t=-1,r=0,o=0,s,i,l,a,u,d,f;const h=[];h[0]=()=>{i===void 0?i=l:i+=l},h[1]=()=>{i!==void 0&&(e.push(i),i=void 0)},h[2]=()=>{h[0](),o++},h[3]=()=>{if(o>0)o--,r=4,h[0]();else{if(o=0,i===void 0||(i=WM(i),i===!1))return!1;h[1]()}};function p(){const m=n[t+1];if(r===5&&m==="'"||r===6&&m==='"')return t++,l="\\"+m,h[0](),!0}for(;r!==null;)if(t++,s=n[t],!(s==="\\"&&p())){if(a=jM(s),f=_r[r],u=f[a]||f.l||8,u===8||(r=u[0],u[1]!==void 0&&(d=h[u[1]],d&&(l=s,d()===!1))))return;if(r===7)return e}}const bp=new Map;function YM(n,e){return He(n)?n[e]:null}function GM(n,e){if(!He(n))return null;let t=bp.get(e);if(t||(t=KM(e),t&&bp.set(e,t)),!t)return null;const r=t.length;let o=n,s=0;for(;s<r;){const i=t[s];if(og.includes(i)&&hn(o))return null;const l=o[i];if(l===void 0||Ge(o))return null;o=l,s++}return o}const QM=n=>n,ZM=n=>"",JM="text",XM=n=>n.length===0?"":qI(n),qM=XI;function wp(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function eO(n){const e=ct(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(ct(n.named.count)||ct(n.named.n))?ct(n.named.count)?n.named.count:ct(n.named.n)?n.named.n:e:e}function tO(n,e){e.count||(e.count=n),e.n||(e.n=n)}function nO(n={}){const e=n.locale,t=eO(n),r=He(n.pluralRules)&&Se(e)&&Ge(n.pluralRules[e])?n.pluralRules[e]:wp,o=He(n.pluralRules)&&Se(e)&&Ge(n.pluralRules[e])?wp:void 0,s=C=>C[r(t,C.length,o)],i=n.list||[],l=C=>i[C],a=n.named||Ke();ct(n.pluralIndex)&&tO(t,a);const u=C=>a[C];function d(C){const b=Ge(n.messages)?n.messages(C):He(n.messages)?n.messages[C]:!1;return b||(n.parent?n.parent.message(C):ZM)}const f=C=>n.modifiers?n.modifiers[C]:QM,h=ze(n.processor)&&Ge(n.processor.normalize)?n.processor.normalize:XM,p=ze(n.processor)&&Ge(n.processor.interpolate)?n.processor.interpolate:qM,m=ze(n.processor)&&Se(n.processor.type)?n.processor.type:JM,v={list:l,named:u,plural:s,linked:(C,...b)=>{const[E,y]=b;let x="text",w="";b.length===1?He(E)?(w=E.modifier||w,x=E.type||x):Se(E)&&(w=E||w):b.length===2&&(Se(E)&&(w=E||w),Se(y)&&(x=y||x));const I=d(C)(v),M=x==="vnode"&&st(I)&&w?I[0]:I;return w?f(w)(M,x):M},message:d,type:m,interpolate:p,normalize:h,values:yt(Ke(),i,a)};return v}let Vs=null;function rO(n){Vs=n}function oO(n,e,t){Vs&&Vs.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const sO=iO("function:translate");function iO(n){return e=>Vs&&Vs.emit(n,e)}const sg=fl.__EXTEND_POINT__,Ir=dl(sg),St={NOT_FOUND_KEY:sg,FALLBACK_TO_TRANSLATE:Ir(),CANNOT_FORMAT_NUMBER:Ir(),FALLBACK_TO_NUMBER_FORMAT:Ir(),CANNOT_FORMAT_DATE:Ir(),FALLBACK_TO_DATE_FORMAT:Ir(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:Ir(),__EXTEND_POINT__:Ir()},aO={[St.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[St.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[St.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[St.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[St.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 oo(n,...e){return bd(aO[n],...e)}const ig=Oe.__EXTEND_POINT__,Mr=dl(ig),lt={INVALID_ARGUMENT:ig,INVALID_DATE_ARGUMENT:Mr(),INVALID_ISO_DATE_ARGUMENT:Mr(),NOT_SUPPORT_NON_STRING_MESSAGE:Mr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:Mr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:Mr(),NOT_SUPPORT_LOCALE_TYPE:Mr(),__EXTEND_POINT__:Mr()};function xn(n){return ns(n,null,process.env.NODE_ENV!=="production"?{messages:lO}:void 0)}const lO={[lt.INVALID_ARGUMENT]:"Invalid arguments",[lt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[lt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[lt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[lt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[lt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[lt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Sd(n,e){return e.locale!=null?Tp(e.locale):Tp(n.locale)}let dc;function Tp(n){if(Se(n))return n;if(Ge(n)){if(n.resolvedOnce&&dc!=null)return dc;if(n.constructor.name==="Function"){const e=n();if(JI(e))throw xn(lt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return dc=e}else throw xn(lt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw xn(lt.NOT_SUPPORT_LOCALE_TYPE)}function cO(n,e,t){return[...new Set([t,...st(e)?e:He(e)?Object.keys(e):Se(e)?[e]:[t]])]}function ag(n,e,t){const r=Se(t)?t:$s,o=n;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(r);if(!s){s=[];let i=[t];for(;st(i);)i=Sp(s,i,e);const l=st(e)||!ze(e)?e:e.default?e.default:null;i=Se(l)?[l]:l,st(i)&&Sp(s,i,!1),o.__localeChainCache.set(r,s)}return s}function Sp(n,e,t){let r=!0;for(let o=0;o<e.length&&Ye(r);o++){const s=e[o];Se(s)&&(r=uO(n,e[o],t))}return r}function uO(n,e,t){let r;const o=e.split("-");do{const s=o.join("-");r=dO(n,s,t),o.splice(-1,1)}while(o.length&&r===!0);return r}function dO(n,e,t){let r=!1;if(!n.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const o=e.replace(/!/g,"");n.push(o),(st(t)||ze(t))&&t[o]&&(r=t[o])}return r}const fO="9.14.4",hl=-1,$s="en-US",Oa="",kp=n=>`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function hO(){return{upper:(n,e)=>e==="text"&&Se(n)?n.toUpperCase():e==="vnode"&&He(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Se(n)?n.toLowerCase():e==="vnode"&&He(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Se(n)?kp(n):e==="vnode"&&He(n)&&"__v_isVNode"in n?kp(n.children):n}}let lg;function _p(n){lg=n}let cg;function pO(n){cg=n}let ug;function mO(n){ug=n}let dg=null;const gO=n=>{dg=n},vO=()=>dg;let fg=null;const xp=n=>{fg=n},yO=()=>fg;let Np=0;function EO(n={}){const e=Ge(n.onWarn)?n.onWarn:Jn,t=Se(n.version)?n.version:fO,r=Se(n.locale)||Ge(n.locale)?n.locale:$s,o=Ge(r)?$s:r,s=st(n.fallbackLocale)||ze(n.fallbackLocale)||Se(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:o,i=ze(n.messages)?n.messages:fc(o),l=ze(n.datetimeFormats)?n.datetimeFormats:fc(o),a=ze(n.numberFormats)?n.numberFormats:fc(o),u=yt(Ke(),n.modifiers,hO()),d=n.pluralRules||Ke(),f=Ge(n.missing)?n.missing:null,h=Ye(n.missingWarn)||Wo(n.missingWarn)?n.missingWarn:!0,p=Ye(n.fallbackWarn)||Wo(n.fallbackWarn)?n.fallbackWarn:!0,m=!!n.fallbackFormat,g=!!n.unresolving,v=Ge(n.postTranslation)?n.postTranslation:null,C=ze(n.processor)?n.processor:null,b=Ye(n.warnHtmlMessage)?n.warnHtmlMessage:!0,E=!!n.escapeParameter,y=Ge(n.messageCompiler)?n.messageCompiler:lg;process.env.NODE_ENV!=="production"&&Ge(n.messageCompiler)&&K2(oo(St.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const x=Ge(n.messageResolver)?n.messageResolver:cg||YM,w=Ge(n.localeFallbacker)?n.localeFallbacker:ug||cO,I=He(n.fallbackContext)?n.fallbackContext:void 0,M=n,L=He(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,$=He(M.__numberFormatters)?M.__numberFormatters:new Map,V=He(M.__meta)?M.__meta:{};Np++;const z={version:t,cid:Np,locale:r,fallbackLocale:s,messages:i,modifiers:u,pluralRules:d,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:m,unresolving:g,postTranslation:v,processor:C,warnHtmlMessage:b,escapeParameter:E,messageCompiler:y,messageResolver:x,localeFallbacker:w,fallbackContext:I,onWarn:e,__meta:V};return z.datetimeFormats=l,z.numberFormats=a,z.__datetimeFormatters=L,z.__numberFormatters=$,process.env.NODE_ENV!=="production"&&(z.__v_emitter=M.__v_emitter!=null?M.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&oO(z,t,V),z}const fc=n=>({[n]:Ke()});function pl(n,e){return n instanceof RegExp?n.test(e):n}function hg(n,e){return n instanceof RegExp?n.test(e):n}function kd(n,e,t,r,o){const{missing:s,onWarn:i}=n;if(process.env.NODE_ENV!=="production"){const l=n.__v_emitter;l&&l.emit("missing",{locale:t,key:e,type:o,groupId:`${o}:${e}`})}if(s!==null){const l=s(n,t,e,o);return Se(l)?l:e}else return process.env.NODE_ENV!=="production"&&hg(r,e)&&i(oo(St.NOT_FOUND_KEY,{key:e,locale:t})),e}function as(n,e,t){const r=n;r.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function pg(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function CO(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let r=t+1;r<e.length;r++)if(pg(n,e[r]))return!0;return!1}function hc(n){return t=>AO(t,n)}function AO(n,e){const t=RM(e);if(t==null)throw Fs(0);if(Td(t)===1){const s=BM(t);return n.plural(s.reduce((i,l)=>[...i,Ip(n,l)],[]))}else return Ip(n,t)}function Ip(n,e){const t=PM(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const r=FM(e).reduce((o,s)=>[...o,Xc(n,s)],[]);return n.normalize(r)}}function Xc(n,e){const t=Td(e);switch(t){case 3:return Ci(e,t);case 9:return Ci(e,t);case 4:{const r=e;if(un(r,"k")&&r.k)return n.interpolate(n.named(r.k));if(un(r,"key")&&r.key)return n.interpolate(n.named(r.key));throw Fs(t)}case 5:{const r=e;if(un(r,"i")&&ct(r.i))return n.interpolate(n.list(r.i));if(un(r,"index")&&ct(r.index))return n.interpolate(n.list(r.index));throw Fs(t)}case 6:{const r=e,o=VM(r),s=$M(r);return n.linked(Xc(n,s),o?Xc(n,o):void 0,n.type)}case 7:return Ci(e,t);case 8:return Ci(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const bO="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function mg(n,e){e&&uM(n)&&Jn(bd(bO,{source:n}))}const gg=n=>n;let No=Ke();function vg(n){n.code===fl.USE_MODULO_SYNTAX&&Jn(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
197
+ */function RM(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Un().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Un().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Un().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function hn(n){return He(n)&&Td(n)===0&&(un(n,"b")||un(n,"body"))}const Z2=["b","body"];function BM(n){return kr(n,Z2)}const J2=["c","cases"];function PM(n){return kr(n,J2,[])}const X2=["s","static"];function FM(n){return kr(n,X2)}const q2=["i","items"];function VM(n){return kr(n,q2,[])}const eg=["t","type"];function Td(n){return kr(n,eg)}const tg=["v","value"];function Ci(n,e){const t=kr(n,tg);if(t!=null)return t;throw Fs(e)}const ng=["m","modifier"];function $M(n){return kr(n,ng)}const rg=["k","key"];function zM(n){const e=kr(n,rg);if(e)return e;throw Fs(6)}function kr(n,e,t){for(let r=0;r<e.length;r++){const o=e[r];if(un(n,o)&&n[o]!=null)return n[o]}return t}const og=[...Z2,...J2,...X2,...q2,...rg,...ng,...tg,...eg];function Fs(n){return new Error(`unhandled node type: ${n}`)}const _r=[];_r[0]={w:[0],i:[3,0],"[":[4],o:[7]};_r[1]={w:[1],".":[2],"[":[4],o:[7]};_r[2]={w:[2],i:[3,0],0:[3,0]};_r[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};_r[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};_r[5]={"'":[4,0],o:8,l:[5,0]};_r[6]={'"':[4,0],o:8,l:[6,0]};const UM=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function HM(n){return UM.test(n)}function jM(n){const e=n.charCodeAt(0),t=n.charCodeAt(n.length-1);return e===t&&(e===34||e===39)?n.slice(1,-1):n}function WM(n){if(n==null)return"o";switch(n.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return n;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 KM(n){const e=n.trim();return n.charAt(0)==="0"&&isNaN(parseInt(n))?!1:HM(e)?jM(e):"*"+e}function YM(n){const e=[];let t=-1,r=0,o=0,s,i,l,a,u,d,f;const h=[];h[0]=()=>{i===void 0?i=l:i+=l},h[1]=()=>{i!==void 0&&(e.push(i),i=void 0)},h[2]=()=>{h[0](),o++},h[3]=()=>{if(o>0)o--,r=4,h[0]();else{if(o=0,i===void 0||(i=KM(i),i===!1))return!1;h[1]()}};function p(){const m=n[t+1];if(r===5&&m==="'"||r===6&&m==='"')return t++,l="\\"+m,h[0](),!0}for(;r!==null;)if(t++,s=n[t],!(s==="\\"&&p())){if(a=WM(s),f=_r[r],u=f[a]||f.l||8,u===8||(r=u[0],u[1]!==void 0&&(d=h[u[1]],d&&(l=s,d()===!1))))return;if(r===7)return e}}const bp=new Map;function GM(n,e){return He(n)?n[e]:null}function QM(n,e){if(!He(n))return null;let t=bp.get(e);if(t||(t=YM(e),t&&bp.set(e,t)),!t)return null;const r=t.length;let o=n,s=0;for(;s<r;){const i=t[s];if(og.includes(i)&&hn(o))return null;const l=o[i];if(l===void 0||Ge(o))return null;o=l,s++}return o}const ZM=n=>n,JM=n=>"",XM="text",qM=n=>n.length===0?"":eM(n),eO=qI;function wp(n,e){return n=Math.abs(n),e===2?n?n>1?1:0:1:n?Math.min(n,2):0}function tO(n){const e=ct(n.pluralIndex)?n.pluralIndex:-1;return n.named&&(ct(n.named.count)||ct(n.named.n))?ct(n.named.count)?n.named.count:ct(n.named.n)?n.named.n:e:e}function nO(n,e){e.count||(e.count=n),e.n||(e.n=n)}function rO(n={}){const e=n.locale,t=tO(n),r=He(n.pluralRules)&&Se(e)&&Ge(n.pluralRules[e])?n.pluralRules[e]:wp,o=He(n.pluralRules)&&Se(e)&&Ge(n.pluralRules[e])?wp:void 0,s=C=>C[r(t,C.length,o)],i=n.list||[],l=C=>i[C],a=n.named||Ke();ct(n.pluralIndex)&&nO(t,a);const u=C=>a[C];function d(C){const b=Ge(n.messages)?n.messages(C):He(n.messages)?n.messages[C]:!1;return b||(n.parent?n.parent.message(C):JM)}const f=C=>n.modifiers?n.modifiers[C]:ZM,h=ze(n.processor)&&Ge(n.processor.normalize)?n.processor.normalize:qM,p=ze(n.processor)&&Ge(n.processor.interpolate)?n.processor.interpolate:eO,m=ze(n.processor)&&Se(n.processor.type)?n.processor.type:XM,v={list:l,named:u,plural:s,linked:(C,...b)=>{const[E,y]=b;let x="text",w="";b.length===1?He(E)?(w=E.modifier||w,x=E.type||x):Se(E)&&(w=E||w):b.length===2&&(Se(E)&&(w=E||w),Se(y)&&(x=y||x));const I=d(C)(v),M=x==="vnode"&&st(I)&&w?I[0]:I;return w?f(w)(M,x):M},message:d,type:m,interpolate:p,normalize:h,values:yt(Ke(),i,a)};return v}let Vs=null;function oO(n){Vs=n}function sO(n,e,t){Vs&&Vs.emit("i18n:init",{timestamp:Date.now(),i18n:n,version:e,meta:t})}const iO=aO("function:translate");function aO(n){return e=>Vs&&Vs.emit(n,e)}const sg=fl.__EXTEND_POINT__,Ir=dl(sg),St={NOT_FOUND_KEY:sg,FALLBACK_TO_TRANSLATE:Ir(),CANNOT_FORMAT_NUMBER:Ir(),FALLBACK_TO_NUMBER_FORMAT:Ir(),CANNOT_FORMAT_DATE:Ir(),FALLBACK_TO_DATE_FORMAT:Ir(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:Ir(),__EXTEND_POINT__:Ir()},lO={[St.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[St.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[St.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[St.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[St.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[St.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 oo(n,...e){return bd(lO[n],...e)}const ig=Oe.__EXTEND_POINT__,Mr=dl(ig),lt={INVALID_ARGUMENT:ig,INVALID_DATE_ARGUMENT:Mr(),INVALID_ISO_DATE_ARGUMENT:Mr(),NOT_SUPPORT_NON_STRING_MESSAGE:Mr(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:Mr(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:Mr(),NOT_SUPPORT_LOCALE_TYPE:Mr(),__EXTEND_POINT__:Mr()};function xn(n){return ns(n,null,process.env.NODE_ENV!=="production"?{messages:cO}:void 0)}const cO={[lt.INVALID_ARGUMENT]:"Invalid arguments",[lt.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[lt.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[lt.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[lt.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[lt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[lt.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function Sd(n,e){return e.locale!=null?Tp(e.locale):Tp(n.locale)}let dc;function Tp(n){if(Se(n))return n;if(Ge(n)){if(n.resolvedOnce&&dc!=null)return dc;if(n.constructor.name==="Function"){const e=n();if(XI(e))throw xn(lt.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return dc=e}else throw xn(lt.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw xn(lt.NOT_SUPPORT_LOCALE_TYPE)}function uO(n,e,t){return[...new Set([t,...st(e)?e:He(e)?Object.keys(e):Se(e)?[e]:[t]])]}function ag(n,e,t){const r=Se(t)?t:$s,o=n;o.__localeChainCache||(o.__localeChainCache=new Map);let s=o.__localeChainCache.get(r);if(!s){s=[];let i=[t];for(;st(i);)i=Sp(s,i,e);const l=st(e)||!ze(e)?e:e.default?e.default:null;i=Se(l)?[l]:l,st(i)&&Sp(s,i,!1),o.__localeChainCache.set(r,s)}return s}function Sp(n,e,t){let r=!0;for(let o=0;o<e.length&&Ye(r);o++){const s=e[o];Se(s)&&(r=dO(n,e[o],t))}return r}function dO(n,e,t){let r;const o=e.split("-");do{const s=o.join("-");r=fO(n,s,t),o.splice(-1,1)}while(o.length&&r===!0);return r}function fO(n,e,t){let r=!1;if(!n.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const o=e.replace(/!/g,"");n.push(o),(st(t)||ze(t))&&t[o]&&(r=t[o])}return r}const hO="9.14.4",hl=-1,$s="en-US",Oa="",kp=n=>`${n.charAt(0).toLocaleUpperCase()}${n.substr(1)}`;function pO(){return{upper:(n,e)=>e==="text"&&Se(n)?n.toUpperCase():e==="vnode"&&He(n)&&"__v_isVNode"in n?n.children.toUpperCase():n,lower:(n,e)=>e==="text"&&Se(n)?n.toLowerCase():e==="vnode"&&He(n)&&"__v_isVNode"in n?n.children.toLowerCase():n,capitalize:(n,e)=>e==="text"&&Se(n)?kp(n):e==="vnode"&&He(n)&&"__v_isVNode"in n?kp(n.children):n}}let lg;function _p(n){lg=n}let cg;function mO(n){cg=n}let ug;function gO(n){ug=n}let dg=null;const vO=n=>{dg=n},yO=()=>dg;let fg=null;const xp=n=>{fg=n},EO=()=>fg;let Np=0;function CO(n={}){const e=Ge(n.onWarn)?n.onWarn:Jn,t=Se(n.version)?n.version:hO,r=Se(n.locale)||Ge(n.locale)?n.locale:$s,o=Ge(r)?$s:r,s=st(n.fallbackLocale)||ze(n.fallbackLocale)||Se(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:o,i=ze(n.messages)?n.messages:fc(o),l=ze(n.datetimeFormats)?n.datetimeFormats:fc(o),a=ze(n.numberFormats)?n.numberFormats:fc(o),u=yt(Ke(),n.modifiers,pO()),d=n.pluralRules||Ke(),f=Ge(n.missing)?n.missing:null,h=Ye(n.missingWarn)||Wo(n.missingWarn)?n.missingWarn:!0,p=Ye(n.fallbackWarn)||Wo(n.fallbackWarn)?n.fallbackWarn:!0,m=!!n.fallbackFormat,g=!!n.unresolving,v=Ge(n.postTranslation)?n.postTranslation:null,C=ze(n.processor)?n.processor:null,b=Ye(n.warnHtmlMessage)?n.warnHtmlMessage:!0,E=!!n.escapeParameter,y=Ge(n.messageCompiler)?n.messageCompiler:lg;process.env.NODE_ENV!=="production"&&Ge(n.messageCompiler)&&K2(oo(St.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const x=Ge(n.messageResolver)?n.messageResolver:cg||GM,w=Ge(n.localeFallbacker)?n.localeFallbacker:ug||uO,I=He(n.fallbackContext)?n.fallbackContext:void 0,M=n,L=He(M.__datetimeFormatters)?M.__datetimeFormatters:new Map,$=He(M.__numberFormatters)?M.__numberFormatters:new Map,V=He(M.__meta)?M.__meta:{};Np++;const z={version:t,cid:Np,locale:r,fallbackLocale:s,messages:i,modifiers:u,pluralRules:d,missing:f,missingWarn:h,fallbackWarn:p,fallbackFormat:m,unresolving:g,postTranslation:v,processor:C,warnHtmlMessage:b,escapeParameter:E,messageCompiler:y,messageResolver:x,localeFallbacker:w,fallbackContext:I,onWarn:e,__meta:V};return z.datetimeFormats=l,z.numberFormats=a,z.__datetimeFormatters=L,z.__numberFormatters=$,process.env.NODE_ENV!=="production"&&(z.__v_emitter=M.__v_emitter!=null?M.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&sO(z,t,V),z}const fc=n=>({[n]:Ke()});function pl(n,e){return n instanceof RegExp?n.test(e):n}function hg(n,e){return n instanceof RegExp?n.test(e):n}function kd(n,e,t,r,o){const{missing:s,onWarn:i}=n;if(process.env.NODE_ENV!=="production"){const l=n.__v_emitter;l&&l.emit("missing",{locale:t,key:e,type:o,groupId:`${o}:${e}`})}if(s!==null){const l=s(n,t,e,o);return Se(l)?l:e}else return process.env.NODE_ENV!=="production"&&hg(r,e)&&i(oo(St.NOT_FOUND_KEY,{key:e,locale:t})),e}function as(n,e,t){const r=n;r.__localeChainCache=new Map,n.localeFallbacker(n,t,e)}function pg(n,e){return n===e?!1:n.split("-")[0]===e.split("-")[0]}function AO(n,e){const t=e.indexOf(n);if(t===-1)return!1;for(let r=t+1;r<e.length;r++)if(pg(n,e[r]))return!0;return!1}function hc(n){return t=>bO(t,n)}function bO(n,e){const t=BM(e);if(t==null)throw Fs(0);if(Td(t)===1){const s=PM(t);return n.plural(s.reduce((i,l)=>[...i,Ip(n,l)],[]))}else return Ip(n,t)}function Ip(n,e){const t=FM(e);if(t!=null)return n.type==="text"?t:n.normalize([t]);{const r=VM(e).reduce((o,s)=>[...o,Xc(n,s)],[]);return n.normalize(r)}}function Xc(n,e){const t=Td(e);switch(t){case 3:return Ci(e,t);case 9:return Ci(e,t);case 4:{const r=e;if(un(r,"k")&&r.k)return n.interpolate(n.named(r.k));if(un(r,"key")&&r.key)return n.interpolate(n.named(r.key));throw Fs(t)}case 5:{const r=e;if(un(r,"i")&&ct(r.i))return n.interpolate(n.list(r.i));if(un(r,"index")&&ct(r.index))return n.interpolate(n.list(r.index));throw Fs(t)}case 6:{const r=e,o=$M(r),s=zM(r);return n.linked(Xc(n,s),o?Xc(n,o):void 0,n.type)}case 7:return Ci(e,t);case 8:return Ci(e,t);default:throw new Error(`unhandled node on format message part: ${t}`)}}const wO="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function mg(n,e){e&&dM(n)&&Jn(bd(wO,{source:n}))}const gg=n=>n;let No=Ke();function vg(n){n.code===fl.USE_MODULO_SYNTAX&&Jn(`The use of named interpolation with modulo syntax is deprecated. It will be removed in v10.
198
198
  reference: https://vue-i18n.intlify.dev/guide/essentials/syntax#rails-i18n-format
199
- (message compiler warning message: ${n.message})`)}function yg(n,e={}){let t=!1;const r=e.onError||lM;return e.onError=o=>{t=!0,r(o)},{...LM(n,e),detectError:t}}const wO=(n,e)=>{if(!Se(n))throw xn(lt.NOT_SUPPORT_NON_STRING_MESSAGE);process.env.NODE_ENV!=="production"&&(e.onWarn=vg);{const t=Ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&mg(n,t);const o=(e.onCacheKey||gg)(n),s=No[o];if(s)return s;const{code:i,detectError:l}=yg(n,e),a=new Function(`return ${i}`)();return l?a:No[o]=a}};function TO(n,e){if(process.env.NODE_ENV!=="production"&&(e.onWarn=vg),__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&Se(n)){const t=Ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&mg(n,t);const o=(e.onCacheKey||gg)(n),s=No[o];if(s)return s;const{ast:i,detectError:l}=yg(n,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),a=hc(i);return l?a:No[o]=a}else{if(process.env.NODE_ENV!=="production"&&!hn(n))return Jn(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>n;const t=n.cacheKey;if(t){const r=No[t];return r||(No[t]=hc(n))}else return hc(n)}}const Mp=()=>"",en=n=>Ge(n);function Op(n,...e){const{fallbackFormat:t,postTranslation:r,unresolving:o,messageCompiler:s,fallbackLocale:i,messages:l}=n,[a,u]=qc(...e),d=Ye(u.missingWarn)?u.missingWarn:n.missingWarn,f=Ye(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn,h=Ye(u.escapeParameter)?u.escapeParameter:n.escapeParameter,p=!!u.resolvedMessage,m=Se(u.default)||Ye(u.default)?Ye(u.default)?s?a:()=>a:u.default:t?s?a:()=>a:"",g=t||m!=="",v=Sd(n,u);h&&SO(u);let[C,b,E]=p?[a,v,l[v]||Ke()]:Eg(n,a,v,i,f,d),y=C,x=a;if(!p&&!(Se(y)||hn(y)||en(y))&&g&&(y=m,x=y),!p&&(!(Se(y)||hn(y)||en(y))||!Se(b)))return o?hl:a;if(process.env.NODE_ENV!=="production"&&Se(y)&&n.messageCompiler==null)return Jn(`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 w=!1;const I=()=>{w=!0},M=en(y)?y:Cg(n,a,b,y,x,I);if(w)return y;const L=NO(n,b,E,u),$=nO(L),V=kO(n,M,$),z=r?r(V,a):V;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const G={timestamp:Date.now(),key:Se(a)?a:en(y)?y.key:"",locale:b||(en(y)?y.locale:""),format:Se(y)?y:en(y)?y.source:"",message:z};G.meta=yt({},n.__meta,vO()||{}),sO(G)}return z}function SO(n){st(n.list)?n.list=n.list.map(e=>Se(e)?mp(e):e):He(n.named)&&Object.keys(n.named).forEach(e=>{Se(n.named[e])&&(n.named[e]=mp(n.named[e]))})}function Eg(n,e,t,r,o,s){const{messages:i,onWarn:l,messageResolver:a,localeFallbacker:u}=n,d=u(n,r,t);let f=Ke(),h,p=null,m=t,g=null;const v="translate";for(let C=0;C<d.length;C++){if(h=g=d[C],process.env.NODE_ENV!=="production"&&t!==h&&!pg(t,h)&&pl(o,e)&&l(oo(St.FALLBACK_TO_TRANSLATE,{key:e,target:h})),process.env.NODE_ENV!=="production"&&t!==h){const x=n.__v_emitter;x&&x.emit("fallback",{type:v,key:e,from:m,to:g,groupId:`${v}:${e}`})}f=i[h]||Ke();let b=null,E,y;if(process.env.NODE_ENV!=="production"&&Yn&&(b=window.performance.now(),E="intlify-message-resolve-start",y="intlify-message-resolve-end",Ut&&Ut(E)),(p=a(f,e))===null&&(p=f[e]),process.env.NODE_ENV!=="production"&&Yn){const x=window.performance.now(),w=n.__v_emitter;w&&b&&p&&w.emit("message-resolve",{type:"message-resolve",key:e,message:p,time:x-b,groupId:`${v}:${e}`}),E&&y&&Ut&&ro&&(Ut(y),ro("intlify message resolve",E,y))}if(Se(p)||hn(p)||en(p))break;if(!CO(h,d)){const x=kd(n,e,h,s,v);x!==e&&(p=x)}m=g}return[p,h,f]}function Cg(n,e,t,r,o,s){const{messageCompiler:i,warnHtmlMessage:l}=n;if(en(r)){const h=r;return h.locale=h.locale||t,h.key=h.key||e,h}if(i==null){const h=()=>r;return h.locale=t,h.key=e,h}let a=null,u,d;process.env.NODE_ENV!=="production"&&Yn&&(a=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",Ut&&Ut(u));const f=i(r,_O(n,t,o,r,l,s));if(process.env.NODE_ENV!=="production"&&Yn){const h=window.performance.now(),p=n.__v_emitter;p&&a&&p.emit("message-compilation",{type:"message-compilation",message:r,time:h-a,groupId:`translate:${e}`}),u&&d&&Ut&&ro&&(Ut(d),ro("intlify message compilation",u,d))}return f.locale=t,f.key=e,f.source=r,f}function kO(n,e,t){let r=null,o,s;process.env.NODE_ENV!=="production"&&Yn&&(r=window.performance.now(),o="intlify-message-evaluation-start",s="intlify-message-evaluation-end",Ut&&Ut(o));const i=e(t);if(process.env.NODE_ENV!=="production"&&Yn){const l=window.performance.now(),a=n.__v_emitter;a&&r&&a.emit("message-evaluation",{type:"message-evaluation",value:i,time:l-r,groupId:`translate:${e.key}`}),o&&s&&Ut&&ro&&(Ut(s),ro("intlify message evaluation",o,s))}return i}function qc(...n){const[e,t,r]=n,o=Ke();if(!Se(e)&&!ct(e)&&!en(e)&&!hn(e))throw xn(lt.INVALID_ARGUMENT);const s=ct(e)?String(e):(en(e),e);return ct(t)?o.plural=t:Se(t)?o.default=t:ze(t)&&!ul(t)?o.named=t:st(t)&&(o.list=t),ct(r)?o.plural=r:Se(r)?o.default=r:ze(r)&&yt(o,r),[s,o]}function _O(n,e,t,r,o,s){return{locale:e,key:t,warnHtmlMessage:o,onError:i=>{if(s&&s(i),process.env.NODE_ENV!=="production"){const l=xO(r),a=`Message compilation error: ${i.message}`,u=i.location&&l&&eM(l,i.location.start.offset,i.location.end.offset),d=n.__v_emitter;d&&l&&d.emit("compile-error",{message:l,error:i.message,start:i.location&&i.location.start.offset,end:i.location&&i.location.end.offset,groupId:`translate:${t}`}),console.error(u?`${a}
200
- ${u}`:a)}else throw i},onCacheKey:i=>KI(e,t,i)}}function xO(n){if(Se(n))return n;if(n.loc&&n.loc.source)return n.loc.source}function NO(n,e,t,r){const{modifiers:o,pluralRules:s,messageResolver:i,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:d}=n,h={locale:e,modifiers:o,pluralRules:s,messages:p=>{let m=i(t,p);if(m==null&&d){const[,,g]=Eg(d,p,e,l,a,u);m=i(g,p)}if(Se(m)||hn(m)){let g=!1;const C=Cg(n,p,e,m,p,()=>{g=!0});return g?Mp:C}else return en(m)?m:Mp}};return n.processor&&(h.processor=n.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),ct(r.plural)&&(h.pluralIndex=r.plural),h}const Lp=typeof Intl<"u",Ag={dateTimeFormat:Lp&&typeof Intl.DateTimeFormat<"u",numberFormat:Lp&&typeof Intl.NumberFormat<"u"};function Dp(n,...e){const{datetimeFormats:t,unresolving:r,fallbackLocale:o,onWarn:s,localeFallbacker:i}=n,{__datetimeFormatters:l}=n;if(process.env.NODE_ENV!=="production"&&!Ag.dateTimeFormat)return s(oo(St.CANNOT_FORMAT_DATE)),Oa;const[a,u,d,f]=eu(...e),h=Ye(d.missingWarn)?d.missingWarn:n.missingWarn,p=Ye(d.fallbackWarn)?d.fallbackWarn:n.fallbackWarn,m=!!d.part,g=Sd(n,d),v=i(n,o,g);if(!Se(a)||a==="")return new Intl.DateTimeFormat(g,f).format(u);let C={},b,E=null,y=g,x=null;const w="datetime format";for(let L=0;L<v.length;L++){if(b=x=v[L],process.env.NODE_ENV!=="production"&&g!==b&&pl(p,a)&&s(oo(St.FALLBACK_TO_DATE_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=n.__v_emitter;$&&$.emit("fallback",{type:w,key:a,from:y,to:x,groupId:`${w}:${a}`})}if(C=t[b]||{},E=C[a],ze(E))break;kd(n,a,b,h,w),y=x}if(!ze(E)||!Se(b))return r?hl:a;let I=`${b}__${a}`;ul(f)||(I=`${I}__${JSON.stringify(f)}`);let M=l.get(I);return M||(M=new Intl.DateTimeFormat(b,yt({},E,f)),l.set(I,M)),m?M.formatToParts(u):M.format(u)}const bg=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function eu(...n){const[e,t,r,o]=n,s=Ke();let i=Ke(),l;if(Se(e)){const a=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw xn(lt.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw xn(lt.INVALID_ISO_DATE_ARGUMENT)}}else if(GI(e)){if(isNaN(e.getTime()))throw xn(lt.INVALID_DATE_ARGUMENT);l=e}else if(ct(e))l=e;else throw xn(lt.INVALID_ARGUMENT);return Se(t)?s.key=t:ze(t)&&Object.keys(t).forEach(a=>{bg.includes(a)?i[a]=t[a]:s[a]=t[a]}),Se(r)?s.locale=r:ze(r)&&(i=r),ze(o)&&(i=o),[s.key||"",l,s,i]}function Rp(n,e,t){const r=n;for(const o in t){const s=`${e}__${o}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function Bp(n,...e){const{numberFormats:t,unresolving:r,fallbackLocale:o,onWarn:s,localeFallbacker:i}=n,{__numberFormatters:l}=n;if(process.env.NODE_ENV!=="production"&&!Ag.numberFormat)return s(oo(St.CANNOT_FORMAT_NUMBER)),Oa;const[a,u,d,f]=tu(...e),h=Ye(d.missingWarn)?d.missingWarn:n.missingWarn,p=Ye(d.fallbackWarn)?d.fallbackWarn:n.fallbackWarn,m=!!d.part,g=Sd(n,d),v=i(n,o,g);if(!Se(a)||a==="")return new Intl.NumberFormat(g,f).format(u);let C={},b,E=null,y=g,x=null;const w="number format";for(let L=0;L<v.length;L++){if(b=x=v[L],process.env.NODE_ENV!=="production"&&g!==b&&pl(p,a)&&s(oo(St.FALLBACK_TO_NUMBER_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=n.__v_emitter;$&&$.emit("fallback",{type:w,key:a,from:y,to:x,groupId:`${w}:${a}`})}if(C=t[b]||{},E=C[a],ze(E))break;kd(n,a,b,h,w),y=x}if(!ze(E)||!Se(b))return r?hl:a;let I=`${b}__${a}`;ul(f)||(I=`${I}__${JSON.stringify(f)}`);let M=l.get(I);return M||(M=new Intl.NumberFormat(b,yt({},E,f)),l.set(I,M)),m?M.formatToParts(u):M.format(u)}const wg=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function tu(...n){const[e,t,r,o]=n,s=Ke();let i=Ke();if(!ct(e))throw xn(lt.INVALID_ARGUMENT);const l=e;return Se(t)?s.key=t:ze(t)&&Object.keys(t).forEach(a=>{wg.includes(a)?i[a]=t[a]:s[a]=t[a]}),Se(r)?s.locale=r:ze(r)&&(i=r),ze(o)&&(i=o),[s.key||"",l,s,i]}function Pp(n,e,t){const r=n;for(const o in t){const s=`${e}__${o}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}DM();/*!
199
+ (message compiler warning message: ${n.message})`)}function yg(n,e={}){let t=!1;const r=e.onError||cM;return e.onError=o=>{t=!0,r(o)},{...DM(n,e),detectError:t}}const TO=(n,e)=>{if(!Se(n))throw xn(lt.NOT_SUPPORT_NON_STRING_MESSAGE);process.env.NODE_ENV!=="production"&&(e.onWarn=vg);{const t=Ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&mg(n,t);const o=(e.onCacheKey||gg)(n),s=No[o];if(s)return s;const{code:i,detectError:l}=yg(n,e),a=new Function(`return ${i}`)();return l?a:No[o]=a}};function SO(n,e){if(process.env.NODE_ENV!=="production"&&(e.onWarn=vg),__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&Se(n)){const t=Ye(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&mg(n,t);const o=(e.onCacheKey||gg)(n),s=No[o];if(s)return s;const{ast:i,detectError:l}=yg(n,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),a=hc(i);return l?a:No[o]=a}else{if(process.env.NODE_ENV!=="production"&&!hn(n))return Jn(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>n;const t=n.cacheKey;if(t){const r=No[t];return r||(No[t]=hc(n))}else return hc(n)}}const Mp=()=>"",en=n=>Ge(n);function Op(n,...e){const{fallbackFormat:t,postTranslation:r,unresolving:o,messageCompiler:s,fallbackLocale:i,messages:l}=n,[a,u]=qc(...e),d=Ye(u.missingWarn)?u.missingWarn:n.missingWarn,f=Ye(u.fallbackWarn)?u.fallbackWarn:n.fallbackWarn,h=Ye(u.escapeParameter)?u.escapeParameter:n.escapeParameter,p=!!u.resolvedMessage,m=Se(u.default)||Ye(u.default)?Ye(u.default)?s?a:()=>a:u.default:t?s?a:()=>a:"",g=t||m!=="",v=Sd(n,u);h&&kO(u);let[C,b,E]=p?[a,v,l[v]||Ke()]:Eg(n,a,v,i,f,d),y=C,x=a;if(!p&&!(Se(y)||hn(y)||en(y))&&g&&(y=m,x=y),!p&&(!(Se(y)||hn(y)||en(y))||!Se(b)))return o?hl:a;if(process.env.NODE_ENV!=="production"&&Se(y)&&n.messageCompiler==null)return Jn(`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 w=!1;const I=()=>{w=!0},M=en(y)?y:Cg(n,a,b,y,x,I);if(w)return y;const L=IO(n,b,E,u),$=rO(L),V=_O(n,M,$),z=r?r(V,a):V;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const G={timestamp:Date.now(),key:Se(a)?a:en(y)?y.key:"",locale:b||(en(y)?y.locale:""),format:Se(y)?y:en(y)?y.source:"",message:z};G.meta=yt({},n.__meta,yO()||{}),iO(G)}return z}function kO(n){st(n.list)?n.list=n.list.map(e=>Se(e)?mp(e):e):He(n.named)&&Object.keys(n.named).forEach(e=>{Se(n.named[e])&&(n.named[e]=mp(n.named[e]))})}function Eg(n,e,t,r,o,s){const{messages:i,onWarn:l,messageResolver:a,localeFallbacker:u}=n,d=u(n,r,t);let f=Ke(),h,p=null,m=t,g=null;const v="translate";for(let C=0;C<d.length;C++){if(h=g=d[C],process.env.NODE_ENV!=="production"&&t!==h&&!pg(t,h)&&pl(o,e)&&l(oo(St.FALLBACK_TO_TRANSLATE,{key:e,target:h})),process.env.NODE_ENV!=="production"&&t!==h){const x=n.__v_emitter;x&&x.emit("fallback",{type:v,key:e,from:m,to:g,groupId:`${v}:${e}`})}f=i[h]||Ke();let b=null,E,y;if(process.env.NODE_ENV!=="production"&&Yn&&(b=window.performance.now(),E="intlify-message-resolve-start",y="intlify-message-resolve-end",Ut&&Ut(E)),(p=a(f,e))===null&&(p=f[e]),process.env.NODE_ENV!=="production"&&Yn){const x=window.performance.now(),w=n.__v_emitter;w&&b&&p&&w.emit("message-resolve",{type:"message-resolve",key:e,message:p,time:x-b,groupId:`${v}:${e}`}),E&&y&&Ut&&ro&&(Ut(y),ro("intlify message resolve",E,y))}if(Se(p)||hn(p)||en(p))break;if(!AO(h,d)){const x=kd(n,e,h,s,v);x!==e&&(p=x)}m=g}return[p,h,f]}function Cg(n,e,t,r,o,s){const{messageCompiler:i,warnHtmlMessage:l}=n;if(en(r)){const h=r;return h.locale=h.locale||t,h.key=h.key||e,h}if(i==null){const h=()=>r;return h.locale=t,h.key=e,h}let a=null,u,d;process.env.NODE_ENV!=="production"&&Yn&&(a=window.performance.now(),u="intlify-message-compilation-start",d="intlify-message-compilation-end",Ut&&Ut(u));const f=i(r,xO(n,t,o,r,l,s));if(process.env.NODE_ENV!=="production"&&Yn){const h=window.performance.now(),p=n.__v_emitter;p&&a&&p.emit("message-compilation",{type:"message-compilation",message:r,time:h-a,groupId:`translate:${e}`}),u&&d&&Ut&&ro&&(Ut(d),ro("intlify message compilation",u,d))}return f.locale=t,f.key=e,f.source=r,f}function _O(n,e,t){let r=null,o,s;process.env.NODE_ENV!=="production"&&Yn&&(r=window.performance.now(),o="intlify-message-evaluation-start",s="intlify-message-evaluation-end",Ut&&Ut(o));const i=e(t);if(process.env.NODE_ENV!=="production"&&Yn){const l=window.performance.now(),a=n.__v_emitter;a&&r&&a.emit("message-evaluation",{type:"message-evaluation",value:i,time:l-r,groupId:`translate:${e.key}`}),o&&s&&Ut&&ro&&(Ut(s),ro("intlify message evaluation",o,s))}return i}function qc(...n){const[e,t,r]=n,o=Ke();if(!Se(e)&&!ct(e)&&!en(e)&&!hn(e))throw xn(lt.INVALID_ARGUMENT);const s=ct(e)?String(e):(en(e),e);return ct(t)?o.plural=t:Se(t)?o.default=t:ze(t)&&!ul(t)?o.named=t:st(t)&&(o.list=t),ct(r)?o.plural=r:Se(r)?o.default=r:ze(r)&&yt(o,r),[s,o]}function xO(n,e,t,r,o,s){return{locale:e,key:t,warnHtmlMessage:o,onError:i=>{if(s&&s(i),process.env.NODE_ENV!=="production"){const l=NO(r),a=`Message compilation error: ${i.message}`,u=i.location&&l&&tM(l,i.location.start.offset,i.location.end.offset),d=n.__v_emitter;d&&l&&d.emit("compile-error",{message:l,error:i.message,start:i.location&&i.location.start.offset,end:i.location&&i.location.end.offset,groupId:`translate:${t}`}),console.error(u?`${a}
200
+ ${u}`:a)}else throw i},onCacheKey:i=>YI(e,t,i)}}function NO(n){if(Se(n))return n;if(n.loc&&n.loc.source)return n.loc.source}function IO(n,e,t,r){const{modifiers:o,pluralRules:s,messageResolver:i,fallbackLocale:l,fallbackWarn:a,missingWarn:u,fallbackContext:d}=n,h={locale:e,modifiers:o,pluralRules:s,messages:p=>{let m=i(t,p);if(m==null&&d){const[,,g]=Eg(d,p,e,l,a,u);m=i(g,p)}if(Se(m)||hn(m)){let g=!1;const C=Cg(n,p,e,m,p,()=>{g=!0});return g?Mp:C}else return en(m)?m:Mp}};return n.processor&&(h.processor=n.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),ct(r.plural)&&(h.pluralIndex=r.plural),h}const Lp=typeof Intl<"u",Ag={dateTimeFormat:Lp&&typeof Intl.DateTimeFormat<"u",numberFormat:Lp&&typeof Intl.NumberFormat<"u"};function Dp(n,...e){const{datetimeFormats:t,unresolving:r,fallbackLocale:o,onWarn:s,localeFallbacker:i}=n,{__datetimeFormatters:l}=n;if(process.env.NODE_ENV!=="production"&&!Ag.dateTimeFormat)return s(oo(St.CANNOT_FORMAT_DATE)),Oa;const[a,u,d,f]=eu(...e),h=Ye(d.missingWarn)?d.missingWarn:n.missingWarn,p=Ye(d.fallbackWarn)?d.fallbackWarn:n.fallbackWarn,m=!!d.part,g=Sd(n,d),v=i(n,o,g);if(!Se(a)||a==="")return new Intl.DateTimeFormat(g,f).format(u);let C={},b,E=null,y=g,x=null;const w="datetime format";for(let L=0;L<v.length;L++){if(b=x=v[L],process.env.NODE_ENV!=="production"&&g!==b&&pl(p,a)&&s(oo(St.FALLBACK_TO_DATE_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=n.__v_emitter;$&&$.emit("fallback",{type:w,key:a,from:y,to:x,groupId:`${w}:${a}`})}if(C=t[b]||{},E=C[a],ze(E))break;kd(n,a,b,h,w),y=x}if(!ze(E)||!Se(b))return r?hl:a;let I=`${b}__${a}`;ul(f)||(I=`${I}__${JSON.stringify(f)}`);let M=l.get(I);return M||(M=new Intl.DateTimeFormat(b,yt({},E,f)),l.set(I,M)),m?M.formatToParts(u):M.format(u)}const bg=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function eu(...n){const[e,t,r,o]=n,s=Ke();let i=Ke(),l;if(Se(e)){const a=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!a)throw xn(lt.INVALID_ISO_DATE_ARGUMENT);const u=a[3]?a[3].trim().startsWith("T")?`${a[1].trim()}${a[3].trim()}`:`${a[1].trim()}T${a[3].trim()}`:a[1].trim();l=new Date(u);try{l.toISOString()}catch{throw xn(lt.INVALID_ISO_DATE_ARGUMENT)}}else if(QI(e)){if(isNaN(e.getTime()))throw xn(lt.INVALID_DATE_ARGUMENT);l=e}else if(ct(e))l=e;else throw xn(lt.INVALID_ARGUMENT);return Se(t)?s.key=t:ze(t)&&Object.keys(t).forEach(a=>{bg.includes(a)?i[a]=t[a]:s[a]=t[a]}),Se(r)?s.locale=r:ze(r)&&(i=r),ze(o)&&(i=o),[s.key||"",l,s,i]}function Rp(n,e,t){const r=n;for(const o in t){const s=`${e}__${o}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function Bp(n,...e){const{numberFormats:t,unresolving:r,fallbackLocale:o,onWarn:s,localeFallbacker:i}=n,{__numberFormatters:l}=n;if(process.env.NODE_ENV!=="production"&&!Ag.numberFormat)return s(oo(St.CANNOT_FORMAT_NUMBER)),Oa;const[a,u,d,f]=tu(...e),h=Ye(d.missingWarn)?d.missingWarn:n.missingWarn,p=Ye(d.fallbackWarn)?d.fallbackWarn:n.fallbackWarn,m=!!d.part,g=Sd(n,d),v=i(n,o,g);if(!Se(a)||a==="")return new Intl.NumberFormat(g,f).format(u);let C={},b,E=null,y=g,x=null;const w="number format";for(let L=0;L<v.length;L++){if(b=x=v[L],process.env.NODE_ENV!=="production"&&g!==b&&pl(p,a)&&s(oo(St.FALLBACK_TO_NUMBER_FORMAT,{key:a,target:b})),process.env.NODE_ENV!=="production"&&g!==b){const $=n.__v_emitter;$&&$.emit("fallback",{type:w,key:a,from:y,to:x,groupId:`${w}:${a}`})}if(C=t[b]||{},E=C[a],ze(E))break;kd(n,a,b,h,w),y=x}if(!ze(E)||!Se(b))return r?hl:a;let I=`${b}__${a}`;ul(f)||(I=`${I}__${JSON.stringify(f)}`);let M=l.get(I);return M||(M=new Intl.NumberFormat(b,yt({},E,f)),l.set(I,M)),m?M.formatToParts(u):M.format(u)}const wg=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function tu(...n){const[e,t,r,o]=n,s=Ke();let i=Ke();if(!ct(e))throw xn(lt.INVALID_ARGUMENT);const l=e;return Se(t)?s.key=t:ze(t)&&Object.keys(t).forEach(a=>{wg.includes(a)?i[a]=t[a]:s[a]=t[a]}),Se(r)?s.locale=r:ze(r)&&(i=r),ze(o)&&(i=o),[s.key||"",l,s,i]}function Pp(n,e,t){const r=n;for(const o in t){const s=`${e}__${o}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}RM();/*!
201
201
  * vue-i18n v9.14.4
202
202
  * (c) 2025 kazuya kawaguchi
203
203
  * Released under the MIT License.
204
- */const IO="9.14.4";function MO(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Un().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Un().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Un().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Un().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Un().__INTLIFY_PROD_DEVTOOLS__=!1)}const Tg=St.__EXTEND_POINT__,Fn=dl(Tg),Dt={FALLBACK_TO_ROOT:Tg,NOT_SUPPORTED_PRESERVE:Fn(),NOT_SUPPORTED_FORMATTER:Fn(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Fn(),NOT_SUPPORTED_GET_CHOICE_INDEX:Fn(),COMPONENT_NAME_LEGACY_COMPATIBLE:Fn(),NOT_FOUND_PARENT_SCOPE:Fn(),IGNORE_OBJ_FLATTEN:Fn(),NOTICE_DROP_ALLOW_COMPOSITION:Fn(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Fn()},OO={[Dt.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Dt.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[Dt.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[Dt.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[Dt.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[Dt.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Dt.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Dt.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function La(n,...e){return bd(OO[n],...e)}const Sg=lt.__EXTEND_POINT__,Lt=dl(Sg),Xe={UNEXPECTED_RETURN_TYPE:Sg,INVALID_ARGUMENT:Lt(),MUST_BE_CALL_SETUP_TOP:Lt(),NOT_INSTALLED:Lt(),NOT_AVAILABLE_IN_LEGACY_MODE:Lt(),REQUIRED_VALUE:Lt(),INVALID_VALUE:Lt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Lt(),NOT_INSTALLED_WITH_PROVIDE:Lt(),UNEXPECTED_ERROR:Lt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Lt(),BRIDGE_SUPPORT_VUE_2_ONLY:Lt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Lt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Lt(),__EXTEND_POINT__:Lt()};function pr(n,...e){return ns(n,null,process.env.NODE_ENV!=="production"?{messages:LO,args:e}:void 0)}const LO={[Xe.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Xe.INVALID_ARGUMENT]:"Invalid argument",[Xe.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Xe.NOT_INSTALLED]:"Need to install with `app.use` function",[Xe.UNEXPECTED_ERROR]:"Unexpected error",[Xe.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[Xe.REQUIRED_VALUE]:"Required in value: {0}",[Xe.INVALID_VALUE]:"Invalid value",[Xe.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Xe.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Xe.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Xe.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[Xe.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[Xe.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},nu=Zn("__translateVNode"),ru=Zn("__datetimeParts"),ou=Zn("__numberParts"),su=Zn("__enableEmitter"),iu=Zn("__disableEmitter"),DO=Zn("__setPluralRules"),kg=Zn("__injectWithOption"),au=Zn("__dispose");function zs(n){if(!He(n)||hn(n))return n;for(const e in n)if(un(n,e))if(!e.includes("."))He(n[e])&&zs(n[e]);else{const t=e.split("."),r=t.length-1;let o=n,s=!1;for(let i=0;i<r;i++){if(t[i]==="__proto__")throw new Error(`unsafe key: ${t[i]}`);if(t[i]in o||(o[t[i]]=Ke()),!He(o[t[i]])){process.env.NODE_ENV!=="production"&&Jn(La(Dt.IGNORE_OBJ_FLATTEN,{key:t[i]})),s=!0;break}o=o[t[i]]}if(s||(hn(o)?og.includes(t[r])||delete n[e]:(o[t[r]]=n[e],delete n[e])),!hn(o)){const i=o[t[r]];He(i)&&zs(i)}}return n}function _d(n,e){const{messages:t,__i18n:r,messageResolver:o,flatJson:s}=e,i=ze(t)?t:st(r)?Ke():{[n]:Ke()};if(st(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(i[a]=i[a]||Ke(),xi(u,i[a])):xi(u,i)}else Se(l)&&xi(JSON.parse(l),i)}),o==null&&s)for(const l in i)un(i,l)&&zs(i[l]);return i}function _g(n){return n.type}function RO(n,e,t){let r=He(e.messages)?e.messages:Ke();"__i18nGlobal"in t&&(r=_d(n.locale.value,{messages:r,__i18n:t.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{n.mergeLocaleMessage(s,r[s])});{if(He(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(i=>{n.mergeDateTimeFormat(i,e.datetimeFormats[i])})}if(He(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(i=>{n.mergeNumberFormat(i,e.numberFormats[i])})}}}function Fp(n){return c.createVNode(c.Text,null,n,0)}const Vp="__INTLIFY_META__",$p=()=>[],BO=()=>!1;let zp=0;function Up(n){return(e,t,r,o)=>n(t,r,c.getCurrentInstance()||void 0,o)}const PO=()=>{const n=c.getCurrentInstance();let e=null;return n&&(e=_g(n)[Vp])?{[Vp]:e}:null};function FO(n={},e){const{__root:t,__injectWithOption:r}=n,o=t===void 0,s=n.flatJson,i=Yn?c.ref:c.shallowRef,l=!!n.translateExistCompatible;process.env.NODE_ENV!=="production"&&l&&K2(La(Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let a=Ye(n.inheritLocale)?n.inheritLocale:!0;const u=i(t&&a?t.locale.value:Se(n.locale)?n.locale:$s),d=i(t&&a?t.fallbackLocale.value:Se(n.fallbackLocale)||st(n.fallbackLocale)||ze(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:u.value),f=i(_d(u.value,n)),h=i(ze(n.datetimeFormats)?n.datetimeFormats:{[u.value]:{}}),p=i(ze(n.numberFormats)?n.numberFormats:{[u.value]:{}});let m=t?t.missingWarn:Ye(n.missingWarn)||Wo(n.missingWarn)?n.missingWarn:!0,g=t?t.fallbackWarn:Ye(n.fallbackWarn)||Wo(n.fallbackWarn)?n.fallbackWarn:!0,v=t?t.fallbackRoot:Ye(n.fallbackRoot)?n.fallbackRoot:!0,C=!!n.fallbackFormat,b=Ge(n.missing)?n.missing:null,E=Ge(n.missing)?Up(n.missing):null,y=Ge(n.postTranslation)?n.postTranslation:null,x=t?t.warnHtmlMessage:Ye(n.warnHtmlMessage)?n.warnHtmlMessage:!0,w=!!n.escapeParameter;const I=t?t.modifiers:ze(n.modifiers)?n.modifiers:{};let M=n.pluralRules||t&&t.pluralRules,L;L=(()=>{o&&xp(null);const q={version:IO,locale:u.value,fallbackLocale:d.value,messages:f.value,modifiers:I,pluralRules:M,missing:E===null?void 0:E,missingWarn:m,fallbackWarn:g,fallbackFormat:C,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:x,escapeParameter:w,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};q.datetimeFormats=h.value,q.numberFormats=p.value,q.__datetimeFormatters=ze(L)?L.__datetimeFormatters:void 0,q.__numberFormatters=ze(L)?L.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(q.__v_emitter=ze(L)?L.__v_emitter:void 0);const se=EO(q);return o&&xp(se),se})(),as(L,u.value,d.value);function V(){return[u.value,d.value,f.value,h.value,p.value]}const z=c.computed({get:()=>u.value,set:q=>{u.value=q,L.locale=u.value}}),G=c.computed({get:()=>d.value,set:q=>{d.value=q,L.fallbackLocale=d.value,as(L,u.value,q)}}),Y=c.computed(()=>f.value),K=c.computed(()=>h.value),W=c.computed(()=>p.value);function J(){return Ge(y)?y:null}function U(q){y=q,L.postTranslation=q}function ee(){return b}function ne(q){q!==null&&(E=Up(q)),b=q,L.missing=E}function ce(q,se){return q!=="translate"||!se.resolvedMessage}const me=(q,se,Ae,Be,Ze,tt)=>{V();let Ct;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=t?yO():void 0),Ct=q(L)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=void 0)}if(Ae!=="translate exists"&&ct(Ct)&&Ct===hl||Ae==="translate exists"&&!Ct){const[te,ge]=se();if(process.env.NODE_ENV!=="production"&&t&&Se(te)&&ce(Ae,ge)&&(v&&(pl(g,te)||hg(m,te))&&Jn(La(Dt.FALLBACK_TO_ROOT,{key:te,type:Ae})),process.env.NODE_ENV!=="production")){const{__v_emitter:pe}=L;pe&&v&&pe.emit("fallback",{type:Ae,key:te,to:"global",groupId:`${Ae}:${te}`})}return t&&v?Be(t):Ze(te)}else{if(tt(Ct))return Ct;throw pr(Xe.UNEXPECTED_RETURN_TYPE)}};function ve(...q){return me(se=>Reflect.apply(Op,null,[se,...q]),()=>qc(...q),"translate",se=>Reflect.apply(se.t,se,[...q]),se=>se,se=>Se(se))}function Te(...q){const[se,Ae,Be]=q;if(Be&&!He(Be))throw pr(Xe.INVALID_ARGUMENT);return ve(se,Ae,yt({resolvedMessage:!0},Be||{}))}function ke(...q){return me(se=>Reflect.apply(Dp,null,[se,...q]),()=>eu(...q),"datetime format",se=>Reflect.apply(se.d,se,[...q]),()=>Oa,se=>Se(se))}function Ne(...q){return me(se=>Reflect.apply(Bp,null,[se,...q]),()=>tu(...q),"number format",se=>Reflect.apply(se.n,se,[...q]),()=>Oa,se=>Se(se))}function Ce(q){return q.map(se=>Se(se)||ct(se)||Ye(se)?Fp(String(se)):se)}const B={normalize:Ce,interpolate:q=>q,type:"vnode"};function N(...q){return me(se=>{let Ae;const Be=se;try{Be.processor=B,Ae=Reflect.apply(Op,null,[Be,...q])}finally{Be.processor=null}return Ae},()=>qc(...q),"translate",se=>se[nu](...q),se=>[Fp(se)],se=>st(se))}function R(...q){return me(se=>Reflect.apply(Bp,null,[se,...q]),()=>tu(...q),"number format",se=>se[ou](...q),$p,se=>Se(se)||st(se))}function A(...q){return me(se=>Reflect.apply(Dp,null,[se,...q]),()=>eu(...q),"datetime format",se=>se[ru](...q),$p,se=>Se(se)||st(se))}function T(q){M=q,L.pluralRules=M}function _(q,se){return me(()=>{if(!q)return!1;const Ae=Se(se)?se:u.value,Be=j(Ae),Ze=L.messageResolver(Be,q);return l?Ze!=null:hn(Ze)||en(Ze)||Se(Ze)},()=>[q],"translate exists",Ae=>Reflect.apply(Ae.te,Ae,[q,se]),BO,Ae=>Ye(Ae))}function O(q){let se=null;const Ae=ag(L,d.value,u.value);for(let Be=0;Be<Ae.length;Be++){const Ze=f.value[Ae[Be]]||{},tt=L.messageResolver(Ze,q);if(tt!=null){se=tt;break}}return se}function H(q){const se=O(q);return se??(t?t.tm(q)||{}:{})}function j(q){return f.value[q]||{}}function Z(q,se){if(s){const Ae={[q]:se};for(const Be in Ae)un(Ae,Be)&&zs(Ae[Be]);se=Ae[q]}f.value[q]=se,L.messages=f.value}function X(q,se){f.value[q]=f.value[q]||{};const Ae={[q]:se};if(s)for(const Be in Ae)un(Ae,Be)&&zs(Ae[Be]);se=Ae[q],xi(se,f.value[q]),L.messages=f.value}function S(q){return h.value[q]||{}}function k(q,se){h.value[q]=se,L.datetimeFormats=h.value,Rp(L,q,se)}function F(q,se){h.value[q]=yt(h.value[q]||{},se),L.datetimeFormats=h.value,Rp(L,q,se)}function Q(q){return p.value[q]||{}}function ie(q,se){p.value[q]=se,L.numberFormats=p.value,Pp(L,q,se)}function he(q,se){p.value[q]=yt(p.value[q]||{},se),L.numberFormats=p.value,Pp(L,q,se)}zp++,t&&Yn&&(c.watch(t.locale,q=>{a&&(u.value=q,L.locale=q,as(L,u.value,d.value))}),c.watch(t.fallbackLocale,q=>{a&&(d.value=q,L.fallbackLocale=q,as(L,u.value,d.value))}));const be={id:zp,locale:z,fallbackLocale:G,get inheritLocale(){return a},set inheritLocale(q){a=q,q&&t&&(u.value=t.locale.value,d.value=t.fallbackLocale.value,as(L,u.value,d.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Y,get modifiers(){return I},get pluralRules(){return M||{}},get isGlobal(){return o},get missingWarn(){return m},set missingWarn(q){m=q,L.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(q){g=q,L.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(q){v=q},get fallbackFormat(){return C},set fallbackFormat(q){C=q,L.fallbackFormat=C},get warnHtmlMessage(){return x},set warnHtmlMessage(q){x=q,L.warnHtmlMessage=q},get escapeParameter(){return w},set escapeParameter(q){w=q,L.escapeParameter=q},t:ve,getLocaleMessage:j,setLocaleMessage:Z,mergeLocaleMessage:X,getPostTranslationHandler:J,setPostTranslationHandler:U,getMissingHandler:ee,setMissingHandler:ne,[DO]:T};return be.datetimeFormats=K,be.numberFormats=W,be.rt=Te,be.te=_,be.tm=H,be.d=ke,be.n=Ne,be.getDateTimeFormat=S,be.setDateTimeFormat=k,be.mergeDateTimeFormat=F,be.getNumberFormat=Q,be.setNumberFormat=ie,be.mergeNumberFormat=he,be[kg]=r,be[nu]=N,be[ru]=A,be[ou]=R,process.env.NODE_ENV!=="production"&&(be[su]=q=>{L.__v_emitter=q},be[iu]=()=>{L.__v_emitter=void 0}),be}const xd={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function VO({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((r,o)=>[...r,...o.type===c.Fragment?o.children:[o]],[]):e.reduce((t,r)=>{const o=n[r];return o&&(t[r]=o()),t},Ke())}function xg(n){return c.Fragment}yt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>ct(n)||!isNaN(n)}},xd);function $O(n){return st(n)&&!Se(n[0])}function Ng(n,e,t,r){const{slots:o,attrs:s}=e;return()=>{const i={part:!0};let l=Ke();n.locale&&(i.locale=n.locale),Se(n.format)?i.key=n.format:He(n.format)&&(Se(n.format.key)&&(i.key=n.format.key),l=Object.keys(n.format).reduce((h,p)=>t.includes(p)?yt(Ke(),h,{[p]:n.format[p]}):h,Ke()));const a=r(n.value,i,l);let u=[i.key];st(a)?u=a.map((h,p)=>{const m=o[h.type],g=m?m({[h.type]:h.value,index:p,parts:a}):[h.value];return $O(g)&&(g[0].key=`${h.type}-${p}`),g}):Se(a)&&(u=[a]);const d=yt(Ke(),s),f=Se(n.tag)||He(n.tag)?n.tag:xg();return c.h(f,d,u)}}yt({value:{type:Number,required:!0},format:{type:[String,Object]}},xd);yt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},xd);function Hp(n,e){}const zO=Zn("global-vue-i18n");function qs(n={}){const e=c.getCurrentInstance();if(e==null)throw pr(Xe.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw pr(Xe.NOT_INSTALLED);const t=UO(e),r=jO(t),o=_g(e),s=HO(n,o);if(__VUE_I18N_LEGACY_API__&&t.mode==="legacy"&&!n.__useComponent){if(!t.allowComposition)throw pr(Xe.NOT_AVAILABLE_IN_LEGACY_MODE);return GO(e,s,r,n)}if(s==="global")return RO(r,n,o),r;if(s==="parent"){let a=WO(t,e,n.__useComponent);return a==null&&(process.env.NODE_ENV!=="production"&&Jn(La(Dt.NOT_FOUND_PARENT_SCOPE)),a=r),a}const i=t;let l=i.__getInstance(e);if(l==null){const a=yt({},n);"__i18n"in o&&(a.__i18n=o.__i18n),r&&(a.__root=r),l=FO(a),i.__composerExtend&&(l[au]=i.__composerExtend(l)),YO(i,e,l),i.__setInstance(e,l)}return l}function UO(n){{const e=c.inject(n.isCE?zO:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw pr(n.isCE?Xe.NOT_INSTALLED_WITH_PROVIDE:Xe.UNEXPECTED_ERROR);return e}}function HO(n,e){return ul(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function jO(n){return n.mode==="composition"?n.global:n.global.__composer}function WO(n,e,t=!1){let r=null;const o=e.root;let s=KO(e,t);for(;s!=null;){const i=n;if(n.mode==="composition")r=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=i.__getInstance(s);l!=null&&(r=l.__composer,t&&r&&!r[kg]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function KO(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function YO(n,e,t){let r=null;c.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,r=tM();const o=t;o[su]&&o[su](r),r.on("*",Hp)}},e),c.onUnmounted(()=>{const o=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Hp),o[iu]&&o[iu](),delete e.vnode.el.__VUE_I18N__),n.__deleteInstance(e);const s=o[au];s&&(s(),delete o[au])},e)}function GO(n,e,t,r={}){const o=e==="local",s=c.shallowRef(null);if(o&&n.proxy&&!(n.proxy.$options.i18n||n.proxy.$options.__i18n))throw pr(Xe.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=Ye(r.inheritLocale)?r.inheritLocale:!Se(r.locale),l=c.ref(!o||i?t.locale.value:Se(r.locale)?r.locale:$s),a=c.ref(!o||i?t.fallbackLocale.value:Se(r.fallbackLocale)||st(r.fallbackLocale)||ze(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),u=c.ref(_d(l.value,r)),d=c.ref(ze(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),f=c.ref(ze(r.numberFormats)?r.numberFormats:{[l.value]:{}}),h=o?t.missingWarn:Ye(r.missingWarn)||Wo(r.missingWarn)?r.missingWarn:!0,p=o?t.fallbackWarn:Ye(r.fallbackWarn)||Wo(r.fallbackWarn)?r.fallbackWarn:!0,m=o?t.fallbackRoot:Ye(r.fallbackRoot)?r.fallbackRoot:!0,g=!!r.fallbackFormat,v=Ge(r.missing)?r.missing:null,C=Ge(r.postTranslation)?r.postTranslation:null,b=o?t.warnHtmlMessage:Ye(r.warnHtmlMessage)?r.warnHtmlMessage:!0,E=!!r.escapeParameter,y=o?t.modifiers:ze(r.modifiers)?r.modifiers:{},x=r.pluralRules||o&&t.pluralRules;function w(){return[l.value,a.value,u.value,d.value,f.value]}const I=c.computed({get:()=>s.value?s.value.locale.value:l.value,set:_=>{s.value&&(s.value.locale.value=_),l.value=_}}),M=c.computed({get:()=>s.value?s.value.fallbackLocale.value:a.value,set:_=>{s.value&&(s.value.fallbackLocale.value=_),a.value=_}}),L=c.computed(()=>s.value?s.value.messages.value:u.value),$=c.computed(()=>d.value),V=c.computed(()=>f.value);function z(){return s.value?s.value.getPostTranslationHandler():C}function G(_){s.value&&s.value.setPostTranslationHandler(_)}function Y(){return s.value?s.value.getMissingHandler():v}function K(_){s.value&&s.value.setMissingHandler(_)}function W(_){return w(),_()}function J(..._){return s.value?W(()=>Reflect.apply(s.value.t,null,[..._])):W(()=>"")}function U(..._){return s.value?Reflect.apply(s.value.rt,null,[..._]):""}function ee(..._){return s.value?W(()=>Reflect.apply(s.value.d,null,[..._])):W(()=>"")}function ne(..._){return s.value?W(()=>Reflect.apply(s.value.n,null,[..._])):W(()=>"")}function ce(_){return s.value?s.value.tm(_):{}}function me(_,O){return s.value?s.value.te(_,O):!1}function ve(_){return s.value?s.value.getLocaleMessage(_):{}}function Te(_,O){s.value&&(s.value.setLocaleMessage(_,O),u.value[_]=O)}function ke(_,O){s.value&&s.value.mergeLocaleMessage(_,O)}function Ne(_){return s.value?s.value.getDateTimeFormat(_):{}}function Ce(_,O){s.value&&(s.value.setDateTimeFormat(_,O),d.value[_]=O)}function D(_,O){s.value&&s.value.mergeDateTimeFormat(_,O)}function B(_){return s.value?s.value.getNumberFormat(_):{}}function N(_,O){s.value&&(s.value.setNumberFormat(_,O),f.value[_]=O)}function R(_,O){s.value&&s.value.mergeNumberFormat(_,O)}const A={get id(){return s.value?s.value.id:-1},locale:I,fallbackLocale:M,messages:L,datetimeFormats:$,numberFormats:V,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(_){s.value&&(s.value.inheritLocale=_)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(u.value)},get modifiers(){return s.value?s.value.modifiers:y},get pluralRules(){return s.value?s.value.pluralRules:x},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:h},set missingWarn(_){s.value&&(s.value.missingWarn=_)},get fallbackWarn(){return s.value?s.value.fallbackWarn:p},set fallbackWarn(_){s.value&&(s.value.missingWarn=_)},get fallbackRoot(){return s.value?s.value.fallbackRoot:m},set fallbackRoot(_){s.value&&(s.value.fallbackRoot=_)},get fallbackFormat(){return s.value?s.value.fallbackFormat:g},set fallbackFormat(_){s.value&&(s.value.fallbackFormat=_)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:b},set warnHtmlMessage(_){s.value&&(s.value.warnHtmlMessage=_)},get escapeParameter(){return s.value?s.value.escapeParameter:E},set escapeParameter(_){s.value&&(s.value.escapeParameter=_)},t:J,getPostTranslationHandler:z,setPostTranslationHandler:G,getMissingHandler:Y,setMissingHandler:K,rt:U,d:ee,n:ne,tm:ce,te:me,getLocaleMessage:ve,setLocaleMessage:Te,mergeLocaleMessage:ke,getDateTimeFormat:Ne,setDateTimeFormat:Ce,mergeDateTimeFormat:D,getNumberFormat:B,setNumberFormat:N,mergeNumberFormat:R};function T(_){_.locale.value=l.value,_.fallbackLocale.value=a.value,Object.keys(u.value).forEach(O=>{_.mergeLocaleMessage(O,u.value[O])}),Object.keys(d.value).forEach(O=>{_.mergeDateTimeFormat(O,d.value[O])}),Object.keys(f.value).forEach(O=>{_.mergeNumberFormat(O,f.value[O])}),_.escapeParameter=E,_.fallbackFormat=g,_.fallbackRoot=m,_.fallbackWarn=p,_.missingWarn=h,_.warnHtmlMessage=b}return c.onBeforeMount(()=>{if(n.proxy==null||n.proxy.$i18n==null)throw pr(Xe.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const _=s.value=n.proxy.$i18n.__composer;e==="global"?(l.value=_.locale.value,a.value=_.fallbackLocale.value,u.value=_.messages.value,d.value=_.datetimeFormats.value,f.value=_.numberFormats.value):o&&T(_)}),A}MO();__INTLIFY_JIT_COMPILATION__?_p(TO):_p(wO);pO(GM);mO(ag);if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const n=Un();n.__INTLIFY__=!0,rO(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const QO="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgaGVpZ2h0PSI4MDBweCIKICAgd2lkdGg9IjgwMHB4IgogICB2aWV3Qm94PSIwIDAgODAwIDgwMCIKICAgZmlsbD0ibm9uZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnMiIKICAgc29kaXBvZGk6ZG9jbmFtZT0iYmVsbC1pY29uLnN2ZyIKICAgaW5rc2NhcGU6dmVyc2lvbj0iMS40LjIgKGViZjBlOTQsIDIwMjUtMDUtMDgpIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzCiAgICAgaWQ9ImRlZnMyIiAvPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBpZD0ibmFtZWR2aWV3MiIKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiMwMDAwMDAiCiAgICAgYm9yZGVyb3BhY2l0eT0iMC4yNSIKICAgICBpbmtzY2FwZTpzaG93cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMC4wIgogICAgIGlua3NjYXBlOnBhZ2VjaGVja2VyYm9hcmQ9IjAiCiAgICAgaW5rc2NhcGU6ZGVza2NvbG9yPSIjZDFkMWQxIgogICAgIGlua3NjYXBlOnpvb209IjAuOTM5MDI2MDEiCiAgICAgaW5rc2NhcGU6Y3g9IjM2MS4wMTIzNiIKICAgICBpbmtzY2FwZTpjeT0iNDI1LjQ0MDgyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMjMyMyIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMzIxIgogICAgIGlua3NjYXBlOndpbmRvdy14PSI2OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTkiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmcyIgogICAgIGlua3NjYXBlOmxvY2tndWlkZXM9ImZhbHNlIiAvPgogIDxwYXRoCiAgICAgZmlsbD0iIzM5NDE1NiIKICAgICBkPSJtIDU3NC43MTM0LDUxNy43MDgzOSBjIC00My4wMjM0MywtMTkuNDI5NTggLTQwLjMzOTkxLC05Mi4wMzE3MyAtNDAuMzcxNjYsLTk0LjEzNjAzIGwgLTAuODY0MDMsLTU1LjA4NjIyIGMgLTAuODQ0NTIsLTUzLjg0MjYzIC0zMi43NjI4OSwtMTAxLjAxNzg3IC03OS41MjI2MSwtMTIwLjczMzg5IC0wLjEwMDU1LC0yNy42ODUzOCAtMjYuMjQ3ODcsLTUwLjE3NzEzIC01My45NTM3NSwtNTAuMTc3MTMgLTI3LjcwNjU1LDAgLTUzLjg1MzIsMjIuNDkzMDcgLTUzLjk1NDQyLDUwLjE3NTgxIC00Ni43NTc3NCwxOS43MTYwMSAtNzcuNjczOTUsNjguNjIxNjYgLTc4LjY1NzI0LDEyMi40NjE5MyBsIC0wLjg2NDAzLDQ3LjMxIGMgLTAuMDMwNCwyLjEwNDMgMS43ODc3Myw4MC43NTQ2MyAtNDEuMjM3MDMsMTAwLjE4NDIgLTQuOTAxMjIsMi4yMTQxMiAtNy41OTQ5NCwxMi45NDczIC02LjQ2MTc1LDE4LjIwNTA4IDEuMTMxODcsNS4yNTg0MyAzLjk4MjM3LDE0LjQxMTkgOS4zNjEyMiwxNC40MTE5IGggMTEwLjg3MTE1IGMgMi4yMzU5NSwxMi4zMDAzNSA4LjA1MjA1LDIzLjc0MzM2IDE2Ljk0NzU0LDMzLjAxMTk2IDExLjgxNDgsMTIuMzA5NjEgMjcuNDM5MywxOS4wODg4OCA0My45OTI1NywxOS4wODg4OCAxNi41NTQ2LDAgMzIuMTc5MSwtNi43NzkyNyA0My45OTI1OCwtMTkuMDg4ODggOC44OTY4MSwtOS4yNjkyNSAxNC43MTI5MSwtMjAuNzEyOTQgMTYuOTQ3NTQsLTMzLjAxMTk2IGggMTEwLjg3MTE1IGMgNS4zNzg4NSwwIDguMjI4NjksLTkuMTUyOCA5LjM2MTg5LC0xNC40MTE5IDEuMTM0NDksLTUuMjU3NzggLTEuNTU3ODksLTE1Ljk5MDMgLTYuNDU5MTIsLTE4LjIwMzc1IHogbSAtNjUuNDU3NDIsLTI3Ljc0MTc4IGMgNC41MjI4MiwxMy43MTIwNCA3LjI1NzA3LDE2LjIwNjczIDE2LjMzODQ1LDI3LjY2NTYyIGwgLTI1MC4zOTQ3NSwtMC43OTI3NSBjIDkuMDgwMDUsLTExLjQ1NzU2IDEwLjM3MTQsLTEzLjE1ODg1IDE0Ljg5NDIyLC0yNi44NzI4NyB6IE0gNDAwLjAwMTM1LDIyNC4wMDYyMiBjIDEyLjUzMjU1LDAgMTkuNTMwMTUsNC44MjI1MiAyMi44NDU3LDE2LjMwMTI2IC04LjU0MTU5LC0xLjc3MTU2IC0xMy43ODc0NywtMi43MDU2MyAtMjIuODQ1NywtMi43MDU2MyAtOS4wNTgyMywwIC0xNC4zMDQxMiwwLjkzMzQxIC0yMi44NDU2OSwyLjcwNTYzIDMuMzE2MiwtMTEuNDc4MDggMTAuMzEzODEsLTE2LjMwMTI2IDIyLjg0NTY5LC0xNi4zMDEyNiB6IG0gLTEwMy41ODg0OCwxOTkuNjM0OTQgMS43OTkzMywtNTQuMjIxNyBjIDEuOTYwMjIsLTU5LjA2OTg5IDQyLjY4NTQzLC05Ni42NzQ5NyAxMDEuNzg5MTUsLTk2LjY3NDk3IDU5LjEwMzczLDAgOTkuODk0OTksMzUuODAzNTkgMTAxLjc4OTE2LDk0Ljg3NTY0IGwgMS43OTkzMyw1Ni4xMTQzIGMgMC4wMTUyLDEuNzE3MzEgMS40NzQyMiwxMi41NjgzIDEuMjMyNDMsMzQuNzg2MiBIIDI5NS4xNzc3OCBjIDAuNzE4OTQsLTIyLjIzOTA2IDEuMjIxMTksLTMzLjEyMTggMS4yMzUwOSwtMzQuODc5NDcgeiBtIDEwMy41ODg0OCwxNDguOTY5NzggYyAtMTcuNDI1MTcsMCAtMjUuNDM1NTgsLTUuNTgwMTUgLTMwLjMxNjk0LC0yMi4yODYyNCBoIDYwLjYzMjU3IGMgLTQuODgxMzgsMTYuNzA2MDkgLTEyLjg4OTE0LDIyLjI4NjI0IC0zMC4zMTU2MywyMi4yODYyNCB6IgogICAgIGlkPSJwYXRoMSIKICAgICBzdHlsZT0ic3Ryb2tlLXdpZHRoOjAuODk5NjY2O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICBzb2RpcG9kaTpub2RldHlwZXM9ImNjc2NzY3NjY2NzY2NzY2NzY2NjY2NjY3Njc2NzY3Nzc2NjY2NzY2NzIiAvPgogIDxwYXRoCiAgICAgZmlsbD0iIzM5NDE1NiIKICAgICBkPSJtIDM5Ny45Njk0NCwyODMuMzM2NjkgYyAtNDkuNDE4NTUsMCAtODkuNjIzNjEsNDAuMjAzNzMgLTg5LjYyMzYxLDg5LjYyMTYxIDAsNi4zNDM1NCA1LjE0Mjg2LDExLjQ4NjQgMTEuNDg2MzksMTEuNDg2NCA2LjM0MzU1LDAgMTEuNDg2NDEsLTUuMTQyODYgMTEuNDg2NDEsLTExLjQ4NjQgMCwtMzYuNzUwNzYgMjkuODk5MzgsLTY2LjY0OTQ4IDY2LjY1MTQ4LC02Ni42NDk0OCA2LjM0MzUzLDAgMTEuNDg2MzksLTUuMTQyODUgMTEuNDg2MzksLTExLjQ4NjQgLTYuNmUtNCwtNi4zNDQyIC01LjE0MzUzLC0xMS40ODU3MyAtMTEuNDg3MDYsLTExLjQ4NTczIHoiCiAgICAgaWQ9InBhdGgyIgogICAgIHN0eWxlPSJzdHJva2Utd2lkdGg6MC45MDQ3MTI7c3Ryb2tlLWRhc2hhcnJheTpub25lIgogICAgIHNvZGlwb2RpOm5vZGV0eXBlcz0ic3Nzc3NjcyIgLz4KPC9zdmc+Cg==",jp=async(n,e)=>{const t=n+e,o=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(s)).map(l=>l.toString(16).padStart(2,"0")).join("")};function Nd(){const n=()=>new Promise(t=>{if(document.readyState==="complete")return t();window.addEventListener("load",()=>t(),{once:!0})});return{OnWindowLoaded:t=>{c.onMounted(()=>n().then(t))}}}const ZO=(n,e,t)=>{const{OnWindowLoaded:r}=Nd(),o="lkj298fhGGJihge",s=c.ref(!1),i=()=>e+"|"+t();return r(async()=>{if(e==null||t==null||t()==null){s.value=!1;return}const u=i(),d=localStorage.getItem(n),f=JSON.parse(d)||[],h=await jp(u,o);s.value=!f.includes(h)}),{hasUnfulfilledInteraction:s,MarkInteractionPerformed:async()=>{const u=i(),d=await jp(u,o),f=localStorage.getItem(n),h=JSON.parse(f)||[];h.includes(d)||(h.push(d),localStorage.setItem(n,JSON.stringify(h))),s.value=!1}}};function Ig(n){const{OnWindowLoaded:e}=Nd();let t;const r=()=>{t=document.addEventListener("click",s=>{if(!s||!s.target)return;let i=null;if(s.target instanceof Element&&(i=s.target.closest(".popover")),i)return;const l=zr.getInstance(n.value);l&&l.hide()})};c.onMounted(r);const o=()=>{if((n==null?void 0:n.value)==null)return;zr.getInstance(n.value)||new zr(n.value)};e(o),c.watch(n,o),c.onUnmounted(()=>{if((n==null?void 0:n.value)!=null){const s=zr.getInstance(n.value);s&&s.dispose()}t&&document.removeEventListener("click",t)})}const JO=["data-bs-title","data-bs-content"],XO=["title"],qO={key:0,class:"number-circle",textContent:1},eL=c.defineComponent({__name:"BDNotificationButton",props:{userId:{},getNotification:{}},setup(n){const e=n,t=()=>{var d;return(d=e.getNotification)==null?void 0:d.linkUrl},{hasUnfulfilledInteraction:r,MarkInteractionPerformed:o}=ZO("notificationsRead",e.userId,t),s=c.ref();Ig(s);const i=c.computed(()=>{const d=e.getNotification;if(!d)return!1;const{isActive:f,startDate:h,endDate:p}=d;if(!f)return!1;const m=new Date(h),g=new Date(p),v=new Date;return v>=m&&v<=g}),l=c.computed(()=>{var d;return(d=e.getNotification)==null?void 0:d.tooltip}),a=c.computed(()=>{var d;return(d=e.getNotification)==null?void 0:d.title}),u=c.computed(()=>{const d=e.getNotification;if(!d)return"";const{text:f,linkUrl:h,linkText:p}=d;return`
204
+ */const MO="9.14.4";function OO(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Un().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Un().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(Un().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Un().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Un().__INTLIFY_PROD_DEVTOOLS__=!1)}const Tg=St.__EXTEND_POINT__,Fn=dl(Tg),Dt={FALLBACK_TO_ROOT:Tg,NOT_SUPPORTED_PRESERVE:Fn(),NOT_SUPPORTED_FORMATTER:Fn(),NOT_SUPPORTED_PRESERVE_DIRECTIVE:Fn(),NOT_SUPPORTED_GET_CHOICE_INDEX:Fn(),COMPONENT_NAME_LEGACY_COMPATIBLE:Fn(),NOT_FOUND_PARENT_SCOPE:Fn(),IGNORE_OBJ_FLATTEN:Fn(),NOTICE_DROP_ALLOW_COMPOSITION:Fn(),NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG:Fn()},LO={[Dt.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Dt.NOT_SUPPORTED_PRESERVE]:"Not supported 'preserve'.",[Dt.NOT_SUPPORTED_FORMATTER]:"Not supported 'formatter'.",[Dt.NOT_SUPPORTED_PRESERVE_DIRECTIVE]:"Not supported 'preserveDirectiveContent'.",[Dt.NOT_SUPPORTED_GET_CHOICE_INDEX]:"Not supported 'getChoiceIndex'.",[Dt.COMPONENT_NAME_LEGACY_COMPATIBLE]:"Component name legacy compatible: '{name}' -> 'i18n'",[Dt.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Dt.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Dt.NOTICE_DROP_ALLOW_COMPOSITION]:"'allowComposition' option will be dropped in the next major version. For more information, please see 👉 https://tinyurl.com/2p97mcze",[Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG]:"'translateExistCompatible' option will be dropped in the next major version."};function La(n,...e){return bd(LO[n],...e)}const Sg=lt.__EXTEND_POINT__,Lt=dl(Sg),Xe={UNEXPECTED_RETURN_TYPE:Sg,INVALID_ARGUMENT:Lt(),MUST_BE_CALL_SETUP_TOP:Lt(),NOT_INSTALLED:Lt(),NOT_AVAILABLE_IN_LEGACY_MODE:Lt(),REQUIRED_VALUE:Lt(),INVALID_VALUE:Lt(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:Lt(),NOT_INSTALLED_WITH_PROVIDE:Lt(),UNEXPECTED_ERROR:Lt(),NOT_COMPATIBLE_LEGACY_VUE_I18N:Lt(),BRIDGE_SUPPORT_VUE_2_ONLY:Lt(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:Lt(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:Lt(),__EXTEND_POINT__:Lt()};function pr(n,...e){return ns(n,null,process.env.NODE_ENV!=="production"?{messages:DO,args:e}:void 0)}const DO={[Xe.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Xe.INVALID_ARGUMENT]:"Invalid argument",[Xe.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Xe.NOT_INSTALLED]:"Need to install with `app.use` function",[Xe.UNEXPECTED_ERROR]:"Unexpected error",[Xe.NOT_AVAILABLE_IN_LEGACY_MODE]:"Not available in legacy mode",[Xe.REQUIRED_VALUE]:"Required in value: {0}",[Xe.INVALID_VALUE]:"Invalid value",[Xe.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Xe.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Xe.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Xe.BRIDGE_SUPPORT_VUE_2_ONLY]:"vue-i18n-bridge support Vue 2.x only",[Xe.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION]:"Must define ‘i18n’ option or custom block in Composition API with using local scope in Legacy API mode",[Xe.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},nu=Zn("__translateVNode"),ru=Zn("__datetimeParts"),ou=Zn("__numberParts"),su=Zn("__enableEmitter"),iu=Zn("__disableEmitter"),RO=Zn("__setPluralRules"),kg=Zn("__injectWithOption"),au=Zn("__dispose");function zs(n){if(!He(n)||hn(n))return n;for(const e in n)if(un(n,e))if(!e.includes("."))He(n[e])&&zs(n[e]);else{const t=e.split("."),r=t.length-1;let o=n,s=!1;for(let i=0;i<r;i++){if(t[i]==="__proto__")throw new Error(`unsafe key: ${t[i]}`);if(t[i]in o||(o[t[i]]=Ke()),!He(o[t[i]])){process.env.NODE_ENV!=="production"&&Jn(La(Dt.IGNORE_OBJ_FLATTEN,{key:t[i]})),s=!0;break}o=o[t[i]]}if(s||(hn(o)?og.includes(t[r])||delete n[e]:(o[t[r]]=n[e],delete n[e])),!hn(o)){const i=o[t[r]];He(i)&&zs(i)}}return n}function _d(n,e){const{messages:t,__i18n:r,messageResolver:o,flatJson:s}=e,i=ze(t)?t:st(r)?Ke():{[n]:Ke()};if(st(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:a,resource:u}=l;a?(i[a]=i[a]||Ke(),xi(u,i[a])):xi(u,i)}else Se(l)&&xi(JSON.parse(l),i)}),o==null&&s)for(const l in i)un(i,l)&&zs(i[l]);return i}function _g(n){return n.type}function BO(n,e,t){let r=He(e.messages)?e.messages:Ke();"__i18nGlobal"in t&&(r=_d(n.locale.value,{messages:r,__i18n:t.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{n.mergeLocaleMessage(s,r[s])});{if(He(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(i=>{n.mergeDateTimeFormat(i,e.datetimeFormats[i])})}if(He(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(i=>{n.mergeNumberFormat(i,e.numberFormats[i])})}}}function Fp(n){return c.createVNode(c.Text,null,n,0)}const Vp="__INTLIFY_META__",$p=()=>[],PO=()=>!1;let zp=0;function Up(n){return(e,t,r,o)=>n(t,r,c.getCurrentInstance()||void 0,o)}const FO=()=>{const n=c.getCurrentInstance();let e=null;return n&&(e=_g(n)[Vp])?{[Vp]:e}:null};function VO(n={},e){const{__root:t,__injectWithOption:r}=n,o=t===void 0,s=n.flatJson,i=Yn?c.ref:c.shallowRef,l=!!n.translateExistCompatible;process.env.NODE_ENV!=="production"&&l&&K2(La(Dt.NOTICE_DROP_TRANSLATE_EXIST_COMPATIBLE_FLAG));let a=Ye(n.inheritLocale)?n.inheritLocale:!0;const u=i(t&&a?t.locale.value:Se(n.locale)?n.locale:$s),d=i(t&&a?t.fallbackLocale.value:Se(n.fallbackLocale)||st(n.fallbackLocale)||ze(n.fallbackLocale)||n.fallbackLocale===!1?n.fallbackLocale:u.value),f=i(_d(u.value,n)),h=i(ze(n.datetimeFormats)?n.datetimeFormats:{[u.value]:{}}),p=i(ze(n.numberFormats)?n.numberFormats:{[u.value]:{}});let m=t?t.missingWarn:Ye(n.missingWarn)||Wo(n.missingWarn)?n.missingWarn:!0,g=t?t.fallbackWarn:Ye(n.fallbackWarn)||Wo(n.fallbackWarn)?n.fallbackWarn:!0,v=t?t.fallbackRoot:Ye(n.fallbackRoot)?n.fallbackRoot:!0,C=!!n.fallbackFormat,b=Ge(n.missing)?n.missing:null,E=Ge(n.missing)?Up(n.missing):null,y=Ge(n.postTranslation)?n.postTranslation:null,x=t?t.warnHtmlMessage:Ye(n.warnHtmlMessage)?n.warnHtmlMessage:!0,w=!!n.escapeParameter;const I=t?t.modifiers:ze(n.modifiers)?n.modifiers:{};let M=n.pluralRules||t&&t.pluralRules,L;L=(()=>{o&&xp(null);const q={version:MO,locale:u.value,fallbackLocale:d.value,messages:f.value,modifiers:I,pluralRules:M,missing:E===null?void 0:E,missingWarn:m,fallbackWarn:g,fallbackFormat:C,unresolving:!0,postTranslation:y===null?void 0:y,warnHtmlMessage:x,escapeParameter:w,messageResolver:n.messageResolver,messageCompiler:n.messageCompiler,__meta:{framework:"vue"}};q.datetimeFormats=h.value,q.numberFormats=p.value,q.__datetimeFormatters=ze(L)?L.__datetimeFormatters:void 0,q.__numberFormatters=ze(L)?L.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(q.__v_emitter=ze(L)?L.__v_emitter:void 0);const se=CO(q);return o&&xp(se),se})(),as(L,u.value,d.value);function V(){return[u.value,d.value,f.value,h.value,p.value]}const z=c.computed({get:()=>u.value,set:q=>{u.value=q,L.locale=u.value}}),G=c.computed({get:()=>d.value,set:q=>{d.value=q,L.fallbackLocale=d.value,as(L,u.value,q)}}),Y=c.computed(()=>f.value),K=c.computed(()=>h.value),W=c.computed(()=>p.value);function J(){return Ge(y)?y:null}function U(q){y=q,L.postTranslation=q}function ee(){return b}function ne(q){q!==null&&(E=Up(q)),b=q,L.missing=E}function ce(q,se){return q!=="translate"||!se.resolvedMessage}const me=(q,se,Ae,Be,Ze,tt)=>{V();let Ct;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=t?EO():void 0),Ct=q(L)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,o||(L.fallbackContext=void 0)}if(Ae!=="translate exists"&&ct(Ct)&&Ct===hl||Ae==="translate exists"&&!Ct){const[te,ge]=se();if(process.env.NODE_ENV!=="production"&&t&&Se(te)&&ce(Ae,ge)&&(v&&(pl(g,te)||hg(m,te))&&Jn(La(Dt.FALLBACK_TO_ROOT,{key:te,type:Ae})),process.env.NODE_ENV!=="production")){const{__v_emitter:pe}=L;pe&&v&&pe.emit("fallback",{type:Ae,key:te,to:"global",groupId:`${Ae}:${te}`})}return t&&v?Be(t):Ze(te)}else{if(tt(Ct))return Ct;throw pr(Xe.UNEXPECTED_RETURN_TYPE)}};function ve(...q){return me(se=>Reflect.apply(Op,null,[se,...q]),()=>qc(...q),"translate",se=>Reflect.apply(se.t,se,[...q]),se=>se,se=>Se(se))}function Te(...q){const[se,Ae,Be]=q;if(Be&&!He(Be))throw pr(Xe.INVALID_ARGUMENT);return ve(se,Ae,yt({resolvedMessage:!0},Be||{}))}function ke(...q){return me(se=>Reflect.apply(Dp,null,[se,...q]),()=>eu(...q),"datetime format",se=>Reflect.apply(se.d,se,[...q]),()=>Oa,se=>Se(se))}function Ne(...q){return me(se=>Reflect.apply(Bp,null,[se,...q]),()=>tu(...q),"number format",se=>Reflect.apply(se.n,se,[...q]),()=>Oa,se=>Se(se))}function Ce(q){return q.map(se=>Se(se)||ct(se)||Ye(se)?Fp(String(se)):se)}const B={normalize:Ce,interpolate:q=>q,type:"vnode"};function N(...q){return me(se=>{let Ae;const Be=se;try{Be.processor=B,Ae=Reflect.apply(Op,null,[Be,...q])}finally{Be.processor=null}return Ae},()=>qc(...q),"translate",se=>se[nu](...q),se=>[Fp(se)],se=>st(se))}function R(...q){return me(se=>Reflect.apply(Bp,null,[se,...q]),()=>tu(...q),"number format",se=>se[ou](...q),$p,se=>Se(se)||st(se))}function A(...q){return me(se=>Reflect.apply(Dp,null,[se,...q]),()=>eu(...q),"datetime format",se=>se[ru](...q),$p,se=>Se(se)||st(se))}function T(q){M=q,L.pluralRules=M}function _(q,se){return me(()=>{if(!q)return!1;const Ae=Se(se)?se:u.value,Be=j(Ae),Ze=L.messageResolver(Be,q);return l?Ze!=null:hn(Ze)||en(Ze)||Se(Ze)},()=>[q],"translate exists",Ae=>Reflect.apply(Ae.te,Ae,[q,se]),PO,Ae=>Ye(Ae))}function O(q){let se=null;const Ae=ag(L,d.value,u.value);for(let Be=0;Be<Ae.length;Be++){const Ze=f.value[Ae[Be]]||{},tt=L.messageResolver(Ze,q);if(tt!=null){se=tt;break}}return se}function H(q){const se=O(q);return se??(t?t.tm(q)||{}:{})}function j(q){return f.value[q]||{}}function Z(q,se){if(s){const Ae={[q]:se};for(const Be in Ae)un(Ae,Be)&&zs(Ae[Be]);se=Ae[q]}f.value[q]=se,L.messages=f.value}function X(q,se){f.value[q]=f.value[q]||{};const Ae={[q]:se};if(s)for(const Be in Ae)un(Ae,Be)&&zs(Ae[Be]);se=Ae[q],xi(se,f.value[q]),L.messages=f.value}function S(q){return h.value[q]||{}}function k(q,se){h.value[q]=se,L.datetimeFormats=h.value,Rp(L,q,se)}function F(q,se){h.value[q]=yt(h.value[q]||{},se),L.datetimeFormats=h.value,Rp(L,q,se)}function Q(q){return p.value[q]||{}}function ie(q,se){p.value[q]=se,L.numberFormats=p.value,Pp(L,q,se)}function he(q,se){p.value[q]=yt(p.value[q]||{},se),L.numberFormats=p.value,Pp(L,q,se)}zp++,t&&Yn&&(c.watch(t.locale,q=>{a&&(u.value=q,L.locale=q,as(L,u.value,d.value))}),c.watch(t.fallbackLocale,q=>{a&&(d.value=q,L.fallbackLocale=q,as(L,u.value,d.value))}));const be={id:zp,locale:z,fallbackLocale:G,get inheritLocale(){return a},set inheritLocale(q){a=q,q&&t&&(u.value=t.locale.value,d.value=t.fallbackLocale.value,as(L,u.value,d.value))},get availableLocales(){return Object.keys(f.value).sort()},messages:Y,get modifiers(){return I},get pluralRules(){return M||{}},get isGlobal(){return o},get missingWarn(){return m},set missingWarn(q){m=q,L.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(q){g=q,L.fallbackWarn=g},get fallbackRoot(){return v},set fallbackRoot(q){v=q},get fallbackFormat(){return C},set fallbackFormat(q){C=q,L.fallbackFormat=C},get warnHtmlMessage(){return x},set warnHtmlMessage(q){x=q,L.warnHtmlMessage=q},get escapeParameter(){return w},set escapeParameter(q){w=q,L.escapeParameter=q},t:ve,getLocaleMessage:j,setLocaleMessage:Z,mergeLocaleMessage:X,getPostTranslationHandler:J,setPostTranslationHandler:U,getMissingHandler:ee,setMissingHandler:ne,[RO]:T};return be.datetimeFormats=K,be.numberFormats=W,be.rt=Te,be.te=_,be.tm=H,be.d=ke,be.n=Ne,be.getDateTimeFormat=S,be.setDateTimeFormat=k,be.mergeDateTimeFormat=F,be.getNumberFormat=Q,be.setNumberFormat=ie,be.mergeNumberFormat=he,be[kg]=r,be[nu]=N,be[ru]=A,be[ou]=R,process.env.NODE_ENV!=="production"&&(be[su]=q=>{L.__v_emitter=q},be[iu]=()=>{L.__v_emitter=void 0}),be}const xd={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:n=>n==="parent"||n==="global",default:"parent"},i18n:{type:Object}};function $O({slots:n},e){return e.length===1&&e[0]==="default"?(n.default?n.default():[]).reduce((r,o)=>[...r,...o.type===c.Fragment?o.children:[o]],[]):e.reduce((t,r)=>{const o=n[r];return o&&(t[r]=o()),t},Ke())}function xg(n){return c.Fragment}yt({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:n=>ct(n)||!isNaN(n)}},xd);function zO(n){return st(n)&&!Se(n[0])}function Ng(n,e,t,r){const{slots:o,attrs:s}=e;return()=>{const i={part:!0};let l=Ke();n.locale&&(i.locale=n.locale),Se(n.format)?i.key=n.format:He(n.format)&&(Se(n.format.key)&&(i.key=n.format.key),l=Object.keys(n.format).reduce((h,p)=>t.includes(p)?yt(Ke(),h,{[p]:n.format[p]}):h,Ke()));const a=r(n.value,i,l);let u=[i.key];st(a)?u=a.map((h,p)=>{const m=o[h.type],g=m?m({[h.type]:h.value,index:p,parts:a}):[h.value];return zO(g)&&(g[0].key=`${h.type}-${p}`),g}):Se(a)&&(u=[a]);const d=yt(Ke(),s),f=Se(n.tag)||He(n.tag)?n.tag:xg();return c.h(f,d,u)}}yt({value:{type:Number,required:!0},format:{type:[String,Object]}},xd);yt({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},xd);function Hp(n,e){}const UO=Zn("global-vue-i18n");function qs(n={}){const e=c.getCurrentInstance();if(e==null)throw pr(Xe.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw pr(Xe.NOT_INSTALLED);const t=HO(e),r=WO(t),o=_g(e),s=jO(n,o);if(__VUE_I18N_LEGACY_API__&&t.mode==="legacy"&&!n.__useComponent){if(!t.allowComposition)throw pr(Xe.NOT_AVAILABLE_IN_LEGACY_MODE);return QO(e,s,r,n)}if(s==="global")return BO(r,n,o),r;if(s==="parent"){let a=KO(t,e,n.__useComponent);return a==null&&(process.env.NODE_ENV!=="production"&&Jn(La(Dt.NOT_FOUND_PARENT_SCOPE)),a=r),a}const i=t;let l=i.__getInstance(e);if(l==null){const a=yt({},n);"__i18n"in o&&(a.__i18n=o.__i18n),r&&(a.__root=r),l=VO(a),i.__composerExtend&&(l[au]=i.__composerExtend(l)),GO(i,e,l),i.__setInstance(e,l)}return l}function HO(n){{const e=c.inject(n.isCE?UO:n.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw pr(n.isCE?Xe.NOT_INSTALLED_WITH_PROVIDE:Xe.UNEXPECTED_ERROR);return e}}function jO(n,e){return ul(n)?"__i18n"in e?"local":"global":n.useScope?n.useScope:"local"}function WO(n){return n.mode==="composition"?n.global:n.global.__composer}function KO(n,e,t=!1){let r=null;const o=e.root;let s=YO(e,t);for(;s!=null;){const i=n;if(n.mode==="composition")r=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=i.__getInstance(s);l!=null&&(r=l.__composer,t&&r&&!r[kg]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function YO(n,e=!1){return n==null?null:e&&n.vnode.ctx||n.parent}function GO(n,e,t){let r=null;c.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=t,r=nM();const o=t;o[su]&&o[su](r),r.on("*",Hp)}},e),c.onUnmounted(()=>{const o=t;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",Hp),o[iu]&&o[iu](),delete e.vnode.el.__VUE_I18N__),n.__deleteInstance(e);const s=o[au];s&&(s(),delete o[au])},e)}function QO(n,e,t,r={}){const o=e==="local",s=c.shallowRef(null);if(o&&n.proxy&&!(n.proxy.$options.i18n||n.proxy.$options.__i18n))throw pr(Xe.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const i=Ye(r.inheritLocale)?r.inheritLocale:!Se(r.locale),l=c.ref(!o||i?t.locale.value:Se(r.locale)?r.locale:$s),a=c.ref(!o||i?t.fallbackLocale.value:Se(r.fallbackLocale)||st(r.fallbackLocale)||ze(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:l.value),u=c.ref(_d(l.value,r)),d=c.ref(ze(r.datetimeFormats)?r.datetimeFormats:{[l.value]:{}}),f=c.ref(ze(r.numberFormats)?r.numberFormats:{[l.value]:{}}),h=o?t.missingWarn:Ye(r.missingWarn)||Wo(r.missingWarn)?r.missingWarn:!0,p=o?t.fallbackWarn:Ye(r.fallbackWarn)||Wo(r.fallbackWarn)?r.fallbackWarn:!0,m=o?t.fallbackRoot:Ye(r.fallbackRoot)?r.fallbackRoot:!0,g=!!r.fallbackFormat,v=Ge(r.missing)?r.missing:null,C=Ge(r.postTranslation)?r.postTranslation:null,b=o?t.warnHtmlMessage:Ye(r.warnHtmlMessage)?r.warnHtmlMessage:!0,E=!!r.escapeParameter,y=o?t.modifiers:ze(r.modifiers)?r.modifiers:{},x=r.pluralRules||o&&t.pluralRules;function w(){return[l.value,a.value,u.value,d.value,f.value]}const I=c.computed({get:()=>s.value?s.value.locale.value:l.value,set:_=>{s.value&&(s.value.locale.value=_),l.value=_}}),M=c.computed({get:()=>s.value?s.value.fallbackLocale.value:a.value,set:_=>{s.value&&(s.value.fallbackLocale.value=_),a.value=_}}),L=c.computed(()=>s.value?s.value.messages.value:u.value),$=c.computed(()=>d.value),V=c.computed(()=>f.value);function z(){return s.value?s.value.getPostTranslationHandler():C}function G(_){s.value&&s.value.setPostTranslationHandler(_)}function Y(){return s.value?s.value.getMissingHandler():v}function K(_){s.value&&s.value.setMissingHandler(_)}function W(_){return w(),_()}function J(..._){return s.value?W(()=>Reflect.apply(s.value.t,null,[..._])):W(()=>"")}function U(..._){return s.value?Reflect.apply(s.value.rt,null,[..._]):""}function ee(..._){return s.value?W(()=>Reflect.apply(s.value.d,null,[..._])):W(()=>"")}function ne(..._){return s.value?W(()=>Reflect.apply(s.value.n,null,[..._])):W(()=>"")}function ce(_){return s.value?s.value.tm(_):{}}function me(_,O){return s.value?s.value.te(_,O):!1}function ve(_){return s.value?s.value.getLocaleMessage(_):{}}function Te(_,O){s.value&&(s.value.setLocaleMessage(_,O),u.value[_]=O)}function ke(_,O){s.value&&s.value.mergeLocaleMessage(_,O)}function Ne(_){return s.value?s.value.getDateTimeFormat(_):{}}function Ce(_,O){s.value&&(s.value.setDateTimeFormat(_,O),d.value[_]=O)}function D(_,O){s.value&&s.value.mergeDateTimeFormat(_,O)}function B(_){return s.value?s.value.getNumberFormat(_):{}}function N(_,O){s.value&&(s.value.setNumberFormat(_,O),f.value[_]=O)}function R(_,O){s.value&&s.value.mergeNumberFormat(_,O)}const A={get id(){return s.value?s.value.id:-1},locale:I,fallbackLocale:M,messages:L,datetimeFormats:$,numberFormats:V,get inheritLocale(){return s.value?s.value.inheritLocale:i},set inheritLocale(_){s.value&&(s.value.inheritLocale=_)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(u.value)},get modifiers(){return s.value?s.value.modifiers:y},get pluralRules(){return s.value?s.value.pluralRules:x},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:h},set missingWarn(_){s.value&&(s.value.missingWarn=_)},get fallbackWarn(){return s.value?s.value.fallbackWarn:p},set fallbackWarn(_){s.value&&(s.value.missingWarn=_)},get fallbackRoot(){return s.value?s.value.fallbackRoot:m},set fallbackRoot(_){s.value&&(s.value.fallbackRoot=_)},get fallbackFormat(){return s.value?s.value.fallbackFormat:g},set fallbackFormat(_){s.value&&(s.value.fallbackFormat=_)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:b},set warnHtmlMessage(_){s.value&&(s.value.warnHtmlMessage=_)},get escapeParameter(){return s.value?s.value.escapeParameter:E},set escapeParameter(_){s.value&&(s.value.escapeParameter=_)},t:J,getPostTranslationHandler:z,setPostTranslationHandler:G,getMissingHandler:Y,setMissingHandler:K,rt:U,d:ee,n:ne,tm:ce,te:me,getLocaleMessage:ve,setLocaleMessage:Te,mergeLocaleMessage:ke,getDateTimeFormat:Ne,setDateTimeFormat:Ce,mergeDateTimeFormat:D,getNumberFormat:B,setNumberFormat:N,mergeNumberFormat:R};function T(_){_.locale.value=l.value,_.fallbackLocale.value=a.value,Object.keys(u.value).forEach(O=>{_.mergeLocaleMessage(O,u.value[O])}),Object.keys(d.value).forEach(O=>{_.mergeDateTimeFormat(O,d.value[O])}),Object.keys(f.value).forEach(O=>{_.mergeNumberFormat(O,f.value[O])}),_.escapeParameter=E,_.fallbackFormat=g,_.fallbackRoot=m,_.fallbackWarn=p,_.missingWarn=h,_.warnHtmlMessage=b}return c.onBeforeMount(()=>{if(n.proxy==null||n.proxy.$i18n==null)throw pr(Xe.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const _=s.value=n.proxy.$i18n.__composer;e==="global"?(l.value=_.locale.value,a.value=_.fallbackLocale.value,u.value=_.messages.value,d.value=_.datetimeFormats.value,f.value=_.numberFormats.value):o&&T(_)}),A}OO();__INTLIFY_JIT_COMPILATION__?_p(SO):_p(TO);mO(QM);gO(ag);if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const n=Un();n.__INTLIFY__=!0,oO(n.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const ZO="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgaGVpZ2h0PSI4MDBweCIKICAgd2lkdGg9IjgwMHB4IgogICB2aWV3Qm94PSIwIDAgODAwIDgwMCIKICAgZmlsbD0ibm9uZSIKICAgdmVyc2lvbj0iMS4xIgogICBpZD0ic3ZnMiIKICAgc29kaXBvZGk6ZG9jbmFtZT0iYmVsbC1pY29uLnN2ZyIKICAgaW5rc2NhcGU6dmVyc2lvbj0iMS40LjIgKGViZjBlOTQsIDIwMjUtMDUtMDgpIgogICB4bWxuczppbmtzY2FwZT0iaHR0cDovL3d3dy5pbmtzY2FwZS5vcmcvbmFtZXNwYWNlcy9pbmtzY2FwZSIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG9kaS5zb3VyY2Vmb3JnZS5uZXQvRFREL3NvZGlwb2RpLTAuZHRkIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzCiAgICAgaWQ9ImRlZnMyIiAvPgogIDxzb2RpcG9kaTpuYW1lZHZpZXcKICAgICBpZD0ibmFtZWR2aWV3MiIKICAgICBwYWdlY29sb3I9IiNmZmZmZmYiCiAgICAgYm9yZGVyY29sb3I9IiMwMDAwMDAiCiAgICAgYm9yZGVyb3BhY2l0eT0iMC4yNSIKICAgICBpbmtzY2FwZTpzaG93cGFnZXNoYWRvdz0iMiIKICAgICBpbmtzY2FwZTpwYWdlb3BhY2l0eT0iMC4wIgogICAgIGlua3NjYXBlOnBhZ2VjaGVja2VyYm9hcmQ9IjAiCiAgICAgaW5rc2NhcGU6ZGVza2NvbG9yPSIjZDFkMWQxIgogICAgIGlua3NjYXBlOnpvb209IjAuOTM5MDI2MDEiCiAgICAgaW5rc2NhcGU6Y3g9IjM2MS4wMTIzNiIKICAgICBpbmtzY2FwZTpjeT0iNDI1LjQ0MDgyIgogICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMjMyMyIKICAgICBpbmtzY2FwZTp3aW5kb3ctaGVpZ2h0PSIxMzIxIgogICAgIGlua3NjYXBlOndpbmRvdy14PSI2OSIKICAgICBpbmtzY2FwZTp3aW5kb3cteT0iLTkiCiAgICAgaW5rc2NhcGU6d2luZG93LW1heGltaXplZD0iMSIKICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmcyIgogICAgIGlua3NjYXBlOmxvY2tndWlkZXM9ImZhbHNlIiAvPgogIDxwYXRoCiAgICAgZmlsbD0iIzM5NDE1NiIKICAgICBkPSJtIDU3NC43MTM0LDUxNy43MDgzOSBjIC00My4wMjM0MywtMTkuNDI5NTggLTQwLjMzOTkxLC05Mi4wMzE3MyAtNDAuMzcxNjYsLTk0LjEzNjAzIGwgLTAuODY0MDMsLTU1LjA4NjIyIGMgLTAuODQ0NTIsLTUzLjg0MjYzIC0zMi43NjI4OSwtMTAxLjAxNzg3IC03OS41MjI2MSwtMTIwLjczMzg5IC0wLjEwMDU1LC0yNy42ODUzOCAtMjYuMjQ3ODcsLTUwLjE3NzEzIC01My45NTM3NSwtNTAuMTc3MTMgLTI3LjcwNjU1LDAgLTUzLjg1MzIsMjIuNDkzMDcgLTUzLjk1NDQyLDUwLjE3NTgxIC00Ni43NTc3NCwxOS43MTYwMSAtNzcuNjczOTUsNjguNjIxNjYgLTc4LjY1NzI0LDEyMi40NjE5MyBsIC0wLjg2NDAzLDQ3LjMxIGMgLTAuMDMwNCwyLjEwNDMgMS43ODc3Myw4MC43NTQ2MyAtNDEuMjM3MDMsMTAwLjE4NDIgLTQuOTAxMjIsMi4yMTQxMiAtNy41OTQ5NCwxMi45NDczIC02LjQ2MTc1LDE4LjIwNTA4IDEuMTMxODcsNS4yNTg0MyAzLjk4MjM3LDE0LjQxMTkgOS4zNjEyMiwxNC40MTE5IGggMTEwLjg3MTE1IGMgMi4yMzU5NSwxMi4zMDAzNSA4LjA1MjA1LDIzLjc0MzM2IDE2Ljk0NzU0LDMzLjAxMTk2IDExLjgxNDgsMTIuMzA5NjEgMjcuNDM5MywxOS4wODg4OCA0My45OTI1NywxOS4wODg4OCAxNi41NTQ2LDAgMzIuMTc5MSwtNi43NzkyNyA0My45OTI1OCwtMTkuMDg4ODggOC44OTY4MSwtOS4yNjkyNSAxNC43MTI5MSwtMjAuNzEyOTQgMTYuOTQ3NTQsLTMzLjAxMTk2IGggMTEwLjg3MTE1IGMgNS4zNzg4NSwwIDguMjI4NjksLTkuMTUyOCA5LjM2MTg5LC0xNC40MTE5IDEuMTM0NDksLTUuMjU3NzggLTEuNTU3ODksLTE1Ljk5MDMgLTYuNDU5MTIsLTE4LjIwMzc1IHogbSAtNjUuNDU3NDIsLTI3Ljc0MTc4IGMgNC41MjI4MiwxMy43MTIwNCA3LjI1NzA3LDE2LjIwNjczIDE2LjMzODQ1LDI3LjY2NTYyIGwgLTI1MC4zOTQ3NSwtMC43OTI3NSBjIDkuMDgwMDUsLTExLjQ1NzU2IDEwLjM3MTQsLTEzLjE1ODg1IDE0Ljg5NDIyLC0yNi44NzI4NyB6IE0gNDAwLjAwMTM1LDIyNC4wMDYyMiBjIDEyLjUzMjU1LDAgMTkuNTMwMTUsNC44MjI1MiAyMi44NDU3LDE2LjMwMTI2IC04LjU0MTU5LC0xLjc3MTU2IC0xMy43ODc0NywtMi43MDU2MyAtMjIuODQ1NywtMi43MDU2MyAtOS4wNTgyMywwIC0xNC4zMDQxMiwwLjkzMzQxIC0yMi44NDU2OSwyLjcwNTYzIDMuMzE2MiwtMTEuNDc4MDggMTAuMzEzODEsLTE2LjMwMTI2IDIyLjg0NTY5LC0xNi4zMDEyNiB6IG0gLTEwMy41ODg0OCwxOTkuNjM0OTQgMS43OTkzMywtNTQuMjIxNyBjIDEuOTYwMjIsLTU5LjA2OTg5IDQyLjY4NTQzLC05Ni42NzQ5NyAxMDEuNzg5MTUsLTk2LjY3NDk3IDU5LjEwMzczLDAgOTkuODk0OTksMzUuODAzNTkgMTAxLjc4OTE2LDk0Ljg3NTY0IGwgMS43OTkzMyw1Ni4xMTQzIGMgMC4wMTUyLDEuNzE3MzEgMS40NzQyMiwxMi41NjgzIDEuMjMyNDMsMzQuNzg2MiBIIDI5NS4xNzc3OCBjIDAuNzE4OTQsLTIyLjIzOTA2IDEuMjIxMTksLTMzLjEyMTggMS4yMzUwOSwtMzQuODc5NDcgeiBtIDEwMy41ODg0OCwxNDguOTY5NzggYyAtMTcuNDI1MTcsMCAtMjUuNDM1NTgsLTUuNTgwMTUgLTMwLjMxNjk0LC0yMi4yODYyNCBoIDYwLjYzMjU3IGMgLTQuODgxMzgsMTYuNzA2MDkgLTEyLjg4OTE0LDIyLjI4NjI0IC0zMC4zMTU2MywyMi4yODYyNCB6IgogICAgIGlkPSJwYXRoMSIKICAgICBzdHlsZT0ic3Ryb2tlLXdpZHRoOjAuODk5NjY2O3N0cm9rZS1kYXNoYXJyYXk6bm9uZSIKICAgICBzb2RpcG9kaTpub2RldHlwZXM9ImNjc2NzY3NjY2NzY2NzY2NzY2NjY2NjY3Njc2NzY3Nzc2NjY2NzY2NzIiAvPgogIDxwYXRoCiAgICAgZmlsbD0iIzM5NDE1NiIKICAgICBkPSJtIDM5Ny45Njk0NCwyODMuMzM2NjkgYyAtNDkuNDE4NTUsMCAtODkuNjIzNjEsNDAuMjAzNzMgLTg5LjYyMzYxLDg5LjYyMTYxIDAsNi4zNDM1NCA1LjE0Mjg2LDExLjQ4NjQgMTEuNDg2MzksMTEuNDg2NCA2LjM0MzU1LDAgMTEuNDg2NDEsLTUuMTQyODYgMTEuNDg2NDEsLTExLjQ4NjQgMCwtMzYuNzUwNzYgMjkuODk5MzgsLTY2LjY0OTQ4IDY2LjY1MTQ4LC02Ni42NDk0OCA2LjM0MzUzLDAgMTEuNDg2MzksLTUuMTQyODUgMTEuNDg2MzksLTExLjQ4NjQgLTYuNmUtNCwtNi4zNDQyIC01LjE0MzUzLC0xMS40ODU3MyAtMTEuNDg3MDYsLTExLjQ4NTczIHoiCiAgICAgaWQ9InBhdGgyIgogICAgIHN0eWxlPSJzdHJva2Utd2lkdGg6MC45MDQ3MTI7c3Ryb2tlLWRhc2hhcnJheTpub25lIgogICAgIHNvZGlwb2RpOm5vZGV0eXBlcz0ic3Nzc3NjcyIgLz4KPC9zdmc+Cg==",jp=async(n,e)=>{const t=n+e,o=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(s)).map(l=>l.toString(16).padStart(2,"0")).join("")};function Nd(){const n=()=>new Promise(t=>{if(document.readyState==="complete")return t();window.addEventListener("load",()=>t(),{once:!0})});return{OnWindowLoaded:t=>{c.onMounted(()=>n().then(t))}}}const JO=(n,e,t)=>{const{OnWindowLoaded:r}=Nd(),o="lkj298fhGGJihge",s=c.ref(!1),i=()=>e+"|"+t();return r(async()=>{if(e==null||t==null||t()==null){s.value=!1;return}const u=i(),d=localStorage.getItem(n),f=JSON.parse(d)||[],h=await jp(u,o);s.value=!f.includes(h)}),{hasUnfulfilledInteraction:s,MarkInteractionPerformed:async()=>{const u=i(),d=await jp(u,o),f=localStorage.getItem(n),h=JSON.parse(f)||[];h.includes(d)||(h.push(d),localStorage.setItem(n,JSON.stringify(h))),s.value=!1}}};function Ig(n){const{OnWindowLoaded:e}=Nd();let t;const r=()=>{t=document.addEventListener("click",s=>{if(!s||!s.target)return;let i=null;if(s.target instanceof Element&&(i=s.target.closest(".popover")),i)return;const l=zr.getInstance(n.value);l&&l.hide()})};c.onMounted(r);const o=()=>{if((n==null?void 0:n.value)==null)return;zr.getInstance(n.value)||new zr(n.value)};e(o),c.watch(n,o),c.onUnmounted(()=>{if((n==null?void 0:n.value)!=null){const s=zr.getInstance(n.value);s&&s.dispose()}t&&document.removeEventListener("click",t)})}const XO=["data-bs-title","data-bs-content"],qO=["title"],eL={key:0,class:"number-circle",textContent:1},tL=c.defineComponent({__name:"BDNotificationButton",props:{userId:{},getNotification:{}},setup(n){const e=n,t=()=>{var d;return(d=e.getNotification)==null?void 0:d.linkUrl},{hasUnfulfilledInteraction:r,MarkInteractionPerformed:o}=JO("notificationsRead",e.userId,t),s=c.ref();Ig(s);const i=c.computed(()=>{const d=e.getNotification;if(!d)return!1;const{isActive:f,startDate:h,endDate:p}=d;if(!f)return!1;const m=new Date(h),g=new Date(p),v=new Date;return v>=m&&v<=g}),l=c.computed(()=>{var d;return(d=e.getNotification)==null?void 0:d.tooltip}),a=c.computed(()=>{var d;return(d=e.getNotification)==null?void 0:d.title}),u=c.computed(()=>{const d=e.getNotification;if(!d)return"";const{text:f,linkUrl:h,linkText:p}=d;return`
205
205
  <p>${f}</p>
206
206
  <a href='${h}' target='_blank'>${p}</a>
207
- `});return(d,f)=>i.value?(c.openBlock(),c.createElementBlock("a",{key:0,ref_key:"notificationButton",ref:s,tabindex:"0",class:"bd-notification-button",role:"button","data-bs-toggle":"popover","data-bs-placement":"bottom","data-bs-title":a.value,"data-bs-content":u.value,"data-bs-html":!0,onClick:f[0]||(f[0]=(...h)=>c.unref(o)&&c.unref(o)(...h))},[c.withDirectives(c.createElementVNode("img",{src:QO,alt:"BeterDichtbij nieuws notificatie bel.",title:l.value},null,8,XO),[[c.unref(Xs)]]),c.unref(r)?(c.openBlock(),c.createElementBlock("div",qO)):c.createCommentVNode("",!0)],8,JO)):c.createCommentVNode("",!0)}}),tL={class:"profile-side"},nL=["href"],rL={class:"nav-item"},oL=["textContent"],Mg=c.defineComponent({__name:"BDPractitionerHeader",props:{academyUrl:{},userId:{},getNotification:{}},setup(n){const e=n,{t}=qs(),r=c.computed(()=>t("practitionerHeader.academyTooltip")),o=c.computed(()=>t("practitionerHeader.AcademyMenuItem"));return(s,i)=>(c.openBlock(),c.createBlock(Ad,null,c.createSlots({"profile-side":c.withCtx(()=>[c.createElementVNode("div",tL,[c.createVNode(eL,{"user-id":e.userId,"get-notification":e.getNotification},null,8,["user-id","get-notification"]),e.academyUrl?(c.openBlock(),c.createElementBlock("a",{key:0,href:e.academyUrl,target:"_blank",rel:"noopener,noreferrer"},[c.withDirectives(c.createVNode(c.unref(Ni),{title:r.value},null,8,["title"]),[[c.unref(Xs)]])],8,nL)):c.createCommentVNode("",!0)])]),_:2},[e.academyUrl?{name:"mobile-menu-special-options",fn:c.withCtx(()=>[c.createElementVNode("li",rL,[c.createVNode(Zr,{class:"nav-link",to:e.academyUrl},{default:c.withCtx(()=>[c.createVNode(c.unref(Ni)),c.createElementVNode("span",{textContent:c.toDisplayString(o.value)},null,8,oL)]),_:1},8,["to"])])]),key:"0"}:void 0]),1024))}}),sL={class:"modal-dialog"},iL={class:"modal-content"},aL={class:"modal-header"},lL={class:"modal-title"},cL=["src"],uL=c.createElementVNode("span",null,"Sluiten",-1),dL={class:"modal-body"},fL={key:0,class:"modal-footer"},hL=["disabled"],ei=c.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(n,{emit:e}){const t=n,r=c.computed(()=>`modal bd-modal modal-${t.size}`),o=()=>e("submit"),s=()=>e("cancel");return(i,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.value),tabindex:"-1"},[c.createElementVNode("div",sL,[c.createElementVNode("div",iL,[c.createElementVNode("div",aL,[c.createElementVNode("h2",lL,[t.titleImage?(c.openBlock(),c.createElementBlock("img",{key:0,src:t.titleImage,class:"title-image",alt:""},null,8,cL)):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(t.title),1)]),c.renderSlot(i.$slots,"modal-header-space-between"),t.hideCloseButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:s},[uL,c.createVNode(c.unref(Da))]))]),c.createElementVNode("div",dL,[c.renderSlot(i.$slots,"default")]),i.hideFooter?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",fL,[t.hideFooterSubmitButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"btn btn-primary",disabled:t.disableSubmitButton,onClick:o},c.toDisplayString(t.submitButtonTitle),9,hL)),c.renderSlot(i.$slots,"buttons"),t.hideFooterCancelButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:s,"aria-label":"Annuleren"},c.toDisplayString(t.closeButtonTitle),1))]))])])],2))}}),ml=n=>{const e=c.ref(null);return{showModal:()=>{const o=document.getElementById(n);o instanceof HTMLElement?(e.value=yr.getOrCreateInstance(o),e.value.show()):console.error(`Modal '${n}' niet gevonden.`)},closeModal:()=>{if(e.value){e.value.hide();return}const o=document.getElementById(n);if(o instanceof HTMLElement){const s=yr.getInstance(o);s&&s.hide()}}}};function Og(){const n=c.ref(0),e=c.ref(!0),t=c.ref(null),r=c.ref({top:0,left:0,x:0,y:0}),o=c.computed(()=>n.value>0?`zoom-${n.value}`:"");return{zoom:n,mouseDown:e,imageHolderRef:t,pos:r,SetZoom:o,OnMouseDown:a=>{if(!t.value)return;r.value.left=t.value.scrollLeft,r.value.top=t.value.scrollTop;const u=document.querySelector("#image-attachment-modal"),d=document.querySelector(".image-preview-image-holder");u&&(u.style.cursor="grabbing"),d&&(d.style.cursor="grabbing"),r.value.x=a.clientX,r.value.y=a.clientY,e.value=!0},OnMouseMove:a=>{if(e.value){const u=a.clientX-r.value.x,d=a.clientY-r.value.y;t.value&&(t.value.scrollTop=r.value.top-d,t.value.scrollLeft=r.value.left-u)}},OnMouseUp:()=>{const a=document.querySelector("#image-attachment-modal"),u=document.querySelector(".image-preview-image-holder");a&&a.style&&(a.style.cursor=""),u&&u.style&&(u.style.cursor="grab"),e.value=!1}}}const pL=["src","alt"],mL={key:0,class:"show-spinner"},gL={class:"spinner-border text-primary",role:"status"},vL={class:"visually-hidden"},yL=["href"],Lg=c.defineComponent({__name:"BDImageAttachmentModal",props:["loadingText","downloadText"],setup(n,{expose:e}){const t=n,{showModal:r}=ml("image-attachment-modal"),{zoom:o,imageHolderRef:s,SetZoom:i,OnMouseDown:l,OnMouseMove:a,OnMouseUp:u}=Og(),d=c.ref(!0),f=c.ref({BerichtId:0,Id:void 0,MimeType:null,Naam:Fe,altName:Fe,downloadUrl:Fe,fullImageUrl:Fe,previewUrl:Fe});e({Show:g=>{f.value=g,o.value=0,r()}});const p=()=>{d.value=!1},m=()=>{f.value={BerichtId:0,Id:void 0,MimeType:null,Naam:Fe,altName:Fe,downloadUrl:Fe,fullImageUrl:Fe,previewUrl:Fe}};return(g,v)=>(c.openBlock(),c.createBlock(ei,{id:"image-attachment-modal",class:c.normalizeClass(c.unref(Fe)),title:f.value.Naam,hideFooterCancelButton:!0,showHeaderButton:!0,onCancel:m},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"image-preview-image-holder",ref_key:"imageHolderRef",ref:s,onMousedown:v[0]||(v[0]=(...C)=>c.unref(l)&&c.unref(l)(...C)),onMousemove:v[1]||(v[1]=(...C)=>c.unref(a)&&c.unref(a)(...C)),onMouseup:v[2]||(v[2]=(...C)=>c.unref(u)&&c.unref(u)(...C))},[f.value?(c.openBlock(),c.createElementBlock("img",{key:0,src:f.value.downloadUrl,alt:f.value.Naam,class:c.normalizeClass(["image-preview-modal",c.unref(i)]),onLoad:p,draggable:!1},null,42,pL)):c.createCommentVNode("",!0)],544),d.value?(c.openBlock(),c.createElementBlock("div",mL,[c.createElementVNode("div",gL,[c.createElementVNode("span",vL,c.toDisplayString(t.loadingText),1)])])):c.createCommentVNode("",!0),c.createVNode(Su,{modelValue:c.unref(o),"onUpdate:modelValue":v[3]||(v[3]=C=>c.isRef(o)?o.value=C:null),class:"image-preview-bd-zoom-slider","max-value":4},null,8,["modelValue"]),c.createElementVNode("a",{href:f.value.downloadUrl},[c.createVNode(Qe,{variant:"primary",class:"download-image"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.downloadText),1)]),_:1})],8,yL)]),_:1},8,["class","title"]))}});function gl(n=void 0){const e=l=>s("Succesvol",l,So.SUCCESS),t=l=>s("Waarschuwing",l,So.WARNING),r=l=>s("Informatie",l,So.INFO),o=l=>s("Mislukt",l,So.DANGER);function s(l,a,u){const d=`toast-${U1()}`,f={id:d,variant:u,title:l,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=c.h(ku,f),g=c.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const v=document.querySelector(`#${d}`);v&&(ts.getOrCreateInstance(v,n).show(),i(v))}function i(l){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 u=new MutationObserver(a),d={attributes:!0};u.observe(l,d)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:o}}const{showDangerToast:EL}=gl();function Id(n){const e=c.ref(null),t=(a,u="serverErrors")=>{var f;let d=[];if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)?d=a.response.data.filter(h=>ri(h.ErrorMessage)&&h.ErrorMessage!==Fe):a.response.data.ErrorMessage?d=[a.response.data.ErrorMessage]:d=null,ri(u))e.value=d;else if(Array.isArray(u)){let h=e.value;for(let p=0;p<u.length;p++)p===u.length-1?h[u[p]]=d:h=h[u[p]]}r(a),i(e)},r=a=>{if(n==null)return;const d=new URL(a.request.responseURL).pathname;if(d in n.error){const f=n.error[d];f&&EL(f)}},o=c.ref(null),s=c.ref(""),i=a=>{t9(a.value)?o.value=a.value.map(u=>ri(u)?u:u.ErrorMessage):ri(a.value)&&(s.value=a.value)};function l(){e.value=null,o.value=null,s.value=Fe}return{serverErrors:e,errorMessages:o,errorMessageText:s,MapErrors:i,MapServerErrors:t,ResetServerErrors:l}}const CL={key:0},AL={key:1},bL={class:"bd-form-field"},wL={class:"bd-form-field"},Dg=c.defineComponent({__name:"BDPhoneNumberEditModal",props:["modalTitle","submitButtonTitle","phoneNumberLabel","phoneNumberUnchangedText","confirmationCodeLabel","confirmationCodeRequiredText","confirmationCodeSentText","editSuccessText","editCanceledText","sendConfirmationCodeText","startPhoneNumberUpdate","confirmPhoneNumberUpdate"],emits:["startPhoneNumberUpdate","confirmPhoneNumberUpdate","setPhoneNumber"],setup(n,{expose:e,emit:t}){const r=n,{showSuccessToast:o,showWarningToast:s}=gl(),{serverErrors:i,errorMessages:l,errorMessageText:a,MapServerErrors:u,ResetServerErrors:d}=Id(null),{closeModal:f}=ml("phone-number-edit-modal");let h=Fe;const p=c.ref(),m=c.ref(null),g=c.ref(),v=c.ref(),C=c.ref(null),b=c.computed(()=>v.value==null||v.value==""),E=()=>{if(m.value=null,d(),!p.value||p.value==h){m.value=!1;return}const L={newPhonenumber:p.value};r.startPhoneNumberUpdate(L).then(x).catch(u)},y=()=>{if(!v.value){C.value=!1;return}const L={requestIdentifier:g.value,token:v.value};r.confirmPhoneNumberUpdate(L).then(w).catch(u)},x=L=>{m.value=null,o(r.confirmationCodeSentText),g.value=L.data.RequestIdentifier},w=()=>{t("setPhoneNumber",p.value),o(r.editSuccessText),f(),m.value=null,C.value=null},I=L=>{h=L,p.value=h,m.value=null,g.value=void 0,v.value=void 0,C.value=null},M=()=>{I(h),d(),s(r.editCanceledText)};return e({Reset:I}),(L,$)=>(c.openBlock(),c.createBlock(ei,{id:"phone-number-edit-modal",class:c.normalizeClass(c.unref(Fe)),title:r.modalTitle,submitButtonTitle:r.submitButtonTitle,hideFooterCancelButton:!1,"disable-submit-button":b.value,serverErrors:c.unref(i),errorMessages:c.unref(l),errorMessageText:c.unref(a),onSubmit:y,onCancel:M},{default:c.withCtx(()=>[c.unref(a)||c.unref(l)?(c.openBlock(),c.createBlock(Ts,{key:0,variant:"danger"},{default:c.withCtx(()=>[c.unref(l)?(c.openBlock(),c.createElementBlock("div",CL,[c.createElementVNode("ul",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(l),(V,z)=>(c.openBlock(),c.createElementBlock("li",{key:z},[c.createVNode(so),c.createElementVNode("span",null,c.toDisplayString(V),1)]))),128))])])):(c.openBlock(),c.createElementBlock("div",AL,c.toDisplayString(c.unref(a)),1))]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",bL,[c.createVNode(Hr,{id:"form-input-phone-number",label:r.phoneNumberLabel,modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=V=>p.value=V),state:m.value,type:"text","form-field-class":"form-input-with-button","invalid-feedback-text":r.phoneNumberUnchangedText},{default:c.withCtx(()=>[c.createVNode(Qe,{textContent:c.toDisplayString(r.sendConfirmationCodeText),class:"tablet-device-up",type:"button",onClick:E},null,8,["textContent"])]),_:1},8,["label","modelValue","state","invalid-feedback-text"]),c.createVNode(Qe,{textContent:c.toDisplayString(r.sendConfirmationCodeText),class:"mobile-device",type:"button",onClick:E},null,8,["textContent"])]),c.createElementVNode("div",wL,[g.value?(c.openBlock(),c.createBlock(Hr,{key:0,label:r.confirmationCodeLabel,modelValue:v.value,"onUpdate:modelValue":$[1]||($[1]=V=>v.value=V),state:C.value,"invalid-feedback-text":r.confirmationCodeRequiredText},null,8,["label","modelValue","state","invalid-feedback-text"])):c.createCommentVNode("",!0)])]),_:1},8,["class","title","submitButtonTitle","disable-submit-button","serverErrors","errorMessages","errorMessageText"]))}});var Rg={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(xu,function(){var t=1e3,r=6e4,o=36e5,s="millisecond",i="second",l="minute",a="hour",u="day",d="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+)?$/,C=/\[([^\]]+)]|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(Y){var K=["th","st","nd","rd"],W=Y%100;return"["+Y+(K[(W-20)%10]||K[W]||K[0])+"]"}},E=function(Y,K,W){var J=String(Y);return!J||J.length>=K?Y:""+Array(K+1-J.length).join(W)+Y},y={s:E,z:function(Y){var K=-Y.utcOffset(),W=Math.abs(K),J=Math.floor(W/60),U=W%60;return(K<=0?"+":"-")+E(J,2,"0")+":"+E(U,2,"0")},m:function Y(K,W){if(K.date()<W.date())return-Y(W,K);var J=12*(W.year()-K.year())+(W.month()-K.month()),U=K.clone().add(J,f),ee=W-U<0,ne=K.clone().add(J+(ee?-1:1),f);return+(-(J+(W-U)/(ee?U-ne:ne-U))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:u,D:m,h:a,m:l,s:i,ms:s,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},x="en",w={};w[x]=b;var I="$isDayjsObject",M=function(Y){return Y instanceof z||!(!Y||!Y[I])},L=function Y(K,W,J){var U;if(!K)return x;if(typeof K=="string"){var ee=K.toLowerCase();w[ee]&&(U=ee),W&&(w[ee]=W,U=ee);var ne=K.split("-");if(!U&&ne.length>1)return Y(ne[0])}else{var ce=K.name;w[ce]=K,U=ce}return!J&&U&&(x=U),U||!J&&x},$=function(Y,K){if(M(Y))return Y.clone();var W=typeof K=="object"?K:{};return W.date=Y,W.args=arguments,new z(W)},V=y;V.l=L,V.i=M,V.w=function(Y,K){return $(Y,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var z=function(){function Y(W){this.$L=L(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[I]=!0}var K=Y.prototype;return K.parse=function(W){this.$d=function(J){var U=J.date,ee=J.utc;if(U===null)return new Date(NaN);if(V.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var ne=U.match(v);if(ne){var ce=ne[2]-1||0,me=(ne[7]||"0").substring(0,3);return ee?new Date(Date.UTC(ne[1],ce,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,me)):new Date(ne[1],ce,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,me)}}return new Date(U)}(W),this.init()},K.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},K.$utils=function(){return V},K.isValid=function(){return this.$d.toString()!==g},K.isSame=function(W,J){var U=$(W);return this.startOf(J)<=U&&U<=this.endOf(J)},K.isAfter=function(W,J){return $(W)<this.startOf(J)},K.isBefore=function(W,J){return this.endOf(J)<$(W)},K.$g=function(W,J,U){return V.u(W)?this[J]:this.set(U,W)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(W,J){var U=this,ee=!!V.u(J)||J,ne=V.p(W),ce=function(B,N){var R=V.w(U.$u?Date.UTC(U.$y,N,B):new Date(U.$y,N,B),U);return ee?R:R.endOf(u)},me=function(B,N){return V.w(U.toDate()[B].apply(U.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(N)),U)},ve=this.$W,Te=this.$M,ke=this.$D,Ne="set"+(this.$u?"UTC":"");switch(ne){case p:return ee?ce(1,0):ce(31,11);case f:return ee?ce(1,Te):ce(0,Te+1);case d:var Ce=this.$locale().weekStart||0,D=(ve<Ce?ve+7:ve)-Ce;return ce(ee?ke-D:ke+(6-D),Te);case u:case m:return me(Ne+"Hours",0);case a:return me(Ne+"Minutes",1);case l:return me(Ne+"Seconds",2);case i:return me(Ne+"Milliseconds",3);default:return this.clone()}},K.endOf=function(W){return this.startOf(W,!1)},K.$set=function(W,J){var U,ee=V.p(W),ne="set"+(this.$u?"UTC":""),ce=(U={},U[u]=ne+"Date",U[m]=ne+"Date",U[f]=ne+"Month",U[p]=ne+"FullYear",U[a]=ne+"Hours",U[l]=ne+"Minutes",U[i]=ne+"Seconds",U[s]=ne+"Milliseconds",U)[ee],me=ee===u?this.$D+(J-this.$W):J;if(ee===f||ee===p){var ve=this.clone().set(m,1);ve.$d[ce](me),ve.init(),this.$d=ve.set(m,Math.min(this.$D,ve.daysInMonth())).$d}else ce&&this.$d[ce](me);return this.init(),this},K.set=function(W,J){return this.clone().$set(W,J)},K.get=function(W){return this[V.p(W)]()},K.add=function(W,J){var U,ee=this;W=Number(W);var ne=V.p(J),ce=function(Te){var ke=$(ee);return V.w(ke.date(ke.date()+Math.round(Te*W)),ee)};if(ne===f)return this.set(f,this.$M+W);if(ne===p)return this.set(p,this.$y+W);if(ne===u)return ce(1);if(ne===d)return ce(7);var me=(U={},U[l]=r,U[a]=o,U[i]=t,U)[ne]||1,ve=this.$d.getTime()+W*me;return V.w(ve,this)},K.subtract=function(W,J){return this.add(-1*W,J)},K.format=function(W){var J=this,U=this.$locale();if(!this.isValid())return U.invalidDate||g;var ee=W||"YYYY-MM-DDTHH:mm:ssZ",ne=V.z(this),ce=this.$H,me=this.$m,ve=this.$M,Te=U.weekdays,ke=U.months,Ne=U.meridiem,Ce=function(N,R,A,T){return N&&(N[R]||N(J,ee))||A[R].slice(0,T)},D=function(N){return V.s(ce%12||12,N,"0")},B=Ne||function(N,R,A){var T=N<12?"AM":"PM";return A?T.toLowerCase():T};return ee.replace(C,function(N,R){return R||function(A){switch(A){case"YY":return String(J.$y).slice(-2);case"YYYY":return V.s(J.$y,4,"0");case"M":return ve+1;case"MM":return V.s(ve+1,2,"0");case"MMM":return Ce(U.monthsShort,ve,ke,3);case"MMMM":return Ce(ke,ve);case"D":return J.$D;case"DD":return V.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return Ce(U.weekdaysMin,J.$W,Te,2);case"ddd":return Ce(U.weekdaysShort,J.$W,Te,3);case"dddd":return Te[J.$W];case"H":return String(ce);case"HH":return V.s(ce,2,"0");case"h":return D(1);case"hh":return D(2);case"a":return B(ce,me,!0);case"A":return B(ce,me,!1);case"m":return String(me);case"mm":return V.s(me,2,"0");case"s":return String(J.$s);case"ss":return V.s(J.$s,2,"0");case"SSS":return V.s(J.$ms,3,"0");case"Z":return ne}return null}(N)||ne.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(W,J,U){var ee,ne=this,ce=V.p(J),me=$(W),ve=(me.utcOffset()-this.utcOffset())*r,Te=this-me,ke=function(){return V.m(ne,me)};switch(ce){case p:ee=ke()/12;break;case f:ee=ke();break;case h:ee=ke()/3;break;case d:ee=(Te-ve)/6048e5;break;case u:ee=(Te-ve)/864e5;break;case a:ee=Te/o;break;case l:ee=Te/r;break;case i:ee=Te/t;break;default:ee=Te}return U?ee:V.a(ee)},K.daysInMonth=function(){return this.endOf(f).$D},K.$locale=function(){return w[this.$L]},K.locale=function(W,J){if(!W)return this.$L;var U=this.clone(),ee=L(W,J,!0);return ee&&(U.$L=ee),U},K.clone=function(){return V.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Y}(),G=z.prototype;return $.prototype=G,[["$ms",s],["$s",i],["$m",l],["$H",a],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(Y){G[Y[1]]=function(K){return this.$g(K,Y[0],Y[1])}}),$.extend=function(Y,K){return Y.$i||(Y(K,z,$),Y.$i=!0),$},$.locale=L,$.isDayjs=M,$.unix=function(Y){return $(1e3*Y)},$.en=w[x],$.Ls=w,$.p={},$})})(Rg);var Bg=Rg.exports;const Yo=Nu(Bg),Pg=(n,e,t,r,o,s)=>{const i=c.ref(null),l=c.ref(null),a=c.ref(!1),u=c.ref(null),{showModal:d,closeModal:f}=ml("session-time-out-modal"),h=c.computed(()=>i.value&&n?n-(i.value+1):0),p=c.computed(()=>l.value?60-l.value:0),m=c.computed(()=>a.value),g=()=>{u.value=setInterval(C,1e3),r(u.value)},v=()=>{u.value&&clearInterval(u.value)},C=()=>{i.value=Yo().diff(t(),"m"),l.value=Yo().subtract(i.value,"m").diff(t(),"s");const M=n??Number.MAX_SAFE_INTEGER,L=e??0;i.value>=M?(a.value=!0,d(),localStorage.setItem("session-timeout","true"),window.onbeforeunload=b):i.value>=M-L?d():f()},b=M=>{M.stopPropagation(),y()},E=()=>{o(),v(),i.value=null,l.value=null,g()},y=()=>{v(),i.value=null,l.value=null,localStorage.removeItem("session-timeout"),s()},x=()=>{a.value?y():E()},w=()=>{y()},I=()=>{a.value?y():f()};return c.onMounted(()=>{const M=document.getElementById("session-time-out-modal");M&&M.addEventListener("hidden.bs.modal",x),v(),g()}),{IsExpired:m,Minutes:h,Seconds:p,OnLogOut:w,OnSubmit:I}},Fg=c.defineComponent({__name:"BDSessionTimeOutModal",props:["expiredTitle","expiredMessage","expiredButtonText","almostExpiredTitle","almostExpiredMessage","almostExpiredButtonText","almostExpiredCancelButtonText","threshold","warningThreshold","getTime","setTaskId","setNewTime","logout"],setup(n){const e=n,{IsExpired:t,Minutes:r,Seconds:o,OnLogOut:s,OnSubmit:i}=Pg(e.threshold,e.warningThreshold,e.getTime,e.setTaskId,e.setNewTime,e.logout),l=c.computed(()=>t.value?e.expiredTitle:e.almostExpiredTitle),a=c.computed(()=>t.value?e.expiredMessage:`${e.almostExpiredMessage} ${r.value}:${o.value<10?"0"+o.value:o.value}`),u=c.computed(()=>t.value?e.expiredButtonText:e.almostExpiredButtonText);return(d,f)=>(c.openBlock(),c.createBlock(ei,{id:"session-time-out-modal",title:l.value,"hide-close-button":!0,"hide-footer-cancel-button":c.unref(t),"close-button-title":e.almostExpiredCancelButtonText,"submit-button-title":u.value,size:"md",onSubmit:c.unref(i),onCancel:c.unref(s)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.value),1)]),_:1},8,["title","hide-footer-cancel-button","close-button-title","submit-button-title","onSubmit","onCancel"]))}}),Vg=()=>({ResetValidation:t=>{for(const r in t.value)t.value[r].state=null},ValidationObjectIsValid:t=>{for(let r in t)if(t[r].state===!1)return!1;return!0}}),TL={class:"template change-password-template"},SL={class:"template-title"},kL={key:0},_L={key:1},xL=["onSubmit","onReset"],NL={class:"bd-form-field"},IL={class:"bd-form-field"},ML={class:"bd-form-field"},OL={class:"bd-form-buttons"},$g=c.defineComponent({__name:"BDChangePasswordTemplate",props:{templateTitle:{},alertText:{},currentPasswordLabel:{},newPasswordLabel:{},confirmNewPasswordLabel:{},submitButtonText:{},cancelButtonText:{},successText:{},failureText:{},requiredText:{},incompatibleText:{},minimalRequirementsText:{},submitPassword:{type:Function}},setup(n){const e=n,{showDangerToast:t,showSuccessToast:r}=gl(),{errorMessages:o,errorMessageText:s,MapServerErrors:i,ResetServerErrors:l}=Id(null),{ValidationObjectIsValid:a}=Vg();let u=c.ref({password:Fe,passwordNew:Fe,passwordRepeat:Fe}),d=c.ref({password:{state:null,errorLabel:Fe},passwordNew:{state:null,errorLabel:Fe},passwordRepeat:{state:null,errorLabel:Fe}});const f=()=>{if(!h())return;const g=e.submitPassword(u.value);g&&g.then(()=>{r(e.successText),p()}).catch(v=>{t(e.failureText),i(v)})},h=()=>{const m=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;if(u.value.passwordNew&&!m.test(u.value.passwordNew))d.value.passwordNew.state=!1,d.value.passwordNew.errorLabel=e.minimalRequirementsText;else{const g=u.value.passwordRepeat===u.value.passwordNew,v=g?e.requiredText:e.incompatibleText;d.value.passwordNew.state=u.value.passwordNew!==Fe&&g?null:!1,d.value.passwordNew.errorLabel=v,d.value.passwordRepeat.state=u.value.passwordRepeat!==Fe&&g?null:!1,d.value.passwordRepeat.errorLabel=v}return d.value.password.state=u.value.password!==Fe?null:!1,d.value.password.errorLabel=d.value.password.state?Fe:e.requiredText,a(d.value)},p=()=>{u.value.password=Fe,u.value.passwordNew=Fe,u.value.passwordRepeat=Fe,d.value.password.state=null,d.value.passwordNew.state=null,d.value.passwordRepeat.state=null,l()};return(m,g)=>(c.openBlock(),c.createElementBlock("main",TL,[c.createVNode(ws,{class:"container-xl"},{default:c.withCtx(()=>[c.createVNode(Dr,{class:"justify-content-md-center template-header"},{default:c.withCtx(()=>[c.createVNode(Lr,{xs:12,md:10,lg:7},{default:c.withCtx(()=>[c.createElementVNode("h1",SL,c.toDisplayString(e.templateTitle),1)]),_:1})]),_:1}),c.createVNode(Dr,{class:"justify-content-md-center"},{default:c.withCtx(()=>[c.createVNode(Lr,{xs:12,md:10,lg:7},{default:c.withCtx(()=>[c.createVNode(Fa,{class:"bd-card-template","no-header":!0},{body:c.withCtx(()=>[c.createVNode(ws,{class:"container-fluid"},{default:c.withCtx(()=>[c.createVNode(Dr,null,{default:c.withCtx(()=>[c.createVNode(Lr,null,{default:c.withCtx(()=>[c.createVNode(Ts,{variant:"warning"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.alertText),1)]),_:1})]),_:1})]),_:1}),c.unref(o)||c.unref(s)?(c.openBlock(),c.createBlock(Dr,{key:0},{default:c.withCtx(()=>[c.createVNode(Lr,null,{default:c.withCtx(()=>[c.createVNode(Ts,{variant:"danger"},{default:c.withCtx(()=>[c.unref(o)?(c.openBlock(),c.createElementBlock("div",kL,[c.createElementVNode("ul",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),(v,C)=>(c.openBlock(),c.createElementBlock("li",{key:C},[c.createVNode(so),c.createElementVNode("span",null,c.toDisplayString(v),1)]))),128))])])):(c.openBlock(),c.createElementBlock("div",_L,c.toDisplayString(c.unref(s)),1))]),_:1})]),_:1})]),_:1})):c.createCommentVNode("",!0),c.createVNode(Dr,null,{default:c.withCtx(()=>[c.createVNode(Lr,{class:"bd-card-form",sm:12,md:12},{default:c.withCtx(()=>[c.createElementVNode("form",{onSubmit:c.withModifiers(f,["prevent"]),onReset:c.withModifiers(p,["prevent"]),class:"form"},[c.createElementVNode("div",NL,[c.createVNode(Hr,{modelValue:c.unref(u).password,"onUpdate:modelValue":g[0]||(g[0]=v=>c.unref(u).password=v),label:m.currentPasswordLabel,state:c.unref(d).password.state,type:"password","invalid-feedback-text":c.unref(d).password.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",IL,[c.createVNode(Hr,{modelValue:c.unref(u).passwordNew,"onUpdate:modelValue":g[1]||(g[1]=v=>c.unref(u).passwordNew=v),label:m.newPasswordLabel,state:c.unref(d).passwordNew.state,type:"password","invalid-feedback-text":c.unref(d).passwordNew.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",ML,[c.createVNode(Hr,{modelValue:c.unref(u).passwordRepeat,"onUpdate:modelValue":g[2]||(g[2]=v=>c.unref(u).passwordRepeat=v),label:m.confirmNewPasswordLabel,state:c.unref(d).passwordRepeat.state,type:"password","invalid-feedback-text":c.unref(d).passwordRepeat.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",OL,[c.createVNode(Qe,{type:"submit"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.submitButtonText),1)]),_:1}),c.createVNode(Qe,{type:"reset",variant:"link"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.cancelButtonText),1)]),_:1})])],40,xL)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]))}}),LL={class:"template not-found-template"},DL={class:"center-screen"},RL={class:"container-warning"},BL=["textContent"],PL=["textContent"],zg=c.defineComponent({__name:"BDNotFoundTemplate",props:{buttonText:{type:String}},emits:["navigate"],setup(n,{emit:e}){const t=n,{t:r}=qs(),o=c.computed(()=>t.buttonText||r("notFoundTemplate.buttonDefault")),s=c.computed(()=>r("notFoundTemplate.title")),i=c.computed(()=>r("notFoundTemplate.description")),l=()=>e("navigate");return(a,u)=>(c.openBlock(),c.createElementBlock("main",LL,[c.createVNode(ws,{class:"container-xl"},{default:c.withCtx(()=>[c.createElementVNode("div",DL,[c.createElementVNode("div",RL,[c.createVNode(wu),c.createElementVNode("h5",{textContent:c.toDisplayString(s.value)},null,8,BL),c.createElementVNode("p",{textContent:c.toDisplayString(i.value)},null,8,PL),c.createVNode(Qe,{onClick:l,variant:"primary",type:"button",textContent:c.toDisplayString(o.value)},null,8,["textContent"])])])]),_:1})]))}});var FL={exports:{}};(function(n,e){(function(t,r){n.exports=r(Bg)})(xu,function(t){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var o=r(t),s={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(i){return"["+i+(i===1||i===8||i>=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(s,null,!0),s})})(FL);var Ug={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(xu,function(){var t={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/,s=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(C){this[v]=+C}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var b=C.match(/([+-]|\d\d)/g),E=60*b[1]+(+b[2]||0);return E===0?0:b[0]==="+"?-E:E}(v)}],h=function(v){var C=a[v];return C&&(C.indexOf?C:C.s.concat(C.f))},p=function(v,C){var b,E=a.meridiem;if(E){for(var y=1;y<=24;y+=1)if(v.indexOf(E(y,0,C))>-1){b=y>12;break}}else b=v===(C?"pm":"PM");return b},m={A:[l,function(v){this.afternoon=p(v,!1)}],a:[l,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:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,d("seconds")],ss:[i,d("seconds")],m:[i,d("minutes")],mm:[i,d("minutes")],H:[i,d("hours")],h:[i,d("hours")],HH:[i,d("hours")],hh:[i,d("hours")],D:[i,d("day")],DD:[s,d("day")],Do:[l,function(v){var C=a.ordinal,b=v.match(/\d+/);if(this.day=b[0],C)for(var E=1;E<=31;E+=1)C(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[i,d("week")],ww:[s,d("week")],M:[i,d("month")],MM:[s,d("month")],MMM:[l,function(v){var C=h("months"),b=(h("monthsShort")||C.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[l,function(v){var C=h("months").indexOf(v)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(v){var C,b;C=v,b=a&&a.formats;for(var E=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,V,z){var G=z&&z.toUpperCase();return V||b[z]||t[z]||b[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,K,W){return K||W.slice(1)})})).match(r),y=E.length,x=0;x<y;x+=1){var w=E[x],I=m[w],M=I&&I[0],L=I&&I[1];E[x]=L?{regex:M,parser:L}:w.replace(/^\[|\]$/g,"")}return function($){for(var V={},z=0,G=0;z<y;z+=1){var Y=E[z];if(typeof Y=="string")G+=Y.length;else{var K=Y.regex,W=Y.parser,J=$.slice(G),U=K.exec(J)[0];W.call(V,U),$=$.replace(U,"")}}return function(ee){var ne=ee.afternoon;if(ne!==void 0){var ce=ee.hours;ne?ce<12&&(ee.hours+=12):ce===12&&(ee.hours=0),delete ee.afternoon}}(V),V}}return function(v,C,b){b.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var E=C.prototype,y=E.parse;E.parse=function(x){var w=x.date,I=x.utc,M=x.args;this.$u=I;var L=M[1];if(typeof L=="string"){var $=M[2]===!0,V=M[3]===!0,z=$||V,G=M[2];V&&(G=M[2]),a=this.$locale(),!$&&G&&(a=b.Ls[G]),this.$d=function(J,U,ee,ne){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*J);var ce=g(U)(J),me=ce.year,ve=ce.month,Te=ce.day,ke=ce.hours,Ne=ce.minutes,Ce=ce.seconds,D=ce.milliseconds,B=ce.zone,N=ce.week,R=new Date,A=Te||(me||ve?1:R.getDate()),T=me||R.getFullYear(),_=0;me&&!ve||(_=ve>0?ve-1:R.getMonth());var O,H=ke||0,j=Ne||0,Z=Ce||0,X=D||0;return B?new Date(Date.UTC(T,_,A,H,j,Z,X+60*B.offset*1e3)):ee?new Date(Date.UTC(T,_,A,H,j,Z,X)):(O=new Date(T,_,A,H,j,Z,X),N&&(O=ne(O).week(N).toDate()),O)}catch{return new Date("")}}(w,L,I,b),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),z&&w!=this.format(L)&&(this.$d=new Date("")),a={}}else if(L instanceof Array)for(var Y=L.length,K=1;K<=Y;K+=1){M[1]=L[K-1];var W=b.apply(this,M);if(W.isValid()){this.$d=W.$d,this.$L=W.$L,this.init();break}K===Y&&(this.$d=new Date(""))}else y.call(this,x)}}})})(Ug);var VL=Ug.exports;const $L=Nu(VL);Yo.extend($L);Yo.locale("nl");function zL(n,e=Yo().startOf("day")){const t="DD-MM-YYYY",r=Yo(n,t);if(r.isSame(e))return"vandaag";const s=e.subtract(1,"day");if(r.isSame(s))return"gister";const l=e.subtract(2,"day");if(r.isSame(l))return"eergister";const u=e.subtract(7,"day");if(r.isAfter(u)){const h="dddd";return r.format(h)}if(r.year()==e.year()){const h="D MMM";return r.format(h)}return r.format(t)}const UL={install:n=>{n.component("BDAlert",Ts),n.component("BDArticle",J1),n.component("BDAttachmentPreviewList",ol),n.component("BDBadge",K1),n.component("BDButton",Qe),n.component("BDCard",Fa),n.component("BDChangePasswordTemplate",$g),n.component("BDChatCloud",z2),n.component("BDCol",Lr),n.component("BDCollapsableCard",H1),n.component("BDContainer",ws),n.component("BDDropdown",Cd),n.component("BDDropdownItem",Oi),n.component("BDDropzone",q1),n.component("BDForm",Y1),n.component("BDFormCheckbox",Z1),n.component("BDFormInput",Hr),n.component("BDFormInvalidFeedback",Va),n.component("BDFormSelect",Q1),n.component("BDHeader",Ad),n.component("BDImageAttachmentModal",Lg),n.component("BDImageAttachmentPreviewList",sl),n.component("BDInputGroup",W1),n.component("BDLink",Zr),n.component("BDLogo",lu),n.component("BDMarkdownEditor",V2),n.component("BDMobileMenu",Ed),n.component("BDModal",ei),n.component("BDNotFoundTemplate",zg),n.component("BDPagination",G1),n.component("BDPhoneNumberEditModal",Dg),n.component("BDPill",$a),n.component("BDPractitionerHeader",Mg),n.component("BDProfileImage",Hs),n.component("BDRow",Dr),n.component("BDSessionTimeOutModal",Fg),n.component("BDTable",U2),n.component("BDToast",ku),n.component("BDUser",$2),n.component("BDUserInformation",_u),n.component("BDVideoCallToast",H2),n.component("BDZoomslider",Su),n.component("IconAcademy",Ni),n.component("IconArrowDown",Wp),n.component("IconArrowUp",Kp),n.component("IconAttachment",Jr),n.component("IconBold",cu),n.component("IconBulletList",uu),n.component("IconCalendar",Yp),n.component("IconCall",Ii),n.component("IconCallReject",du),n.component("IconCardView",Gp),n.component("IconCaretDown",fu),n.component("IconCaretLeft",hu),n.component("IconCaretRight",pu),n.component("IconCheck",Go),n.component("IconClipboard",Qp),n.component("IconClose",Da),n.component("IconComment",Zp),n.component("IconCommentActive",Jp),n.component("IconCommonFileEmpty",qp),n.component("IconCommonFileWarning",e1),n.component("IconCommentStatic",Xp),n.component("IconContactPerson",t1),n.component("IconCopy",n1),n.component("IconDelete",r1),n.component("IconDoubleCheck",o1),n.component("IconDownloadImage",mu),n.component("IconEdit",s1),n.component("IconEndCall",i1),n.component("IconError",Ra),n.component("IconExternal",a1),n.component("IconEyeShow",l1),n.component("IconEyeSlash",c1),n.component("IconFile",gu),n.component("IconFileAdded",u1),n.component("IconForward",d1),n.component("IconHix",f1),n.component("IconHyperlink",Ba),n.component("IconImageFileLandscape",h1),n.component("IconImageFileWarning",p1),n.component("IconInfo",so),n.component("IconInformationCircle",m1),n.component("IconItalic",vu),n.component("IconListView",g1),n.component("IconLock",v1),n.component("IconLusciiEscalated",y1),n.component("IconLusciiLogo",E1),n.component("IconLusciiOpen",C1),n.component("IconLusciiPriorityHigh",A1),n.component("IconLusciiPriorityLow",b1),n.component("IconLusciiPriorityMedium",w1),n.component("IconMenu",yu),n.component("IconMessage",T1),n.component("IconMessageForward",S1),n.component("IconMicrophoneSlash",k1),n.component("IconMicrosoftTeams",_1),n.component("IconMin",x1),n.component("IconOrderedList",Eu),n.component("IconPlus",N1),n.component("IconRefresh",I1),n.component("IconRemove",Us),n.component("IconSananetLogo",M1),n.component("IconService",O1),n.component("IconShareScreen",L1),n.component("IconSingleNeutral",D1),n.component("IconSort",R1),n.component("IconSortAsc",Cu),n.component("IconSortDesc",Au),n.component("IconSortNone",bu),n.component("IconTriangleDown",B1),n.component("IconTriangleExclamation",wu),n.component("IconUnderline",Tu),n.component("IconVideoDisabled",F1),n.component("IconVideocall",P1),n.component("IconZorgkaart",V1),n.directive("vBDTooltip",Xs)}};exports.BDAlert=Ts;exports.BDArticle=J1;exports.BDAttachmentPreviewList=ol;exports.BDBadge=K1;exports.BDButton=Qe;exports.BDCard=Fa;exports.BDChangePasswordTemplate=$g;exports.BDChatCloud=z2;exports.BDCol=Lr;exports.BDCollapsableCard=H1;exports.BDContainer=ws;exports.BDDropdown=Cd;exports.BDDropdownItem=Oi;exports.BDDropzone=q1;exports.BDForm=Y1;exports.BDFormCheckbox=Z1;exports.BDFormInput=Hr;exports.BDFormInvalidFeedback=Va;exports.BDFormSelect=Q1;exports.BDHeader=Ad;exports.BDImageAttachmentModal=Lg;exports.BDImageAttachmentPreviewList=sl;exports.BDInputGroup=W1;exports.BDLink=Zr;exports.BDLogo=lu;exports.BDMarkdownEditor=V2;exports.BDMobileMenu=Ed;exports.BDModal=ei;exports.BDNotFoundTemplate=zg;exports.BDPagination=G1;exports.BDPhoneNumberEditModal=Dg;exports.BDPill=$a;exports.BDPractitionerHeader=Mg;exports.BDProfileImage=Hs;exports.BDRow=Dr;exports.BDSessionTimeOutModal=Fg;exports.BDTable=U2;exports.BDToast=ku;exports.BDUser=$2;exports.BDUserInformation=_u;exports.BDVideoCallToast=H2;exports.BDZoomslider=Su;exports.IconAcademy=Ni;exports.IconArrowDown=Wp;exports.IconArrowUp=Kp;exports.IconAttachment=Jr;exports.IconBold=cu;exports.IconBulletList=uu;exports.IconCalendar=Yp;exports.IconCall=Ii;exports.IconCallReject=du;exports.IconCardView=Gp;exports.IconCaretDown=fu;exports.IconCaretLeft=hu;exports.IconCaretRight=pu;exports.IconCheck=Go;exports.IconClipboard=Qp;exports.IconClose=Da;exports.IconComment=Zp;exports.IconCommentActive=Jp;exports.IconCommentStatic=Xp;exports.IconCommonFileEmpty=qp;exports.IconCommonFileWarning=e1;exports.IconContactPerson=t1;exports.IconCopy=n1;exports.IconDelete=r1;exports.IconDoubleCheck=o1;exports.IconDownloadImage=mu;exports.IconEdit=s1;exports.IconEndCall=i1;exports.IconError=Ra;exports.IconExternal=a1;exports.IconEyeShow=l1;exports.IconEyeSlash=c1;exports.IconFile=gu;exports.IconFileAdded=u1;exports.IconForward=d1;exports.IconHix=f1;exports.IconHyperlink=Ba;exports.IconImageFileLandscape=h1;exports.IconImageFileWarning=p1;exports.IconInfo=so;exports.IconInformationCircle=m1;exports.IconItalic=vu;exports.IconListView=g1;exports.IconLock=v1;exports.IconLusciiEscalated=y1;exports.IconLusciiLogo=E1;exports.IconLusciiOpen=C1;exports.IconLusciiPriorityHigh=A1;exports.IconLusciiPriorityLow=b1;exports.IconLusciiPriorityMedium=w1;exports.IconMenu=yu;exports.IconMessage=T1;exports.IconMessageForward=S1;exports.IconMicrophoneSlash=k1;exports.IconMicrosoftTeams=_1;exports.IconMin=x1;exports.IconOrderedList=Eu;exports.IconPlus=N1;exports.IconRefresh=I1;exports.IconRemove=Us;exports.IconSananetLogo=M1;exports.IconService=O1;exports.IconShareScreen=L1;exports.IconSingleNeutral=D1;exports.IconSort=R1;exports.IconSortAsc=Cu;exports.IconSortDesc=Au;exports.IconSortNone=bu;exports.IconTriangleDown=B1;exports.IconTriangleExclamation=wu;exports.IconUnderline=Tu;exports.IconVideoDisabled=F1;exports.IconVideocall=P1;exports.IconZorgkaart=V1;exports.default=UL;exports.getDisplayDate=zL;exports.useModal=ml;exports.usePopover=Ig;exports.useServerErrors=Id;exports.useSessionTimeOut=Pg;exports.useToaster=gl;exports.useValidation=Vg;exports.useWindow=Nd;exports.useZoom=Og;exports.vBdTooltip=Xs;
207
+ `});return(d,f)=>i.value?(c.openBlock(),c.createElementBlock("a",{key:0,ref_key:"notificationButton",ref:s,tabindex:"0",class:"bd-notification-button",role:"button","data-bs-toggle":"popover","data-bs-placement":"bottom","data-bs-title":a.value,"data-bs-content":u.value,"data-bs-html":!0,onClick:f[0]||(f[0]=(...h)=>c.unref(o)&&c.unref(o)(...h))},[c.withDirectives(c.createElementVNode("img",{src:ZO,alt:"BeterDichtbij nieuws notificatie bel.",title:l.value},null,8,qO),[[c.unref(Xs)]]),c.unref(r)?(c.openBlock(),c.createElementBlock("div",eL)):c.createCommentVNode("",!0)],8,XO)):c.createCommentVNode("",!0)}}),nL={class:"profile-side"},rL=["href"],oL={class:"nav-item"},sL=["textContent"],Mg=c.defineComponent({__name:"BDPractitionerHeader",props:{academyUrl:{},userId:{},getNotification:{}},setup(n){const e=n,{t}=qs(),r=c.computed(()=>t("practitionerHeader.academyTooltip")),o=c.computed(()=>t("practitionerHeader.AcademyMenuItem"));return(s,i)=>(c.openBlock(),c.createBlock(Ad,null,c.createSlots({"profile-side":c.withCtx(()=>[c.createElementVNode("div",nL,[c.createVNode(tL,{"user-id":e.userId,"get-notification":e.getNotification},null,8,["user-id","get-notification"]),e.academyUrl?(c.openBlock(),c.createElementBlock("a",{key:0,href:e.academyUrl,target:"_blank",rel:"noopener,noreferrer"},[c.withDirectives(c.createVNode(c.unref(Ni),{title:r.value},null,8,["title"]),[[c.unref(Xs)]])],8,rL)):c.createCommentVNode("",!0)])]),_:2},[e.academyUrl?{name:"mobile-menu-special-options",fn:c.withCtx(()=>[c.createElementVNode("li",oL,[c.createVNode(Zr,{class:"nav-link",to:e.academyUrl},{default:c.withCtx(()=>[c.createVNode(c.unref(Ni)),c.createElementVNode("span",{textContent:c.toDisplayString(o.value)},null,8,sL)]),_:1},8,["to"])])]),key:"0"}:void 0]),1024))}}),iL={class:"modal-dialog"},aL={class:"modal-content"},lL={class:"modal-header"},cL={class:"modal-title"},uL=["src"],dL=c.createElementVNode("span",null,"Sluiten",-1),fL={class:"modal-body"},hL={key:0,class:"modal-footer"},pL=["disabled"],ei=c.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(n,{emit:e}){const t=n,r=c.computed(()=>`modal bd-modal modal-${t.size}`),o=()=>e("submit"),s=()=>e("cancel");return(i,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass(r.value),tabindex:"-1"},[c.createElementVNode("div",iL,[c.createElementVNode("div",aL,[c.createElementVNode("div",lL,[c.createElementVNode("h2",cL,[t.titleImage?(c.openBlock(),c.createElementBlock("img",{key:0,src:t.titleImage,class:"title-image",alt:""},null,8,uL)):c.createCommentVNode("",!0),c.createElementVNode("span",null,c.toDisplayString(t.title),1)]),c.renderSlot(i.$slots,"modal-header-space-between"),t.hideCloseButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,type:"button",class:"btn-close w-auto","data-bs-dismiss":"modal","aria-label":"Sluiten",onClick:s},[dL,c.createVNode(c.unref(Da))]))]),c.createElementVNode("div",fL,[c.renderSlot(i.$slots,"default")]),i.hideFooter?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("div",hL,[t.hideFooterSubmitButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:0,class:"btn btn-primary",disabled:t.disableSubmitButton,onClick:o},c.toDisplayString(t.submitButtonTitle),9,pL)),c.renderSlot(i.$slots,"buttons"),t.hideFooterCancelButton?c.createCommentVNode("",!0):(c.openBlock(),c.createElementBlock("button",{key:1,type:"button",class:"btn btn-link","data-bs-dismiss":"modal",onClick:s,"aria-label":"Annuleren"},c.toDisplayString(t.closeButtonTitle),1))]))])])],2))}}),ml=n=>{const e=c.ref(null);return{showModal:()=>{const o=document.getElementById(n);o instanceof HTMLElement?(e.value=yr.getOrCreateInstance(o),e.value.show()):console.error(`Modal '${n}' niet gevonden.`)},closeModal:()=>{if(e.value){e.value.hide();return}const o=document.getElementById(n);if(o instanceof HTMLElement){const s=yr.getInstance(o);s&&s.hide()}}}};function Og(){const n=c.ref(0),e=c.ref(!0),t=c.ref(null),r=c.ref({top:0,left:0,x:0,y:0}),o=c.computed(()=>n.value>0?`zoom-${n.value}`:"");return{zoom:n,mouseDown:e,imageHolderRef:t,pos:r,SetZoom:o,OnMouseDown:a=>{if(!t.value)return;r.value.left=t.value.scrollLeft,r.value.top=t.value.scrollTop;const u=document.querySelector("#image-attachment-modal"),d=document.querySelector(".image-preview-image-holder");u&&(u.style.cursor="grabbing"),d&&(d.style.cursor="grabbing"),r.value.x=a.clientX,r.value.y=a.clientY,e.value=!0},OnMouseMove:a=>{if(e.value){const u=a.clientX-r.value.x,d=a.clientY-r.value.y;t.value&&(t.value.scrollTop=r.value.top-d,t.value.scrollLeft=r.value.left-u)}},OnMouseUp:()=>{const a=document.querySelector("#image-attachment-modal"),u=document.querySelector(".image-preview-image-holder");a&&a.style&&(a.style.cursor=""),u&&u.style&&(u.style.cursor="grab"),e.value=!1}}}const mL=["src","alt"],gL={key:0,class:"show-spinner"},vL={class:"spinner-border text-primary",role:"status"},yL={class:"visually-hidden"},EL=["href"],Lg=c.defineComponent({__name:"BDImageAttachmentModal",props:["loadingText","downloadText"],setup(n,{expose:e}){const t=n,{showModal:r}=ml("image-attachment-modal"),{zoom:o,imageHolderRef:s,SetZoom:i,OnMouseDown:l,OnMouseMove:a,OnMouseUp:u}=Og(),d=c.ref(!0),f=c.ref({BerichtId:0,Id:void 0,MimeType:null,Naam:Fe,altName:Fe,downloadUrl:Fe,fullImageUrl:Fe,previewUrl:Fe});e({Show:g=>{f.value=g,o.value=0,r()}});const p=()=>{d.value=!1},m=()=>{f.value={BerichtId:0,Id:void 0,MimeType:null,Naam:Fe,altName:Fe,downloadUrl:Fe,fullImageUrl:Fe,previewUrl:Fe}};return(g,v)=>(c.openBlock(),c.createBlock(ei,{id:"image-attachment-modal",class:c.normalizeClass(c.unref(Fe)),title:f.value.Naam,hideFooterCancelButton:!0,showHeaderButton:!0,onCancel:m},{default:c.withCtx(()=>[c.createElementVNode("div",{class:"image-preview-image-holder",ref_key:"imageHolderRef",ref:s,onMousedown:v[0]||(v[0]=(...C)=>c.unref(l)&&c.unref(l)(...C)),onMousemove:v[1]||(v[1]=(...C)=>c.unref(a)&&c.unref(a)(...C)),onMouseup:v[2]||(v[2]=(...C)=>c.unref(u)&&c.unref(u)(...C))},[f.value?(c.openBlock(),c.createElementBlock("img",{key:0,src:f.value.downloadUrl,alt:f.value.Naam,class:c.normalizeClass(["image-preview-modal",c.unref(i)]),onLoad:p,draggable:!1},null,42,mL)):c.createCommentVNode("",!0)],544),d.value?(c.openBlock(),c.createElementBlock("div",gL,[c.createElementVNode("div",vL,[c.createElementVNode("span",yL,c.toDisplayString(t.loadingText),1)])])):c.createCommentVNode("",!0),c.createVNode(Su,{modelValue:c.unref(o),"onUpdate:modelValue":v[3]||(v[3]=C=>c.isRef(o)?o.value=C:null),class:"image-preview-bd-zoom-slider","max-value":4},null,8,["modelValue"]),c.createElementVNode("a",{href:f.value.downloadUrl},[c.createVNode(Qe,{variant:"primary",class:"download-image"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(t.downloadText),1)]),_:1})],8,EL)]),_:1},8,["class","title"]))}});function gl(n=void 0){const e=l=>s("Succesvol",l,So.SUCCESS),t=l=>s("Waarschuwing",l,So.WARNING),r=l=>s("Informatie",l,So.INFO),o=l=>s("Mislukt",l,So.DANGER);function s(l,a,u){const d=`toast-${U1()}`,f={id:d,variant:u,title:l,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=c.h(ku,f),g=c.createApp({render:()=>p}).mount(document.createElement("div"));h.appendChild(g.$el);const v=document.querySelector(`#${d}`);v&&(ts.getOrCreateInstance(v,n).show(),i(v))}function i(l){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 u=new MutationObserver(a),d={attributes:!0};u.observe(l,d)}return{showSuccessToast:e,showInformationToast:r,showWarningToast:t,showDangerToast:o}}const{showDangerToast:CL}=gl();function Id(n){const e=c.ref(null),t=(a,u="serverErrors")=>{var f;let d=[];if(Array.isArray((f=a==null?void 0:a.response)==null?void 0:f.data)?d=a.response.data.filter(h=>ri(h.ErrorMessage)&&h.ErrorMessage!==Fe):a.response.data.ErrorMessage?d=[a.response.data.ErrorMessage]:d=null,ri(u))e.value=d;else if(Array.isArray(u)){let h=e.value;for(let p=0;p<u.length;p++)p===u.length-1?h[u[p]]=d:h=h[u[p]]}r(a),i(e)},r=a=>{if(n==null)return;const d=new URL(a.request.responseURL).pathname;if(d in n.error){const f=n.error[d];f&&CL(f)}},o=c.ref(null),s=c.ref(""),i=a=>{t9(a.value)?o.value=a.value.map(u=>ri(u)?u:u.ErrorMessage):ri(a.value)&&(s.value=a.value)};function l(){e.value=null,o.value=null,s.value=Fe}return{serverErrors:e,errorMessages:o,errorMessageText:s,MapErrors:i,MapServerErrors:t,ResetServerErrors:l}}const AL={key:0},bL={key:1},wL={class:"bd-form-field"},TL={class:"bd-form-field"},Dg=c.defineComponent({__name:"BDPhoneNumberEditModal",props:["modalTitle","submitButtonTitle","phoneNumberLabel","phoneNumberUnchangedText","confirmationCodeLabel","confirmationCodeRequiredText","confirmationCodeSentText","editSuccessText","editCanceledText","sendConfirmationCodeText","startPhoneNumberUpdate","confirmPhoneNumberUpdate"],emits:["startPhoneNumberUpdate","confirmPhoneNumberUpdate","setPhoneNumber"],setup(n,{expose:e,emit:t}){const r=n,{showSuccessToast:o,showWarningToast:s}=gl(),{serverErrors:i,errorMessages:l,errorMessageText:a,MapServerErrors:u,ResetServerErrors:d}=Id(null),{closeModal:f}=ml("phone-number-edit-modal");let h=Fe;const p=c.ref(),m=c.ref(null),g=c.ref(),v=c.ref(),C=c.ref(null),b=c.computed(()=>v.value==null||v.value==""),E=()=>{if(m.value=null,d(),!p.value||p.value==h){m.value=!1;return}const L={newPhonenumber:p.value};r.startPhoneNumberUpdate(L).then(x).catch(u)},y=()=>{if(!v.value){C.value=!1;return}const L={requestIdentifier:g.value,token:v.value};r.confirmPhoneNumberUpdate(L).then(w).catch(u)},x=L=>{m.value=null,o(r.confirmationCodeSentText),g.value=L.data.RequestIdentifier},w=()=>{t("setPhoneNumber",p.value),o(r.editSuccessText),f(),m.value=null,C.value=null},I=L=>{h=L,p.value=h,m.value=null,g.value=void 0,v.value=void 0,C.value=null},M=()=>{I(h),d(),s(r.editCanceledText)};return e({Reset:I}),(L,$)=>(c.openBlock(),c.createBlock(ei,{id:"phone-number-edit-modal",class:c.normalizeClass(c.unref(Fe)),title:r.modalTitle,submitButtonTitle:r.submitButtonTitle,hideFooterCancelButton:!1,"disable-submit-button":b.value,serverErrors:c.unref(i),errorMessages:c.unref(l),errorMessageText:c.unref(a),onSubmit:y,onCancel:M},{default:c.withCtx(()=>[c.unref(a)||c.unref(l)?(c.openBlock(),c.createBlock(Ts,{key:0,variant:"danger"},{default:c.withCtx(()=>[c.unref(l)?(c.openBlock(),c.createElementBlock("div",AL,[c.createElementVNode("ul",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(l),(V,z)=>(c.openBlock(),c.createElementBlock("li",{key:z},[c.createVNode(so),c.createElementVNode("span",null,c.toDisplayString(V),1)]))),128))])])):(c.openBlock(),c.createElementBlock("div",bL,c.toDisplayString(c.unref(a)),1))]),_:1})):c.createCommentVNode("",!0),c.createElementVNode("div",wL,[c.createVNode(Hr,{id:"form-input-phone-number",label:r.phoneNumberLabel,modelValue:p.value,"onUpdate:modelValue":$[0]||($[0]=V=>p.value=V),state:m.value,type:"text","form-field-class":"form-input-with-button","invalid-feedback-text":r.phoneNumberUnchangedText},{default:c.withCtx(()=>[c.createVNode(Qe,{textContent:c.toDisplayString(r.sendConfirmationCodeText),class:"tablet-device-up",type:"button",onClick:E},null,8,["textContent"])]),_:1},8,["label","modelValue","state","invalid-feedback-text"]),c.createVNode(Qe,{textContent:c.toDisplayString(r.sendConfirmationCodeText),class:"mobile-device",type:"button",onClick:E},null,8,["textContent"])]),c.createElementVNode("div",TL,[g.value?(c.openBlock(),c.createBlock(Hr,{key:0,label:r.confirmationCodeLabel,modelValue:v.value,"onUpdate:modelValue":$[1]||($[1]=V=>v.value=V),state:C.value,"invalid-feedback-text":r.confirmationCodeRequiredText},null,8,["label","modelValue","state","invalid-feedback-text"])):c.createCommentVNode("",!0)])]),_:1},8,["class","title","submitButtonTitle","disable-submit-button","serverErrors","errorMessages","errorMessageText"]))}});var Rg={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(xu,function(){var t=1e3,r=6e4,o=36e5,s="millisecond",i="second",l="minute",a="hour",u="day",d="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+)?$/,C=/\[([^\]]+)]|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(Y){var K=["th","st","nd","rd"],W=Y%100;return"["+Y+(K[(W-20)%10]||K[W]||K[0])+"]"}},E=function(Y,K,W){var J=String(Y);return!J||J.length>=K?Y:""+Array(K+1-J.length).join(W)+Y},y={s:E,z:function(Y){var K=-Y.utcOffset(),W=Math.abs(K),J=Math.floor(W/60),U=W%60;return(K<=0?"+":"-")+E(J,2,"0")+":"+E(U,2,"0")},m:function Y(K,W){if(K.date()<W.date())return-Y(W,K);var J=12*(W.year()-K.year())+(W.month()-K.month()),U=K.clone().add(J,f),ee=W-U<0,ne=K.clone().add(J+(ee?-1:1),f);return+(-(J+(W-U)/(ee?U-ne:ne-U))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:f,y:p,w:d,d:u,D:m,h:a,m:l,s:i,ms:s,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},x="en",w={};w[x]=b;var I="$isDayjsObject",M=function(Y){return Y instanceof z||!(!Y||!Y[I])},L=function Y(K,W,J){var U;if(!K)return x;if(typeof K=="string"){var ee=K.toLowerCase();w[ee]&&(U=ee),W&&(w[ee]=W,U=ee);var ne=K.split("-");if(!U&&ne.length>1)return Y(ne[0])}else{var ce=K.name;w[ce]=K,U=ce}return!J&&U&&(x=U),U||!J&&x},$=function(Y,K){if(M(Y))return Y.clone();var W=typeof K=="object"?K:{};return W.date=Y,W.args=arguments,new z(W)},V=y;V.l=L,V.i=M,V.w=function(Y,K){return $(Y,{locale:K.$L,utc:K.$u,x:K.$x,$offset:K.$offset})};var z=function(){function Y(W){this.$L=L(W.locale,null,!0),this.parse(W),this.$x=this.$x||W.x||{},this[I]=!0}var K=Y.prototype;return K.parse=function(W){this.$d=function(J){var U=J.date,ee=J.utc;if(U===null)return new Date(NaN);if(V.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var ne=U.match(v);if(ne){var ce=ne[2]-1||0,me=(ne[7]||"0").substring(0,3);return ee?new Date(Date.UTC(ne[1],ce,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,me)):new Date(ne[1],ce,ne[3]||1,ne[4]||0,ne[5]||0,ne[6]||0,me)}}return new Date(U)}(W),this.init()},K.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},K.$utils=function(){return V},K.isValid=function(){return this.$d.toString()!==g},K.isSame=function(W,J){var U=$(W);return this.startOf(J)<=U&&U<=this.endOf(J)},K.isAfter=function(W,J){return $(W)<this.startOf(J)},K.isBefore=function(W,J){return this.endOf(J)<$(W)},K.$g=function(W,J,U){return V.u(W)?this[J]:this.set(U,W)},K.unix=function(){return Math.floor(this.valueOf()/1e3)},K.valueOf=function(){return this.$d.getTime()},K.startOf=function(W,J){var U=this,ee=!!V.u(J)||J,ne=V.p(W),ce=function(B,N){var R=V.w(U.$u?Date.UTC(U.$y,N,B):new Date(U.$y,N,B),U);return ee?R:R.endOf(u)},me=function(B,N){return V.w(U.toDate()[B].apply(U.toDate("s"),(ee?[0,0,0,0]:[23,59,59,999]).slice(N)),U)},ve=this.$W,Te=this.$M,ke=this.$D,Ne="set"+(this.$u?"UTC":"");switch(ne){case p:return ee?ce(1,0):ce(31,11);case f:return ee?ce(1,Te):ce(0,Te+1);case d:var Ce=this.$locale().weekStart||0,D=(ve<Ce?ve+7:ve)-Ce;return ce(ee?ke-D:ke+(6-D),Te);case u:case m:return me(Ne+"Hours",0);case a:return me(Ne+"Minutes",1);case l:return me(Ne+"Seconds",2);case i:return me(Ne+"Milliseconds",3);default:return this.clone()}},K.endOf=function(W){return this.startOf(W,!1)},K.$set=function(W,J){var U,ee=V.p(W),ne="set"+(this.$u?"UTC":""),ce=(U={},U[u]=ne+"Date",U[m]=ne+"Date",U[f]=ne+"Month",U[p]=ne+"FullYear",U[a]=ne+"Hours",U[l]=ne+"Minutes",U[i]=ne+"Seconds",U[s]=ne+"Milliseconds",U)[ee],me=ee===u?this.$D+(J-this.$W):J;if(ee===f||ee===p){var ve=this.clone().set(m,1);ve.$d[ce](me),ve.init(),this.$d=ve.set(m,Math.min(this.$D,ve.daysInMonth())).$d}else ce&&this.$d[ce](me);return this.init(),this},K.set=function(W,J){return this.clone().$set(W,J)},K.get=function(W){return this[V.p(W)]()},K.add=function(W,J){var U,ee=this;W=Number(W);var ne=V.p(J),ce=function(Te){var ke=$(ee);return V.w(ke.date(ke.date()+Math.round(Te*W)),ee)};if(ne===f)return this.set(f,this.$M+W);if(ne===p)return this.set(p,this.$y+W);if(ne===u)return ce(1);if(ne===d)return ce(7);var me=(U={},U[l]=r,U[a]=o,U[i]=t,U)[ne]||1,ve=this.$d.getTime()+W*me;return V.w(ve,this)},K.subtract=function(W,J){return this.add(-1*W,J)},K.format=function(W){var J=this,U=this.$locale();if(!this.isValid())return U.invalidDate||g;var ee=W||"YYYY-MM-DDTHH:mm:ssZ",ne=V.z(this),ce=this.$H,me=this.$m,ve=this.$M,Te=U.weekdays,ke=U.months,Ne=U.meridiem,Ce=function(N,R,A,T){return N&&(N[R]||N(J,ee))||A[R].slice(0,T)},D=function(N){return V.s(ce%12||12,N,"0")},B=Ne||function(N,R,A){var T=N<12?"AM":"PM";return A?T.toLowerCase():T};return ee.replace(C,function(N,R){return R||function(A){switch(A){case"YY":return String(J.$y).slice(-2);case"YYYY":return V.s(J.$y,4,"0");case"M":return ve+1;case"MM":return V.s(ve+1,2,"0");case"MMM":return Ce(U.monthsShort,ve,ke,3);case"MMMM":return Ce(ke,ve);case"D":return J.$D;case"DD":return V.s(J.$D,2,"0");case"d":return String(J.$W);case"dd":return Ce(U.weekdaysMin,J.$W,Te,2);case"ddd":return Ce(U.weekdaysShort,J.$W,Te,3);case"dddd":return Te[J.$W];case"H":return String(ce);case"HH":return V.s(ce,2,"0");case"h":return D(1);case"hh":return D(2);case"a":return B(ce,me,!0);case"A":return B(ce,me,!1);case"m":return String(me);case"mm":return V.s(me,2,"0");case"s":return String(J.$s);case"ss":return V.s(J.$s,2,"0");case"SSS":return V.s(J.$ms,3,"0");case"Z":return ne}return null}(N)||ne.replace(":","")})},K.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},K.diff=function(W,J,U){var ee,ne=this,ce=V.p(J),me=$(W),ve=(me.utcOffset()-this.utcOffset())*r,Te=this-me,ke=function(){return V.m(ne,me)};switch(ce){case p:ee=ke()/12;break;case f:ee=ke();break;case h:ee=ke()/3;break;case d:ee=(Te-ve)/6048e5;break;case u:ee=(Te-ve)/864e5;break;case a:ee=Te/o;break;case l:ee=Te/r;break;case i:ee=Te/t;break;default:ee=Te}return U?ee:V.a(ee)},K.daysInMonth=function(){return this.endOf(f).$D},K.$locale=function(){return w[this.$L]},K.locale=function(W,J){if(!W)return this.$L;var U=this.clone(),ee=L(W,J,!0);return ee&&(U.$L=ee),U},K.clone=function(){return V.w(this.$d,this)},K.toDate=function(){return new Date(this.valueOf())},K.toJSON=function(){return this.isValid()?this.toISOString():null},K.toISOString=function(){return this.$d.toISOString()},K.toString=function(){return this.$d.toUTCString()},Y}(),G=z.prototype;return $.prototype=G,[["$ms",s],["$s",i],["$m",l],["$H",a],["$W",u],["$M",f],["$y",p],["$D",m]].forEach(function(Y){G[Y[1]]=function(K){return this.$g(K,Y[0],Y[1])}}),$.extend=function(Y,K){return Y.$i||(Y(K,z,$),Y.$i=!0),$},$.locale=L,$.isDayjs=M,$.unix=function(Y){return $(1e3*Y)},$.en=w[x],$.Ls=w,$.p={},$})})(Rg);var Bg=Rg.exports;const Yo=Nu(Bg),Pg=(n,e,t,r,o,s)=>{const i=c.ref(null),l=c.ref(null),a=c.ref(!1),u=c.ref(null),{showModal:d,closeModal:f}=ml("session-time-out-modal"),h=c.computed(()=>i.value&&n?n-(i.value+1):0),p=c.computed(()=>l.value?60-l.value:0),m=c.computed(()=>a.value),g=()=>{u.value=setInterval(C,1e3),r(u.value)},v=()=>{u.value&&clearInterval(u.value)},C=()=>{i.value=Yo().diff(t(),"m"),l.value=Yo().subtract(i.value,"m").diff(t(),"s");const M=n??Number.MAX_SAFE_INTEGER,L=e??0;i.value>=M?(a.value=!0,d(),localStorage.setItem("session-timeout","true"),window.onbeforeunload=b):i.value>=M-L?d():f()},b=M=>{M.stopPropagation(),y()},E=()=>{o(),v(),i.value=null,l.value=null,g()},y=()=>{v(),i.value=null,l.value=null,localStorage.removeItem("session-timeout"),s()},x=()=>{a.value?y():E()},w=()=>{y()},I=()=>{a.value?y():f()};return c.onMounted(()=>{const M=document.getElementById("session-time-out-modal");M&&M.addEventListener("hidden.bs.modal",x),v(),g()}),{IsExpired:m,Minutes:h,Seconds:p,OnLogOut:w,OnSubmit:I}},Fg=c.defineComponent({__name:"BDSessionTimeOutModal",props:["expiredTitle","expiredMessage","expiredButtonText","almostExpiredTitle","almostExpiredMessage","almostExpiredButtonText","almostExpiredCancelButtonText","threshold","warningThreshold","getTime","setTaskId","setNewTime","logout","hideCancelButton"],setup(n){const e=n,{IsExpired:t,Minutes:r,Seconds:o,OnLogOut:s,OnSubmit:i}=Pg(e.threshold,e.warningThreshold,e.getTime,e.setTaskId,e.setNewTime,e.logout),l=c.computed(()=>t.value?e.expiredTitle:e.almostExpiredTitle),a=c.computed(()=>t.value?e.expiredMessage:`${e.almostExpiredMessage} ${r.value}:${o.value<10?"0"+o.value:o.value}`),u=c.computed(()=>e.hideCancelButton||t.value),d=c.computed(()=>t.value?e.expiredButtonText:e.almostExpiredButtonText);return(f,h)=>(c.openBlock(),c.createBlock(ei,{id:"session-time-out-modal",title:l.value,"hide-close-button":!0,"hide-footer-cancel-button":u.value,"close-button-title":e.almostExpiredCancelButtonText,"submit-button-title":d.value,size:"md",onSubmit:c.unref(i),onCancel:c.unref(s)},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(a.value),1)]),_:1},8,["title","hide-footer-cancel-button","close-button-title","submit-button-title","onSubmit","onCancel"]))}}),Vg=()=>({ResetValidation:t=>{for(const r in t.value)t.value[r].state=null},ValidationObjectIsValid:t=>{for(let r in t)if(t[r].state===!1)return!1;return!0}}),SL={class:"template change-password-template"},kL={class:"template-title"},_L={key:0},xL={key:1},NL=["onSubmit","onReset"],IL={class:"bd-form-field"},ML={class:"bd-form-field"},OL={class:"bd-form-field"},LL={class:"bd-form-buttons"},$g=c.defineComponent({__name:"BDChangePasswordTemplate",props:{templateTitle:{},alertText:{},currentPasswordLabel:{},newPasswordLabel:{},confirmNewPasswordLabel:{},submitButtonText:{},cancelButtonText:{},successText:{},failureText:{},requiredText:{},incompatibleText:{},minimalRequirementsText:{},submitPassword:{type:Function}},setup(n){const e=n,{showDangerToast:t,showSuccessToast:r}=gl(),{errorMessages:o,errorMessageText:s,MapServerErrors:i,ResetServerErrors:l}=Id(null),{ValidationObjectIsValid:a}=Vg();let u=c.ref({password:Fe,passwordNew:Fe,passwordRepeat:Fe}),d=c.ref({password:{state:null,errorLabel:Fe},passwordNew:{state:null,errorLabel:Fe},passwordRepeat:{state:null,errorLabel:Fe}});const f=()=>{if(!h())return;const g=e.submitPassword(u.value);g&&g.then(()=>{r(e.successText),p()}).catch(v=>{t(e.failureText),i(v)})},h=()=>{const m=/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,}$/;if(u.value.passwordNew&&!m.test(u.value.passwordNew))d.value.passwordNew.state=!1,d.value.passwordNew.errorLabel=e.minimalRequirementsText;else{const g=u.value.passwordRepeat===u.value.passwordNew,v=g?e.requiredText:e.incompatibleText;d.value.passwordNew.state=u.value.passwordNew!==Fe&&g?null:!1,d.value.passwordNew.errorLabel=v,d.value.passwordRepeat.state=u.value.passwordRepeat!==Fe&&g?null:!1,d.value.passwordRepeat.errorLabel=v}return d.value.password.state=u.value.password!==Fe?null:!1,d.value.password.errorLabel=d.value.password.state?Fe:e.requiredText,a(d.value)},p=()=>{u.value.password=Fe,u.value.passwordNew=Fe,u.value.passwordRepeat=Fe,d.value.password.state=null,d.value.passwordNew.state=null,d.value.passwordRepeat.state=null,l()};return(m,g)=>(c.openBlock(),c.createElementBlock("main",SL,[c.createVNode(ws,{class:"container-xl"},{default:c.withCtx(()=>[c.createVNode(Dr,{class:"justify-content-md-center template-header"},{default:c.withCtx(()=>[c.createVNode(Lr,{xs:12,md:10,lg:7},{default:c.withCtx(()=>[c.createElementVNode("h1",kL,c.toDisplayString(e.templateTitle),1)]),_:1})]),_:1}),c.createVNode(Dr,{class:"justify-content-md-center"},{default:c.withCtx(()=>[c.createVNode(Lr,{xs:12,md:10,lg:7},{default:c.withCtx(()=>[c.createVNode(Fa,{class:"bd-card-template","no-header":!0},{body:c.withCtx(()=>[c.createVNode(ws,{class:"container-fluid"},{default:c.withCtx(()=>[c.createVNode(Dr,null,{default:c.withCtx(()=>[c.createVNode(Lr,null,{default:c.withCtx(()=>[c.createVNode(Ts,{variant:"warning"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.alertText),1)]),_:1})]),_:1})]),_:1}),c.unref(o)||c.unref(s)?(c.openBlock(),c.createBlock(Dr,{key:0},{default:c.withCtx(()=>[c.createVNode(Lr,null,{default:c.withCtx(()=>[c.createVNode(Ts,{variant:"danger"},{default:c.withCtx(()=>[c.unref(o)?(c.openBlock(),c.createElementBlock("div",_L,[c.createElementVNode("ul",null,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(c.unref(o),(v,C)=>(c.openBlock(),c.createElementBlock("li",{key:C},[c.createVNode(so),c.createElementVNode("span",null,c.toDisplayString(v),1)]))),128))])])):(c.openBlock(),c.createElementBlock("div",xL,c.toDisplayString(c.unref(s)),1))]),_:1})]),_:1})]),_:1})):c.createCommentVNode("",!0),c.createVNode(Dr,null,{default:c.withCtx(()=>[c.createVNode(Lr,{class:"bd-card-form",sm:12,md:12},{default:c.withCtx(()=>[c.createElementVNode("form",{onSubmit:c.withModifiers(f,["prevent"]),onReset:c.withModifiers(p,["prevent"]),class:"form"},[c.createElementVNode("div",IL,[c.createVNode(Hr,{modelValue:c.unref(u).password,"onUpdate:modelValue":g[0]||(g[0]=v=>c.unref(u).password=v),label:m.currentPasswordLabel,state:c.unref(d).password.state,type:"password","invalid-feedback-text":c.unref(d).password.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",ML,[c.createVNode(Hr,{modelValue:c.unref(u).passwordNew,"onUpdate:modelValue":g[1]||(g[1]=v=>c.unref(u).passwordNew=v),label:m.newPasswordLabel,state:c.unref(d).passwordNew.state,type:"password","invalid-feedback-text":c.unref(d).passwordNew.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",OL,[c.createVNode(Hr,{modelValue:c.unref(u).passwordRepeat,"onUpdate:modelValue":g[2]||(g[2]=v=>c.unref(u).passwordRepeat=v),label:m.confirmNewPasswordLabel,state:c.unref(d).passwordRepeat.state,type:"password","invalid-feedback-text":c.unref(d).passwordRepeat.errorLabel},null,8,["modelValue","label","state","invalid-feedback-text"])]),c.createElementVNode("div",LL,[c.createVNode(Qe,{type:"submit"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.submitButtonText),1)]),_:1}),c.createVNode(Qe,{type:"reset",variant:"link"},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(m.cancelButtonText),1)]),_:1})])],40,NL)]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1})]))}}),DL={class:"template not-found-template"},RL={class:"center-screen"},BL={class:"container-warning"},PL=["textContent"],FL=["textContent"],zg=c.defineComponent({__name:"BDNotFoundTemplate",props:{buttonText:{type:String}},emits:["navigate"],setup(n,{emit:e}){const t=n,{t:r}=qs(),o=c.computed(()=>t.buttonText||r("notFoundTemplate.buttonDefault")),s=c.computed(()=>r("notFoundTemplate.title")),i=c.computed(()=>r("notFoundTemplate.description")),l=()=>e("navigate");return(a,u)=>(c.openBlock(),c.createElementBlock("main",DL,[c.createVNode(ws,{class:"container-xl"},{default:c.withCtx(()=>[c.createElementVNode("div",RL,[c.createElementVNode("div",BL,[c.createVNode(wu),c.createElementVNode("h5",{textContent:c.toDisplayString(s.value)},null,8,PL),c.createElementVNode("p",{textContent:c.toDisplayString(i.value)},null,8,FL),c.createVNode(Qe,{onClick:l,variant:"primary",type:"button",textContent:c.toDisplayString(o.value)},null,8,["textContent"])])])]),_:1})]))}});var VL={exports:{}};(function(n,e){(function(t,r){n.exports=r(Bg)})(xu,function(t){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var o=r(t),s={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(i){return"["+i+(i===1||i===8||i>=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(s,null,!0),s})})(VL);var Ug={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(xu,function(){var t={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/,s=/\d\d/,i=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},u=function(v){return(v=+v)+(v>68?1900:2e3)},d=function(v){return function(C){this[v]=+C}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var b=C.match(/([+-]|\d\d)/g),E=60*b[1]+(+b[2]||0);return E===0?0:b[0]==="+"?-E:E}(v)}],h=function(v){var C=a[v];return C&&(C.indexOf?C:C.s.concat(C.f))},p=function(v,C){var b,E=a.meridiem;if(E){for(var y=1;y<=24;y+=1)if(v.indexOf(E(y,0,C))>-1){b=y>12;break}}else b=v===(C?"pm":"PM");return b},m={A:[l,function(v){this.afternoon=p(v,!1)}],a:[l,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:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,d("seconds")],ss:[i,d("seconds")],m:[i,d("minutes")],mm:[i,d("minutes")],H:[i,d("hours")],h:[i,d("hours")],HH:[i,d("hours")],hh:[i,d("hours")],D:[i,d("day")],DD:[s,d("day")],Do:[l,function(v){var C=a.ordinal,b=v.match(/\d+/);if(this.day=b[0],C)for(var E=1;E<=31;E+=1)C(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[i,d("week")],ww:[s,d("week")],M:[i,d("month")],MM:[s,d("month")],MMM:[l,function(v){var C=h("months"),b=(h("monthsShort")||C.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[l,function(v){var C=h("months").indexOf(v)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(v){this.year=u(v)}],YYYY:[/\d{4}/,d("year")],Z:f,ZZ:f};function g(v){var C,b;C=v,b=a&&a.formats;for(var E=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,V,z){var G=z&&z.toUpperCase();return V||b[z]||t[z]||b[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,K,W){return K||W.slice(1)})})).match(r),y=E.length,x=0;x<y;x+=1){var w=E[x],I=m[w],M=I&&I[0],L=I&&I[1];E[x]=L?{regex:M,parser:L}:w.replace(/^\[|\]$/g,"")}return function($){for(var V={},z=0,G=0;z<y;z+=1){var Y=E[z];if(typeof Y=="string")G+=Y.length;else{var K=Y.regex,W=Y.parser,J=$.slice(G),U=K.exec(J)[0];W.call(V,U),$=$.replace(U,"")}}return function(ee){var ne=ee.afternoon;if(ne!==void 0){var ce=ee.hours;ne?ce<12&&(ee.hours+=12):ce===12&&(ee.hours=0),delete ee.afternoon}}(V),V}}return function(v,C,b){b.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var E=C.prototype,y=E.parse;E.parse=function(x){var w=x.date,I=x.utc,M=x.args;this.$u=I;var L=M[1];if(typeof L=="string"){var $=M[2]===!0,V=M[3]===!0,z=$||V,G=M[2];V&&(G=M[2]),a=this.$locale(),!$&&G&&(a=b.Ls[G]),this.$d=function(J,U,ee,ne){try{if(["x","X"].indexOf(U)>-1)return new Date((U==="X"?1e3:1)*J);var ce=g(U)(J),me=ce.year,ve=ce.month,Te=ce.day,ke=ce.hours,Ne=ce.minutes,Ce=ce.seconds,D=ce.milliseconds,B=ce.zone,N=ce.week,R=new Date,A=Te||(me||ve?1:R.getDate()),T=me||R.getFullYear(),_=0;me&&!ve||(_=ve>0?ve-1:R.getMonth());var O,H=ke||0,j=Ne||0,Z=Ce||0,X=D||0;return B?new Date(Date.UTC(T,_,A,H,j,Z,X+60*B.offset*1e3)):ee?new Date(Date.UTC(T,_,A,H,j,Z,X)):(O=new Date(T,_,A,H,j,Z,X),N&&(O=ne(O).week(N).toDate()),O)}catch{return new Date("")}}(w,L,I,b),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),z&&w!=this.format(L)&&(this.$d=new Date("")),a={}}else if(L instanceof Array)for(var Y=L.length,K=1;K<=Y;K+=1){M[1]=L[K-1];var W=b.apply(this,M);if(W.isValid()){this.$d=W.$d,this.$L=W.$L,this.init();break}K===Y&&(this.$d=new Date(""))}else y.call(this,x)}}})})(Ug);var $L=Ug.exports;const zL=Nu($L);Yo.extend(zL);Yo.locale("nl");function UL(n,e=Yo().startOf("day")){const t="DD-MM-YYYY",r=Yo(n,t);if(r.isSame(e))return"vandaag";const s=e.subtract(1,"day");if(r.isSame(s))return"gister";const l=e.subtract(2,"day");if(r.isSame(l))return"eergister";const u=e.subtract(7,"day");if(r.isAfter(u)){const h="dddd";return r.format(h)}if(r.year()==e.year()){const h="D MMM";return r.format(h)}return r.format(t)}const HL={install:n=>{n.component("BDAlert",Ts),n.component("BDArticle",J1),n.component("BDAttachmentPreviewList",ol),n.component("BDBadge",K1),n.component("BDButton",Qe),n.component("BDCard",Fa),n.component("BDChangePasswordTemplate",$g),n.component("BDChatCloud",z2),n.component("BDCol",Lr),n.component("BDCollapsableCard",H1),n.component("BDContainer",ws),n.component("BDDropdown",Cd),n.component("BDDropdownItem",Oi),n.component("BDDropzone",q1),n.component("BDForm",Y1),n.component("BDFormCheckbox",Z1),n.component("BDFormInput",Hr),n.component("BDFormInvalidFeedback",Va),n.component("BDFormSelect",Q1),n.component("BDHeader",Ad),n.component("BDImageAttachmentModal",Lg),n.component("BDImageAttachmentPreviewList",sl),n.component("BDInputGroup",W1),n.component("BDLink",Zr),n.component("BDLogo",lu),n.component("BDMarkdownEditor",V2),n.component("BDMobileMenu",Ed),n.component("BDModal",ei),n.component("BDNotFoundTemplate",zg),n.component("BDPagination",G1),n.component("BDPhoneNumberEditModal",Dg),n.component("BDPill",$a),n.component("BDPractitionerHeader",Mg),n.component("BDProfileImage",Hs),n.component("BDRow",Dr),n.component("BDSessionTimeOutModal",Fg),n.component("BDTable",U2),n.component("BDToast",ku),n.component("BDUser",$2),n.component("BDUserInformation",_u),n.component("BDVideoCallToast",H2),n.component("BDZoomslider",Su),n.component("IconAcademy",Ni),n.component("IconArrowDown",Wp),n.component("IconArrowUp",Kp),n.component("IconAttachment",Jr),n.component("IconBold",cu),n.component("IconBulletList",uu),n.component("IconCalendar",Yp),n.component("IconCall",Ii),n.component("IconCallReject",du),n.component("IconCardView",Gp),n.component("IconCaretDown",fu),n.component("IconCaretLeft",hu),n.component("IconCaretRight",pu),n.component("IconCheck",Go),n.component("IconClipboard",Qp),n.component("IconClose",Da),n.component("IconComment",Zp),n.component("IconCommentActive",Jp),n.component("IconCommonFileEmpty",qp),n.component("IconCommonFileWarning",e1),n.component("IconCommentStatic",Xp),n.component("IconContactPerson",t1),n.component("IconCopy",n1),n.component("IconDelete",r1),n.component("IconDoubleCheck",o1),n.component("IconDownloadImage",mu),n.component("IconEdit",s1),n.component("IconEndCall",i1),n.component("IconError",Ra),n.component("IconExternal",a1),n.component("IconEyeShow",l1),n.component("IconEyeSlash",c1),n.component("IconFile",gu),n.component("IconFileAdded",u1),n.component("IconForward",d1),n.component("IconHix",f1),n.component("IconHyperlink",Ba),n.component("IconImageFileLandscape",h1),n.component("IconImageFileWarning",p1),n.component("IconInfo",so),n.component("IconInformationCircle",m1),n.component("IconItalic",vu),n.component("IconListView",g1),n.component("IconLock",v1),n.component("IconLusciiEscalated",y1),n.component("IconLusciiLogo",E1),n.component("IconLusciiOpen",C1),n.component("IconLusciiPriorityHigh",A1),n.component("IconLusciiPriorityLow",b1),n.component("IconLusciiPriorityMedium",w1),n.component("IconMenu",yu),n.component("IconMessage",T1),n.component("IconMessageForward",S1),n.component("IconMicrophoneSlash",k1),n.component("IconMicrosoftTeams",_1),n.component("IconMin",x1),n.component("IconOrderedList",Eu),n.component("IconPlus",N1),n.component("IconRefresh",I1),n.component("IconRemove",Us),n.component("IconSananetLogo",M1),n.component("IconService",O1),n.component("IconShareScreen",L1),n.component("IconSingleNeutral",D1),n.component("IconSort",R1),n.component("IconSortAsc",Cu),n.component("IconSortDesc",Au),n.component("IconSortNone",bu),n.component("IconTriangleDown",B1),n.component("IconTriangleExclamation",wu),n.component("IconUnderline",Tu),n.component("IconVideoDisabled",F1),n.component("IconVideocall",P1),n.component("IconZorgkaart",V1),n.directive("vBDTooltip",Xs)}};exports.BDAlert=Ts;exports.BDArticle=J1;exports.BDAttachmentPreviewList=ol;exports.BDBadge=K1;exports.BDButton=Qe;exports.BDCard=Fa;exports.BDChangePasswordTemplate=$g;exports.BDChatCloud=z2;exports.BDCol=Lr;exports.BDCollapsableCard=H1;exports.BDContainer=ws;exports.BDDropdown=Cd;exports.BDDropdownItem=Oi;exports.BDDropzone=q1;exports.BDForm=Y1;exports.BDFormCheckbox=Z1;exports.BDFormInput=Hr;exports.BDFormInvalidFeedback=Va;exports.BDFormSelect=Q1;exports.BDHeader=Ad;exports.BDImageAttachmentModal=Lg;exports.BDImageAttachmentPreviewList=sl;exports.BDInputGroup=W1;exports.BDLink=Zr;exports.BDLogo=lu;exports.BDMarkdownEditor=V2;exports.BDMobileMenu=Ed;exports.BDModal=ei;exports.BDNotFoundTemplate=zg;exports.BDPagination=G1;exports.BDPhoneNumberEditModal=Dg;exports.BDPill=$a;exports.BDPractitionerHeader=Mg;exports.BDProfileImage=Hs;exports.BDRow=Dr;exports.BDSessionTimeOutModal=Fg;exports.BDTable=U2;exports.BDToast=ku;exports.BDUser=$2;exports.BDUserInformation=_u;exports.BDVideoCallToast=H2;exports.BDZoomslider=Su;exports.IconAcademy=Ni;exports.IconArrowDown=Wp;exports.IconArrowUp=Kp;exports.IconAttachment=Jr;exports.IconBold=cu;exports.IconBulletList=uu;exports.IconCalendar=Yp;exports.IconCall=Ii;exports.IconCallReject=du;exports.IconCardView=Gp;exports.IconCaretDown=fu;exports.IconCaretLeft=hu;exports.IconCaretRight=pu;exports.IconCheck=Go;exports.IconClipboard=Qp;exports.IconClose=Da;exports.IconComment=Zp;exports.IconCommentActive=Jp;exports.IconCommentStatic=Xp;exports.IconCommonFileEmpty=qp;exports.IconCommonFileWarning=e1;exports.IconContactPerson=t1;exports.IconCopy=n1;exports.IconDelete=r1;exports.IconDoubleCheck=o1;exports.IconDownloadImage=mu;exports.IconEdit=s1;exports.IconEndCall=i1;exports.IconError=Ra;exports.IconExternal=a1;exports.IconEyeShow=l1;exports.IconEyeSlash=c1;exports.IconFile=gu;exports.IconFileAdded=u1;exports.IconForward=d1;exports.IconHix=f1;exports.IconHyperlink=Ba;exports.IconImageFileLandscape=h1;exports.IconImageFileWarning=p1;exports.IconInfo=so;exports.IconInformationCircle=m1;exports.IconItalic=vu;exports.IconListView=g1;exports.IconLock=v1;exports.IconLusciiEscalated=y1;exports.IconLusciiLogo=E1;exports.IconLusciiOpen=C1;exports.IconLusciiPriorityHigh=A1;exports.IconLusciiPriorityLow=b1;exports.IconLusciiPriorityMedium=w1;exports.IconMenu=yu;exports.IconMessage=T1;exports.IconMessageForward=S1;exports.IconMicrophoneSlash=k1;exports.IconMicrosoftTeams=_1;exports.IconMin=x1;exports.IconOrderedList=Eu;exports.IconPlus=N1;exports.IconRefresh=I1;exports.IconRemove=Us;exports.IconSananetLogo=M1;exports.IconService=O1;exports.IconShareScreen=L1;exports.IconSingleNeutral=D1;exports.IconSort=R1;exports.IconSortAsc=Cu;exports.IconSortDesc=Au;exports.IconSortNone=bu;exports.IconTriangleDown=B1;exports.IconTriangleExclamation=wu;exports.IconUnderline=Tu;exports.IconVideoDisabled=F1;exports.IconVideocall=P1;exports.IconZorgkaart=V1;exports.default=HL;exports.getDisplayDate=UL;exports.useModal=ml;exports.usePopover=Ig;exports.useServerErrors=Id;exports.useSessionTimeOut=Pg;exports.useToaster=gl;exports.useValidation=Vg;exports.useWindow=Nd;exports.useZoom=Og;exports.vBdTooltip=Xs;