@opengis/admin 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-page-BITdPM_Q.js → add-page-Br1zSsnM.js} +1 -1
- package/dist/{admin-interface-B4lFdAo2.js → admin-interface-DxaFriP4.js} +1 -1
- package/dist/{admin-view-BBfaVOCs.js → admin-view-BTWK_4_H.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +1 -1
- package/dist/{card-view-Cl_Fctq9.js → card-view-DKf8gKcK.js} +1 -1
- package/dist/{edit-page-xZRumD1s.js → edit-page-BsyDcEBt.js} +1 -1
- package/dist/{import-file-bNbV7TKQ.js → import-file-CjiK4lv2.js} +8 -8
- package/dist/{profile-page-D0qkXqbP.js → profile-page-BXiut9Px.js} +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/admin.umd.cjs
CHANGED
@@ -734,7 +734,7 @@ img.ProseMirror-separator {
|
|
734
734
|
|
735
735
|
`);return!s||!a?!1:t.chain().command(({tr:o})=>(o.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:i,empty:s}=n;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const o=i.after();return o===void 0?!1:r.nodeAt(o)?t.commands.command(({tr:g})=>(g.setSelection(on.near(r.resolve(o))),!0)):t.commands.exitCode()}}},addInputRules(){return[U_({find:hU,type:this.type,getAttributes:t=>({language:t[1]})}),U_({find:fU,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ni({key:new Xi("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!n||!s)return!1;const{tr:a,schema:o}=t.state,p=o.text(n.replace(/\r\n?/g,`
|
736
736
|
`));return a.replaceSelectionWith(this.type.create({language:s},p)),a.selection.$from.parent.type!==this.type&&a.setSelection(Zt.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta("paste",!0),t.dispatch(a),!0}}})]}}),pU=Hs.create({name:"doc",topNode:!0,content:"block+"});function mU(t={}){return new ni({view(e){return new gU(e,t)}})}class gU{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=a=>{this[i](a)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let o=e.nodeBefore,p=e.nodeAfter;if(o||p){let g=this.editorView.nodeDOM(this.cursorPos-(o?o.nodeSize:0));if(g){let y=g.getBoundingClientRect(),v=o?y.bottom:y.top;o&&p&&(v=(v+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:y.left,right:y.right,top:v-this.width/2,bottom:v+this.width/2}}}}if(!r){let o=this.editorView.coordsAtPos(this.cursorPos);r={left:o.left-this.width/2,right:o.left+this.width/2,top:o.top,bottom:o.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,a;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,a=-pageYOffset;else{let o=i.getBoundingClientRect();s=o.left-i.scrollLeft,a=o.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let o=mS(this.editorView.state.doc,a,this.editorView.dragging.slice);o!=null&&(a=o)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const yU=Ur.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[mU(this.options)]}});class yr extends on{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return yr.valid(r)?new yr(r):on.near(r)}content(){return gt.empty}eq(e){return e instanceof yr&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new yr(e.resolve(n.pos))}getBookmark(){return new lx(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!bU(e)||!_U(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&yr.valid(e))return e;let i=e.pos,s=null;for(let a=e.depth;;a--){let o=e.node(a);if(n>0?e.indexAfter(a)<o.childCount:e.index(a)>0){s=o.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=n;let p=e.doc.resolve(i);if(yr.valid(p))return p}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!Lt.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=a,i+=n;let o=e.doc.resolve(i);if(yr.valid(o))return o}return null}}}yr.prototype.visible=!1,yr.findFrom=yr.findGapCursorFrom,on.jsonID("gapcursor",yr);class lx{constructor(e){this.pos=e}map(e){return new lx(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return yr.valid(n)?new yr(n):on.near(n)}}function bU(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function _U(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function xU(){return new ni({props:{decorations:EU,createSelectionBetween(t,e,n){return e.pos==n.pos&&yr.valid(n)?new yr(n):null},handleClick:wU,handleKeyDown:vU,handleDOMEvents:{beforeinput:kU}}})}const vU=$C({ArrowLeft:_g("horiz",-1),ArrowRight:_g("horiz",1),ArrowUp:_g("vert",-1),ArrowDown:_g("vert",1)});function _g(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let a=r.selection,o=e>0?a.$to:a.$from,p=a.empty;if(a instanceof Zt){if(!s.endOfTextblock(n)||o.depth==0)return!1;p=!1,o=r.doc.resolve(e>0?o.after():o.before())}let g=yr.findGapCursorFrom(o,e,p);return g?(i&&i(r.tr.setSelection(new yr(g))),!0):!1}}function wU(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!yr.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Lt.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new yr(r))),!0)}function kU(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof yr))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=Ue.empty;for(let a=r.length-1;a>=0;a--)i=Ue.from(r[a].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new gt(i,0,0));return s.setSelection(Zt.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function EU(t){if(!(t.selection instanceof yr))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",Ar.create(t.doc,[ms.widget(t.selection.head,e,{key:"gapcursor"})])}const SU=Ur.create({name:"gapCursor",addProseMirrorPlugins(){return[xU()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pn(St(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),CU=Hs.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",Er(this.options.HTMLAttributes,t)]},renderText(){return`
|
737
|
-
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,p=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:g,dispatch:y})=>{if(y&&p&&a){const v=p.filter(E=>o.includes(E.type.name));g.ensureMarks(v)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),TU=Hs.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Er(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>U_({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var xg=200,Wr=function(){};Wr.prototype.append=function(e){return e.length?(e=Wr.from(e),!this.length&&e||e.length<xg&&this.leafAppend(e)||this.length<xg&&e.leafPrepend(this)||this.appendInner(e)):this},Wr.prototype.prepend=function(e){return e.length?Wr.from(e).append(this):this},Wr.prototype.appendInner=function(e){return new AU(this,e)},Wr.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Wr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Wr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Wr.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Wr.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i},Wr.from=function(e){return e instanceof Wr?e:e&&e.length?new hA(e):Wr.empty};var hA=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,o){for(var p=s;p<a;p++)if(i(this.values[p],o+p)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,o){for(var p=s-1;p>=a;p--)if(i(this.values[p],o+p)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=xg)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=xg)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Wr);Wr.empty=new hA([]);var AU=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,a){var o=this.left.length;if(i<o&&this.left.forEachInner(r,i,Math.min(s,o),a)===!1||s>o&&this.right.forEachInner(r,Math.max(i-o,0),Math.min(this.length,s)-o,a+o)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var o=this.left.length;if(i>o&&this.right.forEachInvertedInner(r,i-o,Math.max(s,o)-o,a+o)===!1||s<o&&this.left.forEachInvertedInner(r,Math.min(i,o),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Wr);const MU=500;class lo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=e.tr,o,p,g=[],y=[];return this.items.forEach((v,E)=>{if(!v.step){i||(i=this.remapping(r,E+1),s=i.maps.length),s--,y.push(v);return}if(i){y.push(new Po(v.map));let T=v.step.map(i.slice(s)),D;T&&a.maybeStep(T).doc&&(D=a.mapping.maps[a.mapping.maps.length-1],g.push(new Po(D,void 0,void 0,g.length+y.length))),s--,D&&i.appendMap(D,s)}else a.maybeStep(v.step);if(v.selection)return o=i?v.selection.map(i.slice(s)):v.selection,p=new lo(this.items.slice(0,r).append(y.reverse().concat(g)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:a,selection:o}}addTransform(e,n,r,i){let s=[],a=this.eventCount,o=this.items,p=!i&&o.length?o.get(o.length-1):null;for(let y=0;y<e.steps.length;y++){let v=e.steps[y].invert(e.docs[y]),E=new Po(e.mapping.maps[y],v,n),T;(T=p&&p.merge(E))&&(E=T,y?s.pop():o=o.slice(0,o.length-1)),s.push(E),n&&(a++,n=void 0),i||(p=E)}let g=a-r.depth;return g>IU&&(o=DU(o,g),a-=g),new lo(o.append(s),a)}remapping(e,n){let r=new Cu;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Po(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,o=this.eventCount;this.items.forEach(E=>{E.selection&&o--},i);let p=n;this.items.forEach(E=>{let T=s.getMirror(--p);if(T==null)return;a=Math.min(a,T);let D=s.maps[T];if(E.step){let N=e.steps[T].invert(e.docs[T]),B=E.selection&&E.selection.map(s.slice(p+1,T));B&&o++,r.push(new Po(D,N,B))}else r.push(new Po(D))},i);let g=[];for(let E=n;E<a;E++)g.push(new Po(s.maps[E]));let y=this.items.slice(0,i).append(g).append(r),v=new lo(y,o);return v.emptyItemCount()>MU&&(v=v.compress(this.items.length-r.length)),v}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((a,o)=>{if(o>=e)i.push(a),a.selection&&s++;else if(a.step){let p=a.step.map(n.slice(r)),g=p&&p.getMap();if(r--,g&&n.appendMap(g,r),p){let y=a.selection&&a.selection.map(n.slice(r));y&&s++;let v=new Po(g.invert(),p,y),E,T=i.length-1;(E=i.length&&i[T].merge(v))?i[T]=E:i.push(v)}}else a.map&&r--},this.items.length,0),new lo(Wr.from(i.reverse()),s)}}lo.empty=new lo(Wr.empty,0);function DU(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Po{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Po(n.getMap().invert(),n,this.selection)}}}class rl{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const IU=20;function PU(t,e,n,r){let i=n.getMeta(xc),s;if(i)return i.historyState;n.getMeta(OU)&&(t=new rl(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(xc))return a.getMeta(xc).redo?new rl(t.done.addTransform(n,void 0,r,vg(e)),t.undone,fA(n.mapping.maps),t.prevTime,t.prevComposition):new rl(t.done,t.undone.addTransform(n,void 0,r,vg(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let o=n.getMeta("composition"),p=t.prevTime==0||!a&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!NU(n,t.prevRanges)),g=a?cx(t.prevRanges,n.mapping):fA(n.mapping.maps);return new rl(t.done.addTransform(n,p?e.selection.getBookmark():void 0,r,vg(e)),lo.empty,g,n.time,o??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rl(t.done.rebased(n,s),t.undone.rebased(n,s),cx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rl(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),cx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function NU(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function fA(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function cx(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function RU(t,e,n){let r=vg(e),i=xc.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),o=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),p=new rl(n?o:s.remaining,n?s.remaining:o,null,0,-1);return s.transform.setSelection(a).setMeta(xc,{redo:n,historyState:p})}let ux=!1,pA=null;function vg(t){let e=t.plugins;if(pA!=e){ux=!1,pA=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){ux=!0;break}}return ux}const xc=new Xi("history"),OU=new Xi("closeHistory");function BU(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ni({key:xc,state:{init(){return new rl(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PU(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?gA:r=="historyRedo"?yA:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function mA(t,e){return(n,r)=>{let i=xc.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=RU(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const gA=mA(!1,!0),yA=mA(!0,!0),VU=Ur.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>gA(t,e),redo:()=>({state:t,dispatch:e})=>yA(t,e)}},addProseMirrorPlugins(){return[BU(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),zU=Hs.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Er(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):yT(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:o})=>{var p;if(o){const{$to:g}=a.selection,y=g.end();if(g.nodeAfter)g.nodeAfter.isTextblock?a.setSelection(Zt.create(a.doc,g.pos+1)):g.nodeAfter.isBlock?a.setSelection(Lt.create(a.doc,g.pos)):a.setSelection(Zt.create(a.doc,g.pos));else{const v=(p=g.parent.type.contentMatch.defaultType)===null||p===void 0?void 0:p.create();v&&(a.insert(y,v),a.setSelection(Zt.create(a.doc,y+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[m7({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),LU=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,FU=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,$U=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,jU=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,HU=Ao.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Fu({find:LU,type:this.type}),Fu({find:$U,type:this.type})]},addPasteRules(){return[$u({find:FU,type:this.type}),$u({find:jU,type:this.type})]}}),UU=Hs.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Er(this.options.HTMLAttributes,t),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)}}}),WU="listItem",bA="textStyle",_A=/^(\d+)\.\s$/,qU=Hs.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Er(this.options.HTMLAttributes,n),0]:["ol",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(WU,this.editor.getAttributes(bA)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Gh({find:_A,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gh({find:_A,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(bA)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),GU=Hs.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),YU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,ZU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,XU=Ao.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Fu({find:YU,type:this.type})]},addPasteRules(){return[$u({find:ZU,type:this.type})]}}),xA=Hs.create({name:"text",group:"inline"}),KU=Ur.create({name:"starterKit",addExtensions(){var t,e,n,r,i,s,a,o,p,g,y,v,E,T,D,N,B,V;const U=[];return this.options.bold!==!1&&U.push(oU.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&U.push(tU.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&U.push(lU.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&U.push(dU.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&U.push(dA.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&U.push(pU.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&U.push(yU.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&U.push(SU.configure((o=this.options)===null||o===void 0?void 0:o.gapcursor)),this.options.hardBreak!==!1&&U.push(CU.configure((p=this.options)===null||p===void 0?void 0:p.hardBreak)),this.options.heading!==!1&&U.push(TU.configure((g=this.options)===null||g===void 0?void 0:g.heading)),this.options.history!==!1&&U.push(VU.configure((y=this.options)===null||y===void 0?void 0:y.history)),this.options.horizontalRule!==!1&&U.push(zU.configure((v=this.options)===null||v===void 0?void 0:v.horizontalRule)),this.options.italic!==!1&&U.push(HU.configure((E=this.options)===null||E===void 0?void 0:E.italic)),this.options.listItem!==!1&&U.push(UU.configure((T=this.options)===null||T===void 0?void 0:T.listItem)),this.options.orderedList!==!1&&U.push(qU.configure((D=this.options)===null||D===void 0?void 0:D.orderedList)),this.options.paragraph!==!1&&U.push(GU.configure((N=this.options)===null||N===void 0?void 0:N.paragraph)),this.options.strike!==!1&&U.push(XU.configure((B=this.options)===null||B===void 0?void 0:B.strike)),this.options.text!==!1&&U.push(xA.configure((V=this.options)===null||V===void 0?void 0:V.text)),U}}),JU=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,i;const s=n.getAttribute("style"),a=(i=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");n.setAttribute("style",`${a};${s}`)})},QU=Ao.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&JU(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(s=>!!s))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),e9=Ur.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function t9(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:o}=t,p=r&&!i,g=g7(n),y=new RegExp(`\\s${g}$`),v=a?"^":"",E=i?"":g,T=p?new RegExp(`${v}${g}.*?(?=\\s${E}|$)`,"gm"):new RegExp(`${v}(?:^)?${g}[^\\s${E}]*`,"gm"),D=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!D)return null;const N=o.pos-D.length,B=Array.from(D.matchAll(T)).pop();if(!B||B.input===void 0||B.index===void 0)return null;const V=B.input.slice(Math.max(0,B.index-1),B.index),U=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(V);if(s!==null&&!U)return null;const K=N+B.index;let Y=K+B[0].length;return p&&y.test(D.slice(Y-1,Y+1))&&(B[0]+=" ",Y+=1),K<o.pos&&Y>=o.pos?{range:{from:K,to:Y},query:B[0].slice(n.length),text:B[0]}:null}const n9=new Xi("suggestion");function r9({pluginKey:t=n9,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:o="span",decorationClass:p="suggestion",command:g=()=>null,items:y=()=>[],render:v=()=>({}),allow:E=()=>!0,findSuggestionMatch:T=t9}){let D;const N=v==null?void 0:v(),B=new ni({key:t,view(){return{update:async(V,U)=>{var K,Y,we,ye,Te,Re,Ne;const Ye=(K=this.key)===null||K===void 0?void 0:K.getState(U),qe=(Y=this.key)===null||Y===void 0?void 0:Y.getState(V.state),he=Ye.active&&qe.active&&Ye.range.from!==qe.range.from,it=!Ye.active&&qe.active,Ct=Ye.active&&!qe.active,Ft=!it&&!Ct&&Ye.query!==qe.query,Bt=it||he&&Ft,It=Ft||he,Ut=Ct||he&&Ft;if(!Bt&&!It&&!Ut)return;const Kt=Ut&&!Bt?Ye:qe,an=V.dom.querySelector(`[data-decoration-id="${Kt.decorationId}"]`);D={editor:e,range:Kt.range,query:Kt.query,text:Kt.text,items:[],command:Xt=>g({editor:e,range:Kt.range,props:Xt}),decorationNode:an,clientRect:an?()=>{var Xt;const{decorationId:rn}=(Xt=this.key)===null||Xt===void 0?void 0:Xt.getState(e.state),wn=V.dom.querySelector(`[data-decoration-id="${rn}"]`);return(wn==null?void 0:wn.getBoundingClientRect())||null}:null},Bt&&((we=N==null?void 0:N.onBeforeStart)===null||we===void 0||we.call(N,D)),It&&((ye=N==null?void 0:N.onBeforeUpdate)===null||ye===void 0||ye.call(N,D)),(It||Bt)&&(D.items=await y({editor:e,query:Kt.query})),Ut&&((Te=N==null?void 0:N.onExit)===null||Te===void 0||Te.call(N,D)),It&&((Re=N==null?void 0:N.onUpdate)===null||Re===void 0||Re.call(N,D)),Bt&&((Ne=N==null?void 0:N.onStart)===null||Ne===void 0||Ne.call(N,D))},destroy:()=>{var V;D&&((V=N==null?void 0:N.onExit)===null||V===void 0||V.call(N,D))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(V,U,K,Y){const{isEditable:we}=e,{composing:ye}=e.view,{selection:Te}=V,{empty:Re,from:Ne}=Te,Ye={...U};if(Ye.composing=ye,we&&(Re||e.view.composing)){(Ne<U.range.from||Ne>U.range.to)&&!ye&&!U.composing&&(Ye.active=!1);const qe=T({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:Te.$from}),he=`id_${Math.floor(Math.random()*4294967295)}`;qe&&E({editor:e,state:Y,range:qe.range,isActive:U.active})?(Ye.active=!0,Ye.decorationId=U.decorationId?U.decorationId:he,Ye.range=qe.range,Ye.query=qe.query,Ye.text=qe.text):Ye.active=!1}else Ye.active=!1;return Ye.active||(Ye.decorationId=null,Ye.range={from:0,to:0},Ye.query=null,Ye.text=null),Ye}},props:{handleKeyDown(V,U){var K;const{active:Y,range:we}=B.getState(V.state);return Y&&((K=N==null?void 0:N.onKeyDown)===null||K===void 0?void 0:K.call(N,{view:V,event:U,range:we}))||!1},decorations(V){const{active:U,range:K,decorationId:Y}=B.getState(V);return U?Ar.create(V.doc,[ms.inline(K.from,K.to,{nodeName:o,class:p,"data-decoration-id":Y})]):null}}});return B}const i9=new Xi("mention"),s9=Hs.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var n;return`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var n;return["span",Er(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`]},suggestion:{char:"@",pluginKey:i9,command:({editor:t,range:e,props:n})=>{var r,i,s;const a=t.view.state.selection.$to.nodeAfter;((r=a==null?void 0:a.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(s=(i=t.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||s===void 0||s.collapseToEnd()},allow:({state:t,range:e})=>{const n=t.doc.resolve(e.from),r=t.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Er({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const n={...this.options};n.HTMLAttributes=Er({"data-type":this.name},this.options.HTMLAttributes,e);const r=this.options.renderHTML({options:n,node:t});return typeof r=="string"?["span",Er({"data-type":this.name},this.options.HTMLAttributes,e),r]:r},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(a,o)=>{if(a.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",o,o+a.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[r9({editor:this.editor,...this.options.suggestion})]}}),o9=Ao.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),a9={props:{editor:Object},methods:{toggleBlockquote(){this.editor&&this.editor.chain().toggleBlockquote().run()}}};function l9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBlockquote&&s.toggleBlockquote(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M6 6a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a3 3 0 0 1-3 3H5a1 1 0 1 0 0 2h1a5 5 0 0 0 5-5V8a2 2 0 0 0-2-2H6Zm9 0a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1a5 5 0 0 0 5-5V8a2 2 0 0 0-2-2h-3Z"})],-1)]))}const c9=Fe(a9,[["render",l9]]),u9={props:{editor:Object},methods:{toggleBulletList(){this.editor&&this.editor.chain().focus().toggleBulletList().run()}}};function d9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBulletList&&s.toggleBulletList(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"M9 8h10M9 12h10M9 16h10M4.99 8H5m-.02 4h.01m0 4H5"})],-1)]))}const h9=Fe(u9,[["render",d9]]),f9={props:{editor:Object},methods:{toggleOrderedList(){this.editor&&this.editor.chain().focus().toggleOrderedList().run()}}};function p9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleOrderedList&&s.toggleOrderedList(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6h8m-8 6h8m-8 6h8M4 16a2 2 0 1 1 3.321 1.5L4 20h5M4 5l2-1v6m-2 0h4"})],-1)]))}const m9=Fe(f9,[["render",p9]]),g9={props:{editor:Object},methods:{toggleCodeBlock(){this.editor&&this.editor.chain().focus().toggleCodeBlock().run()}}};function y9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleCodeBlock&&s.toggleCodeBlock(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 8-4 4 4 4m8 0 4-4-4-4m-2-3-4 14"})],-1)]))}const b9=Fe(g9,[["render",y9]]),_9={props:{editor:Object},methods:{toggleBold(){this.editor&&this.editor.chain().toggleBold().run()}}};function x9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBold&&s.toggleBold(...a)),class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("bold")}])},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5h4.5a3.5 3.5 0 1 1 0 7H8m0-7v7m0-7H6m2 7h6.5a3.5 3.5 0 1 1 0 7H8m0-7v7m0 0H6"})],-1),d.createElementVNode("span",{class:"sr-only"},"Bold",-1)]),2)}const v9=Fe(_9,[["render",x9]]),w9={props:{editor:Object},methods:{toggleItalic(){this.editor&&this.editor.chain().toggleItalic().run()}}};function k9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleItalic&&s.toggleItalic(...a)),class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("italic")}])},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8.874 19 6.143-14M6 19h6.33m-.66-14H18"})],-1),d.createElementVNode("span",{class:"sr-only"},"Italic",-1)]),2)}const E9=Fe(w9,[["render",k9]]),S9={},C9={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function T9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",C9,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"M9 19.2H5.5c-.3 0-.5-.2-.5-.5V16c0-.2.2-.4.5-.4h13c.3 0 .5.2.5.4v2.7c0 .3-.2.5-.5.5H18m-6-1 1.4 1.8h.2l1.4-1.7m-7-5.4L12 4c0-.1 0-.1 0 0l4 8.8m-6-2.7h4m-7 2.7h2.5m5 0H17"},null,-1)]))}const A9={components:{IconA:Fe(S9,[["render",T9]])},props:{editor:Object},data(){return{color:"#000000",colors:["#000000","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{setColor(t){this.editor&&(this.editor.chain().focus().setColor(t).run(),this.$refs.popover.togglePopover(),this.color=t)}}},M9={class:"relative flex"},D9={class:"flex w-[160px] flex-wrap gap-[4px]"},I9=["onClick"];function P9(t,e,n,r,i,s){const a=d.resolveComponent("IconA"),o=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(o,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",M9,[d.createVNode(a,{height:"20",width:"20",class:"text-gray-500"}),d.createElementVNode("span",{class:"absolute h-[4px] w-[80%] bottom-[2px] left-[2px]",style:d.normalizeStyle({backgroundColor:i.color})},null,4)])]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("ul",D9,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.colors,p=>(d.openBlock(),d.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:d.normalizeStyle({backgroundColor:p}),onClick:g=>s.setColor(p),key:p},null,12,I9))),128))])])]),_:1},512)}const N9=Fe(A9,[["render",P9]]),R9={},O9={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"};function B9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",O9,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),d.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),d.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const wg=Fe(R9,[["render",B9]]),V9={components:{IconMore:wg},props:{editor:Object},methods:{toggleUnderline(){this.$refs.popover.togglePopover(),this.editor&&this.editor.chain().focus().toggleUnderline().run()},toggleStrike(){this.$refs.popover.togglePopover(),this.editor&&this.editor.chain().focus().toggleStrike().run()}}};function z9(t,e,n,r,i,s){const a=d.resolveComponent("IconMore"),o=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(o,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",{class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("underline")||n.editor.isActive("strike")}])},[d.createVNode(a,{height:"18",width:"18",class:"rotate-90"})],2)]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.toggleUnderline&&s.toggleUnderline(...p)),class:d.normalizeClass(["p-[8px] block rounded-lg w-[140px] mb-[4px] text-start hover:bg-gray-100 !duration-300 underline underline-offset-1",{"bg-gray-100 text-gray-900":n.editor.isActive("underline")}])}," Підкресленний ",2),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>s.toggleStrike&&s.toggleStrike(...p)),class:d.normalizeClass(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300 line-through",{"bg-gray-100 text-gray-900":n.editor.isActive("strike")}])}," Перекресленний ",2)])]),_:1},512)}const L9={bold:v9,italic:E9,text_more:Fe(V9,[["render",z9]]),color:N9,bullet_list:h9,ordered_list:m9,blockquote:c9,codeblock:b9},F9={components:{EditorContent:QH},props:{controls:{type:Array,default:()=>["bold","italic","color","blockquote","bullet_list","ordered_list","codeblock","text_more"]},options:{type:Array,default:()=>[]},modelValue:{type:String,default:()=>""}},data(){return{editor:null}},computed:{controlsList(){return Object.entries(L9).filter(([t])=>this.controls.includes(t)).map(([t,e])=>e)}},watch:{modelValue(t){this.editor&&this.editor.getHTML()!==t&&this.editor.commands.setContent(t)},editor(t){t&&this.editor.on("update",({editor:e})=>{const n=e.getHTML();n!==this.modelValue&&this.$emit("update:modelValue",n)})}},mounted(){this.editor&&this.editor.destroy(),this.initEditor()},beforeDestroy(){this.editor&&this.editor.destroy()},methods:{initEditor(){this.editor=new JH({content:this.modelValue,extensions:[KU,dA,QU,e9,o9,xA,s9.configure({HTMLAttributes:{class:"mention"},suggestion:{items:({query:t})=>{var n;const e=(n=this.options)==null?void 0:n.filter(r=>{var i,s;return(s=(i=r==null?void 0:r.email)==null?void 0:i.toLowerCase())==null?void 0:s.includes(t==null?void 0:t.toLowerCase())}).slice(0,5);return e.length?e:[{id:null,text:"Данні відсутні",email:null}]},render:()=>{let t,e;return{onStart:n=>{var s;t=document.createElement("div"),t.className="mention-popup",(s=n.items)==null||s.forEach(a=>{const o=document.createElement("div");o.className="mention-option",a.id===null?(o.textContent=a.text,o.style.pointerEvents="none",o.style.color="#999"):(o.textContent=a.text,o.addEventListener("click",()=>{n.command({id:a.id,label:a.email})})),t.appendChild(o)}),document.body.appendChild(t);const{from:r}=n.range,i=n.editor.view.coordsAtPos(r);t.style.position="absolute",t.style.left=`${i.left}px`,t.style.top=`${i.top-t.offsetHeight}px`,e=t},onUpdate:n=>{var s;for(;t.firstChild;)t.removeChild(t.firstChild);(s=n.items)==null||s.forEach(a=>{const o=document.createElement("div");o.className="mention-option",a.id===null?(o.textContent=a.text,o.style.pointerEvents="none",o.style.color="#999"):(o.textContent=a.text,o.addEventListener("click",()=>{n.command({id:a.id,label:a.email})})),t.appendChild(o)});const{from:r}=n.range,i=n.editor.view.coordsAtPos(r);t.style.left=`${i.left}px`,t.style.top=`${i.top-t.offsetHeight}px`},onExit:()=>{e&&e.remove()}}}}})]})},focusEditor(){this.editor&&!this.editor.isFocused&&this.editor.commands.focus()}}},$9={class:"w-full border border-gray-200 rounded-lg editor-container bg-gray-50 dark:bg-gray-700 dark:border-gray-600"},j9={key:0,class:"flex flex-wrap items-center w-full gap-2 px-3 py-2 border-b editor-toolbar dark:border-gray-600"};function H9(t,e,n,r,i,s){const a=d.resolveComponent("EditorContent");return d.openBlock(),d.createElementBlock("div",$9,[i.editor?(d.openBlock(),d.createElementBlock("div",j9,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.controlsList,(o,p)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(o),{key:p,editor:i.editor},null,8,["editor"]))),128))])):d.createCommentVNode("",!0),d.createElementVNode("div",{onClick:e[0]||(e[0]=(...o)=>s.focusEditor&&s.focusEditor(...o)),class:"relative w-full px-4 py-2 bg-white rounded-b-lg editor-content dark:bg-gray-800"},[d.createVNode(a,{editor:i.editor,class:"relative w-full"},null,8,["editor"])])])}const vA=Fe(F9,[["render",H9]]),U9={components:{VsTextEditor:vA},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""},options:Array},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,hovered:!1,windowWidth:null,textareaValue:""}},computed:{isElementVisible(){return this.windowWidth>=600?this.hovered:!0},isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const t=new Date(this.comment.cdate);return new Intl.DateTimeFormat("uk-UA",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(t)}catch{return""}}},mounted(){window.addEventListener("resize",this.updateWindowWidth)},beforeDestroy(){window.removeEventListener("resize",this.updateWindowWidth)},watch:{isOpen(t){t&&(this.textareaValue=this.comment.body)}},methods:{updateWindowWidth(){this.windowWidth=typeof window>"u"?null:window==null?void 0:window.innerWidth},confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await je.post(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isOpen=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},openEditModal(){document.body.click(),this.isOpen=!0},async deleteComment(){try{await je.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},W9={class:"relativen group-last:after:hidden after:absolute after:top-7 after:bottom-1 after:start-3 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700"},q9={class:"relative flex items-center justify-center overflow-hidden rounded-full size-6"},G9=["src"],Y9={key:1,class:"flex shrink-0 justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-400"},Z9={class:"w-full"},X9={class:"flex w-full justify-between -mt-[5px]"},K9={class:"flex items-center"},J9={class:"text-sm font-semibold text-gray-800 dark:text-neutral-200"},Q9={class:"text-xs text-gray-400 ms-1 dark:text-neutral-500"},eW={class:"min-h-[32px]"},tW={class:"p-0.5 inline-flex items-center gap-x-0.5 bg-white border border-gray-200 shadow-sm rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},nW=["innerHTML"],rW={class:"flex flex-col gap-[8px] p-[10px] text-sm font-medium text-gray-500"},iW={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function sW(t,e,n,r,i,s){var p,g;const a=d.resolveComponent("VsTextEditor"),o=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{class:"group relative w-full flex gap-x-3.5",onMouseenter:e[2]||(e[2]=y=>i.hovered=!0),onMouseleave:e[3]||(e[3]=y=>i.hovered=!1)},[d.createElementVNode("div",W9,[d.createElementVNode("div",q9,[n.comment.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"object-cover shrink-0",src:n.comment.avatar,alt:"Avatar"},null,8,G9)):(d.openBlock(),d.createElementBlock("span",Y9,d.toDisplayString((p=n.comment.username)==null?void 0:p.charAt(0)),1))])]),d.createElementVNode("div",Z9,[d.createElementVNode("span",X9,[d.createElementVNode("div",K9,[d.createElementVNode("span",J9,d.toDisplayString((g=n.comment)==null?void 0:g.username),1),d.createElementVNode("span",Q9,d.toDisplayString(s.createDate),1)]),d.createElementVNode("div",eW,[d.withDirectives(d.createElementVNode("div",tW,[d.createElementVNode("div",{class:"inline-block",onClick:e[0]||(e[0]=y=>s.openEditModal())},e[8]||(e[8]=[d.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="sr-only">Edit message</span></button>',1),d.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Edit message ",-1)])),d.createElementVNode("div",{class:"inline-block",onClick:e[1]||(e[1]=y=>s.confirnDeleteComment())},e[9]||(e[9]=[d.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg><span class="sr-only">Delete message</span></button>',1),d.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Delete message ",-1)]))],512),[[d.vShow,s.isElementVisible]])])]),d.createElementVNode("p",{class:"mt-1 text-sm text-gray-800 dark:text-neutral-200",innerHTML:n.comment.body},null,8,nW)])],32),d.createVNode(o,{visible:i.isOpen,"onUpdate:visible":e[7]||(e[7]=y=>i.isOpen=y),title:"Редагувати",size:"small"},{footer:d.withCtx(()=>[d.createElementVNode("div",iW,[d.createElementVNode("button",{onClick:e[5]||(e[5]=y=>i.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:e[6]||(e[6]=(...y)=>s.updateComment&&s.updateComment(...y)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createElementVNode("div",rW,[d.createVNode(a,{modelValue:i.textareaValue,"onUpdate:modelValue":e[4]||(e[4]=y=>i.textareaValue=y),options:n.options},null,8,["modelValue","options"])])]),_:1},8,["visible"])],64)}const oW={components:{VsWidgetCommentsItem:Fe(U9,[["render",sW]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null},options:Array},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:t}=await je.get(`/api/widget/comment/${this.id}`);this.comments=t.rows,this.user=t.user}catch(t){this.isLoadFailed=!0,console.error(t)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},aW={class:"flex flex-col"},lW={key:0,class:"max-h-[300px] p-[10px] overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},cW={class:"p-4"},uW={class:"mt-1 text-gray-500 dark:text-neutral-500"},dW={class:"mt-4 flex justify-end gap-x-3"};function hW(t,e,n,r,i,s){var y;const a=d.resolveComponent("VsErrorOnLoading"),o=d.resolveComponent("VsWidgetCommentsItem"),p=d.resolveComponent("VsLoader"),g=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock("div",aW,[i.isLoaded?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[i.isLoadFailed?(d.openBlock(),d.createBlock(a,{key:0})):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[(y=i.comments)!=null&&y.length?(d.openBlock(),d.createElementBlock("div",lW,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.comments,(v,E)=>(d.openBlock(),d.createElementBlock("div",{class:"pb-8 last:pb-0",key:E},[d.createVNode(o,{comment:v,user:i.user,options:n.options,index:E,id:n.id,onListUpdate:s.getComments,onOpenModal:e[0]||(e[0]=T=>s.handleOpenModal(T))},null,8,["comment","user","options","index","id","onListUpdate"])]))),128))])):d.createCommentVNode("",!0)],64))],64)):(d.openBlock(),d.createBlock(p,{key:1,class:"justify-center",text:"Please wait..."})),d.createVNode(g,{title:i.modal.title,size:"small",visible:i.isModalVisible,"onUpdate:visible":e[3]||(e[3]=v=>i.isModalVisible=v)},{default:d.withCtx(()=>[d.createElementVNode("div",cW,[d.createElementVNode("p",uW,d.toDisplayString(i.modal.message),1),d.createElementVNode("div",dW,[d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=(...v)=>i.modal.cancel&&i.modal.cancel(...v))},d.toDisplayString(i.modal.cancelButtonText),1),d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...v)=>i.modal.confirm&&i.modal.confirm(...v))},d.toDisplayString(i.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const fW=Fe(oW,[["render",hW]]),pW={components:{VsTextEditor:vA},props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0},options:Array},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await je.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.closeEditor(),this.$emit("list-update")}catch(t){console.error(t)}},closeEditor(){this.isEditorOpen=!1,this.commentContent=""},handleKeydown(t){t.ctrlKey&&t.key==="Enter"&&this.addNewComment()}}},mW={class:"flex flex-col items-start w-full widget-comment-form"},gW={class:"w-full mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"},yW={key:0,class:"flex gap-[10px]"};function bW(t,e,n,r,i,s){const a=d.resolveComponent("VsTextEditor");return d.openBlock(),d.createElementBlock("div",mW,[d.createElementVNode("div",gW,[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[i.isEditorOpen?(d.openBlock(),d.createBlock(a,{key:0,modelValue:i.commentContent,"onUpdate:modelValue":e[0]||(e[0]=o=>i.commentContent=o),options:n.options,onKeydown:s.handleKeydown},null,8,["modelValue","options","onKeydown"])):d.createCommentVNode("",!0)]),_:1}),i.isEditorOpen?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[1]||(e[1]=o=>i.isEditorOpen=!0),class:"border flex items-center pl-[20px] border-gray-200 rounded-lg h-[40px] hover:bg-gray-50 text-gray-500 duration-300 hover:text-gray-900"}," Додати коментар... "))]),i.isEditorOpen?(d.openBlock(),d.createElementBlock("div",yW,[d.createElementVNode("button",{ref:"buttonAdd",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...o)=>s.addNewComment&&s.addNewComment(...o))}," Відправити коментар ",512),d.createElementVNode("button",{onClick:e[3]||(e[3]=(...o)=>s.closeEditor&&s.closeEditor(...o)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-black duration-300 border rounded-lg gap-x-2 hover:bg-gray-100"}," Скасувати ")])):d.createCommentVNode("",!0)])}const _W={components:{VsWidgetCommentsList:fW,VsWidgetCommentsAddForm:Fe(pW,[["render",bW]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0",options:[]}},mounted(){this.comments=this.$refs.commentListRef.comments,this.getUsersList()},watch:{comments(t){this.$emit("count-change",t.length)}},methods:{async getUsersList(){try{const{data:t}=await je.get("/api/suggest/core.user_mentioned");this.options=t}catch(t){console.log(t)}},listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},xW={class:"w-full bg-white-200"};function vW(t,e,n,r,i,s){const a=d.resolveComponent("VsWidgetCommentsAddForm"),o=d.resolveComponent("VsWidgetCommentsList");return d.openBlock(),d.createElementBlock("div",xW,[e[2]||(e[2]=d.createElementVNode("div",{class:"flex items-center justify-between w-full mb-4 gap-x-2"},null,-1)),d.createVNode(a,{options:i.options,id:n.id,onListUpdate:e[0]||(e[0]=p=>s.listUpdate())},null,8,["options","id"]),d.createVNode(o,{options:i.options,id:n.id,onUpdateCommentCount:e[1]||(e[1]=p=>s.updateCommentCount()),"prefilled-data":n.prefilledData,ref:"commentListRef"},null,8,["options","id","prefilled-data"])])}const wA=Fe(_W,[["render",vW]]),kA=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}),wW=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}),kW={},EW={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-user"};function SW(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",EW,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},null,-1),d.createElementVNode("path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},null,-1)]))}const EA=Fe(kW,[["render",SW]]),CW=t=>{const e=/(\b\S)?/g,n=t.match(e);return n?n.join("").toUpperCase():""},TW=d.defineComponent({props:{username:{type:String,default:()=>""}},components:{IconUserOutline:EA},computed:{inItials(){return CW(this.username||"u")}}}),AW={class:"flex shrink-0 bg-white justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 rounded-full"},MW={key:0};function DW(t,e,n,r,i,s){const a=d.resolveComponent("IconUserOutline");return d.openBlock(),d.createElementBlock("div",AW,[t.inItials?(d.openBlock(),d.createElementBlock("span",MW,d.toDisplayString(t.inItials),1)):(d.openBlock(),d.createBlock(a,{key:1,class:"w-[16px] h-[16px]"}))])}const IW=Fe(TW,[["render",DW]]),dx={load(){try{const t=Array.from(arguments);window.headLoadedFiles||(window.headLoadedFiles=[]);const e=typeof arguments[arguments.length-1]=="function"?arguments[arguments.length-1]:null,n=t.filter(r=>typeof r!="function").reduce((r,i)=>r.concat(i),[]).filter(r=>r&&!window.headLoadedFiles[r.url||r.split("?")[0]]);Promise.all(n.map(r=>this.loadFile1(r))).then(()=>{e&&e()})}catch(t){console.log(t)}},promise(t){return new Promise((e,n)=>{dx.load(t,()=>{e()})})},loadFile1(t){let e=!1;typeof t=="object"&&(e=t.type,t=t.url);const n=t.split("?")[0];return new Promise((r,i)=>{function s(o){delete window.headLoadedFiles[`_${n}`],window.headLoadedFiles[n]=o.type,r(o.type)}let a;window.headLoadedFiles[`_${n}`]?a=window.headLoadedFiles[`_${n}`]:(n.includes(".css")?(a=document.createElement("link"),a.href=t,a.type="text/css",a.rel="stylesheet"):(a=document.createElement("script"),a.type="text/javascript",a.src=t,e&&(a.type=e)),window.headLoadedFiles[`_${n}`]=a,document.head.appendChild(a)),a.addEventListener("load",s),a.addEventListener("error",s)})}},PW={props:{point:{type:String,default:()=>""}},data(){return{zoom:18}},computed:{parsedPoint(){return JSON.parse(this.point)},tooltipText(){return this.parsedPoint.coordinates.join(", ")},coordinates(){return[...this.parsedPoint.coordinates].reverse()}},async mounted(){typeof window>"u"||(window!=null&&window.L||(await dx.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"),await dx.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js")),this.initMap())},methods:{initMap(){const t=window.L.map("map",{center:this.coordinates,zoom:this.zoom});window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(t),window.L.circle(this.coordinates,{color:"red",fillColor:"red",fillOpacity:.2,radius:10}).addTo(t).bindTooltip(this.tooltipText)}}},NW={id:"map",style:{height:"9rem",width:"24rem"}};function RW(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",NW)}const OW=Fe(PW,[["render",RW]]),BW=d.defineComponent({components:{VsWidgetHistoryItemAvatar:IW,VsWidgetHistoryItemMap:OW,IconFile:S2},props:{item:{type:Object,default:()=>{}}},methods:{getTitle(t){return t.title||t.attr},getOldValue(t){return t.old||"Не вказано"},getNewValue(t){return t.new||"Не вказано"},getDate(t){return wW(t.cdate)}}}),VW={class:"relative"},zW={class:"w-full flex gap-x-5"},LW={class:"grow"},FW={class:"text-sm font-semibold text-gray-800 dark:text-neutral-300"},$W={key:0},jW={key:1},HW={key:0,class:"text-sm text-gray-500 dark:text-neutral-500"},UW={key:1,class:"text-sm text-gray-500 dark:text-neutral-500"},WW={key:2,class:"text-sm text-gray-500 dark:text-neutral-500"},qW={key:3,class:"mt-2"},GW={class:"grid grid-cols-2 gap-2"},YW={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},ZW={class:"flex gap-x-2"},XW={class:"grow truncate"},KW={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},JW={class:"block text-xs text-gray-400 dark:text-neutral-500"},QW={key:4,class:"text-sm text-gray-500 dark:text-neutral-500"},eq={key:5,class:"text-sm text-gray-500 dark:text-neutral-500"},tq={key:6,class:"mt-2"},nq={class:"grid grid-cols-2 gap-2"},rq={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},iq={class:"flex gap-x-2"},sq={class:"grow truncate"},oq={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},aq={class:"block text-xs text-gray-400 dark:text-neutral-500"},lq={class:"mt-2 text-[11px] uppercase text-gray-400 dark:text-neutral-500"};function cq(t,e,n,r,i,s){var p,g,y,v;const a=d.resolveComponent("VsWidgetHistoryItemAvatar"),o=d.resolveComponent("IconFile");return d.openBlock(),d.createElementBlock("div",VW,[d.createElementVNode("div",zW,[d.createVNode(a,{username:t.item.username},null,8,["username"]),d.createElementVNode("div",LW,[d.createElementVNode("h4",FW,d.toDisplayString(t.item.username||"User User"),1),t.item.entity_type==="crm.communications"?(d.openBlock(),d.createElementBlock("span",$W,"Коментар")):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"?(d.openBlock(),d.createElementBlock("span",jW,"Файл")):d.createCommentVNode("",!0),t.item.entity_type!=="crm.files"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:2},d.renderList(t.item.changes,E=>(d.openBlock(),d.createElementBlock("li",null,[!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(E.entity_key)&&E.value_old&&E.value_new?(d.openBlock(),d.createElementBlock("p",HW," Дані "+d.toDisplayString(E.entity_key)+" змінились з "+d.toDisplayString(E.value_old)+" на "+d.toDisplayString(E.value_new),1)):d.createCommentVNode("",!0),!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(E.entity_key)&&!E.value_old&&E.value_new?(d.openBlock(),d.createElementBlock("p",UW," Дані "+d.toDisplayString(E.entity_key)+" внесено до БД: "+d.toDisplayString(E.value_new),1)):d.createCommentVNode("",!0),E.value_old&&!E.value_new?(d.openBlock(),d.createElementBlock("p",WW," Дані "+d.toDisplayString(E.entity_key)+" очищено ",1)):d.createCommentVNode("",!0)]))),256)):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="INSERT"&&((p=t.item.changes)!=null&&p[0])?(d.openBlock(),d.createElementBlock("div",qW,[d.createElementVNode("div",GW,[d.createElementVNode("div",YW,[d.createElementVNode("div",ZW,[d.createVNode(o,{class:"w-[24px] h-[24px] text-gray-800"}),d.createElementVNode("div",XW,[d.createElementVNode("p",KW,d.toDisplayString(t.item.changes[0]["Назва файлу"]||"example file_name"),1),d.createElementVNode("small",JW,d.toDisplayString(t.item.changes[0]["Розмір файлу"]||"example file_weight kb")+" KB ",1)])])])])])):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="DELETE"?(d.openBlock(),d.createElementBlock("p",QW," Видалено файл "+d.toDisplayString((y=(g=t.item.changes)==null?void 0:g[0])==null?void 0:y["Назва файлу"]),1)):d.createCommentVNode("",!0),t.item.change_type!=="DELETE"&&!((v=t.item.changes)!=null&&v.length)?(d.openBlock(),d.createElementBlock("p",eq," Зміни відсутні ")):d.createCommentVNode("",!0),t.item.change_type==="addFile"?(d.openBlock(),d.createElementBlock("div",tq,[d.createElementVNode("div",nq,[d.createElementVNode("div",rq,[d.createElementVNode("div",iq,[d.createVNode(o,{class:"w-[24px] h-[24px] text-gray-800"}),d.createElementVNode("div",sq,[d.createElementVNode("p",oq,d.toDisplayString(t.item.file_name||"example file_name"),1),d.createElementVNode("small",aq,d.toDisplayString(t.item.file_weight||"example file_weight kb"),1)])])])])])):d.createCommentVNode("",!0),d.createElementVNode("p",lq,d.toDisplayString(t.getDate(t.item)),1)])])])}const uq=Fe(BW,[["render",cq]]),dq={},hq={class:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",hq,e[0]||(e[0]=[d.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),d.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const pq=Fe(dq,[["render",fq]]),mq=d.defineComponent({components:{VsWidgetHistoryItem:uq,VsEmptyWidget:A2,IconUpDown:pq},props:{id:{type:String,default:""},prefilledData:{type:Object,default:null}},data:()=>({history:{},showAll:!1,limitVisible:5}),computed:{createdDate(){var t,e,n;return(t=this.history)!=null&&t.data?kA((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.cdate):""},lastEditDate(){var t,e,n;return(t=this.history)!=null&&t.data?kA((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.edate):""},authorName(){var t;return(t=this.history)!=null&&t.data?this.history.data.author:""},displayedRows(){var t,e,n;return this.showAll?(t=this.history)==null?void 0:t.rows:(n=(e=this.history)==null?void 0:e.rows)==null?void 0:n.slice(0,this.limitVisible)}},methods:{async getHistoryData(){if(this.prefilledData){this.history=this.prefilledData;return}try{const{data:t}=await je.get(`/api/widget/history/${this.id}`);this.history=t}catch(t){console.error(t)}},showMore(){this.showAll=!0}},async mounted(){await this.getHistoryData()},watch:{"history.rows":function(t){this.$emit("count-change",t.length)}}}),gq={class:"bg-white"},yq={key:0,class:""},bq={key:0,class:"relative last:pb-0 pb-8 last:after:hidden after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700"},_q={class:"w-[38px]"},xq={class:"flex shrink-0 justify-center items-center w-6 h-7 border border-gray-200 text-sm font-semibold text-gray-800 rounded-md mx-auto dark:border-neutral-700 dark:text-neutral-400"},vq={class:"grow"},wq={class:"text-sm font-semibold text-gray-800 group-focus:text-blue-600 dark:text-neutral-300 dark:group-focus:text-blue-500"},kq={key:1,class:"w-full h-[330px] flex items-center justify-center"};function Eq(t,e,n,r,i,s){var p,g,y,v,E,T;const a=d.resolveComponent("VsWidgetHistoryItem"),o=d.resolveComponent("IconUpDown");return d.openBlock(),d.createElementBlock("div",gq,[e[1]||(e[1]=d.createElementVNode("div",{class:"flex items-center justify-between mb-4 gap-x-2"},null,-1)),(g=(p=t.history)==null?void 0:p.rows)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",yq,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.displayedRows,(D,N)=>{var B,V;return d.openBlock(),d.createElementBlock("li",{class:"list-none mr-[10px]",key:D.uid},[d.createVNode(a,{item:D,class:d.normalizeClass(N===((V=(B=t.history)==null?void 0:B.rows)==null?void 0:V.length)-1?"pb-0 after:hidden":"pb-8 after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700")},null,8,["item","class"])])}),128)),((v=(y=t.history)==null?void 0:y.rows)==null?void 0:v.length)>4&&!t.showAll?(d.openBlock(),d.createElementBlock("div",bq,[d.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...D)=>t.showMore&&t.showMore(...D)),class:"hs-collapse-toggle hs-collapse-open:hidden group w-full text-start flex items-center gap-x-5 focus:outline-none",id:"hs-pro-dnao","aria-expanded":"false","aria-controls":"hs-pro-dnao-button","data-hs-collapse":"#hs-pro-dnao-button"},[d.createElementVNode("span",_q,[d.createElementVNode("span",xq,[d.createVNode(o)])]),d.createElementVNode("span",vq,[d.createElementVNode("span",wq," Показати ще "+d.toDisplayString(((T=(E=t.history)==null?void 0:E.rows)==null?void 0:T.length)-t.limitVisible),1)])])])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createElementBlock("div",kq," Історія відсутні "))])}const Sq=Fe(mq,[["render",Eq]]),Cq={props:{id:{type:String,default:""},data:{type:Object,default:null}},data(){return{mode:"base"}},methods:{getPdfUrl(){const t=`/api/print-template/crm.accounts.doc/${this.id}`;return this.mode==="demo"?t+"?demo=1&format=pdf":this.mode==="preview"?t+"?preview=1&format=pdf":t},setMode(t){this.mode=t},downloadPdf(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}`,t.download=`document_${this.id}.pdf`,t.click()},downloadWord(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}?format=word`,t.download=`document_${this.id}.docx`,t.click()}}},Tq={class:"flex flex-col h-[calc(100vh-300px)] text-sm"},Aq={class:"flex justify-between"},Mq={class:"flex gap-4 mb-4"},Dq={class:"flex mb-4 border rounded overflow-hidden"},Iq=["src"];function Pq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Tq,[d.createElementVNode("div",Aq,[d.createElementVNode("div",Mq,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...a)=>s.downloadPdf&&s.downloadPdf(...a)),class:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"}," Завантажити PDF "),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...a)=>s.downloadWord&&s.downloadWord(...a)),class:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"}," Завантажити Word ")]),d.createElementVNode("div",Dq,[d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="base","bg-white":i.mode!=="base"},"px-4 py-2 border-r text-black"]),onClick:e[2]||(e[2]=a=>s.setMode("base"))}," Базовий ",2),d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="demo","bg-white":i.mode!=="demo"},"px-4 py-2 border-r text-black"]),onClick:e[3]||(e[3]=a=>s.setMode("demo"))}," Демо ",2),d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="preview","bg-white":i.mode!=="preview"},"px-4 py-2 text-black"]),onClick:e[4]||(e[4]=a=>s.setMode("preview"))}," Перегляд шаблону ",2)])]),d.createElementVNode("iframe",{src:s.getPdfUrl(),type:"application/pdf",class:"flex-grow w-full border-0 rounded-lg shadow-lg"},null,8,Iq)])}const Nq=Fe(Cq,[["render",Pq]]),Rq={},Oq={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Bq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Oq,e[0]||(e[0]=[d.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const hx=Fe(Rq,[["render",Bq]]),Vq={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},zq={style:{display:"none"}},Lq=["height","width","fill"];function Fq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock(d.Fragment,null,[(d.openBlock(),d.createElementBlock("svg",zq,e[0]||(e[0]=[d.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[d.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(d.openBlock(),d.createElementBlock("svg",{height:n.height,width:n.width,fill:n.color},e[1]||(e[1]=[d.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,Lq))],64)}const fx=Fe(Vq,[["render",Fq]]),$q={class:"hs-dropdown [--placement:bottom-right] inline-flex"},jq={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},Hq={class:"flex flex-col items-start"},Uq={key:0,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},Wq={class:"p-4"},qq={class:"flex justify-end mt-4 gap-x-3"},Gq={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Yq={__name:"vs-widget-table-controls",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""},form:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""}},emits:["update-table"],setup(t,{emit:e}){const n=t,r=e,i=d.ref(!1),s=d.ref(!1),a=d.ref({}),o=d.ref(null),p=()=>{i.value=!0,document.body.click()},g=async()=>{var E;try{const T=await je.get(`/api/table/${n.table}/${n.id}`);a.value=T==null?void 0:T.data;const{data:D}=await je.get(`/api/form/${n.form}`);o.value=((E=D==null?void 0:D.form)==null?void 0:E.schema)||(D==null?void 0:D.form),document.body.click(),s.value=!0}catch{}},y=async()=>{try{await je.delete(`${n.apiDelete||"/api/table"}/${n.table}/${n.id}`),await r("update-table"),i.value=!1}catch(E){console.log(E)}},v=async()=>{try{await je.put(`/api/table/${n.table}/${n.id}`,a.value),s.value=!1,await r("update-table")}catch{}};return d.onMounted(()=>{n.isForm&&g()}),(E,T)=>{const D=d.resolveComponent("VsPopover"),N=d.resolveComponent("VsConfirm"),B=d.resolveComponent("VsForm"),V=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",$q,[d.createVNode(D,{trigger:"click",placement:"bottom-left"},{reference:d.withCtx(()=>[d.createElementVNode("button",jq,[d.createVNode(wg,{height:"16",width:"16"})])]),default:d.withCtx(()=>[d.createElementVNode("div",Hq,[d.createElementVNode("button",{onClick:g,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[d.createVNode(fx,{color:"#000"}),T[5]||(T[5]=d.createTextVNode(" Редагувати "))]),E.isForm?(d.openBlock(),d.createElementBlock("div",Uq)):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:d.withModifiers(p,["stop"]),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[d.createVNode(hx),T[6]||(T[6]=d.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]),_:1})]),d.createVNode(N,{visible:i.value,"onUpdate:visible":T[1]||(T[1]=U=>i.value=U),size:"small",title:"Ви впевнені?"},{default:d.withCtx(()=>[d.createElementVNode("div",Wq,[T[7]||(T[7]=d.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),d.createElementVNode("div",qq,[d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:T[0]||(T[0]=U=>i.value=!1)}," Скасувати "),d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:y}," Так, я впевнена/ий ")])])]),_:1},8,["visible"]),d.createVNode(V,{visible:s.value,"onUpdate:visible":T[4]||(T[4]=U=>s.value=U),title:"Редагувати об'єкт"},{footer:d.withCtx(()=>[d.createElementVNode("div",Gq,[d.createElementVNode("button",{onClick:T[3]||(T[3]=U=>s.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:v,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(B,{scheme:o.value,modelValue:a.value,"onUpdate:modelValue":T[2]||(T[2]=U=>a.value=U),ref:"form"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},Zq={},Xq={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function Kq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Xq,e[0]||(e[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const Zu=Fe(Zq,[["render",Kq]]),Jq={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Qq={__name:"vs-widget-table-add-form",props:{token:{type:String,default:()=>""},form:{type:String,default:()=>""}},setup(t){const e=t,n=d.ref(!1),r=d.ref(null),i=d.ref({}),s=d.ref(),a=async()=>{var p;try{const{data:g}=await je.get(`/api/form/${e.form}`);r.value=((p=g==null?void 0:g.form)==null?void 0:p.schema)||(g==null?void 0:g.form),n.value=!0}catch{}},o=async()=>{var p;try{await((p=s.value)==null?void 0:p.doValidation()),await je.post(`/api/table/${e.token}`,i.value)}catch(g){console.log(g)}};return(p,g)=>{const y=d.resolveComponent("VsForm"),v=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:a,class:"h-[34px] w-[34px] shadow bg-blue-500 rounded-lg flex items-center justify-center text-white duration-300 hover:bg-blue-700"},[d.createVNode(Zu)]),d.createVNode(v,{visible:n.value,"onUpdate:visible":g[2]||(g[2]=E=>n.value=E),title:"Створити об'єкт"},{footer:d.withCtx(()=>[d.createElementVNode("div",Jq,[d.createElementVNode("button",{onClick:g[1]||(g[1]=E=>n.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:o,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(y,{scheme:r.value,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=E=>i.value=E),ref_key:"form",ref:s},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},eG={props:{row:Object,column:Object,table:String}};function tG(t,e,n,r,i,s){var a,o,p,g,y,v,E,T;return d.openBlock(),d.createBlock(d.resolveDynamicComponent(((a=n.column)==null?void 0:a.format)==="custom"?(o=n.column)==null?void 0:o.component:`table-format-${((g=(p=n.column)==null?void 0:p.format)==null?void 0:g.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=D=>t.$emit("update-table")),name:(y=n.column)==null?void 0:y.name,data:n.row,value:(E=n.row)==null?void 0:E[(v=n.column)==null?void 0:v.name],table:n.table,column:n.column,edit:(T=n.column)==null?void 0:T.edit},null,40,["name","data","value","table","column","edit"])}const sf=Fe(eG,[["render",tG]]),nG={},rG={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function iG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",rG,e[0]||(e[0]=[d.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const SA=Fe(nG,[["render",iG]]),sG={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String},filter:{type:Array},data:{type:Object}},components:{IconFilter:SA},mounted(){setTimeout(()=>{var t,e;if(typeof this.filter=="string"){if(!filter)return;const[n,r]=filter==null?void 0:filter.split("=");this.filterValue[n]=(t=this.data)==null?void 0:t[r]}else typeof this.filter=="object"&&((e=this.filter)==null||e.forEach(n=>{var s;if(!n)return;const[r,i]=n==null?void 0:n.split("=");this.filterValue[r]=(s=this.data)==null?void 0:s[i]}))})},data(){return{isFilters:!1,filterValue:{}}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},oG={key:0,class:"py-[1px] px-[6px] text-white text-[10px] rounded-full bg-blue-500"},aG={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function lG(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter"),o=d.resolveComponent("VsFilter");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>i.isFilters=!i.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[d.createVNode(a,{height:"16",width:"16"}),e[5]||(e[5]=d.createTextVNode(" Фільтри ")),n.onFilters?(d.openBlock(),d.createElementBlock("span",oG,d.toDisplayString(n.onFilters),1)):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p;return[d.withDirectives(d.createElementVNode("div",{onClick:e[4]||(e[4]=(...g)=>s.closeFilter&&s.closeFilter(...g)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[d.createElementVNode("div",aG,[(p=n.scheme)!=null&&p.length?(d.openBlock(),d.createBlock(o,{key:0,ref:"filter",scheme:n.scheme,layout:"default",modelValue:i.filterValue,"onUpdate:modelValue":e[1]||(e[1]=g=>i.filterValue=g),"apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[2]||(e[2]=g=>t.$emit("filterChange",g)),closeFilterBtn:!0,onFilterClose:e[3]||(e[3]=g=>i.isFilters=!1)},null,8,["scheme","modelValue","token"])):d.createCommentVNode("",!0)])],512),[[d.vShow,i.isFilters]])]}),_:1})],64)}const cG=Fe(sG,[["render",lG]]),uG={class:"h-full"},dG={class:"flex justify-between mb-[4px]"},hG={class:"flex gap-[4px]"},fG={class:"inline-block w-full align-middle"},pG={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},mG={class:"dark:bg-neutral-700 sticky top-[-1px] bg-white"},gG={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px]"},yG={class:"divide-y divide-gray-200 dark:divide-neutral-700"},bG={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px] px-[10px]"},_G={key:0,class:"h-[60px] flex relative items-center justify-center"},xG={__name:"vs-widget-table",props:{data:Object,columns:Array,token:String,table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},data:{type:Object,default:()=>null},filter:{type:Array,default:()=>[]}},setup(t){const e=t,n=d.ref(null),r=d.ref([]),i=d.ref(1),s=d.ref(""),a=d.ref(null),o=d.ref(null),p=d.ref(0),g=async()=>{var E;try{const T=await je.get(`/api/table-filter/${e.table}`);a.value=(E=T==null?void 0:T.data)==null?void 0:E.list;const{data:D}=await je.get((e!=null&&e.api?e.api:"/api/table-data")+(e.token?`/${e.token}`:e.table&&e.id?`/${e.table}`:""),{params:{page:i.value,limit:10,search:s.value,filter:o.value}});n.value=D,r.value=(D==null?void 0:D.columns)||(e==null?void 0:e.columns)}catch(T){console.error("Ошибка при загрузке данных таблицы:",T)}},y=E=>{i.value=E,g()},v=async({url:E,state:T})=>{var D;o.value=E!=="no-url"?E:null,p.value=(D=Object.entries(T))==null?void 0:D.length,i.value=1,await g()};return d.watch(s,g),d.onMounted(()=>{g()}),(E,T)=>{var B,V,U,K,Y,we,ye,Te,Re,Ne,Ye,qe;const D=d.resolveComponent("VsText"),N=d.resolveComponent("VsPagination");return d.openBlock(),d.createElementBlock("div",uG,[d.createElementVNode("div",dG,[d.createVNode(D,{modelValue:s.value,"onUpdate:modelValue":T[0]||(T[0]=he=>s.value=he),class:"h-[40px] w-[300px]",placeholder:"Пошук..."},null,8,["modelValue"]),d.createElementVNode("div",hG,[a.value?(d.openBlock(),d.createBlock(cG,{key:0,scheme:a.value,table:t.table,onFilterChange:v,onFilters:p.value,filter:t.filter,data:(V=(B=t.data)==null?void 0:B.rows)==null?void 0:V[0]},null,8,["scheme","table","onFilters","filter","data"])):d.createCommentVNode("",!0),d.createVNode(Qq,{token:(U=n.value)==null?void 0:U.addToken,form:(K=n.value)==null?void 0:K.form},null,8,["token","form"])])]),d.createElementVNode("div",{class:d.normalizeClass(["overflow-x-auto w-full admin-widget-table [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",[((we=(Y=n.value)==null?void 0:Y.rows)==null?void 0:we.length)>E.limit?"h-[calc(100%-60px)]":"h-[100%]"]])},[d.createElementVNode("div",fG,[d.createElementVNode("table",pG,[(ye=r.value)!=null&&ye.length?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("thead",mG,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(he,it)=>(d.openBlock(),d.createElementBlock("th",{key:it,scope:"col",class:"px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase dark:text-neutral-400 min-w-[200px]"},d.toDisplayString((he==null?void 0:he.title)||(he==null?void 0:he.description)||(he==null?void 0:he.ua)),1))),128)),(Re=(Te=n.value)==null?void 0:Te.actions)!=null&&Re.length?(d.openBlock(),d.createElementBlock("th",gG)):d.createCommentVNode("",!0)])]),d.createElementVNode("tbody",yG,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Ne=n.value)==null?void 0:Ne.rows,(he,it)=>{var Ct,Ft,Bt;return d.openBlock(),d.createElementBlock("tr",{key:it},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(It,Ut)=>(d.openBlock(),d.createElementBlock("td",{key:Ut,class:"px-6 py-4 text-sm text-gray-800 dark:text-neutral-200"},[d.createVNode(sf,{row:he,column:It,table:t.table},null,8,["row","column","table"])]))),128)),(Ft=(Ct=n.value)==null?void 0:Ct.actions)!=null&&Ft.length?(d.openBlock(),d.createElementBlock("td",bG,[d.createVNode(Yq,{id:he==null?void 0:he.id,table:t.table,apiDelete:t.apiDelete,token:he==null?void 0:he.token,form:(Bt=n.value)==null?void 0:Bt.form,onUpdateTable:g},null,8,["id","table","apiDelete","token","form"])])):d.createCommentVNode("",!0)])}),128))])],64)):d.createCommentVNode("",!0)])])],2),((Ye=n.value)==null?void 0:Ye.filtered)>20?(d.openBlock(),d.createElementBlock("div",_G,[d.createVNode(N,{goTo:!1,"default-page":i.value,total:(qe=n.value)==null?void 0:qe.filtered,class:"absolute w-fit",pageSize:10,onPageChange:y,backgroundColor:"#F3F4F6"},null,8,["default-page","total"])])):d.createCommentVNode("",!0)])}}},vG={},wG={class:"shrink-0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function kG(t,e){return d.openBlock(),d.createElementBlock("svg",wG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M18 6 7 17l-5-5"},null,-1),d.createElementVNode("path",{d:"m22 10-7.5 7.5L13 16"},null,-1)]))}const EG=Fe(vG,[["render",kG]]),SG={},CG={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",class:"icon icon-tabler icons-tabler-filled icon-tabler-user"};function TG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",CG,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},null,-1),d.createElementVNode("path",{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},null,-1)]))}const CA=Fe(SG,[["render",TG]]),AG={},MG={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function DG(t,e){return d.openBlock(),d.createElementBlock("svg",MG,e[0]||(e[0]=[d.createElementVNode("polyline",{points:"9 11 12 14 22 4"},null,-1),d.createElementVNode("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"},null,-1)]))}const IG=Fe(AG,[["render",DG]]),PG={class:"relative shrink-0"},NG=["src"],RG={key:1,class:"h-[38px] w-[38px] bg-gray-200 rounded-full flex items-center justify-center"},OG={key:2,class:"absolute top-4 -start-3 size-2 bg-blue-600 rounded-full dark:bg-blue-500"},BG={class:"grow"},VG={class:"text-xs text-gray-500 dark:text-neutral-500"},zG={class:"block text-sm font-medium text-gray-800 dark:text-neutral-300"},LG={class:"text-sm text-gray-500 dark:text-neutral-500"},FG={key:0,class:"sm:group-hover:opacity-100 sm:opacity-0 sm:absolute sm:top-5 sm:end-5 inline-block p-0.5 bg-white border border-gray-200 rounded-lg shadow-sm transition ease-out"},$G={__name:"admin-notification-item",props:{item:Object},emits:["update-notification"],setup(t,{emit:e}){const n=e,r=d.ref(!1),i=()=>r.value=!0,s=()=>r.value=!1,a=async()=>{var o;try{await je.get(`/api/notification-read/${(o=t.item)==null?void 0:o.id}`),await n("update-notification")}catch{}};return(o,p)=>{var y,v,E,T,D,N;const g=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("li",{class:d.normalizeClass(["relative group w-full flex gap-x-5 text-start p-5 border-b",[(y=t.item)!=null&&y.read?"bg-gray-100":"bg-white"]]),onMouseenter:i,onMouseleave:s},[d.createElementVNode("div",PG,[(v=t.item)!=null&&v.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"shrink-0 size-[38px] rounded-full",src:(E=t.item)==null?void 0:E.avatar,alt:"Avatar"},null,8,NG)):(d.openBlock(),d.createElementBlock("div",RG,[d.createVNode(CA)])),(T=t.item)!=null&&T.read?(d.openBlock(),d.createElementBlock("span",OG)):d.createCommentVNode("",!0)]),d.createElementVNode("div",BG,[d.createElementVNode("p",VG,[d.createVNode(hb,{name:"cdate",data:t.item},null,8,["data"])]),d.createElementVNode("span",zG,d.toDisplayString((D=t.item)==null?void 0:D.author),1),d.createElementVNode("p",LG,d.toDisplayString((N=t.item)==null?void 0:N.subject),1)]),r.value?(d.openBlock(),d.createElementBlock("div",FG,[d.createVNode(g,{trigger:"hover",placement:"left"},{reference:d.withCtx(()=>[d.createElementVNode("button",{onClick:a,type:"button",class:"hs-tooltip-toggle hs-tooltip relative inline-block size-7 flex shrink-0 justify-center items-center text-gray-500 hover:bg-gray-100 hover:text-gray-800 rounded"},[d.createVNode(IG)])]),default:d.withCtx(()=>[p[0]||(p[0]=d.createTextVNode(" Прочитати "))]),_:1})])):d.createCommentVNode("",!0)],34)}}},jG={},HG={class:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function UG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",HG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),d.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const WG=Fe(jG,[["render",UG]]),qG={},GG={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function YG(t,e){return d.openBlock(),d.createElementBlock("svg",GG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"},null,-1),d.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))}const ZG=Fe(qG,[["render",YG]]),XG={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},KG={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},JG={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},QG={class:"max-w-sm mx-auto mt-6"},eY={class:"font-medium text-gray-800 dark:text-neutral-200"},tY={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function nY(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",KG,[d.createElementVNode("div",null,[d.createElementVNode("div",JG,[e[0]||(e[0]=d.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),d.createElementVNode("div",QG,[d.createElementVNode("p",eY,d.toDisplayString(n.title),1),d.createElementVNode("p",tY,d.toDisplayString(n.text),1)])])])])}const px=Fe(XG,[["render",nY]]),rY={key:0,class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},iY={class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"},sY={key:0,class:"w-96 h-[100px] z-[11] absolute top-[40px] right-0"},oY={class:"h-[50px] px-[20px] border-b w-full flex items-center justify-between rounded-t-lg bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]"},aY={class:"h-[30px] w-[30px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100"},lY={class:"max-h-[400px] bg-white overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},cY={key:0},uY={key:1},TA={__name:"admin-notification",setup(t){const e=d.ref(0),n=d.ref([]),r=d.ref(!1),i=d.ref(null),{$notify:s}=d.getCurrentInstance().proxy,a=g=>{i.value&&!i.value.contains(g.target)&&(r.value=!1)};d.watch(r,g=>{g?window.addEventListener("click",a):window.removeEventListener("click",a)}),d.onBeforeUnmount(()=>{window.removeEventListener("click",a)});const o=async()=>{try{const{data:g}=await je.get("/api/notification");n.value=(g==null?void 0:g.rows)||[]}catch{s({type:"error",message:"При спробі завантаження нотифікацій виникла помилка",title:"Помилка!"})}};o();const p=async()=>{try{await je.get("/api/notification-read"),await o()}catch{s({type:"error",message:"Виникла помилка",title:"Помилка!"})}};return(g,y)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"notificationRef",ref:i,class:"hs-tooltip [--placement:bottom] inline-block show relative"},[d.createElementVNode("button",{onClick:y[0]||(y[0]=v=>r.value=!r.value),class:"hs-tooltip-toggle relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"},[d.createVNode(WG,{height:"24",width:"24"}),e.value?(d.openBlock(),d.createElementBlock("span",rY,[y[1]||(y[1]=d.createElementVNode("span",{class:"absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600"},null,-1)),d.createElementVNode("span",iY,d.toDisplayString(e.value),1)])):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,null,{default:d.withCtx(()=>{var v;return[r.value?(d.openBlock(),d.createElementBlock("div",sY,[d.createElementVNode("div",oY,[y[2]||(y[2]=d.createElementVNode("nav",{class:"flex"},[d.createElementVNode("button",{type:"button",class:"px-2 py-1.5 relative inline-flex justify-center items-center gap-x-2 text-nowrap hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg focus:outline-none focus:bg-gray-100 after:absolute after:bottom-[-9px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800"}," Всі ")],-1)),d.createElementVNode("button",aY,[d.createVNode(ZG)])]),d.createElementVNode("div",lY,[(v=n.value)!=null&&v.length?(d.openBlock(),d.createElementBlock("ul",cY,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.value,E=>(d.openBlock(),d.createBlock($G,{key:E==null?void 0:E.id,item:E,onUpdateNotification:o},null,8,["item"]))),128))])):(d.openBlock(),d.createElementBlock("div",uY,[d.createVNode(px,{class:"[&>div>div]:min-h-[300px]",text:""})]))]),d.createElementVNode("button",{onClick:p,class:"h-[50px] border-t w-full rounded-b-lg bg-white shadow p-4 flex justify-center items-center gap-x-2 text-sm text-gray-500 font-medium sm:rounded-b-lg hover:text-blue-600 focus:outline-none"},[d.createVNode(EG,{height:"16",width:"16"}),y[3]||(y[3]=d.createTextVNode(" Прочитати усі "))])])):d.createCommentVNode("",!0)]}),_:1})],512))}};var kg,jt,AA,MA,Xu,vc,DA,IA,PA,Eg={},NA=[],dY=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function il(t,e){for(var n in e)t[n]=e[n];return t}function RA(t){var e=t.parentNode;e&&e.removeChild(t)}function ce(t,e,n){var r,i,s,a={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?kg.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)a[s]===void 0&&(a[s]=t.defaultProps[s]);return Sg(t,a,r,i,null)}function Sg(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++AA};return i==null&&jt.vnode!=null&&jt.vnode(s),s}function Pi(){return{current:null}}function tr(t){return t.children}function hY(t,e,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in e||Cg(t,s,null,n[s],r);for(s in e)i&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===e[s]||Cg(t,s,e[s],n[s],r)}function OA(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||dY.test(e)?n:n+"px"}function Cg(t,e,n,r,i){var s;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||OA(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||OA(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?VA:BA,s):t.removeEventListener(e,s?VA:BA,s);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function BA(t){Xu=!0;try{return this.l[t.type+!1](jt.event?jt.event(t):t)}finally{Xu=!1}}function VA(t){Xu=!0;try{return this.l[t.type+!0](jt.event?jt.event(t):t)}finally{Xu=!1}}function bs(t,e){this.props=t,this.context=e}function of(t,e){if(e==null)return t.__?of(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?of(t):null}function zA(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return zA(t)}}function fY(t){Xu?setTimeout(t):IA(t)}function mx(t){(!t.__d&&(t.__d=!0)&&vc.push(t)&&!Tg.__r++||DA!==jt.debounceRendering)&&((DA=jt.debounceRendering)||fY)(Tg)}function Tg(){var t,e,n,r,i,s,a,o;for(vc.sort(function(p,g){return p.__v.__b-g.__v.__b});t=vc.shift();)t.__d&&(e=vc.length,r=void 0,i=void 0,a=(s=(n=t).__v).__e,(o=n.__P)&&(r=[],(i=il({},s)).__v=s.__v+1,gx(o,s,i,n.__n,o.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??of(s),s.__h),HA(r,s),s.__e!=a&&zA(s)),vc.length>e&&vc.sort(function(p,g){return p.__v.__b-g.__v.__b}));Tg.__r=0}function LA(t,e,n,r,i,s,a,o,p,g){var y,v,E,T,D,N,B,V=r&&r.__k||NA,U=V.length;for(n.__k=[],y=0;y<e.length;y++)if((T=n.__k[y]=(T=e[y])==null||typeof T=="boolean"?null:typeof T=="string"||typeof T=="number"||typeof T=="bigint"?Sg(null,T,null,null,T):Array.isArray(T)?Sg(tr,{children:T},null,null,null):T.__b>0?Sg(T.type,T.props,T.key,T.ref?T.ref:null,T.__v):T)!=null){if(T.__=n,T.__b=n.__b+1,(E=V[y])===null||E&&T.key==E.key&&T.type===E.type)V[y]=void 0;else for(v=0;v<U;v++){if((E=V[v])&&T.key==E.key&&T.type===E.type){V[v]=void 0;break}E=null}gx(t,T,E=E||Eg,i,s,a,o,p,g),D=T.__e,(v=T.ref)&&E.ref!=v&&(B||(B=[]),E.ref&&B.push(E.ref,null,T),B.push(v,T.__c||D,T)),D!=null?(N==null&&(N=D),typeof T.type=="function"&&T.__k===E.__k?T.__d=p=FA(T,p,t):p=$A(t,T,E,V,D,p),typeof n.type=="function"&&(n.__d=p)):p&&E.__e==p&&p.parentNode!=t&&(p=of(E))}for(n.__e=N,y=U;y--;)V[y]!=null&&(typeof n.type=="function"&&V[y].__e!=null&&V[y].__e==n.__d&&(n.__d=jA(r).nextSibling),WA(V[y],V[y]));if(B)for(y=0;y<B.length;y++)UA(B[y],B[++y],B[++y])}function FA(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e=typeof r.type=="function"?FA(r,e,n):$A(n,r,r,i,r.__e,e));return e}function Ag(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Ag(n,e)}):e.push(t)),e}function $A(t,e,n,r,i,s){var a,o,p;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==t)t.appendChild(i),a=null;else{for(o=s,p=0;(o=o.nextSibling)&&p<r.length;p+=1)if(o==i)break e;t.insertBefore(i,s),a=s}return a!==void 0?a:i.nextSibling}function jA(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=jA(n)))return r}return null}function gx(t,e,n,r,i,s,a,o,p){var g,y,v,E,T,D,N,B,V,U,K,Y,we,ye,Te,Re=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(p=n.__h,o=e.__e=n.__e,e.__h=null,s=[o]),(g=jt.__b)&&g(e);try{e:if(typeof Re=="function"){if(B=e.props,V=(g=Re.contextType)&&r[g.__c],U=g?V?V.props.value:g.__:r,n.__c?N=(y=e.__c=n.__c).__=y.__E:("prototype"in Re&&Re.prototype.render?e.__c=y=new Re(B,U):(e.__c=y=new bs(B,U),y.constructor=Re,y.render=mY),V&&V.sub(y),y.props=B,y.state||(y.state={}),y.context=U,y.__n=r,v=y.__d=!0,y.__h=[],y._sb=[]),y.__s==null&&(y.__s=y.state),Re.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=il({},y.__s)),il(y.__s,Re.getDerivedStateFromProps(B,y.__s))),E=y.props,T=y.state,y.__v=e,v)Re.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(Re.getDerivedStateFromProps==null&&B!==E&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(B,U),!y.__e&&y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(B,y.__s,U)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(y.props=B,y.state=y.__s,y.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(Ne){Ne&&(Ne.__=e)}),K=0;K<y._sb.length;K++)y.__h.push(y._sb[K]);y._sb=[],y.__h.length&&a.push(y);break e}y.componentWillUpdate!=null&&y.componentWillUpdate(B,y.__s,U),y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(E,T,D)})}if(y.context=U,y.props=B,y.__P=t,Y=jt.__r,we=0,"prototype"in Re&&Re.prototype.render){for(y.state=y.__s,y.__d=!1,Y&&Y(e),g=y.render(y.props,y.state,y.context),ye=0;ye<y._sb.length;ye++)y.__h.push(y._sb[ye]);y._sb=[]}else do y.__d=!1,Y&&Y(e),g=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++we<25);y.state=y.__s,y.getChildContext!=null&&(r=il(il({},r),y.getChildContext())),v||y.getSnapshotBeforeUpdate==null||(D=y.getSnapshotBeforeUpdate(E,T)),Te=g!=null&&g.type===tr&&g.key==null?g.props.children:g,LA(t,Array.isArray(Te)?Te:[Te],e,n,r,i,s,a,o,p),y.base=e.__e,e.__h=null,y.__h.length&&a.push(y),N&&(y.__E=y.__=null),y.__e=!1}else s==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=pY(n.__e,e,n,r,i,s,a,p);(g=jt.diffed)&&g(e)}catch(Ne){e.__v=null,(p||s!=null)&&(e.__e=o,e.__h=!!p,s[s.indexOf(o)]=null),jt.__e(Ne,e,n)}}function HA(t,e){jt.__c&&jt.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){jt.__e(r,n.__v)}})}function pY(t,e,n,r,i,s,a,o){var p,g,y,v=n.props,E=e.props,T=e.type,D=0;if(T==="svg"&&(i=!0),s!=null){for(;D<s.length;D++)if((p=s[D])&&"setAttribute"in p==!!T&&(T?p.localName===T:p.nodeType===3)){t=p,s[D]=null;break}}if(t==null){if(T===null)return document.createTextNode(E);t=i?document.createElementNS("http://www.w3.org/2000/svg",T):document.createElement(T,E.is&&E),s=null,o=!1}if(T===null)v===E||o&&t.data===E||(t.data=E);else{if(s=s&&kg.call(t.childNodes),g=(v=n.props||Eg).dangerouslySetInnerHTML,y=E.dangerouslySetInnerHTML,!o){if(s!=null)for(v={},D=0;D<t.attributes.length;D++)v[t.attributes[D].name]=t.attributes[D].value;(y||g)&&(y&&(g&&y.__html==g.__html||y.__html===t.innerHTML)||(t.innerHTML=y&&y.__html||""))}if(hY(t,E,v,i,o),y)e.__k=[];else if(D=e.props.children,LA(t,Array.isArray(D)?D:[D],e,n,r,i&&T!=="foreignObject",s,a,s?s[0]:n.__k&&of(n,0),o),s!=null)for(D=s.length;D--;)s[D]!=null&&RA(s[D]);o||("value"in E&&(D=E.value)!==void 0&&(D!==t.value||T==="progress"&&!D||T==="option"&&D!==v.value)&&Cg(t,"value",D,v.value,!1),"checked"in E&&(D=E.checked)!==void 0&&D!==t.checked&&Cg(t,"checked",D,v.checked,!1))}return t}function UA(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){jt.__e(r,n)}}function WA(t,e,n){var r,i;if(jt.unmount&&jt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||UA(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){jt.__e(s,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&WA(r[i],e,n||typeof t.type!="function");n||t.__e==null||RA(t.__e),t.__=t.__e=t.__d=void 0}function mY(t,e,n){return this.constructor(t,n)}function af(t,e,n){var r,i,s;jt.__&&jt.__(t,e),i=(r=!1)?null:e.__k,s=[],gx(e,t=e.__k=ce(tr,null,[t]),i||Eg,Eg,e.ownerSVGElement!==void 0,i?null:e.firstChild?kg.call(e.childNodes):null,s,i?i.__e:e.firstChild,r),HA(s,t)}function gY(t,e){var n={__c:e="__cC"+PA++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(o){o.__e=!0,mx(o)})},this.sub=function(a){i.push(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),o&&o.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}kg=NA.slice,jt={__e:function(t,e,n,r){for(var i,s,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(o){t=o}throw t}},AA=0,MA=function(t){return t!=null&&t.constructor===void 0},Xu=!1,bs.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=il({},this.state),typeof t=="function"&&(t=t(il({},n),this.props)),t&&il(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),mx(this))},bs.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mx(this))},bs.prototype.render=tr,vc=[],IA=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tg.__r=0,PA=0;var No,yx,qA,GA=[],bx=[],YA=jt.__b,ZA=jt.__r,XA=jt.diffed,KA=jt.__c,JA=jt.unmount;function yY(){for(var t;t=GA.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Mg),t.__H.__h.forEach(_x),t.__H.__h=[]}catch(e){t.__H.__h=[],jt.__e(e,t.__v)}}jt.__b=function(t){No=null,YA&&YA(t)},jt.__r=function(t){ZA&&ZA(t);var e=(No=t.__c).__H;e&&(yx===No?(e.__h=[],No.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=bx,n.__N=n.i=void 0})):(e.__h.forEach(Mg),e.__h.forEach(_x),e.__h=[])),yx=No},jt.diffed=function(t){XA&&XA(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(GA.push(e)!==1&&qA===jt.requestAnimationFrame||((qA=jt.requestAnimationFrame)||bY)(yY)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==bx&&(n.__=n.__V),n.i=void 0,n.__V=bx})),yx=No=null},jt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Mg),n.__h=n.__h.filter(function(r){return!r.__||_x(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],jt.__e(r,n.__v)}}),KA&&KA(t,e)},jt.unmount=function(t){JA&&JA(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Mg(r)}catch(i){e=i}}),n.__H=void 0,e&&jt.__e(e,n.__v))};var QA=typeof requestAnimationFrame=="function";function bY(t){var e,n=function(){clearTimeout(r),QA&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);QA&&(e=requestAnimationFrame(n))}function Mg(t){var e=No,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),No=e}function _x(t){var e=No;t.__c=t.__(),No=e}function _Y(t,e){for(var n in e)t[n]=e[n];return t}function eM(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function tM(t){this.props=t}(tM.prototype=new bs).isPureReactComponent=!0,tM.prototype.shouldComponentUpdate=function(t,e){return eM(this.props,t)||eM(this.state,e)};var nM=jt.__b;jt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),nM&&nM(t)};var xY=jt.__e;jt.__e=function(t,e,n,r){if(t.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}xY(t,e,n,r)};var rM=jt.unmount;function iM(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=_Y({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return iM(r,e,n)})),t}function sM(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return sM(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function xx(){this.__u=0,this.t=null,this.__b=null}function oM(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Dg(){this.u=null,this.o=null}jt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),rM&&rM(t)},(xx.prototype=new bs).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=oM(r.__v),s=!1,a=function(){s||(s=!0,n.__R=null,i?i(o):o())};n.__R=a;var o=function(){if(!--r.__u){if(r.state.__a){var g=r.state.__a;r.__v.__k[0]=sM(g,g.__c.__P,g.__c.__O)}var y;for(r.setState({__a:r.__b=null});y=r.t.pop();)y.forceUpdate()}},p=e.__h===!0;r.__u++||p||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},xx.prototype.componentWillUnmount=function(){this.t=[]},xx.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=iM(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&ce(tr,null,t.fallback);return i&&(i.__h=null),[ce(tr,null,e.__a?null:t.children),i]};var aM=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function vY(t){return this.getChildContext=function(){return t.context},t.children}function wY(t){var e=this,n=t.i;e.componentWillUnmount=function(){af(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),af(ce(vY,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function kY(t,e){var n=ce(wY,{__v:t,i:e});return n.containerInfo=e,n}(Dg.prototype=new bs).__a=function(t){var e=this,n=oM(e.__v),r=e.o.get(t);return r[0]++,function(i){var s=function(){e.props.revealOrder?(r.push(i),aM(e,t,r)):i()};n?n(s):s()}},Dg.prototype.render=function(t){this.u=null,this.o=new Map;var e=Ag(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Dg.prototype.componentDidUpdate=Dg.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){aM(t,n,e)})};var EY=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,SY=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,CY=typeof document<"u",TY=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};bs.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(bs.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var lM=jt.event;function AY(){}function MY(){return this.cancelBubble}function DY(){return this.defaultPrevented}jt.event=function(t){return lM&&(t=lM(t)),t.persist=AY,t.isPropagationStopped=MY,t.isDefaultPrevented=DY,t.nativeEvent=t};var cM={configurable:!0,get:function(){return this.class}},uM=jt.vnode;jt.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var i=e.indexOf("-")===-1;for(var s in r={},n){var a=n[s];CY&&s==="children"&&e==="noscript"||s==="value"&&"defaultValue"in n&&a==null||(s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+e)&&!TY(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&SY.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=a)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Ag(n.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Ag(n.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),t.props=r,n.class!=n.className&&(cM.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",cM))}t.$$typeof=EY,uM&&uM(t)};var dM=jt.__r;jt.__r=function(t){dM&&dM(t),t.__c};const hM=[],vx=new Map;function Ig(t){hM.push(t),vx.forEach(e=>{pM(e,t)})}function IY(t){t.isConnected&&t.getRootNode&&fM(t.getRootNode())}function fM(t){let e=vx.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=NY();n&&(e.nonce=n);const r=t===document?document.head:t,i=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,i)}vx.set(t,e),PY(e)}}function PY(t){for(const e of hM)pM(t,e)}function pM(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((i,s)=>{i=i.trim(),i&&n.insertRule(i+"}",r+s)})}let wx;function NY(){return wx===void 0&&(wx=RY()),wx}function RY(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&fM(document);var OY=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';Ig(OY);class kx{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Ex(t){t.parentNode&&t.parentNode.removeChild(t)}function _i(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(BY(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function BY(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function VY(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let i=0;i<n.length;i+=1){let s=n[i].querySelectorAll(e);for(let a=0;a<s.length;a+=1)r.push(s[a])}return r}const zY=/(top|left|right|bottom|width|height)$/i;function lf(t,e){for(let n in e)mM(t,n,e[n])}function mM(t,e,n){n==null?t.style[e]="":typeof n=="number"&&zY.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function gM(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let yM=0;function sl(){return yM+=1,"fc-dom-"+yM}function Pg(t){t.preventDefault()}function LY(t,e){return n=>{let r=_i(n.target,t);r&&e.call(r,n,r)}}function bM(t,e,n,r){let i=LY(n,r);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function FY(t,e,n,r){let i;return bM(t,"mouseover",e,(s,a)=>{if(a!==i){i=a,n(s,a);let o=p=>{i=null,r(p,a),a.removeEventListener("mouseleave",o)};a.addEventListener("mouseleave",o)}})}const _M=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function $Y(t,e){let n=r=>{e(r),_M.forEach(i=>{t.removeEventListener(i,n)})};_M.forEach(r=>{t.addEventListener(r,n)})}function xM(t){return Object.assign({onClick:t},vM(t))}function vM(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let wM=0;function wc(){return wM+=1,String(wM)}function Sx(){document.body.classList.add("fc-not-allowed")}function Cx(){document.body.classList.remove("fc-not-allowed")}function jY(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",Pg)}function HY(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",Pg)}function UY(t){t.addEventListener("contextmenu",Pg)}function WY(t){t.removeEventListener("contextmenu",Pg)}function qY(t){let e=[],n=[],r,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)i=n[r],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function GY(t,e,n){let r,i;for(r=0;r<n.length;r+=1)if(i=YY(t,e,n[r]),i)return i;return 0}function YY(t,e,n){return n.func?n.func(t,e):ZY(t[n.field],e[n.field])*(n.order||1)}function ZY(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function Ku(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function cf(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,i,s)=>r.replace("$"+s,i||""),t):n}function XY(t,e){return t-e}function Ng(t){return t%1===0}function KY(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const kM=["years","months","days","milliseconds"],JY=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Sn(t,e){return typeof t=="string"?QY(t):typeof t=="object"&&t?EM(t):typeof t=="number"?EM({[e||"milliseconds"]:t}):null}function QY(t){let e=JY.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function EM(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function eZ(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Tx(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function tZ(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function nZ(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function rZ(t){return Ju(t)/365}function iZ(t){return Ju(t)/30}function Ju(t){return co(t)/864e5}function co(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Ax(t,e){let n=null;for(let r=0;r<kM.length;r+=1){let i=kM[r];if(e[i]){let s=t[i]/e[i];if(!Ng(s)||n!==null&&n!==s)return null;n=s}else if(t[i])return null}return n}function Mx(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function ol(t,e,n){if(t===e)return!0;let r=t.length,i;if(r!==e.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const sZ=["sun","mon","tue","wed","thu","fri","sat"];function SM(t,e){let n=cl(t);return n[2]+=e*7,es(n)}function qr(t,e){let n=cl(t);return n[2]+=e,es(n)}function al(t,e){let n=cl(t);return n[6]+=e,es(n)}function oZ(t,e){return ll(t,e)/7}function ll(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function aZ(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function lZ(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function cZ(t,e){return(e.valueOf()-t.valueOf())/1e3}function uZ(t,e){let n=nr(t),r=nr(e);return{years:0,months:0,days:Math.round(ll(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function dZ(t,e){let n=Rg(t,e);return n!==null&&n%7===0?n/7:null}function Rg(t,e){return ul(t)===ul(e)?Math.round(ll(t,e)):null}function nr(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function hZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function fZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function pZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function mZ(t,e,n){let r=t.getUTCFullYear(),i=Dx(t,r,e,n);if(i<1)return Dx(t,r-1,e,n);let s=Dx(t,r+1,e,n);return s>=1?Math.min(i,s):i}function Dx(t,e,n,r){let i=es([e,0,1+gZ(e,n,r)]),s=nr(t),a=Math.round(ll(i,s));return Math.floor(a/7)+1}function gZ(t,e,n){let r=7+e-n;return-((7+es([t,0,r]).getUTCDay()-e)%7)+r-1}function CM(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function TM(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function cl(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function es(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function AM(t){return!isNaN(t.valueOf())}function ul(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function MM(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Ix(e,!0)))),r}function uf(t){return t.toISOString().replace(/T.*$/,"")}function yZ(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function bZ(t){return Ku(t.getUTCHours(),2)+":"+Ku(t.getUTCMinutes(),2)+":"+Ku(t.getUTCSeconds(),2)}function Ix(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=Math.round(r%60);return e?`${n+Ku(i,2)}:${Ku(s,2)}`:`GMT${n}${i}${s?`:${Ku(s,2)}`:""}`}function Ht(t,e,n){let r,i;return function(...s){if(!r)i=t.apply(this,s);else if(!ol(r,s)){let a=t.apply(this,s);(!e||!e(a,i))&&(i=a)}return r=s,i}}function Og(t,e,n){let r,i;return s=>(r?Ro(r,s)||(i=t.call(this,s)):i=t.call(this,s),r=s,i)}const DM={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Bg={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Vg=/\s*([ap])\.?m\.?/i,_Z=/,/g,xZ=/\s+/g,vZ=/\u200e/g,wZ=/UTC|GMT/;class kZ{constructor(e){let n={},r={},i=0;for(let s in e)s in DM?(r[s]=e[s],i=Math.max(DM[s],i)):(n[s]=e[s],s in Bg&&(i=Math.max(Bg[s],i)));this.standardDateProps=n,this.extendedSettings=r,this.severity=i,this.buildFormattingFunc=Ht(IM)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,i){let{standardDateProps:s,extendedSettings:a}=this,o=MZ(e.marker,n.marker,r.calendarSystem);if(!o)return this.format(e,r);let p=o;p>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(p=1);let g=this.format(e,r),y=this.format(n,r);if(g===y)return g;let v=DZ(s,p),E=IM(v,a,r),T=E(e),D=E(n),N=IZ(g,T,y,D),B=a.separator||i||r.defaultSeparator||"";return N?N.before+T+B+D+N.after:g+B+y}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function IM(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?i=>Ix(i.timeZoneOffset):r===0&&e.week?i=>AZ(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):EZ(t,e,n)}function EZ(t,e,n){t=Object.assign({},t),e=Object.assign({},e),SZ(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let s=Object.assign({},t);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return s=>{let{marker:a}=s,o;i&&!a.getUTCMinutes()?o=i:o=r;let p=o.format(a);return CZ(p,s,t,e,n)}}function SZ(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function CZ(t,e,n,r,i){return t=t.replace(vZ,""),n.timeZoneName==="short"&&(t=TZ(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Ix(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(_Z,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(Vg,"").trim():r.meridiem==="narrow"?t=t.replace(Vg,(s,a)=>a.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(Vg,(s,a)=>`${a.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(Vg,s=>s.toLocaleLowerCase())),t=t.replace(xZ," "),t=t.trim(),t}function TZ(t,e){let n=!1;return t=t.replace(wZ,()=>(n=!0,e)),n||(t+=` ${e}`),t}function AZ(t,e,n,r,i){let s=[];return i==="long"?s.push(n):(i==="short"||i==="narrow")&&s.push(e),(i==="long"||i==="short")&&s.push(" "),s.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&s.reverse(),s.join("")}function MZ(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:ul(t)!==ul(e)?1:0}function DZ(t,e){let n={};for(let r in t)(!(r in Bg)||Bg[r]<=e)&&(n[r]=t[r]);return n}function IZ(t,e,n,r){let i=0;for(;i<t.length;){let s=t.indexOf(e,i);if(s===-1)break;let a=t.substr(0,s);i=s+e.length;let o=t.substr(i),p=0;for(;p<n.length;){let g=n.indexOf(r,p);if(g===-1)break;let y=n.substr(0,g);p=g+r.length;let v=n.substr(p);if(a===y&&o===v)return{before:a,after:o}}}return null}function PM(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function zg(t,e,n,r){let i=PM(t,n.calendarSystem),s=e?PM(e,n.calendarSystem):null;return{date:i,start:i,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class PZ{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,zg(e,null,n,r))}formatRange(e,n,r,i){return r.cmdFormatter(this.cmdStr,zg(e,n,r,i))}}class NZ{constructor(e){this.func=e}format(e,n,r){return this.func(zg(e,null,n,r))}formatRange(e,n,r,i){return this.func(zg(e,n,r,i))}}function or(t){return typeof t=="object"&&t?new kZ(t):typeof t=="string"?new PZ(t):typeof t=="function"?new NZ(t):null}const NM={navLinkDayClick:Ie,navLinkWeekClick:Ie,duration:Sn,bootstrapFontAwesome:Ie,buttonIcons:Ie,customButtons:Ie,defaultAllDayEventDuration:Sn,defaultTimedEventDuration:Sn,nextDayThreshold:Sn,scrollTime:Sn,scrollTimeReset:Boolean,slotMinTime:Sn,slotMaxTime:Sn,dayPopoverFormat:or,slotDuration:Sn,snapDuration:Sn,headerToolbar:Ie,footerToolbar:Ie,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:or,dayHeaderClassNames:Ie,dayHeaderContent:Ie,dayHeaderDidMount:Ie,dayHeaderWillUnmount:Ie,dayCellClassNames:Ie,dayCellContent:Ie,dayCellDidMount:Ie,dayCellWillUnmount:Ie,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Ie,weekNumbers:Boolean,weekNumberClassNames:Ie,weekNumberContent:Ie,weekNumberDidMount:Ie,weekNumberWillUnmount:Ie,editable:Boolean,viewClassNames:Ie,viewDidMount:Ie,viewWillUnmount:Ie,nowIndicator:Boolean,nowIndicatorClassNames:Ie,nowIndicatorContent:Ie,nowIndicatorDidMount:Ie,nowIndicatorWillUnmount:Ie,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Ie,locale:Ie,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Ie,eventOrder:qY,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Ie,contentHeight:Ie,direction:String,weekNumberFormat:or,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Ie,initialDate:Ie,now:Ie,eventDataTransform:Ie,stickyHeaderDates:Ie,stickyFooterScrollbar:Ie,viewHeight:Ie,defaultAllDay:Boolean,eventSourceFailure:Ie,eventSourceSuccess:Ie,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Ie,eventConstraint:Ie,eventAllow:Ie,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Ie,eventContent:Ie,eventDidMount:Ie,eventWillUnmount:Ie,selectConstraint:Ie,selectOverlap:Ie,selectAllow:Ie,droppable:Boolean,unselectCancel:String,slotLabelFormat:Ie,slotLaneClassNames:Ie,slotLaneContent:Ie,slotLaneDidMount:Ie,slotLaneWillUnmount:Ie,slotLabelClassNames:Ie,slotLabelContent:Ie,slotLabelDidMount:Ie,slotLabelWillUnmount:Ie,dayMaxEvents:Ie,dayMaxEventRows:Ie,dayMinWidth:Number,slotLabelInterval:Sn,allDayText:String,allDayClassNames:Ie,allDayContent:Ie,allDayDidMount:Ie,allDayWillUnmount:Ie,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:or,rerenderDelay:Number,moreLinkText:Ie,moreLinkHint:Ie,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Ie,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Sn,hiddenDays:Ie,fixedWeekCount:Boolean,validRange:Ie,visibleRange:Ie,titleFormat:Ie,eventInteractive:Boolean,noEventsText:String,viewHint:Ie,navLinkHint:Ie,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Ie,moreLinkClassNames:Ie,moreLinkContent:Ie,moreLinkDidMount:Ie,moreLinkWillUnmount:Ie,monthStartFormat:or,handleCustomRendering:Ie,customRenderingMetaMap:Ie,customRenderingReplaces:Boolean},df={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},RM={datesSet:Ie,eventsSet:Ie,eventAdd:Ie,eventChange:Ie,eventRemove:Ie,windowResize:Ie,eventClick:Ie,eventMouseEnter:Ie,eventMouseLeave:Ie,select:Ie,unselect:Ie,loading:Ie,_unmount:Ie,_beforeprint:Ie,_afterprint:Ie,_noEventDrop:Ie,_noEventResize:Ie,_resize:Ie,_scrollRequest:Ie},OM={buttonText:Ie,buttonHints:Ie,views:Ie,plugins:Ie,initialEvents:Ie,events:Ie,eventSources:Ie},kc={headerToolbar:Ec,footerToolbar:Ec,buttonText:Ec,buttonHints:Ec,buttonIcons:Ec,dateIncrement:Ec,plugins:Lg,events:Lg,eventSources:Lg,resources:Lg};function Ec(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Ro(t,e):t===e}function Lg(t,e){return Array.isArray(t)&&Array.isArray(e)?ol(t,e):t===e}const RZ={type:String,component:Ie,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Ie,usesMinMaxTime:Boolean,classNames:Ie,content:Ie,didMount:Ie,willUnmount:Ie};function Px(t){return Rx(t,kc)}function Nx(t,e){let n={},r={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(r[i]=t[i]);return{refined:n,extra:r}}function Ie(t){return t}const{hasOwnProperty:Fg}=Object.prototype;function Rx(t,e){let n={};if(e){for(let r in e)if(e[r]===Ec){let i=[];for(let s=t.length-1;s>=0;s-=1){let a=t[s][r];if(typeof a=="object"&&a)i.unshift(a);else if(a!==void 0){n[r]=a;break}}i.length&&(n[r]=Rx(i))}}for(let r=t.length-1;r>=0;r-=1){let i=t[r];for(let s in i)s in n||(n[s]=i[s])}return n}function Sc(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function ha(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function BM(t){let e={};for(let n of t)e[n]=!0;return e}function Ox(t){let e=[];for(let n in t)e.push(t[n]);return e}function Ro(t,e){if(t===e)return!0;for(let n in t)if(Fg.call(t,n)&&!(n in e))return!1;for(let n in e)if(Fg.call(e,n)&&t[n]!==e[n])return!1;return!0}const OZ=/^on[A-Z]/;function BZ(t,e){const n=Bx(t,e);for(let r of n)if(!OZ.test(r))return!1;return!0}function Bx(t,e){let n=[];for(let r in t)Fg.call(t,r)&&(r in e||n.push(r));for(let r in e)Fg.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function Vx(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&VZ(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function VZ(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function zZ(t,e=0,n,r=1){let i=[];n==null&&(n=Object.keys(t).length);for(let s=e;s<n;s+=r){let a=t[s];a!==void 0&&i.push(a)}return i}let VM={};function LZ(t,e){VM[t]=e}function FZ(t){return new VM[t]}class $Z{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return es(e)}markerToArray(e){return cl(e)}}LZ("gregory",$Z);const jZ=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function HZ(t){let e=jZ.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(AM(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class UZ{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=FZ(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):es(CM(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=es(e)),n===null||!AM(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=HZ(e);if(n===null)return null;let{marker:r}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return ul(e)===ul(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return ul(e)===ul(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=dZ(e,n),r!==null?{unit:"week",value:r}:(r=Rg(e,n),r!==null?{unit:"day",value:r}:(r=aZ(e,n),Ng(r)?{unit:"hour",value:r}:(r=lZ(e,n),Ng(r)?{unit:"minute",value:r}:(r=cZ(e,n),Ng(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let i;return r.years&&(i=this.diffWholeYears(e,n),i!==null)?i/rZ(r):r.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/iZ(r):r.days&&(i=Rg(e,n),i!==null)?i/Ju(r):(n.valueOf()-e.valueOf())/co(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?nr(e):n==="hour"?hZ(e):n==="minute"?fZ(e):n==="second"?pZ(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):mZ(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,i={}){return i.isEndExclusive&&(n=al(n,-1)),r.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),MM(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?es(CM(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):es(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-TM(cl(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(cl(e)):null}toDate(e,n){return this.timeZone==="local"?TM(cl(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(cl(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class hf{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}hf.prototype.classes={},hf.prototype.iconClasses={},hf.prototype.baseIconClass="",hf.prototype.iconOverridePrefix="";function $g(t){t();let e=jt.debounceRendering,n=[];function r(i){n.push(i)}for(jt.debounceRendering=r,af(ce(WZ,{}),document.createElement("div"));n.length;)n.shift()();jt.debounceRendering=e}class WZ extends bs{render(){return ce("div",{})}componentDidMount(){this.setState({})}}function zM(t){let e=gY(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,i=n.apply(this,arguments);if(r){let s=[];this.shouldComponentUpdate=a=>{this.props.value!==a.value&&s.forEach(o=>{o.context=a.value,o.forceUpdate()})},this.sub=a=>{s.push(a);let o=a.componentWillUnmount;a.componentWillUnmount=()=>{s.splice(s.indexOf(a),1),o&&o.call(a)}}}return i},e}class qZ{constructor(e,n,r,i){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const fa=zM({});function GZ(t,e,n,r,i,s,a,o,p,g,y,v,E){return{dateEnv:i,options:n,pluginHooks:a,emitter:g,dispatch:o,getCurrentData:p,calendarApi:y,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:s,isRtl:n.direction==="rtl",addResizeHandler(T){g.on("_resize",T)},removeResizeHandler(T){g.off("_resize",T)},createScrollResponder(T){return new qZ(T,g,Sn(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:v,unregisterInteractiveComponent:E}}class Cc extends bs{shouldComponentUpdate(e,n){return this.debug&&console.log(Bx(e,this.props),Bx(n,this.state)),!Vx(this.props,e,this.propEquality)||!Vx(this.state,n,this.stateEquality)}safeSetState(e){Vx(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}Cc.addPropsEquality=YZ,Cc.addStateEquality=ZZ,Cc.contextType=fa,Cc.prototype.propEquality={},Cc.prototype.stateEquality={};class Rn extends Cc{}Rn.contextType=fa;function YZ(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function ZZ(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function pa(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class zx extends Rn{constructor(){super(...arguments),this.id=wc(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Lx(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&pa(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:i,defaultGenerator:s,renderProps:a}=e,o=LM(e,[],this.handleEl);let p=!1,g,y=[],v;if(i!=null){const E=typeof i=="function"?i(a,ce):i;if(E===!0)p=!0;else{const T=E&&typeof E=="object";T&&"html"in E?o.dangerouslySetInnerHTML={__html:E.html}:T&&"domNodes"in E?y=Array.prototype.slice.call(E.domNodes):(T?MA(E):typeof E!="function")?g=E:v=E}}else p=!Lx(e.generatorName,r);return p&&s&&(g=s(a)),this.queuedDomNodes=y,this.currentGeneratorMeta=v,ce(e.elTag,o,g)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:i}=this,{handleCustomRendering:s,customRenderingMetaMap:a}=i.options;if(s){const o=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:a==null?void 0:a[r.generatorName];o&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:o},r),{elClasses:(r.elClasses||[]).filter(XZ)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!ol(e,n)){n.forEach(Ex);for(let i of e)r.appendChild(i);this.currentDomNodes=e}}}zx.addPropsEquality({elClasses:ol,elStyle:Ro,elAttrs:BZ,renderProps:Ro});function Lx(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function LM(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function XZ(t){return!!t}const FM=zM(0);class xi extends bs{constructor(){super(...arguments),this.InnerContent=KZ.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(pa(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=JZ(e.classNameGenerator,e.renderProps);if(e.children){const r=LM(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,r);return e.elTag?ce(e.elTag,r,i):i}else return ce(zx,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}xi.contextType=FM;function KZ(t,e){const n=t.props;return ce(zx,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function JZ(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class ff extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,i={view:n.viewApi};return ce(xi,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...$M(e.viewSpec),...e.elClasses||[]],renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount}),()=>e.children)}}function $M(t){return[`fc-${t.type}-view`,"fc-view"]}function QZ(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function jM(t,e){let n=[],{start:r}=e,i,s;for(t.sort(eX),i=0;i<t.length;i+=1)s=t[i],s.start>r&&n.push({start:r,end:s.start}),s.end>r&&(r=s.end);return r<e.end&&n.push({start:r,end:e.end}),n}function eX(t,e){return t.start.valueOf()-e.start.valueOf()}function dl(t,e){let{start:n,end:r}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function tX(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function Fx(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function jg(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function ma(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function nX(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function HM(t){let e=Math.floor(ll(t.start,t.end))||1,n=nr(t.start),r=qr(n,e);return{start:n,end:r}}function $x(t,e=Sn(0)){let n=null,r=null;if(t.end){r=nr(t.end);let i=t.end.valueOf()-r.valueOf();i&&i>=co(e)&&(r=qr(r,1))}return t.start&&(n=nr(t.start),r&&r<=n&&(r=qr(n,1))),{start:n,end:r}}function rX(t){let e=$x(t);return ll(e.start,e.end)>1}function Qu(t,e,n,r){return r==="year"?Sn(n.diffWholeYears(t,e),"year"):r==="month"?Sn(n.diffWholeMonths(t,e),"month"):uZ(t,e)}function iX(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function sX(t,e){let n=t.initialDate;return n!=null?e.createMarker(n):pf(t.now,e)}function pf(t,e){return typeof t=="function"&&(t=t()),t==null?e.createNowMarker():e.createMarker(t)}class UM{constructor(e){this.props=e,this.nowDate=pf(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:i}=this.props,s=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,r)}buildNext(e,n,r){let{dateEnv:i}=this.props,s=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,r)}build(e,n,r=!0){let{props:i}=this,s,a,o,p,g,y;return s=this.buildValidRange(),s=this.trimHiddenDays(s),r&&(e=nX(e,s)),a=this.buildCurrentRangeInfo(e,n),o=/^(year|month|week|day)$/.test(a.unit),p=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),p=this.trimHiddenDays(p),g=p,i.showNonCurrentDates||(g=dl(g,a.range)),g=this.adjustActiveRange(g),g=dl(g,s),y=Fx(a.range,s),ma(p,e)||(e=p.start),{currentDate:e,validRange:s,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:g,renderRange:p,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:y,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,i=null,s=null,a=null,o;return r.duration?(i=r.duration,s=r.durationUnit,a=this.buildRangeFromDuration(e,n,i,s)):(o=this.props.dayCount)?(s="day",a=this.buildRangeFromDayCount(e,n,o)):(a=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=this.getFallbackDuration(),s=Mx(i).unit,a=this.buildRangeFromDuration(e,n,i,s)),{duration:i,unit:s,range:a}}getFallbackDuration(){return Sn({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:s}=this.props,{start:a,end:o}=e;return r&&(Ju(i)<0&&(a=nr(a),a=n.add(a,i)),Ju(s)>1&&(o=nr(o),o=qr(o,-1),o=n.add(o,s))),{start:a,end:o}}buildRangeFromDuration(e,n,r,i){let{dateEnv:s,dateAlignment:a}=this.props,o,p,g;if(!a){let{dateIncrement:v}=this.props;v&&co(v)<co(r)?a=Mx(v).unit:a=i}Ju(r)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,n),o=nr(o));function y(){o=s.startOf(e,a),p=s.add(o,r),g={start:o,end:p}}return y(),this.trimHiddenDays(g)||(e=this.skipHiddenDays(e,n),y()),g}buildRangeFromDayCount(e,n,r){let{dateEnv:i,dateAlignment:s}=this.props,a=0,o=e,p;s&&(o=i.startOf(o,s)),o=nr(o),o=this.skipHiddenDays(o,n),p=o;do p=qr(p,1),this.isHiddenDay(p)||(a+=1);while(a<r);return{start:o,end:p}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,i=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,s=this.refineRange(i);return s&&(s.start==null||s.end==null)?null:s}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?Sn(1,r):e||Sn({days:1}))}refineRange(e){if(e){let n=QZ(e,this.props.dateEnv);return n&&(n=$x(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=qr(e,n);return e}}function jx(t,e,n,r){return{instanceId:wc(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function oX(t,e,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(t,n);if(s){let{allDay:a}=t;return a==null&&(a=e,a==null&&(a=s.allDayGuess,a==null&&(a=!1))),{allDay:a,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}function Tc(t,e,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:a,instances:o}=t;o=Sc(o,p=>!a[p.defId].recurringDef);for(let p in a){let g=a[p];if(g.recurringDef){let{duration:y}=g.recurringDef;y||(y=g.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let v=aX(g,y,e,r,i.recurringTypes);for(let E of v){let T=jx(p,{start:E,end:r.add(E,y)});o[T.instanceId]=T}}}return{defs:a,instances:o}}function aX(t,e,n,r,i){let a=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(a=a.map(nr)),a}const Hg={id:String,groupId:String,title:String,url:String,interactive:Boolean},WM={start:Ie,end:Ie,date:Ie,allDay:Boolean},lX=Object.assign(Object.assign(Object.assign({},Hg),WM),{extendedProps:Ie});function qM(t,e,n,r,i=Hx(n),s,a){let{refined:o,extra:p}=GM(t,n,i),g=uX(e,n),y=oX(o,g,n.dateEnv,n.pluginHooks.recurringTypes);if(y){let E=Ux(o,p,e?e.sourceId:"",y.allDay,!!y.duration,n,s);return E.recurringDef={typeId:y.typeId,typeData:y.typeData,duration:y.duration},{def:E,instance:null}}let v=cX(o,g,n,r);if(v){let E=Ux(o,p,e?e.sourceId:"",v.allDay,v.hasEnd,n,s),T=jx(E.defId,v.range,v.forcedStartTzo,v.forcedEndTzo);return a&&E.publicId&&a[E.publicId]&&(T.instanceId=a[E.publicId]),{def:E,instance:T}}return null}function GM(t,e,n=Hx(e)){return Nx(t,n)}function Hx(t){return Object.assign(Object.assign(Object.assign({},Wg),lX),t.pluginHooks.eventRefiners)}function Ux(t,e,n,r,i,s,a){let o={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(a&&t.id?a[t.id]:"")||wc(),sourceId:n,allDay:r,hasEnd:i,interactive:t.interactive,ui:qg(t,s),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let p of s.pluginHooks.eventDefMemberAdders)Object.assign(o,p(t));return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function cX(t,e,n,r){let{allDay:i}=t,s,a=null,o=!1,p,g=null,y=t.start!=null?t.start:t.date;if(s=n.dateEnv.createMarkerMeta(y),s)a=s.marker;else if(!r)return null;return t.end!=null&&(p=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!s||s.isTimeUnspecified)&&(!p||p.isTimeUnspecified)),i&&a&&(a=nr(a)),p&&(g=p.marker,i&&(g=nr(g)),a&&g<=a&&(g=null)),g?o=!0:r||(o=n.options.forceEventDuration||!1,g=n.dateEnv.add(a,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:o,range:{start:a,end:g},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:p?p.forcedTzo:null}}function uX(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function mf(t,e,n,r,i,s){let a=_s(),o=Hx(n);for(let p of t){let g=qM(p,e,n,r,o,i,s);g&&Wx(g,a)}return a}function Wx(t,e=_s()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function qx(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],i=Ug(t,s=>dX(r,s));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return _s()}function dX(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function _s(){return{defs:{},instances:{}}}function Gx(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function Ug(t,e){let n=Sc(t.defs,e),r=Sc(t.instances,i=>n[i.defId]);return{defs:n,instances:r}}function hX(t,e){let{defs:n,instances:r}=t,i={},s={};for(let a in n)e.defs[a]||(i[a]=n[a]);for(let a in r)!e.instances[a]&&i[r[a].defId]&&(s[a]=r[a]);return{defs:i,instances:s}}function fX(t,e){return Array.isArray(t)?mf(t,null,e,!0):typeof t=="object"&&t?mf([t],null,e,!0):t!=null?String(t):null}function YM(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const Wg={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Ie,overlap:Ie,allow:Ie,className:YM,classNames:YM,color:String,backgroundColor:String,borderColor:String,textColor:String},pX={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function qg(t,e){let n=fX(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function ZM(t){return t.reduce(mX,pX)}function mX(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const gX={id:String,defaultAllDay:Boolean,url:String,format:String,events:Ie,eventDataTransform:Ie,success:Ie,failure:Ie};function XM(t,e,n=KM(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:i,extra:s}=Nx(r,n),a=yX(i,e);if(a)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:wc(),sourceDefId:a.sourceDefId,meta:a.meta,ui:qg(i,e),extendedProps:s}}return null}function KM(t){return Object.assign(Object.assign(Object.assign({},Wg),gX),t.pluginHooks.eventSourceRefiners)}function yX(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let s=n[r].parseMeta(t);if(s)return{sourceDefId:r,meta:s}}return null}function bX(t,e,n,r,i){switch(e.type){case"RECEIVE_EVENTS":return _X(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return xX(t,n[e.sourceId],e.rawEvents,r.activeRange,i);case"ADD_EVENTS":return vX(t,e.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Gx(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Tc(t,r.activeRange,i):t;case"REMOVE_EVENTS":return hX(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return tD(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ug(t,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return _s();default:return t}}function _X(t,e,n,r,i,s){if(e&&n===e.latestFetchId){let a=mf(JM(i,e,s),e,s);return r&&(a=Tc(a,r,s)),Gx(tD(t,e.sourceId),a)}return t}function xX(t,e,n,r,i){const{defIdMap:s,instanceIdMap:a}=kX(t);let o=mf(JM(n,e,i),e,i,!1,s,a);return Tc(o,r,i)}function JM(t,e,n){let r=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=QM(t,i)),r&&(t=QM(t,r)),t}function QM(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let i=e(r);i?n.push(i):i==null&&n.push(r)}}return n}function vX(t,e,n,r){return n&&(e=Tc(e,n,r)),Gx(t,e)}function eD(t,e,n){let{defs:r}=t,i=ha(t.instances,s=>r[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:n.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:n.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:s.forcedEndTzo}));return{defs:r,instances:i}}function tD(t,e){return Ug(t,n=>n.sourceId!==e)}function wX(t,e){return{defs:t.defs,instances:Sc(t.instances,n=>!e[n.instanceId])}}function kX(t){const{defs:e,instances:n}=t,r={},i={};for(let s in e){const a=e[s],{publicId:o}=a;o&&(r[o]=s)}for(let s in n){const a=n[s],o=e[a.defId],{publicId:p}=o;p&&(i[p]=s)}return{defIdMap:r,instanceIdMap:i}}class Gg{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){EX(this.handlers,e,n)}off(e,n){SX(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],i=this.options&&this.options[e],s=[].concat(i||[],r);for(let a of s)a.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function EX(t,e,n){(t[e]||(t[e]=[])).push(n)}function SX(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const CX={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function TX(t,e){return mf(AX(t),null,e)}function AX(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},CX),n)),e}function nD(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Yx(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function MX(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Yx(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,HX(t,e.dateEnv)),n}function rD(t,e,n){let{dateEnv:r,options:i}=n,s=e;return t?(s=nr(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Zx(t,e,n,r){let i=Yg(t.defs,e),s=_s();for(let a in t.defs){let o=t.defs[a];s.defs[a]=DX(o,i[a],n,r)}for(let a in t.instances){let o=t.instances[a],p=s.defs[o.defId];s.instances[a]=IX(o,p,i[o.defId],n,r)}return s}function DX(t,e,n,r){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let a of r.pluginHooks.eventDefMutationAppliers)a(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function IX(t,e,n,r,i){let{dateEnv:s}=i,a=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,p=Object.assign({},t);return a&&(p.range=HM(p.range)),r.datesDelta&&n.startEditable&&(p.range={start:s.add(p.range.start,r.datesDelta),end:s.add(p.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(p.range={start:s.add(p.range.start,r.startDelta),end:p.range.end}),r.endDelta&&n.durationEditable&&(p.range={start:p.range.start,end:s.add(p.range.end,r.endDelta)}),o&&(p.range={start:p.range.start,end:rD(e.allDay,p.range.start,i)}),e.allDay&&(p.range={start:nr(p.range.start),end:nr(p.range.end)}),p.range.end<p.range.start&&(p.range.end=rD(e.allDay,p.range.start,i)),p}class ed{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class ur{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in WM)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=Hg[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Hg)n=Hg[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Wg){let r=Wg[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,i=r.createMarker(e);if(i&&this._instance){let s=this._instance.range,a=Qu(s.start,i,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(e,n={}){let{dateEnv:r}=this._context,i;if(!(e!=null&&(i=r.createMarker(e),!i))&&this._instance)if(i){let s=Qu(this._instance.range.end,i,r,n.granularity);this.mutate({endDelta:s})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:i}=this._context,s={allDay:r.allDay},a=i.createMarker(e),o;if(a&&!(n!=null&&(o=i.createMarker(n),!o))&&this._instance){let p=this._instance.range;r.allDay===!0&&(p=HM(p));let g=Qu(p.start,a,i,r.granularity);if(o){let y=Qu(p.end,o,i,r.granularity);eZ(g,y)?this.mutate({datesDelta:g,standardProps:s}):this.mutate({startDelta:g,endDelta:y,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:g,standardProps:s})}}moveStart(e){let n=Sn(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=Sn(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=Sn(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,i=or(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:s}=i.getCurrentData(),a=qx(s,n.instanceId);a=Zx(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let p=new ur(i,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:a}),i.emitter.trigger("eventChange",{oldEvent:p,event:this,relatedEvents:Ac(a,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:s})}})}}remove(){let e=this._context,n=iD(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new ed(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:i,endStr:s}=this,a={allDay:n.allDay};return n.title&&(a.title=n.title),i&&(a.start=i),s&&(a.end=s),n.publicId&&(a.id=n.publicId),n.groupId&&(a.groupId=n.groupId),n.url&&(a.url=n.url),r.display&&r.display!=="auto"&&(a.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?a.color=r.backgroundColor:(r.backgroundColor&&(a.backgroundColor=r.backgroundColor),r.borderColor&&(a.borderColor=r.borderColor)),r.textColor&&(a.textColor=r.textColor),r.classNames.length&&(a.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,n.extendedProps):a.extendedProps=n.extendedProps),a}toJSON(){return this.toPlainObject()}}function iD(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Ac(t,e,n){let{defs:r,instances:i}=t,s=[],a=n?n.instanceId:"";for(let o in i){let p=i[o],g=r[p.defId];p.instanceId!==a&&s.push(new ur(e,g,p))}return s}function Xx(t,e,n,r){let i={},s={},a={},o=[],p=[],g=Yg(t.defs,e);for(let y in t.defs){let v=t.defs[y];g[v.defId].display==="inverse-background"&&(v.groupId?(i[v.groupId]=[],a[v.groupId]||(a[v.groupId]=v)):s[y]=[])}for(let y in t.instances){let v=t.instances[y],E=t.defs[v.defId],T=g[E.defId],D=v.range,N=!E.allDay&&r?$x(D,r):D,B=dl(N,n);B&&(T.display==="inverse-background"?E.groupId?i[E.groupId].push(B):s[v.defId].push(B):T.display!=="none"&&(T.display==="background"?o:p).push({def:E,ui:T,instance:v,range:B,isStart:N.start&&N.start.valueOf()===B.start.valueOf(),isEnd:N.end&&N.end.valueOf()===B.end.valueOf()}))}for(let y in i){let v=i[y],E=jM(v,n);for(let T of E){let D=a[y],N=g[D.defId];o.push({def:D,ui:N,instance:null,range:T,isStart:!1,isEnd:!1})}}for(let y in s){let v=s[y],E=jM(v,n);for(let T of E)o.push({def:t.defs[y],ui:g[y],instance:null,range:T,isStart:!1,isEnd:!1})}return{bg:o,fg:p}}function PX(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function sD(t,e){t.fcSeg=e}function td(t){return t.fcSeg||t.parentNode.fcSeg||null}function Yg(t,e){return ha(t,n=>oD(n,e))}function oD(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),ZM(n)}function Kx(t,e){let n=t.map(NX);return n.sort((r,i)=>GY(r,i,e)),n.map(r=>r._seg)}function NX(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:t})}function RX(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:i,ui:s}=t.eventRange,a=s.startEditable;for(let o of r)a=o(a,i,s,e);return a}function OX(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function BX(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function gf(t,e,n,r,i,s,a){let{dateEnv:o,options:p}=n,{displayEventTime:g,displayEventEnd:y}=p,v=t.eventRange.def,E=t.eventRange.instance;g==null&&(g=r!==!1),y==null&&(y=i!==!1);let T=E.range.start,D=E.range.end,N=s||t.start||t.eventRange.range.start,B=a||t.end||t.eventRange.range.end,V=nr(T).valueOf()===nr(N).valueOf(),U=nr(al(D,-1)).valueOf()===nr(al(B,-1)).valueOf();return g&&!v.allDay&&(V||U)?(N=V?T:N,B=U?D:B,y&&v.hasEnd?o.formatRange(N,B,e,{forcedStartTzo:s?null:E.forcedStartTzo,forcedEndTzo:a?null:E.forcedEndTzo}):o.format(N,e,{forcedTzo:s?null:E.forcedStartTzo})):""}function ga(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&ma(e,r.start)}}function VX(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function aD(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Jx(t,e){let{def:n,instance:r}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:a}=e,{eventInteractive:o}=a;return o==null&&(o=n.interactive,o==null&&(o=!!s.hasHandlers("eventClick"))),o?vM(p=>{s.trigger("eventClick",{el:p.target,event:new ur(e,n,r),jsEvent:p,view:e.viewApi})}):{}}const zX={start:Ie,end:Ie,allDay:Boolean};function LX(t,e,n){let r=FX(t,e),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return r}function FX(t,e){let{refined:n,extra:r}=Nx(t,zX),i=n.start?e.createMarkerMeta(n.start):null,s=n.end?e.createMarkerMeta(n.end):null,{allDay:a}=n;return a==null&&(a=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:a},r)}function $X(t,e){return tX(t.range,e.range)&&t.allDay===e.allDay&&jX(t,e)}function jX(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function HX(t,e){return Object.assign(Object.assign({},cD(t.range,e,t.allDay)),{allDay:t.allDay})}function lD(t,e,n){return Object.assign(Object.assign({},cD(t,e,n)),{timeZone:e.timeZone})}function cD(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function UX(t,e,n){let r=GM({editable:!1},n),i=Ux(r.refined,r.extra,"",t.allDay,!0,n);return{def:i,ui:oD(i,e),instance:jx(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function WX(t,e,n){let r=!1,i=function(o){r||(r=!0,e(o))},s=function(o){r||(r=!0,n(o))},a=t(i,s);a&&typeof a.then=="function"&&a.then(i,s)}class uD extends Error{constructor(e,n){super(e),this.response=n}}function qX(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(i=>{if(i.ok)return i.json().then(s=>[s,i],()=>{throw new uD("Failure parsing JSON",i)});throw new uD("Request failed",i)})}let Qx;function dD(){return Qx==null&&(Qx=GX()),Qx}function GX(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class YX extends Rn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{$g(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{$g(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,i=r||n.height==="auto"||n.contentHeight==="auto",s=!i&&n.height!=null?n.height:"",a=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return dD()||a.push("fc-liquid-hack"),e.children(a,s,i,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class nd{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function ZX(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function ev(t){return{[t.component.uid]:t}}const tv={};class XX{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),i;n=n||"day",i=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),s,a;for(let o in n)i.push(o);for(s=0;s<i.length;s+=1)if(a=n[i[s]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:pf(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=Sn(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),or(n))}formatRange(e,n,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),or(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let i=this.getCurrentData(),s=LX(r,i.dateEnv,Sn({days:1}));s&&(this.dispatch({type:"SELECT_DATES",selection:s}),nD(s,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),MX(e,n))}addEvent(e,n){if(e instanceof ur){let a=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Wx({def:a,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),i;if(n instanceof ed)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=Ox(r.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return console.warn(`Could not find an event source with ID "${n}"`),null;i=a.internalEventSource}let s=qM(e,i,r,!1);if(s){let a=new ur(r,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Wx(s)}),this.triggerEventAdd(a),a}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:iD(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:i}=n.eventStore;e=String(e);for(let s in r){let a=r[s];if(a.publicId===e){if(a.recurringDef)return new ur(n,a,null);for(let o in i){let p=i[o];if(p.defId===a.defId)return new ur(n,a,p)}}}return null}getEvents(){let e=this.getCurrentData();return Ac(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let i in n)r.push(new ed(e,n[i]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let i in r)if(r[i].publicId===e)return new ed(n,r[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ed)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=XM(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ed(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=Sn(e);n&&this.trigger("_scrollRequest",{time:n})}}function KX(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function hD(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function JX(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function QX(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function eK(t,e){return{left:t.left-e.left,top:t.top-e.top}}const nv=_s();class tK{constructor(){this.getKeysForEventDefs=Ht(this._getKeysForEventDefs),this.splitDateSelection=Ht(this._splitDateSpan),this.splitEventStore=Ht(this._splitEventStore),this.splitIndividualUi=Ht(this._splitIndividualUi),this.splitEventDrag=Ht(this._splitInteraction),this.splitEventResize=Ht(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),o=this.splitEventDrag(e.eventDrag),p=this.splitEventResize(e.eventResize),g={};this.eventUiBuilders=ha(n,(y,v)=>this.eventUiBuilders[v]||Ht(nK));for(let y in n){let v=n[y],E=a[y]||nv,T=this.eventUiBuilders[y];g[y]={businessHours:v.businessHours||e.businessHours,dateSelection:i[y]||null,eventStore:E,eventUiBases:T(e.eventUiBases[""],v.ui,s[y]),eventSelection:E.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[y]||null,eventResize:p[y]||null}}return g}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let i of r)n[i]=e}return n}_getKeysForEventDefs(e){return ha(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:i}=e,s={};for(let a in r)for(let o of n[a])s[o]||(s[o]=_s()),s[o].defs[a]=r[a];for(let a in i){let o=i[a];for(let p of n[o.defId])s[p]&&(s[p].instances[a]=o)}return s}_splitIndividualUi(e,n){let r={};for(let i in e)if(i)for(let s of n[i])r[s]||(r[s]={}),r[s][i]=e[i];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,i),a=o=>{n[o]||(n[o]={affectedEvents:r[o]||nv,mutatedEvents:s[o]||nv,isEvent:e.isEvent})};for(let o in r)a(o);for(let o in s)a(o)}return n}}function nK(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let i={"":ZM(r)};return n&&Object.assign(i,n),i}function rv(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&!ma(r.activeRange,t)),isOther:!!(r&&!ma(r.currentRange,t)),isToday:!!(e&&ma(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function Zg(t,e){let n=["fc-day",`fc-day-${sZ[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const rK=or({year:"numeric",month:"long",day:"numeric"}),iK=or({week:"long"});function rd(t,e,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:a}=t;let o=i.format(e,n==="week"?iK:rK);if(s.navLinks){let p=i.toDate(e);const g=y=>{let v=n==="day"?s.navLinkDayClick:n==="week"?s.navLinkWeekClick:null;typeof v=="function"?v.call(a,i.toDate(e),y):(typeof v=="string"&&(n=v),a.zoomTo(e,n))};return Object.assign({title:cf(s.navLinkHint,[o,p],o),"data-navlink":""},r?xM(g):{onClick:g})}return{"aria-label":o}}let iv=null;function sK(){return iv===null&&(iv=oK()),iv}function oK(){let t=document.createElement("div");lf(t,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),t.innerHTML="<div></div>",document.body.appendChild(t);let n=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return Ex(t),n}let sv;function aK(){return sv||(sv=lK()),sv}function lK(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=fD(t);return document.body.removeChild(t),e}function fD(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function cK(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,s=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,o=fD(t),p=o.y-r-i,g=o.x-s-a,y={borderLeft:r,borderRight:i,borderTop:s,borderBottom:a,scrollbarBottom:g,scrollbarLeft:0,scrollbarRight:0};return sK()&&n.direction==="rtl"?y.scrollbarLeft=p:y.scrollbarRight=p,e&&(y.paddingLeft=parseInt(n.paddingLeft,10)||0,y.paddingRight=parseInt(n.paddingRight,10)||0,y.paddingTop=parseInt(n.paddingTop,10)||0,y.paddingBottom=parseInt(n.paddingBottom,10)||0),y}function uK(t,e=!1,n){let r=ov(t),i=cK(t,e),s={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return e&&(s.left+=i.paddingLeft,s.right-=i.paddingRight,s.top+=i.paddingTop,s.bottom-=i.paddingBottom),s}function ov(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function dK(t){let e=pD(t),n=t.getBoundingClientRect();for(let r of e){let i=hD(n,r.getBoundingClientRect());if(i)n=i;else return null}return n}function pD(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class id{constructor(e,n,r,i){this.els=n;let s=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(s.left),i&&this.buildElVerticals(s.top)}buildElHorizontals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.left-e),r.push(s.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.top-e),r.push(s.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}topToIndex(e){let{tops:n,bottoms:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return Xg(this.tops||[],e.tops||[])&&Xg(this.bottoms||[],e.bottoms||[])&&Xg(this.lefts||[],e.lefts||[])&&Xg(this.rights||[],e.rights||[])}}function Xg(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class av{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class hK extends av{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class fK extends av{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class uo extends Rn{constructor(){super(...arguments),this.uid=wc()}prepareHits(){}queryHit(e,n,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!_i(e,".fc-event-mirror")}isValidDateDownEl(e){return!_i(e,".fc-event:not(.fc-bg-event)")&&!_i(e,".fc-more-link")&&!_i(e,"a[data-navlink]")&&!_i(e,".fc-popover")}}class mD{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:cv(n.span,e.touchingEntry.span)});r.push(i),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let i=e.span,s=n.span;i.start<s.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:s.start}},r),i.end>s.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:i.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:i}=this;n.lateral===-1?(uv(i,n.level,n.levelCoord),uv(r,n.level,[e])):uv(r[n.level],n.lateral,e),this.stackCnts[Mc(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:i,stackCnts:s}=this,a=n.length,o=0,p=-1,g=-1,y=null,v=0;for(let D=0;D<a;D+=1){const N=n[D];if(!i&&N>=o+this.getEntryThickness(e))break;let B=r[D],V,U=dv(B,e.span.start,lv),K=U[0]+U[1];for(;(V=B[K])&&V.span.start<e.span.end;){let Y=N+this.getEntryThickness(V);Y>o&&(o=Y,y=V,p=D,g=K),Y===o&&(v=Math.max(v,s[Mc(V)]+1)),K+=1}}let E=0;if(y)for(E=p+1;E<a&&n[E]<o;)E+=1;let T=-1;return E<a&&n[E]===o&&(T=dv(r[E],e.span.end,lv)[0]),{touchingLevel:p,touchingLateral:g,touchingEntry:y,stackCnt:v,levelCoord:o,level:E,lateral:T}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,i=[];for(let s=0;s<r;s+=1){let a=e[s],o=n[s];for(let p of a)i.push(Object.assign(Object.assign({},p),{thickness:this.getEntryThickness(p),levelCoord:o}))}return i}}function lv(t){return t.span.end}function Mc(t){return t.index+":"+t.span.start}function pK(t){let e=[];for(let n of t){let r=[],i={span:n.span,entries:[n]};for(let s of e)cv(s.span,i.span)?i={entries:s.entries.concat(i.entries),span:mK(s.span,i.span)}:r.push(s);r.push(i),e=r}return e}function mK(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function cv(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function uv(t,e,n){t.splice(e,0,n)}function dv(t,e,n){let r=0,i=t.length;if(!i||e<n(t[r]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),a=n(t[s]);if(e<a)i=s;else if(e>a)r=s+1;else return[s,1]}return[r,0]}class gK{constructor(e,n){this.emitter=new Gg}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const hv={};function yK(t,e){return!t||e>10?or({weekday:"short"}):e>1?or({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):or({weekday:"long"})}const gD="fc-col-header-cell";function yD(t){return t.text}class bK extends Rn{render(){let{dateEnv:e,options:n,theme:r,viewApi:i}=this.context,{props:s}=this,{date:a,dateProfile:o}=s,p=rv(a,s.todayRange,null,o),g=[gD].concat(Zg(p,r)),y=e.format(a,s.dayHeaderFormat),v=!p.isDisabled&&s.colCnt>1?rd(this.context,a):{},E=Object.assign(Object.assign(Object.assign({date:e.toDate(a),view:i},s.extraRenderProps),{text:y}),p);return ce(xi,{elTag:"th",elClasses:g,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":p.isDisabled?void 0:uf(a)},s.extraDataAttrs),renderProps:E,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:yD,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},T=>ce("div",{className:"fc-scrollgrid-sync-inner"},!p.isDisabled&&ce(T,{elTag:"a",elAttrs:v,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}}const _K=or({weekday:"long"});class xK extends Rn{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:i,options:s}=this.context,a=qr(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},p=n.format(a,e.dayHeaderFormat),g=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:i}),e.extraRenderProps),{text:p});return ce(xi,{elTag:"th",elClasses:[gD,...Zg(o,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:g,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:yD,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},y=>ce("div",{className:"fc-scrollgrid-sync-inner"},ce(y,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(a,_K)}})))}}class sd extends bs{constructor(e,n){super(e,n),this.initialNowDate=pf(n.options.now,n.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:n}=this,r=al(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=n.dateEnv.startOf(r,e.unit),s=n.dateEnv.add(i,Sn(1,e.unit)),a=s.valueOf()-r.valueOf();return a=Math.min(1e3*60*60*24,a),{currentState:{nowDate:i,todayRange:bD(i)},nextState:{nowDate:s,todayRange:bD(s)},waitMs:a}}setTimeout(){let{nextState:e,waitMs:n}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(e,()=>{this.setTimeout()})},n)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}sd.contextType=fa;function bD(t){let e=nr(t),n=qr(e,1);return{start:e,end:n}}class _D extends Rn{constructor(){super(...arguments),this.createDayHeaderFormatter=Ht(vK)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:i,renderIntro:s}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return ce(sd,{unit:"day"},(o,p)=>ce("tr",{role:"row"},s&&s("day"),n.map(g=>i?ce(bK,{key:g.toISOString(),date:g,dateProfile:r,todayRange:p,colCnt:n.length,dayHeaderFormat:a}):ce(xK,{key:g.getUTCDay(),dow:g.getUTCDay(),dayHeaderFormat:a}))))}}function vK(t,e,n){return t||yK(e,n)}class xD{constructor(e,n){let r=e.start,{end:i}=e,s=[],a=[],o=-1;for(;r<i;)n.isHiddenDay(r)?s.push(o+.5):(o+=1,s.push(o),a.push(r)),r=qr(r,1);this.dates=a,this.indices=s,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(qr(e.end,-1)),i=Math.max(0,n),s=Math.min(this.cnt-1,r);return i=Math.ceil(i),s=Math.floor(s),i<=s?{firstIndex:i,lastIndex:s,isStart:n===i,isEnd:r===s}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(ll(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class vD{constructor(e,n){let{dates:r}=e,i,s,a;if(n){for(s=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==s;i+=1);a=Math.ceil(r.length/i)}else a=1,i=r.length;this.rowCnt=a,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(n,i));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),i=[];if(r){let{firstIndex:s,lastIndex:a}=r,o=s;for(;o<=a;){let p=Math.floor(o/n),g=Math.min((p+1)*n,a+1);i.push({row:p,firstCol:o%n,lastCol:(g-1)%n,isStart:r.isStart&&o===s,isEnd:r.isEnd&&g-1===a}),o=g}}return i}}class wD{constructor(){this.sliceBusinessHours=Ht(this._sliceBusinessHours),this.sliceDateSelection=Ht(this._sliceDateSpan),this.sliceEventStore=Ht(this._sliceEventStore),this.sliceEventDrag=Ht(this._sliceInteraction),this.sliceEventResize=Ht(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,i,...s){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,n,r,...s);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,a,i,...s),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,i,...s),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,n,r,...s),eventResize:this.sliceEventResize(e.eventResize,a,n,r,...s),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,i,...s){return this._sliceDateSpan({range:{start:e,end:al(e,1)},allDay:!1},n,r,{},i,...s)}_sliceBusinessHours(e,n,r,i,...s){return e?this._sliceEventStore(Tc(e,Kg(n,!!r),i),{},n,r,...s).bg:[]}_sliceEventStore(e,n,r,i,...s){if(e){let a=Xx(e,n,Kg(r,!!i),i);return{bg:this.sliceEventRanges(a.bg,s),fg:this.sliceEventRanges(a.fg,s)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,i,...s){if(!e)return null;let a=Xx(e.mutatedEvents,n,Kg(r,!!i),i);return{segs:this.sliceEventRanges(a.fg,s),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,i,s,...a){if(!e)return[];let o=Kg(n,!!r),p=dl(e.range,o);if(p){e=Object.assign(Object.assign({},e),{range:p});let g=UX(e,i,s),y=this.sliceRange(e.range,...a);for(let v of y)v.eventRange=g;return y}return[]}sliceEventRanges(e,n){let r=[];for(let i of e)r.push(...this.sliceEventRange(i,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:qr(r.start,1)});let i=this.sliceRange(r,...n);for(let s of i)s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd;return i}}function Kg(t,e){let n=t.activeRange;return e?n:{start:al(n.start,t.slotMinTime.milliseconds),end:al(n.end,t.slotMaxTime.milliseconds-864e5)}}function kD(t,e,n){let{instances:r}=t.mutatedEvents;for(let i in r)if(!jg(e.validRange,r[i].range))return!1;return ED({eventDrag:t},n)}function wK(t,e,n){return jg(e.validRange,t.range)?ED({dateSelection:t},n):!1}function ED(t,e){let n=e.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||kK)(r,e)}function kK(t,e,n={},r){return!(t.eventDrag&&!EK(t,e,n,r)||t.dateSelection&&!SK(t,e,n,r))}function EK(t,e,n,r){let i=e.getCurrentData(),s=t.eventDrag,a=s.mutatedEvents,o=a.defs,p=a.instances,g=Yg(o,s.isEvent?t.eventUiBases:{"":i.selectionConfig});r&&(g=ha(g,r));let y=wX(t.eventStore,s.affectedEvents.instances),v=y.defs,E=y.instances,T=Yg(v,t.eventUiBases);for(let D in p){let N=p[D],B=N.range,V=g[N.defId],U=o[N.defId];if(!SD(V.constraints,B,y,t.businessHours,e))return!1;let{eventOverlap:K}=e.options,Y=typeof K=="function"?K:null;for(let ye in E){let Te=E[ye];if(Fx(B,Te.range)&&(T[Te.defId].overlap===!1&&s.isEvent||V.overlap===!1||Y&&!Y(new ur(e,v[Te.defId],Te),new ur(e,U,N))))return!1}let we=i.eventStore;for(let ye of V.allows){let Te=Object.assign(Object.assign({},n),{range:N.range,allDay:U.allDay}),Re=we.defs[U.defId],Ne=we.instances[D],Ye;if(Re?Ye=new ur(e,Re,Ne):Ye=new ur(e,U),!ye(Yx(Te,e),Ye))return!1}}return!0}function SK(t,e,n,r){let i=t.eventStore,s=i.defs,a=i.instances,o=t.dateSelection,p=o.range,{selectionConfig:g}=e.getCurrentData();if(r&&(g=r(g)),!SD(g.constraints,p,i,t.businessHours,e))return!1;let{selectOverlap:y}=e.options,v=typeof y=="function"?y:null;for(let E in a){let T=a[E];if(Fx(p,T.range)&&(g.overlap===!1||v&&!v(new ur(e,s[T.defId],T),null)))return!1}for(let E of g.allows){let T=Object.assign(Object.assign({},n),o);if(!E(Yx(T,e),null))return!1}return!0}function SD(t,e,n,r,i){for(let s of t)if(!TK(CK(s,e,n,r,i),e))return!1;return!0}function CK(t,e,n,r,i){return t==="businessHours"?fv(Tc(r,e,i)):typeof t=="string"?fv(Ug(n,s=>s.groupId===t)):typeof t=="object"&&t?fv(Tc(t,e,i)):[]}function fv(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function TK(t,e){for(let n of t)if(jg(n,e))return!0;return!1}const Jg=/^(visible|hidden)$/;class CD extends Rn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,pa(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,i=n&&r,s=["fc-scroller"];return n&&(r?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),ce("div",{ref:this.handleEl,className:s.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Jg.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Jg.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Jg.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Jg.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class ya{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:i,currentMap:s}=this,a=!1,o=!1;n!==null?(a=r in s,s[r]=n,i[r]=(i[r]||0)+1,o=!0):(i[r]-=1,i[r]||(delete s[r],delete this.callbackMap[r],a=!0)),this.masterCallback&&(a&&this.masterCallback(null,String(r)),o&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return zZ(this.currentMap,e,n,r)}getAll(){return Ox(this.currentMap)}}function AK(t){let e=VY(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,KY(r));return Math.ceil(n)}function TD(t,e){return t.liquid&&e.liquid}function MK(t,e){return e.maxHeight!=null||TD(t,e)}function DK(t,e,n,r){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):ce("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,ce(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function IK(t,e){return ol(t,e,Ro)}function PK(t,e){let n=[];for(let r of t){let i=r.span||1;for(let s=0;s<i;s+=1)n.push(ce("col",{style:{width:r.width==="shrink"?NK(e):r.width||"",minWidth:r.minWidth||""}}))}return ce("colgroup",{},...n)}function NK(t){return t??4}function RK(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function OK(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function BK(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function pv(t){return ce("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function Qg(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function AD(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class mv extends Rn{constructor(){super(...arguments),this.processCols=Ht(e=>e,IK),this.renderMicroColGroup=Ht(PK),this.scrollerRefs=new ya,this.scrollerElRefs=new ya(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,i=e.sections||[],s=this.processCols(e.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),o=OK(e.liquid,r);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let p=i.length,g=0,y,v=[],E=[],T=[];for(;g<p&&(y=i[g]).type==="header";)v.push(this.renderSection(y,a,!0)),g+=1;for(;g<p&&(y=i[g]).type==="body";)E.push(this.renderSection(y,a,!1)),g+=1;for(;g<p&&(y=i[g]).type==="footer";)T.push(this.renderSection(y,a,!0)),g+=1;let D=!dD();const N={role:"rowgroup"};return ce("table",{role:"grid",className:o.join(" "),style:{height:e.height}},!!(!D&&v.length)&&ce("thead",N,...v),!!(!D&&E.length)&&ce("tbody",N,...E),!!(!D&&T.length)&&ce("tfoot",N,...T),D&&ce("tbody",N,...v,...E,...T))}renderSection(e,n,r){return"outerContent"in e?ce(tr,{key:e.key},e.outerContent):ce("tr",{key:e.key,role:"presentation",className:BK(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,i){if("outerContent"in r)return r.outerContent;let{props:s}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:p}=this.state,g=MK(s,e),y=TD(s,e),v=s.liquid?a?"scroll":g?"auto":"hidden":"visible",E=e.key,T=DK(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!s.collapsibleWidth&&o[E]!==void 0?o[E]:null,clientHeight:p[E]!==void 0?p[E]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return ce(i?"th":"td",{ref:r.elRef,role:"presentation"},ce("div",{className:`fc-scroller-harness${y?" fc-scroller-harness-liquid":""}`},ce(CD,{ref:this.scrollerRefs.createRef(E),elRef:this.scrollerElRefs.createRef(E),overflowY:v,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:y,liquidIsAbsolute:!0},T)))}_handleScrollerEl(e,n){let r=VK(this.props.sections,n);r&&pa(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return RK(this.props.cols)?AK(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=aK(),{scrollerRefs:n,scrollerElRefs:r}=this,i=!1,s={},a={};for(let o in n.currentMap){let p=n.currentMap[o];if(p&&p.needsYScrolling()){i=!0;break}}for(let o of this.props.sections){let p=o.key,g=r.currentMap[p];if(g){let y=g.parentNode;s[p]=Math.floor(y.getBoundingClientRect().width-(i?e.y:0)),a[p]=Math.floor(y.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:s,scrollerClientHeights:a}}}mv.addStateEquality({scrollerClientWidths:Ro,scrollerClientHeights:Ro});function VK(t,e){for(let n of t)if(n.key===e)return n;return null}class ey extends Rn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&sD(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{eventRange:s}=i,{ui:a}=s,o={event:new ur(n,s.def,s.instance),view:n.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&RX(i,n),isStartResizable:!e.disableResizing&&OX(i,n),isEndResizable:!e.disableResizing&&BX(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return ce(xi,Object.assign({},e,{elRef:this.handleEl,elClasses:[...VX(o),...i.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&sD(this.el,this.props.seg)}}class MD extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{ui:s}=i.eventRange,a=r.eventTimeFormat||e.defaultTimeFormat,o=gf(i,a,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return ce(ey,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:Jx(i,n),defaultGenerator:zK,timeText:o}),(p,g)=>ce(tr,null,ce(p,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:g.textColor}}),!!g.isStartResizable&&ce("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!g.isEndResizable&&ce("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}function zK(t){return ce("div",{className:"fc-event-main-frame"},t.timeText&&ce("div",{className:"fc-event-time"},t.timeText),ce("div",{className:"fc-event-title-container"},ce("div",{className:"fc-event-title fc-sticky"},t.event.title||ce(tr,null," "))))}const gv=t=>ce(fa.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return ce(xi,Object.assign({},t,{elTag:t.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))}),LK=or({day:"numeric"});class yv extends Rn{constructor(){super(...arguments),this.refineRenderProps=Og(FK)}render(){let{props:e,context:n}=this,{options:r}=n,i=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return ce(xi,Object.assign({},e,{elClasses:[...Zg(i,n.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":uf(e.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount}))}}function bv(t){return!!(t.dayCellContent||Lx("dayCellContent",t))}function FK(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:i}=t,s=rv(e,t.todayRange,null,r),a=t.showDayNumber?n.format(e,i?t.monthStartFormat:LK):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},s),{isMonthStart:i,dayNumberText:a}),t.extraRenderProps)}class DD extends Rn{render(){let{props:e}=this,{seg:n}=e;return ce(ey,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:$K,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function $K(t){let{title:e}=t.event;return e&&ce("div",{className:"fc-event-title"},t.event.title)}function ID(t){return ce("div",{className:`fc-${t}`})}const PD=t=>ce(fa.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:i}=t,s=r.weekNumberFormat||t.defaultFormat,a=n.computeWeekNumber(i),o=n.format(i,s);return ce(xi,Object.assign({},t,{renderProps:{num:a,text:o,date:i},generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:jK,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))});function jK(t){return t.text}const _v=10;class HK extends Rn{constructor(){super(...arguments),this.state={titleId:sl()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&pa(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=gM(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:i}=this,s=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return kY(ce("div",Object.assign({},r.extraAttrs,{id:r.id,className:s.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),ce("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},ce("span",{className:"fc-popover-title",id:i.titleId},r.title),ce("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),ce("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:i}=this,s=dK(n);if(s){let a=i.getBoundingClientRect(),o=r?_i(n,".fc-scrollgrid").getBoundingClientRect().top:s.top,p=e?s.right-a.width:s.left;o=Math.max(o,_v),p=Math.min(p,document.documentElement.clientWidth-_v-a.width),p=Math.max(p,_v);let g=i.offsetParent.getBoundingClientRect();lf(i,{top:o-g.top,left:p-g.left})}}}class UK extends uo{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:i,todayRange:s,dateProfile:a}=r,o=n.format(i,e.dayPopoverFormat);return ce(yv,{elRef:this.handleRootEl,date:i,dateProfile:a,todayRange:s},(p,g,y)=>ce(HK,{elRef:y.ref,id:r.id,title:o,extraClassNames:["fc-more-popover"].concat(y.className||[]),extraAttrs:y,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},bv(e)&&ce(p,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,i){let{rootEl:s,props:a}=this;return e>=0&&e<r&&n>=0&&n<i?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:s,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}}class ND extends Rn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:sl()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&pa(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:i}=r.options,s=RD(n).start;function a(o){let{def:p,instance:g,range:y}=o.eventRange;return{event:new ur(r,p,g),start:r.dateEnv.toDate(y.start),end:r.dateEnv.toDate(y.end),isStart:o.isStart,isEnd:o.isEnd}}typeof i=="function"&&(i=i({date:s,allDay:!!n.allDayDate,allSegs:n.allSegs.map(a),hiddenSegs:n.hiddenSegs.map(a),jsEvent:e,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(s,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return ce(fa.Consumer,null,r=>{let{viewApi:i,options:s,calendarApi:a}=r,{moreLinkText:o}=s,{moreCnt:p}=e,g=RD(e),y=typeof o=="function"?o.call(a,p):`+${p} ${o}`,v=cf(s.moreLinkHint,[p],y),E={num:p,shortText:`+${p}`,text:y,view:i};return ce(tr,null,!!e.moreCnt&&ce(xi,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),xM(this.handleClick)),{title:v,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:E,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||WK,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),n.isPopoverOpen&&ce(UK,{id:n.popoverId,startDate:g.start,endDate:g.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=_i(this.linkEl,".fc-view-harness"))}}function WK(t){return t.text}function RD(t){if(t.allDayDate)return{start:t.allDayDate,end:qr(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:OD(e),end:GK(e)}}function OD(t){return t.reduce(qK).eventRange.range.start}function qK(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function GK(t){return t.reduce(YK).eventRange.range.end}function YK(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class ZK{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let n of this.handlers)n(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}}class XK extends ZK{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let r=!1;e.isActive?(n.set(e.id,e),r=!0):n.has(e.id)&&(n.delete(e.id),r=!0),r&&this.set(n)}}const KK=[],BD={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},VD=Object.assign(Object.assign({},BD),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function JK(t){let e=t.length>0?t[0].code:"en",n=KK.concat(t),r={en:VD};for(let i of n)r[i.code]=i;return{map:r,defaultCode:e}}function zD(t,e){return typeof t=="object"&&!Array.isArray(t)?LD(t.code,[t.code],t):QK(t,e)}function QK(t,e){let n=[].concat(t||[]),r=eJ(n,e)||VD;return LD(t,n,r)}function eJ(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let s=r.slice(0,i).join("-");if(e[s])return e[s]}}return null}function LD(t,e,n){let r=Rx([BD,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function Oo(t){return{id:wc(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function tJ(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(s){for(let a of s){const o=a.name,p=n[o];p===void 0?(n[o]=a.id,i(a.deps),r=rJ(r,a)):p!==a.id&&console.warn(`Duplicate plugin '${o}'`)}}return t&&i(t),i(e),r}function nJ(){let t=[],e=[],n;return(r,i)=>((!n||!ol(r,t)||!ol(i,e))&&(n=tJ(r,i)),t=r,e=i,n)}function rJ(t,e){return{premiumReleaseDate:iJ(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function iJ(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class hl extends hf{}hl.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},hl.prototype.baseIconClass="fc-icon",hl.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},hl.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},hl.prototype.iconOverrideOption="buttonIcons",hl.prototype.iconOverrideCustomButtonOption="icon",hl.prototype.iconOverridePrefix="fc-icon-";function sJ(t,e){let n={},r;for(r in t)xv(r,n,t,e);for(r in e)xv(r,n,t,e);return n}function xv(t,e,n,r){if(e[t])return e[t];let i=oJ(t,e,n,r);return i&&(e[t]=i),i}function oJ(t,e,n,r){let i=n[t],s=r[t],a=y=>i&&i[y]!==null?i[y]:s&&s[y]!==null?s[y]:null,o=a("component"),p=a("superType"),g=null;if(p){if(p===t)throw new Error("Can't have a custom view type that references itself");g=xv(p,e,n,r)}return!o&&g&&(o=g.component),o?{type:t,component:o,defaults:Object.assign(Object.assign({},g?g.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},g?g.overrides:{}),s?s.rawOptions:{})}:null}function FD(t){return ha(t,aJ)}function aJ(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=$D(e):n&&!(n.prototype instanceof Rn)&&(n=$D(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function $D(t){return e=>ce(fa.Consumer,null,n=>ce(xi,{elTag:"div",elClasses:$M(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function lJ(t,e,n,r){let i=FD(t),s=FD(e.views),a=sJ(i,s);return ha(a,o=>cJ(o,s,e,n,r))}function cJ(t,e,n,r,i){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,a=null,o="",p="",g={};if(s&&(a=uJ(s),a)){let E=Mx(a);o=E.unit,E.value===1&&(p=o,g=e[o]?e[o].rawOptions:{})}let y=E=>{let T=E.buttonText||{},D=t.defaults.buttonTextKey;return D!=null&&T[D]!=null?T[D]:T[t.type]!=null?T[t.type]:T[p]!=null?T[p]:null},v=E=>{let T=E.buttonHints||{},D=t.defaults.buttonTextKey;return D!=null&&T[D]!=null?T[D]:T[t.type]!=null?T[t.type]:T[p]!=null?T[p]:null};return{type:t.type,component:t.component,duration:a,durationUnit:o,singleUnit:p,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},g),t.overrides),buttonTextOverride:y(r)||y(n)||t.overrides.buttonText,buttonTextDefault:y(i)||t.defaults.buttonText||y(df)||t.type,buttonTitleOverride:v(r)||v(n)||t.overrides.buttonHint,buttonTitleDefault:v(i)||t.defaults.buttonHint||v(df)}}let jD={};function uJ(t){let e=JSON.stringify(t),n=jD[e];return n===void 0&&(n=Sn(t),jD[e]=n),n}function dJ(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function hJ(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function fJ(t,e,n,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(i=r.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(t,n),i.isValid)return i;break}return t}function pJ(t,e,n){let r=e?e.activeRange:null;return UD({},vJ(t,n),r,n)}function mJ(t,e,n,r){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return UD(t,e.sources,i,r);case"REMOVE_EVENT_SOURCE":return yJ(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?WD(t,i,r):t;case"FETCH_EVENT_SOURCES":return vv(t,e.sourceIds?BM(e.sourceIds):qD(t,r),i,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return xJ(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function gJ(t,e,n){let r=e?e.activeRange:null;return vv(t,qD(t,n),r,!0,n)}function HD(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function UD(t,e,n,r){let i={};for(let s of e)i[s.sourceId]=s;return n&&(i=WD(i,n,r)),Object.assign(Object.assign({},t),i)}function yJ(t,e){return Sc(t,n=>n.sourceId!==e)}function WD(t,e,n){return vv(t,Sc(t,r=>bJ(r,e,n)),e,!1,n)}function bJ(t,e,n){return GD(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function vv(t,e,n,r,i){let s={};for(let a in t){let o=t[a];e[a]?s[a]=_J(o,n,r,i):s[a]=o}return s}function _J(t,e,n,r){let{options:i,calendarApi:s}=r,a=r.pluginHooks.eventSourceDefs[t.sourceDefId],o=wc();return a.fetch({eventSource:t,range:e,isRefetch:n,context:r},p=>{let{rawEvents:g}=p;i.eventSourceSuccess&&(g=i.eventSourceSuccess.call(s,g,p.response)||g),t.success&&(g=t.success.call(s,g,p.response)||g),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:g})},p=>{let g=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,p),g=!0),t.failure&&(t.failure(p),g=!0),g||console.warn(p.message,p),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:p})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:o})}function xJ(t,e,n,r){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):t}function qD(t,e){return Sc(t,n=>GD(n,e))}function vJ(t,e){let n=KM(e),r=[].concat(t.eventSources||[]),i=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let s of r){let a=XM(s,e,n);a&&i.push(a)}return i}function GD(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function wJ(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function kJ(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function EJ(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function SJ(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function CJ(t,e,n,r,i){let s=t.headerToolbar?YD(t.headerToolbar,t,e,n,r,i):null,a=t.footerToolbar?YD(t.footerToolbar,t,e,n,r,i):null;return{header:s,footer:a}}function YD(t,e,n,r,i,s){let a={},o=[],p=!1;for(let g in t){let y=t[g],v=TJ(y,e,n,r,i,s);a[g]=v.widgets,o.push(...v.viewsWithButtons),p=p||v.hasTitle}return{sectionWidgets:a,viewsWithButtons:o,hasTitle:p}}function TJ(t,e,n,r,i,s){let a=e.direction==="rtl",o=e.customButtons||{},p=n.buttonText||{},g=e.buttonText||{},y=n.buttonHints||{},v=e.buttonHints||{},E=t?t.split(" "):[],T=[],D=!1;return{widgets:E.map(B=>B.split(",").map(V=>{if(V==="title")return D=!0,{buttonName:V};let U,K,Y,we,ye,Te;if(U=o[V])Y=Re=>{U.click&&U.click.call(Re.target,Re,Re.target)},(we=r.getCustomButtonIconClass(U))||(we=r.getIconClass(V,a))||(ye=U.text),Te=U.hint||U.text;else if(K=i[V]){T.push(V),Y=()=>{s.changeView(V)},(ye=K.buttonTextOverride)||(we=r.getIconClass(V,a))||(ye=K.buttonTextDefault);let Re=K.buttonTextOverride||K.buttonTextDefault;Te=cf(K.buttonTitleOverride||K.buttonTitleDefault||e.viewHint,[Re,V],Re)}else if(s[V])if(Y=()=>{s[V]()},(ye=p[V])||(we=r.getIconClass(V,a))||(ye=g[V]),V==="prevYear"||V==="nextYear"){let Re=V==="prevYear"?"prev":"next";Te=cf(y[Re]||v[Re],[g.year||"year","year"],g[V])}else Te=Re=>cf(y[V]||v[V],[g[Re]||Re,Re],g[V]);return{buttonName:V,buttonClick:Y,buttonIcon:we,buttonText:ye,buttonHint:Te}})),viewsWithButtons:T,hasTitle:D}}class AJ{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const MJ=Oo({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}}]}),DJ=Oo({name:"func-event-source",eventSourceDefs:[{parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,i=t.eventSource.meta;WX(i.bind(null,lD(t.range,r)),s=>e({rawEvents:s}),n)}}]}),IJ=Oo({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:Ie,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,i=PJ(r,t.range,t.context);qX(r.method,r.url,i).then(([s,a])=>{e({rawEvents:s,response:a})},n)}}]});function PJ(t,e,n){let{dateEnv:r,options:i}=n,s,a,o,p,g={};return s=t.startParam,s==null&&(s=i.startParam),a=t.endParam,a==null&&(a=i.endParam),o=t.timeZoneParam,o==null&&(o=i.timeZoneParam),typeof t.extraParams=="function"?p=t.extraParams():p=t.extraParams||{},Object.assign(g,p),g[s]=r.formatIso(e.start),g[a]=r.formatIso(e.end),r.timeZone!=="local"&&(g[o]=r.timeZone),g}const NJ=Oo({name:"simple-recurring-event",recurringTypes:[{parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=tZ(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=dl(e,{start:t.startRecur,end:t.endRecur});return r?RJ(t.daysOfWeek,t.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:Ie,startTime:Sn,endTime:Sn,duration:Sn,startRecur:Ie,endRecur:Ie}});function RJ(t,e,n,r){let i=t?BM(t):null,s=nr(n.start),a=n.end,o=[];for(;s<a;){let p;(!i||i[s.getUTCDay()])&&(e?p=r.add(s,e):p=s,o.push(p)),s=qr(s,1)}return o}const OJ=Oo({name:"change-handler",optionChangeHandlers:{events(t,e){ZD([t],e)},eventSources:ZD}});function ZD(t,e){let n=Ox(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let i of t){let s=!1;for(let a=0;a<n.length;a+=1)if(n[a]._raw===i){n.splice(a,1),s=!0;break}s||r.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)e.calendarApi.addEventSource(i)}function BJ(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},lD(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function VJ(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Ac(t,e))}const zJ=[MJ,DJ,IJ,NJ,OJ,Oo({name:"misc",isLoadingFuncs:[t=>HD(t.eventSources)],propSetHandlers:{dateProfile:BJ,eventStore:VJ}})];class LJ{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new kx(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function FJ(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,or(e.titleFormat||$J(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function $J(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Rg(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class jJ{constructor(e){this.computeCurrentViewData=Ht(this._computeCurrentViewData),this.organizeRawLocales=Ht(JK),this.buildLocale=Ht(zD),this.buildPluginHooks=nJ(),this.buildDateEnv=Ht(HJ),this.buildTheme=Ht(UJ),this.parseToolbars=Ht(CJ),this.buildViewSpecs=Ht(lJ),this.buildDateProfileGenerator=Og(WJ),this.buildViewApi=Ht(qJ),this.buildViewUiProps=Og(ZJ),this.buildEventUiBySource=Ht(GJ,Ro),this.buildEventUiBases=Ht(YJ),this.parseContextBusinessHours=Og(XJ),this.buildTitle=Ht(FJ),this.emitter=new Gg,this.actionRunner=new LJ(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=E=>{this.actionRunner.request(E)},this.props=e,this.actionRunner.pause();let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,s=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let a=sX(r.calendarOptions,r.dateEnv),o=s.dateProfileGenerator.build(a);ma(o.activeRange,a)||(a=o.currentRange.start);let p={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let E of r.pluginHooks.contextInit)E(p);let g=pJ(r.calendarOptions,o,p),y={dynamicOptionOverrides:n,currentViewType:i,currentDate:a,dateProfile:o,businessHours:this.parseContextBusinessHours(p),eventSources:g,eventUiBases:{},eventStore:_s(),renderableEventStore:_s(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},v=Object.assign(Object.assign({},p),y);for(let E of r.pluginHooks.reducers)Object.assign(y,E(null,null,v));wv(y,p)&&this.emitter.trigger("loading",!0),this.state=y,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:i}=this,s=hJ(r.dynamicOptionOverrides,e),a=this.computeOptionsData(n.optionOverrides,s,n.calendarApi),o=dJ(r.currentViewType,e),p=this.computeCurrentViewData(o,a,n.optionOverrides,s);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(p.options);let g={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:y,dateProfile:v}=r;this.data&&this.data.dateProfileGenerator!==p.dateProfileGenerator&&(v=p.dateProfileGenerator.build(y)),y=iX(y,e),v=fJ(v,e,y,p.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!ma(v.currentRange,y))&&(y=v.currentRange.start);let E=mJ(r.eventSources,e,v,g),T=bX(r.eventStore,e,E,v,g),N=HD(E)&&!p.options.progressiveEventRendering&&r.renderableEventStore||T,{eventUiSingleBase:B,selectionConfig:V}=this.buildViewUiProps(g),U=this.buildEventUiBySource(E),K=this.buildEventUiBases(N.defs,B,U),Y={dynamicOptionOverrides:s,currentViewType:o,currentDate:y,dateProfile:v,eventSources:E,eventStore:T,renderableEventStore:N,selectionConfig:V,eventUiBases:K,businessHours:this.parseContextBusinessHours(g),dateSelection:wJ(r.dateSelection,e),eventSelection:kJ(r.eventSelection,e),eventDrag:EJ(r.eventDrag,e),eventResize:SJ(r.eventResize,e)},we=Object.assign(Object.assign({},g),Y);for(let Re of a.pluginHooks.reducers)Object.assign(Y,Re(r,e,we));let ye=wv(r,g),Te=wv(Y,g);!ye&&Te?i.trigger("loading",!0):ye&&!Te&&i.trigger("loading",!1),this.state=Y,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(n.dateProfile,s.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),s),n),o=i.pluginHooks.optionChangeHandlers,p=r&&r.calendarOptions,g=i.calendarOptions;if(p&&p!==g){p.timeZone!==g.timeZone&&(n.eventSources=a.eventSources=gJ(a.eventSources,n.dateProfile,a),n.eventStore=a.eventStore=eD(a.eventStore,r.dateEnv,a.dateEnv),n.renderableEventStore=a.renderableEventStore=eD(a.renderableEventStore,r.dateEnv,a.dateEnv));for(let y in o)(this.optionsForHandling.indexOf(y)!==-1||p[y]!==g[y])&&o[y](g[y],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:s,localeDefaults:a,availableLocaleData:o,extra:p}=this.processRawCalendarOptions(e,n);XD(p);let g=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,s,o,i.defaultRangeSeparator),y=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),v=this.buildTheme(i,s),E=this.parseToolbars(i,this.stableOptionOverrides,v,y,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:s,dateEnv:g,viewSpecs:y,theme:v,toolbarConfig:E,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,n){let{locales:r,locale:i}=Px([df,e,n]),s=this.organizeRawLocales(r),a=s.map,o=this.buildLocale(i||s.defaultCode,a).options,p=this.buildPluginHooks(e.plugins||[],zJ),g=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},NM),RM),OM),p.listenerRefiners),p.optionRefiners),y={},v=Px([df,o,e,n]),E={},T=this.currentCalendarOptionsInput,D=this.currentCalendarOptionsRefined,N=!1;for(let B in v)this.optionsForRefining.indexOf(B)===-1&&(v[B]===T[B]||kc[B]&&B in T&&kc[B](T[B],v[B]))?E[B]=D[B]:g[B]?(E[B]=g[B](v[B]),N=!0):y[B]=T[B];return N&&(this.currentCalendarOptionsInput=v,this.currentCalendarOptionsRefined=E,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:p,availableLocaleData:s,localeDefaults:o,extra:y}}_computeCurrentViewData(e,n,r,i){let s=n.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(s,n.pluginHooks,n.localeDefaults,r,i);XD(o);let p=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),g=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:s,options:a,dateProfileGenerator:p,viewApi:g}}processRawViewOptions(e,n,r,i,s){let a=Px([df,e.optionDefaults,r,i,e.optionOverrides,s]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},NM),RM),OM),RZ),n.listenerRefiners),n.optionRefiners),p={},g=this.currentViewOptionsInput,y=this.currentViewOptionsRefined,v=!1,E={};for(let T in a)a[T]===g[T]||kc[T]&&kc[T](a[T],g[T])?p[T]=y[T]:(a[T]===this.currentCalendarOptionsInput[T]||kc[T]&&kc[T](a[T],this.currentCalendarOptionsInput[T])?T in this.currentCalendarOptionsRefined&&(p[T]=this.currentCalendarOptionsRefined[T]):o[T]?p[T]=o[T](a[T]):E[T]=a[T],v=!0);return v&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=p),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:E}}}function HJ(t,e,n,r,i,s,a,o){let p=zD(e||a.defaultCode,a.map);return new UZ({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:p,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:o})}function UJ(t,e){let n=e.themeClasses[t.themeSystem]||hl;return new n(t)}function WJ(t){let e=t.dateProfileGeneratorClass||UM;return new e(t)}function qJ(t,e,n){return new AJ(t,e,n)}function GJ(t){return ha(t,e=>e.ui)}function YJ(t,e,n){let r={"":e};for(let i in t){let s=t[i];s.sourceId&&n[s.sourceId]&&(r[i]=n[s.sourceId])}return r}function ZJ(t){let{options:e}=t;return{eventUiSingleBase:qg({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:qg({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function wv(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function XJ(t){return TX(t.options.businessHours,t)}function XD(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class KJ extends Rn{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return ce("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,i=[],s=!0;for(let a of e){let{buttonName:o,buttonClick:p,buttonText:g,buttonIcon:y,buttonHint:v}=a;if(o==="title")s=!1,i.push(ce("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let E=o===n.activeButton,T=!n.isTodayEnabled&&o==="today"||!n.isPrevEnabled&&o==="prev"||!n.isNextEnabled&&o==="next",D=[`fc-${o}-button`,r.getClass("button")];E&&D.push(r.getClass("buttonActive")),i.push(ce("button",{type:"button",title:typeof v=="function"?v(n.navUnit):v,disabled:T,"aria-pressed":E,className:D.join(" "),onClick:p},g||(y?ce("span",{className:y,role:"img"}):"")))}}if(i.length>1){let a=s&&r.getClass("buttonGroup")||"";return ce("div",{className:a},...i)}return i[0]}}class KD extends Rn{render(){let{model:e,extraClassName:n}=this.props,r=!1,i,s,a=e.sectionWidgets,o=a.center;return a.left?(r=!0,i=a.left):i=a.start,a.right?(r=!0,s=a.right):s=a.end,ce("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",o||[]),this.renderSection("end",s||[]))}renderSection(e,n){let{props:r}=this;return ce(KJ,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class JJ extends Rn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,pa(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,i=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",a="";return r?n.availableWidth!==null?s=n.availableWidth/r:a=`${1/r*100}%`:s=e.height||"",ce("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:s,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class QJ extends nd{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:i}=this,{context:s}=i,a=td(r);if(a&&i.isValidSegDownEl(n.target)){let o=_i(n.target,".fc-event-forced-url"),p=o?o.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:r,event:new ur(i.context,a.eventRange.def,a.eventRange.instance),jsEvent:n,view:s.viewApi}),p&&!n.defaultPrevented&&(window.location.href=p)}},this.destroy=bM(e.el,"click",".fc-event",this.handleSegClick)}}class eQ extends nd{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{td(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=FY(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:i}=this,{context:s}=i,a=td(r);(!n||i.isValidSegDownEl(n.target))&&s.emitter.trigger(e,{el:r,event:new ur(s,a.eventRange.def,a.eventRange.instance),jsEvent:n,view:s.viewApi})}}class tQ extends Cc{constructor(){super(...arguments),this.buildViewContext=Ht(GZ),this.buildViewPropTransformers=Ht(rQ),this.buildToolbarProps=Ht(nQ),this.headerRef=Pi(),this.footerRef=Pi(),this.interactionsStore={},this.state={viewLabelId:sl()},this.registerInteractiveComponent=(e,n)=>{let r=ZX(e,n),a=[QJ,eQ].concat(this.props.pluginHooks.componentInteractions).map(o=>new o(r));this.interactionsStore[e.uid]=a,tv[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete tv[e.uid]},this.resizeRunner=new kx(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,i=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,pf(e.options.now,e.dateEnv),e.viewTitle),s=!1,a="",o;e.isHeightAuto||e.forPrint?a="":r.height!=null?s=!0:r.contentHeight!=null?a=r.contentHeight:o=Math.max(r.aspectRatio,.5);let p=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),g=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return ce(fa.Provider,{value:p},n.header&&ce(KD,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:g},i)),ce(JJ,{liquid:s,height:a,aspectRatio:o,labeledById:g},this.renderView(e),this.buildAppendContent()),n.footer&&ce(KD,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let i in r)n[i]!==e[i]&&r[i](n[i],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return ce(tr,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},s=this.buildViewPropTransformers(n.viewPropsTransformers);for(let o of s)Object.assign(i,o.transform(i,e));let a=r.component;return ce(a,Object.assign({},i))}}function nQ(t,e,n,r,i,s){let a=n.build(i,void 0,!1),o=n.buildPrev(e,r,!1),p=n.buildNext(e,r,!1);return{title:s,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:a.isValid&&!ma(e.currentRange,i),isPrevEnabled:o.isValid,isNextEnabled:p.isValid}}function rQ(t){return t.map(e=>new e)}class iQ extends XX{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;$g(()=>{af(ce(YX,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,s,a,o)=>(this.setClassNames(i),this.setHeight(s),ce(FM.Provider,{value:this.customContentRenderId},ce(tQ,Object.assign({isHeightAuto:a,forPrint:o},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,af(null,this.el),this.setClassNames([]),this.setHeight(""))},IY(e),this.el=e,this.renderRunner=new kx(this.handleRenderRequest),new jJ({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){$g(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!ol(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){mM(this.el,"height",e)}}const sQ={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},oQ=d.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(t){return{...t,customRenderingMetaMap:cQ(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const t=[];for(const e of this.customRenderingMap.values())t.push(d.h(aQ,{key:e.id,customRendering:e}));return d.h("div",{attrs:{"data-fc-render-id":this.renderId}},d.h(d.Fragment,t))},mounted(){const t=new XK;this.handleCustomRendering=t.handle.bind(t);const e=this.buildOptions(this.options),n=new iQ(this.$el,e);this.calendar=n,n.render(),t.subscribe(r=>{this.customRenderingMap=r,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:lQ()}),aQ=d.defineComponent({props:{customRendering:Object},render(){const t=this.customRendering,e=typeof t.generatorMeta=="function"?t.generatorMeta(t.renderProps):t.generatorMeta;return d.h(d.Teleport,{to:t.containerEl},e)}});function mfe(t){return t}function lQ(){let t={options:{deep:!0,handler(e){let n=this.getApi();n.pauseRendering();let r=this.buildOptions(e);n.resetOptions(r),this.renderId++}}};for(let e in sQ)t[`options.${e}`]={deep:!0,handler(n){if(n!==void 0){let r=this.getApi();r.pauseRendering(),r.resetOptions({[e]:n},[e]),this.renderId++}}};return t}function cQ(t){const e={};for(const n in t)e[uQ(n)]=t[n];return e}function uQ(t){return t.split("-").map((e,n)=>n?dQ(e):e).join("")}function dQ(t){return t.charAt(0).toUpperCase()+t.slice(1)}class hQ extends uo{constructor(){super(...arguments),this.headerElRef=Pi()}renderSimpleLayout(e,n){let{props:r,context:i}=this,s=[],a=Qg(i.options);return e&&s.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),ce(ff,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},ce(mv,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,n,r,i){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:a,context:o}=this,p=!a.forPrint&&Qg(o.options),g=!a.forPrint&&AD(o.options),y=[];return e&&y.push({type:"header",key:"header",isSticky:p,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),y.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),g&&y.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:pv}]}),ce(ff,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},ce(s,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:y}))}}function ty(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function ny(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function JD(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const QD=or({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function eI(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class tI extends Rn{render(){let{props:e}=this;return ce(MD,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:QD,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class nI extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,s=r.eventTimeFormat||QD,a=gf(i,s,n,!0,e.defaultDisplayEventEnd);return ce(ey,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Jx(e.seg,n),defaultGenerator:fQ,timeText:a,isResizing:!1,isDateSelecting:!1}))}}function fQ(t){return ce(tr,null,ce("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&ce("div",{className:"fc-event-time"},t.timeText),ce("div",{className:"fc-event-title"},t.event.title||ce(tr,null," ")))}class pQ extends Rn{constructor(){super(...arguments),this.compileSegs=Ht(mQ)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return ce(ND,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return ce(tr,null,n.map(s=>{let a=s.eventRange.instance.instanceId;return ce("div",{className:"fc-daygrid-event-harness",key:a,style:{visibility:i[a]?"hidden":""}},eI(s)?ce(nI,Object.assign({seg:s,isDragging:!1,isSelected:a===e.eventSelection,defaultDisplayEventEnd:!1},ga(s,e.todayRange))):ce(tI,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:a===e.eventSelection,defaultDisplayEventEnd:!1},ga(s,e.todayRange))))}))}})}}function mQ(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const gQ=or({week:"narrow"});class yQ extends uo{constructor(){super(...arguments),this.rootElRef=Pi(),this.state={dayNumberId:sl()},this.handleRootEl=e=>{pa(this.rootElRef,e),pa(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:i}=this,{options:s,dateEnv:a}=e,{date:o,dateProfile:p}=n;const g=n.showDayNumber&&_Q(o,p.currentRange,a);return ce(yv,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:bQ,date:o,dateProfile:p,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:g,extraRenderProps:n.extraRenderProps},(y,v)=>ce("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&ce(PD,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:rd(e,o,"week"),date:o,defaultFormat:gQ}),!v.isDisabled&&(n.showDayNumber||bv(s)||n.forceDayTop)?ce("div",{className:"fc-daygrid-day-top"},ce(y,{elTag:"a",elClasses:["fc-daygrid-day-number",g&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},rd(e,o)),{id:r.dayNumberId})})):n.showDayNumber?ce("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},ce("a",{className:"fc-daygrid-day-number"}," ")):void 0,ce("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,ce("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},ce(pQ,{allDayDate:o,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),ce("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function bQ(t){return t.dayNumberText||ce(tr,null," ")}function _Q(t,e,n){const{start:r,end:i}=e,s=al(i,-1),a=n.getYear(r),o=n.getMonth(r),p=n.getYear(s),g=n.getMonth(s);return!(a===p&&o===g)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function rI(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function iI(t){return rI(t)+":"+t.lastCol}function xQ(t,e,n,r,i,s,a){let o=new kQ(V=>{let U=t[V.index].eventRange.instance.instanceId+":"+V.span.start+":"+(V.span.end-1);return i[U]||1});o.allowReslicing=!0,o.strictOrder=r,e===!0||n===!0?(o.maxCoord=s,o.hiddenConsumes=!0):typeof e=="number"?o.maxStackCnt=e:typeof n=="number"&&(o.maxStackCnt=n,o.hiddenConsumes=!0);let p=[],g=[];for(let V=0;V<t.length;V+=1){let U=t[V],K=iI(U);i[K]!=null?p.push({index:V,span:{start:U.firstCol,end:U.lastCol+1}}):g.push(U)}let y=o.addSegs(p),v=o.toRects(),{singleColPlacements:E,multiColPlacements:T,leftoverMargins:D}=vQ(v,t,a),N=[],B=[];for(let V of g){T[V.firstCol].push({seg:V,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let U=V.firstCol;U<=V.lastCol;U+=1)E[U].push({seg:od(V,U,U+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let V=0;V<a.length;V+=1)N.push(0);for(let V of y){let U=t[V.index],K=V.span;T[K.start].push({seg:od(U,K.start,K.end,a),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let Y=K.start;Y<K.end;Y+=1)N[Y]+=1,E[Y].push({seg:od(U,Y,Y+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let V=0;V<a.length;V+=1)B.push(D[V]);return{singleColPlacements:E,multiColPlacements:T,moreCnts:N,moreMarginTops:B}}function vQ(t,e,n){let r=wQ(t,n.length),i=[],s=[],a=[];for(let o=0;o<n.length;o+=1){let p=r[o],g=[],y=0,v=0;for(let T of p){let D=e[T.index];g.push({seg:od(D,o,o+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:T.levelCoord,marginTop:T.levelCoord-y}),y=T.levelCoord+T.thickness}let E=[];y=0,v=0;for(let T of p){let D=e[T.index],N=T.span.end-T.span.start>1,B=T.span.start===o;v+=T.levelCoord-y,y=T.levelCoord+T.thickness,N?(v+=T.thickness,B&&E.push({seg:od(D,T.span.start,T.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:T.levelCoord,marginTop:0})):B&&(E.push({seg:od(D,T.span.start,T.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:T.levelCoord,marginTop:v}),v=0)}i.push(g),s.push(E),a.push(v)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:a}}function wQ(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let i=r.span.start;i<r.span.end;i+=1)n[i].push(r);return n}function od(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,s=i.range,a=dl(s,{start:r[e].date,end:qr(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:a},isStart:t.isStart&&a.start.valueOf()===s.start.valueOf(),isEnd:t.isEnd&&a.end.valueOf()===s.end.valueOf()})}class kQ extends mD{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,i=s=>!this.forceHidden[Mc(s)];for(let s=0;s<r.length;s+=1)r[s]=r[s].filter(i);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:i,forceHidden:s}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:p}=e;if(this.hiddenConsumes&&a){const g=Mc(a);if(!s[g])if(this.allowReslicing){const y=Object.assign(Object.assign({},a),{span:cv(a.span,n.span)}),v=Mc(y);s[v]=!0,i[o][p]=y,r.push(y),this.splitEntry(a,n,r)}else s[g]=!0,r.push(a)}super.handleInvalidInsertion(e,n,r)}}class sI extends uo{constructor(){super(...arguments),this.cellElRefs=new ya,this.frameElRefs=new ya,this.fgElRefs=new ya,this.segHarnessRefs=new ya,this.rootElRef=Pi(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:i}=r,s=e.cells.length,a=ny(e.businessHourSegs,s),o=ny(e.bgEventSegs,s),p=ny(this.getHighlightSegs(),s),g=ny(this.getMirrorSegs(),s),{singleColPlacements:y,multiColPlacements:v,moreCnts:E,moreMarginTops:T}=xQ(Kx(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),D=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return ce("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((N,B)=>{let V=this.renderFgSegs(B,e.forPrint?y[B]:v[B],e.todayRange,D),U=this.renderFgSegs(B,EQ(g[B],v),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return ce(yQ,{key:N.key,elRef:this.cellElRefs.createRef(N.key),innerElRef:this.frameElRefs.createRef(N.key),dateProfile:e.dateProfile,date:N.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&B===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:N.extraRenderProps,extraDataAttrs:N.extraDataAttrs,extraClassNames:N.extraClassNames,extraDateSpan:N.extraDateSpan,moreCnt:E[B],moreMarginTop:T[B],singlePlacements:y[B],fgContentElRef:this.fgElRefs.createRef(N.key),fgContent:ce(tr,null,ce(tr,null,V),ce(tr,null,U)),bgContent:ce(tr,null,this.renderFillSegs(p[B],"highlight"),this.renderFillSegs(a[B],"non-business"),this.renderFillSegs(o[B],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!Ro(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,n,r,i,s,a,o){let{context:p}=this,{eventSelection:g}=this.props,{framePositions:y}=this.state,v=this.props.cells.length===1,E=s||a||o,T=[];if(y)for(let D of n){let{seg:N}=D,{instanceId:B}=N.eventRange.instance,V=D.isVisible&&!i[B],U=D.isAbsolute,K="",Y="";U&&(p.isRtl?(Y=0,K=y.lefts[N.lastCol]-y.lefts[N.firstCol]):(K=0,Y=y.rights[N.firstCol]-y.rights[N.lastCol])),T.push(ce("div",{className:"fc-daygrid-event-harness"+(U?" fc-daygrid-event-harness-abs":""),key:rI(N),ref:E?null:this.segHarnessRefs.createRef(iI(N)),style:{visibility:V?"":"hidden",marginTop:U?"":D.marginTop,top:U?D.absoluteTop:"",left:K,right:Y}},eI(N)?ce(nI,Object.assign({seg:N,isDragging:s,isSelected:B===g,defaultDisplayEventEnd:v},ga(N,r))):ce(tI,Object.assign({seg:N,isDragging:s,isResizing:a,isDateSelecting:o,isSelected:B===g,defaultDisplayEventEnd:v},ga(N,r)))))}return T}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:s}=this.state,a=[];if(s)for(let o of e){let p=r?{right:0,left:s.lefts[o.lastCol]-s.lefts[o.firstCol]}:{left:0,right:s.rights[o.firstCol]-s.rights[o.lastCol]};a.push(ce("div",{key:aD(o.eventRange),className:"fc-daygrid-bg-harness",style:p},n==="bg-event"?ce(DD,Object.assign({seg:o},ga(o,i))):ID(n)))}return ce(tr,{},...a)}updateSizing(e){let{props:n,state:r,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let p=n.cells.map(g=>i.currentMap[g.key]);if(p.length){let g=this.rootElRef.current,y=new id(g,p,!0,!1);(!r.framePositions||!r.framePositions.similarTo(y))&&this.setState({framePositions:new id(g,p,!0,!1)})}}const s=this.state.segHeights,a=this.querySegHeights(),o=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},s),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let i=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}sI.addStateEquality({segHeights:Ro});function EQ(t,e){if(!t.length)return[];let n=SQ(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function SQ(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class CQ extends uo{constructor(){super(...arguments),this.splitBusinessHourSegs=Ht(ty),this.splitBgEventSegs=Ht(ty),this.splitFgEventSegs=Ht(ty),this.splitDateSelectionSegs=Ht(ty),this.splitEventDrag=Ht(JD),this.splitEventResize=Ht(JD),this.rowRefs=new ya}render(){let{props:e,context:n}=this,r=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),a=this.splitFgEventSegs(e.fgEventSegs,r),o=this.splitDateSelectionSegs(e.dateSelectionSegs,r),p=this.splitEventDrag(e.eventDrag,r),g=this.splitEventResize(e.eventResize,r),y=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return ce(sd,{unit:"day"},(v,E)=>ce(tr,null,e.cells.map((T,D)=>ce(sI,{ref:this.rowRefs.createRef(D),key:T.length?T[0].date.toISOString():D,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:E,dateProfile:e.dateProfile,cells:T,renderIntro:e.renderRowIntro,businessHourSegs:i[D],eventSelection:e.eventSelection,bgEventSegs:s[D].filter(TQ),fgEventSegs:a[D],dateSelectionSegs:o[D],eventDrag:p[D],eventResize:g[D],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:y,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new id(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new id(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:i}=this,s=r.leftToIndex(e),a=i.topToIndex(n);if(a!=null&&s!=null){let o=this.props.cells[a][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,s),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(a,s),rect:{left:r.lefts[s],right:r.rights[s],top:i.tops[a],bottom:i.bottoms[a]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,i=qr(r,1);return{start:r,end:i}}}function TQ(t){return t.eventRange.def.allDay}class AQ extends uo{constructor(){super(...arguments),this.elRef=Pi(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:i}=e,s=r===!0||n===!0;s&&!i&&(s=!1,n=null,r=null);let a=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return ce("div",{ref:this.elRef,className:a.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},ce("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,ce("tbody",{role:"presentation"},ce(CQ,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=MQ(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function MQ(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${yZ(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${uf(e.currentDate)}"]`)),n}class DQ extends wD{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class oI extends uo{constructor(){super(...arguments),this.slicer=new DQ,this.tableRef=Pi()}render(){let{props:e,context:n}=this;return ce(AQ,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class IQ extends hQ{constructor(){super(...arguments),this.buildDayTableModel=Ht(PQ),this.headerRef=Pi(),this.tableRef=Pi()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,n),s=e.dayHeaders&&ce(_D,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),a=o=>ce(oI,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,a,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,a)}}function PQ(t,e){let n=new xD(t.renderRange,e);return new vD(n,/year|month|week/.test(t.currentRangeUnit))}class NQ extends UM{buildRenderRange(e,n,r){let i=super.buildRenderRange(e,n,r),{props:s}=this;return RQ({currentRange:i,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}}function RQ(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:i}=n,s;if(t.snapToWeek&&(r=e.startOfWeek(r),s=e.startOfWeek(i),s.valueOf()!==i.valueOf()&&(i=SM(s,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(qr(n.end,-1))),o=Math.ceil(oZ(a,i));i=SM(i,6-o)}return{start:r,end:i}}var OQ=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';Ig(OQ);var BQ=Oo({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:IQ,dateProfileGeneratorClass:NQ},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class VQ extends tK{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?PX(e)?["timed","allDay"]:["allDay"]:["timed"]}}const zQ=or({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function aI(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return ce(fa.Consumer,null,n=>{if(!t.isLabeled)return ce("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,a=i.slotLabelFormat==null?zQ:Array.isArray(i.slotLabelFormat)?or(i.slotLabelFormat[0]):or(i.slotLabelFormat),o={level:0,time:t.time,date:r.toDate(t.date),view:s,text:r.format(t.date,a)};return ce(xi,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:o,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:LQ,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},p=>ce("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},ce(p,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function LQ(t){return t.text}class FQ extends Rn{render(){return this.props.slatMetas.map(e=>ce("tr",{key:e.key},ce(aI,Object.assign({},e))))}}const $Q=or({week:"short"}),jQ=5;class HQ extends uo{constructor(){super(...arguments),this.allDaySplitter=new VQ,this.headerElRef=Pi(),this.rootElRef=Pi(),this.scrollerElRef=Pi(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:i}=this.props,s=i.renderRange,o=ll(s.start,s.end)===1?rd(this.context,s.start,"week"):{};return r.weekNumbers&&e==="day"?ce(PD,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:$Q},p=>ce("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},ce(p,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:o}))):ce("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},ce("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,i={text:n.allDayText,view:r};return ce(xi,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:UQ,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},s=>ce("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},ce(s,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:i,props:s}=this,a=[],o=Qg(i.options);return e&&a.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(a.push({type:"body",key:"all-day",chunk:{content:n}}),a.push({type:"body",key:"all-day-divider",outerContent:ce("tr",{role:"presentation",className:"fc-scrollgrid-section"},ce("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),ce(ff,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},ce(mv,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:a}))}renderHScrollLayout(e,n,r,i,s,a,o){let p=this.context.pluginHooks.scrollGridImpl;if(!p)throw new Error("No ScrollGrid implementation");let{context:g,props:y}=this,v=!y.forPrint&&Qg(g.options),E=!y.forPrint&&AD(g.options),T=[];e&&T.push({type:"header",key:"header",isSticky:v,syncRowHeights:!0,chunks:[{key:"axis",rowContent:N=>ce("tr",{role:"presentation"},this.renderHeadAxis("day",N.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(T.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:N=>ce("tr",{role:"presentation"},this.renderTableRowAxis(N.rowSyncHeights[0]))},{key:"cols",content:n}]}),T.push({key:"all-day-divider",type:"body",outerContent:ce("tr",{role:"presentation",className:"fc-scrollgrid-section"},ce("td",{colSpan:2,className:"fc-timegrid-divider "+g.theme.getClass("tableCellShaded")}))}));let D=g.options.nowIndicator;return T.push({type:"body",key:"body",liquid:!0,expandRows:!!g.options.expandRows,chunks:[{key:"axis",content:N=>ce("div",{className:"fc-timegrid-axis-chunk"},ce("table",{"aria-hidden":!0,style:{height:N.expandRows?N.clientHeight:""}},N.tableColGroupNode,ce("tbody",null,ce(FQ,{slatMetas:a}))),ce("div",{className:"fc-timegrid-now-indicator-container"},ce(sd,{unit:D?"minute":"day"},B=>{let V=D&&o&&o.safeComputeTop(B);return typeof V=="number"?ce(gv,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:V},isAxis:!0,date:B}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),E&&T.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:pv},{key:"cols",content:pv}]}),ce(ff,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:g.viewSpec},ce(p,{liquid:!y.isHeightAuto&&!y.forPrint,forPrint:y.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:s}]}],sections:T}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=jQ),{dayMaxEvents:e,dayMaxEventRows:n}}}function UQ(t){return t.text}class WQ{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(ma(n.currentRange,e)){let r=nr(e),i=e.valueOf()-r.valueOf();if(i>=co(n.slotMinTime)&&i<co(n.slotMaxTime))return this.computeTimeTop(Sn(i))}return null}computeDateTop(e,n){return n||(n=nr(e)),this.computeTimeTop(Sn(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,i=n.els.length,s=(e.milliseconds-co(r.slotMinTime))/co(this.slotDuration),a,o;return s=Math.max(0,s),s=Math.min(i,s),a=Math.floor(s),a=Math.min(a,i-1),o=s-a,n.tops[a]+n.getHeight(a)*o}}class qQ extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:i}=e;return ce("tbody",null,e.slatMetas.map((s,a)=>{let o={time:s.time,date:n.dateEnv.toDate(s.date),view:n.viewApi};return ce("tr",{key:s.key,ref:i.createRef(s.key)},e.axis&&ce(aI,Object.assign({},s)),ce(xi,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class GQ extends Rn{constructor(){super(...arguments),this.rootElRef=Pi(),this.slatElRefs=new ya}render(){let{props:e,context:n}=this;return ce("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},ce("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,ce(qQ,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new WQ(new id(this.rootElRef.current,YQ(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function YQ(t,e){return e.map(n=>t[n.key])}function yf(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function lI(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class ZQ extends Rn{render(){let{props:e}=this;return ce(ND,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>hI(e.hiddenSegs,e),defaultGenerator:XQ,forceTimed:!0},n=>ce(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function XQ(t){return t.shortText}function KQ(t,e,n){let r=new mD;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let i=r.addSegs(t),s=pK(i),a=JQ(r);return a=nee(a,1),{segRects:ree(a),hiddenGroups:s}}function JQ(t){const{entriesByLevel:e}=t,n=kv((r,i)=>r+":"+i,(r,i)=>{let s=tee(t,r,i),a=cI(s,n),o=e[r][i];return[Object.assign(Object.assign({},o),{nextLevelNodes:a[0]}),o.thickness+a[1]]});return cI(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function cI(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=t,s=r,a=[];for(;s<i;)a.push(e(n,s)),s+=1;return a.sort(QQ),[a.map(eee),a[0][1]]}function QQ(t,e){return e[1]-t[1]}function eee(t){return t[0]}function tee(t,e,n){let{levelCoords:r,entriesByLevel:i}=t,s=i[e][n],a=r[e]+s.thickness,o=r.length,p=e;for(;p<o&&r[p]<a;p+=1);for(;p<o;p+=1){let g=i[p],y,v=dv(g,s.span.start,lv),E=v[0]+v[1],T=E;for(;(y=g[T])&&y.span.start<s.span.end;)T+=1;if(E<T)return{level:p,lateralStart:E,lateralEnd:T}}return null}function nee(t,e){const n=kv((r,i,s)=>Mc(r),(r,i,s)=>{let{nextLevelNodes:a,thickness:o}=r,p=o+s,g=o/p,y,v=[];if(!a.length)y=e;else for(let T of a)if(y===void 0){let D=n(T,i,p);y=D[0],v.push(D[1])}else{let D=n(T,y,0);v.push(D[1])}let E=(y-i)*g;return[y-E,Object.assign(Object.assign({},r),{thickness:E,nextLevelNodes:v})]});return t.map(r=>n(r,0,0)[1])}function ree(t){let e=[];const n=kv((i,s,a)=>Mc(i),(i,s,a)=>{let o=Object.assign(Object.assign({},i),{levelCoord:s,stackDepth:a,stackForward:0});return e.push(o),o.stackForward=r(i.nextLevelNodes,s+i.thickness,a+1)+1});function r(i,s,a){let o=0;for(let p of i)o=Math.max(n(p,s,a),o);return o}return r(t,0,0),e}function kv(t,e){const n={};return(...r)=>{let i=t(...r);return i in n?n[i]:n[i]=e(...r)}}function uI(t,e,n=null,r=0){let i=[];if(n)for(let s=0;s<t.length;s+=1){let a=t[s],o=n.computeDateTop(a.start,e),p=Math.max(o+(r||0),n.computeDateTop(a.end,e));i.push({start:Math.round(o),end:Math.round(p)})}return i}function iee(t,e,n,r){let i=[],s=[];for(let g=0;g<t.length;g+=1){let y=e[g];y?i.push({index:g,thickness:1,span:y}):s.push(t[g])}let{segRects:a,hiddenGroups:o}=KQ(i,n,r),p=[];for(let g of a)p.push({seg:t[g.index],rect:g});for(let g of s)p.push({seg:g,rect:null});return{segPlacements:p,hiddenGroups:o}}const see=or({hour:"numeric",minute:"2-digit",meridiem:!1});class dI extends Rn{render(){return ce(MD,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:see}))}}class oee extends Rn{constructor(){super(...arguments),this.sortEventSegs=Ht(Kx)}render(){let{props:e,context:n}=this,{options:r}=n,i=r.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],a=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return ce(yv,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},p=>ce("div",{className:"fc-timegrid-col-frame"},ce("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),ce("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,a,!1,!1,!1)),ce("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),ce("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),bv(r)&&ce(p,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,i,s,a){let{props:o}=this;return o.forPrint?hI(e,o):this.renderPositionedFgSegs(e,n,r,i,s,a)}renderPositionedFgSegs(e,n,r,i,s,a){let{eventMaxStack:o,eventShortHeight:p,eventOrderStrict:g,eventMinHeight:y}=this.context.options,{date:v,slatCoords:E,eventSelection:T,todayRange:D,nowDate:N}=this.props,B=r||i||s,V=uI(e,v,E,y),{segPlacements:U,hiddenGroups:K}=iee(e,V,g,o);return ce(tr,null,this.renderHiddenGroups(K,e),U.map(Y=>{let{seg:we,rect:ye}=Y,Te=we.eventRange.instance.instanceId,Re=B||!!(!n[Te]&&ye),Ne=Ev(ye&&ye.span),Ye=!B&&ye?this.computeSegHStyle(ye):{left:0,right:0},qe=!!ye&&ye.stackForward>0,he=!!ye&&ye.span.end-ye.span.start<p;return ce("div",{className:"fc-timegrid-event-harness"+(qe?" fc-timegrid-event-harness-inset":""),key:a||Te,style:Object.assign(Object.assign({visibility:Re?"":"hidden"},Ne),Ye)},ce(dI,Object.assign({seg:we,isDragging:r,isResizing:i,isDateSelecting:s,isSelected:Te===T,isShort:he},ga(we,D,N))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:a,eventSelection:o,eventDrag:p,eventResize:g}=this.props;return ce(tr,null,e.map(y=>{let v=Ev(y.span),E=aee(y.entries,n);return ce(ZQ,{key:MM(OD(E)),hiddenSegs:E,top:v.top,bottom:v.bottom,extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:a,eventSelection:o,eventDrag:p,eventResize:g})}))}renderFillSegs(e,n){let{props:r,context:i}=this,a=uI(e,r.date,r.slatCoords,i.options.eventMinHeight).map((o,p)=>{let g=e[p];return ce("div",{key:aD(g.eventRange),className:"fc-timegrid-bg-harness",style:Ev(o)},n==="bg-event"?ce(DD,Object.assign({seg:g},ga(g,r.todayRange,r.nowDate))):ID(n))});return ce(tr,null,a)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((i,s)=>ce(gv,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,i=r.slotEventOverlap,s=e.levelCoord,a=e.levelCoord+e.thickness,o,p;i&&(a=Math.min(1,s+(a-s)*2)),n?(o=1-a,p=s):(o=s,p=1-a);let g={zIndex:e.stackDepth+1,left:o*100+"%",right:p*100+"%"};return i&&!e.stackForward&&(g[n?"marginLeft":"marginRight"]=10*2),g}}function hI(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let a=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return ce(tr,null,t.map(o=>{let p=o.eventRange.instance.instanceId;return ce("div",{key:p,style:{visibility:a[p]?"hidden":""}},ce(dI,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:p===r,isShort:!1},ga(o,e,n))))}))}function Ev(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function aee(t,e){return t.map(n=>e[n.index])}class lee extends Rn{constructor(){super(...arguments),this.splitFgEventSegs=Ht(yf),this.splitBgEventSegs=Ht(yf),this.splitBusinessHourSegs=Ht(yf),this.splitNowIndicatorSegs=Ht(yf),this.splitDateSelectionSegs=Ht(yf),this.splitEventDrag=Ht(lI),this.splitEventResize=Ht(lI),this.rootElRef=Pi(),this.cellElRefs=new ya}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,i),a=this.splitBgEventSegs(e.bgEventSegs,i),o=this.splitBusinessHourSegs(e.businessHourSegs,i),p=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),g=this.splitDateSelectionSegs(e.dateSelectionSegs,i),y=this.splitEventDrag(e.eventDrag,i),v=this.splitEventResize(e.eventResize,i);return ce("div",{className:"fc-timegrid-cols",ref:this.rootElRef},ce("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,ce("tbody",{role:"presentation"},ce("tr",{role:"row"},e.axis&&ce("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},ce("div",{className:"fc-timegrid-col-frame"},ce("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&ce(gv,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((E,T)=>ce(oee,{key:E.key,elRef:this.cellElRefs.createRef(E.key),dateProfile:e.dateProfile,date:E.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:E.extraRenderProps,extraDataAttrs:E.extraDataAttrs,extraClassNames:E.extraClassNames,extraDateSpan:E.extraDateSpan,fgEventSegs:s[T],bgEventSegs:a[T],businessHourSegs:o[T],nowIndicatorSegs:p[T],dateSelectionSegs:g[T],eventDrag:y[T],eventResize:v[T],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new id(this.rootElRef.current,cee(this.cellElRefs.currentMap,e.cells),!0,!1))}}function cee(t,e){return e.map(n=>t[n.key])}class uee extends uo{constructor(){super(...arguments),this.processSlotOptions=Ht(dee),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let i=r.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(i)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n}=this;return ce("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},ce(GQ,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),ce(lee,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:n.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,n){let{dateEnv:r,options:i}=this.context,{colCoords:s}=this,{dateProfile:a}=this.props,{slatCoords:o}=this.state,{snapDuration:p,snapsPerSlot:g}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),y=s.leftToIndex(e),v=o.positions.topToIndex(n);if(y!=null&&v!=null){let E=this.props.cells[y],T=o.positions.tops[v],D=o.positions.getHeight(v),N=(n-T)/D,B=Math.floor(N*g),V=v*g+B,U=this.props.cells[y].date,K=Tx(a.slotMinTime,nZ(p,V)),Y=r.add(U,K),we=r.add(Y,p);return{dateProfile:a,dateSpan:Object.assign({range:{start:Y,end:we},allDay:!1},E.extraDateSpan),dayEl:s.els[y],rect:{left:s.lefts[y],right:s.rights[y],top:T,bottom:T+D},layer:0}}return null}}function dee(t,e){let n=e||t,r=Ax(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class hee extends wD{sliceRange(e,n){let r=[];for(let i=0;i<n.length;i+=1){let s=dl(e,n[i]);s&&r.push({start:s.start,end:s.end,isStart:s.start.valueOf()===e.start.valueOf(),isEnd:s.end.valueOf()===e.end.valueOf(),col:i})}return r}}class fee extends uo{constructor(){super(...arguments),this.buildDayRanges=Ht(pee),this.slicer=new hee,this.timeColsRef=Pi()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:i}=e,{nowIndicator:s,nextDayThreshold:a}=n.options,o=this.buildDayRanges(i,r,n.dateEnv);return ce(sd,{unit:s?"minute":"day"},(p,g)=>ce(uee,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:p,nowIndicatorSegs:s&&this.slicer.sliceNowDate(p,r,a,n,o),todayRange:g,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function pee(t,e,n){let r=[];for(let i of t.headerDates)r.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return r}const fI=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function mee(t,e,n,r,i){let s=new Date(0),a=t,o=Sn(0),p=n||gee(r),g=[];for(;co(a)<co(e);){let y=i.add(s,a),v=Ax(o,p)!==null;g.push({date:y,time:a,key:y.toISOString(),isoTimeStr:bZ(y),isLabeled:v}),a=Tx(a,r),o=Tx(o,r)}return g}function gee(t){let e,n,r;for(e=fI.length-1;e>=0;e-=1)if(n=Sn(fI[e]),r=Ax(n,t),r!==null&&r>1)return n;return t}class yee extends HQ{constructor(){super(...arguments),this.buildTimeColsModel=Ht(bee),this.buildSlatMetas=Ht(mee)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:i}=this,{dateProfile:s}=i,a=this.buildTimeColsModel(s,r),o=this.allDaySplitter.splitProps(i),p=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:g}=e,y=!g,v=g,E=e.dayHeaders&&ce(_D,{dates:a.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:y?this.renderHeadAxis:null}),T=e.allDaySlot!==!1&&(N=>ce(oI,Object.assign({},o.allDay,{dateProfile:s,dayTableModel:a,nextDayThreshold:e.nextDayThreshold,tableMinWidth:N.tableMinWidth,colGroupNode:N.tableColGroupNode,renderRowIntro:y?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:N.clientWidth,clientHeight:N.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),D=N=>ce(fee,Object.assign({},o.timed,{dayTableModel:a,dateProfile:s,axis:y,slotDuration:e.slotDuration,slatMetas:p,forPrint:i.forPrint,tableColGroupNode:N.tableColGroupNode,tableMinWidth:N.tableMinWidth,clientWidth:N.clientWidth,clientHeight:N.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:N.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return v?this.renderHScrollLayout(E,T,D,a.colCnt,g,p,this.state.slatCoords):this.renderSimpleLayout(E,T,D)}}function bee(t,e){let n=new xD(t.renderRange,e);return new vD(n,!1)}var _ee='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';Ig(_ee);var xee=Oo({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:yee,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class vee extends Rn{constructor(){super(...arguments),this.state={textId:sl()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:i}=this.context,{cellId:s,dayDate:a,todayRange:o}=this.props,{textId:p}=this.state,g=rv(a,o),y=r.listDayFormat?n.format(a,r.listDayFormat):"",v=r.listDaySideFormat?n.format(a,r.listDaySideFormat):"",E=Object.assign({date:n.toDate(a),view:i,textId:p,text:y,sideText:v,navLinkAttrs:rd(this.context,a),sideNavLinkAttrs:rd(this.context,a,"day",!1)},g);return ce(xi,{elTag:"tr",elClasses:["fc-list-day",...Zg(g,e)],elAttrs:{"data-date":uf(a)},renderProps:E,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:wee,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},T=>ce("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":p},ce(T,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function wee(t){return ce(tr,null,t.text&&ce("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&ce("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const kee=or({hour:"numeric",minute:"2-digit",meridiem:"short"});class Eee extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i,timeHeaderId:s,eventHeaderId:a,dateHeaderId:o}=e,p=r.eventTimeFormat||kee;return ce(ey,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>See(i,n),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(g,y)=>ce(tr,null,Cee(i,p,n,s,o),ce("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},ce("span",{className:"fc-list-event-dot",style:{borderColor:y.borderColor||y.backgroundColor}})),ce(g,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${a} ${o}`}})))}}function See(t,e){let n=Jx(t,e);return ce("a",Object.assign({},n),t.eventRange.def.title)}function Cee(t,e,n,r,i){let{options:s}=n;if(s.displayEventTime!==!1){let a=t.eventRange.def,o=t.eventRange.instance,p=!1,g;if(a.allDay?p=!0:rX(t.eventRange.range)?t.isStart?g=gf(t,e,n,null,null,o.range.start,t.end):t.isEnd?g=gf(t,e,n,null,null,t.start,o.range.end):p=!0:g=gf(t,e,n),p){let y={text:n.options.allDayText,view:n.viewApi};return ce(xi,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:y,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Tee,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return ce("td",{className:"fc-list-event-time"},g)}return null}function Tee(t){return t.text}class Aee extends uo{constructor(){super(...arguments),this.computeDateVars=Ht(Dee),this.eventStoreToSegs=Ht(this._eventStoreToSegs),this.state={timeHeaderId:sl(),eventHeaderId:sl(),dateHeaderIdRoot:sl()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return ce(ff,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},ce(CD,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return ce(xi,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Mee,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>ce(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:i}=this.context,{timeHeaderId:s,eventHeaderId:a,dateHeaderIdRoot:o}=this.state,p=Iee(e);return ce(sd,{unit:"day"},(g,y)=>{let v=[];for(let E=0;E<p.length;E+=1){let T=p[E];if(T){let D=uf(n[E]),N=o+"-"+D;v.push(ce(vee,{key:D,cellId:N,dayDate:n[E],todayRange:y})),T=Kx(T,i.eventOrder);for(let B of T)v.push(ce(Eee,Object.assign({key:D+":"+B.eventRange.instance.instanceId,seg:B,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:s,eventHeaderId:a,dateHeaderId:N},ga(B,y,g))))}}return ce("table",{className:"fc-list-table "+r.getClass("table")},ce("thead",null,ce("tr",null,ce("th",{scope:"col",id:s},i.timeHint),ce("th",{scope:"col","aria-hidden":!0}),ce("th",{scope:"col",id:a},i.eventHint))),ce("tbody",null,v))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(Xx(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let i of e)r.push(...this.eventRangeToSegs(i,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:i}=this.context.options,s=e.range,a=e.def.allDay,o,p,g,y=[];for(o=0;o<n.length;o+=1)if(p=dl(s,n[o]),p&&(g={component:this,eventRange:e,start:p.start,end:p.end,isStart:e.isStart&&p.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&p.end.valueOf()===s.end.valueOf(),dayIndex:o},y.push(g),!g.isEnd&&!a&&o+1<n.length&&s.end<r.add(n[o+1].start,i))){g.end=s.end,g.isEnd=!0;break}return y}}function Mee(t){return t.text}function Dee(t){let e=nr(t.renderRange.start),n=t.renderRange.end,r=[],i=[];for(;e<n;)r.push(e),i.push({start:e,end:qr(e,1)}),e=qr(e,1);return{dayDates:r,dayRanges:i}}function Iee(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var Pee=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';Ig(Pee);const Nee={listDayFormat:pI,listDaySideFormat:pI,noEventsClassNames:Ie,noEventsContent:Ie,noEventsDidMount:Ie,noEventsWillUnmount:Ie};function pI(t){return t===!1?null:or(t)}var Ree=Oo({name:"@fullcalendar/list",optionRefiners:Nee,views:{list:{component:Aee,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});hv.touchMouseIgnoreWait=500;let Sv=0,ry=0,Cv=!1;class mI{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=n=>{if(!this.shouldIgnoreMouse()&&Oee(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let i=n.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,Bee()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:r-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new Gg,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Vee()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),zee()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||_i(r,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Cv=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?_i(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Sv||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Cv=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,n){let r=0,i=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:i}}createEventFromTouch(e,n){let r=e.touches,i,s,a=0,o=0;return r&&r.length?(i=r[0].pageX,s=r[0].pageY):(i=e.pageX,s=e.pageY),n?(this.origPageX=i,this.origPageY=s):(a=i-this.origPageX,o=s-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:a,deltaY:o}}}function Oee(t){return t.button===0&&!t.ctrlKey}function Bee(){Sv+=1,setTimeout(()=>{Sv-=1},hv.touchMouseIgnoreWait)}function Vee(){ry+=1,ry===1&&window.addEventListener("touchmove",gI,{passive:!1})}function zee(){ry-=1,ry||window.removeEventListener("touchmove",gI,{passive:!1})}function gI(t){Cv&&t.preventDefault()}class Lee{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",lf(r,{left:i.left,top:i.top}),$Y(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Ex(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&lf(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",n.classList.add("fc-event-dragging"),lf(n,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class yI extends av{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class bI extends yI{constructor(e,n){super(new hK(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return uK(this.scrollController.el)}}class Fee extends yI{constructor(e){super(new fK,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const _I=typeof performance=="function"?performance.now:Date.now;class $ee{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let n=_I();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,i=n-window.scrollY,s=this.pointerScreenY===null?0:i-this.pointerScreenY,a=this.pointerScreenX===null?0:r-this.pointerScreenX;s<0?this.everMovedUp=!0:s>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(_I()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,n){let{scrollCache:r}=e,{edgeThreshold:i}=this,s=i-e.distance,a=s*s/(i*i)*this.maxVelocity*n,o=1;switch(e.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+a*o);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,i=null,s=this.scrollCaches||[];for(let a of s){let o=a.clientRect,p=e-o.left,g=o.right-e,y=n-o.top,v=o.bottom-n;p>=0&&g>=0&&y>=0&&v>=0&&(y<=r&&this.everMovedUp&&a.canScrollUp()&&(!i||i.distance>y)&&(i={scrollCache:a,name:"top",distance:y}),v<=r&&this.everMovedDown&&a.canScrollDown()&&(!i||i.distance>v)&&(i={scrollCache:a,name:"bottom",distance:v}),p<=r&&this.everMovedLeft&&a.canScrollLeft()&&(!i||i.distance>p)&&(i={scrollCache:a,name:"left",distance:p}),g<=r&&this.everMovedRight&&a.canScrollRight()&&(!i||i.distance>g)&&(i={scrollCache:a,name:"right",distance:g}))}return i}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new Fee(!1):new bI(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class bf extends gK{constructor(e,n){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,jY(document.body),UY(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let s=this.minDistance,a,{deltaX:o,deltaY:p}=i;a=o*o+p*p,a>=s*s&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,HY(document.body),WY(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new mI(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new Lee,this.autoScroller=new $ee}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class jee{constructor(e){this.el=e,this.origRect=ov(e),this.scrollCaches=pD(e).map(n=>new bI(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let i of this.scrollCaches)if(!Hee(i.getEventTarget())&&!KX(r,i.clientRect))return!1;return!0}}function Hee(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class iy{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):i.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Gg}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl,s;i instanceof HTMLElement&&(s=ov(i),r=JX(r,s));let a=this.initialHit=this.queryHitForOffset(r.left,r.top);if(a){if(this.useSubjectCenter&&s){let o=hD(s,a.rect);o&&(r=QX(o))}this.coordAdjust=eK(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!sy(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=ha(this.droppableStore,e=>(e.component.prepareHits(),new jee(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:i}=this,s=null;for(let a in r){let o=r[a].component,p=i[a];if(p&&p.isWithinClipping(e,n)){let g=p.computeLeft(),y=p.computeTop(),v=e-g,E=n-y,{origRect:T}=p,D=T.right-T.left,N=T.bottom-T.top;if(v>=0&&v<D&&E>=0&&E<N){let B=o.queryHit(v,E,D,N);B&&jg(B.dateProfile.activeRange,B.dateSpan.range)&&(this.disablePointCheck||p.el.contains(p.el.getRootNode().elementFromPoint(v+g-window.scrollX,E+y-window.scrollY)))&&(!s||B.layer>s.layer)&&(B.componentId=a,B.context=o.context,B.rect.left+=g,B.rect.right+=g,B.rect.top+=y,B.rect.bottom+=y,s=B)}}}return s}}function sy(t,e){return!t&&!e?!0:!!t!=!!e?!1:$X(t.dateSpan,e.dateSpan)}function xI(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,Uee(t,e.dateEnv)),n}function Uee(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class Wee extends nd{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:i}=this,s=r.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(s))},this.handleDragEnd=r=>{let{component:i}=this,{pointer:s}=this.dragging;if(!s.wasTouchScroll){let{initialHit:a,finalHit:o}=this.hitDragging;if(a&&o&&sy(a,o)){let{context:p}=i,g=Object.assign(Object.assign({},xI(a.dateSpan,p)),{dayEl:a.dayEl,jsEvent:r.origEvent,view:p.viewApi||p.calendarApi.view});p.emitter.trigger("dateClick",g)}}},this.dragging=new bf(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new iy(this.dragging,ev(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class qee extends nd{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=a=>{let{component:o,dragging:p}=this,{options:g}=o.context,y=g.selectable&&o.isValidDateDownEl(a.origEvent.target);p.setIgnoreMove(!y),p.delay=a.isTouch?Gee(o):null},this.handleDragStart=a=>{this.component.context.calendarApi.unselect(a)},this.handleHitUpdate=(a,o)=>{let{context:p}=this.component,g=null,y=!1;if(a){let v=this.hitDragging.initialHit;a.componentId===v.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(v,a)||(g=Yee(v,a,p.pluginHooks.dateSelectionTransformers)),(!g||!wK(g,a.dateProfile,p))&&(y=!0,g=null)}g?p.dispatch({type:"SELECT_DATES",selection:g}):o||p.dispatch({type:"UNSELECT_DATES"}),y?Sx():Cx(),o||(this.dragSelection=g)},this.handlePointerUp=a=>{this.dragSelection&&(nD(this.dragSelection,a,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:r}=n.context,i=this.dragging=new bf(e.el);i.touchScrollAllowed=!1,i.minDistance=r.selectMinDistance||0,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new iy(this.dragging,ev(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Gee(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Yee(t,e,n){let r=t.dateSpan,i=e.dateSpan,s=[r.range.start,r.range.end,i.range.start,i.range.end];s.sort(XY);let a={};for(let o of n){let p=o(t,e);if(p===!1)return null;p&&Object.assign(a,p)}return a.range={start:s[0],end:s[3]},a.allDay=r.allDay,a}class _f extends nd{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=a=>{let o=a.origEvent.target,{component:p,dragging:g}=this,{mirror:y}=g,{options:v}=p.context,E=p.context;this.subjectEl=a.subjectEl;let T=this.subjectSeg=td(a.subjectEl),N=(this.eventRange=T.eventRange).instance.instanceId;this.relevantEvents=qx(E.getCurrentData().eventStore,N),g.minDistance=a.isTouch?0:v.eventDragMinDistance,g.delay=a.isTouch&&N!==p.props.eventSelection?Xee(p):null,v.fixedMirrorParent?y.parentNode=v.fixedMirrorParent:y.parentNode=_i(o,".fc"),y.revertDuration=v.dragRevertDuration;let B=p.isValidSegDownEl(o)&&!_i(o,".fc-event-resizer");g.setIgnoreMove(!B),this.isDragging=B&&a.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=a=>{let o=this.component.context,p=this.eventRange,g=p.instance.instanceId;a.isTouch?g!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:g}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(a),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new ur(o,p.def,p.instance),jsEvent:a.origEvent,view:o.viewApi}))},this.handleHitUpdate=(a,o)=>{if(!this.isDragging)return;let p=this.relevantEvents,g=this.hitDragging.initialHit,y=this.component.context,v=null,E=null,T=null,D=!1,N={affectedEvents:p,mutatedEvents:_s(),isEvent:!0};if(a){v=a.context;let B=v.options;y===v||B.editable&&B.droppable?(E=Zee(g,a,this.eventRange.instance.range.start,v.getCurrentData().pluginHooks.eventDragMutationMassagers),E&&(T=Zx(p,v.getCurrentData().eventUiBases,E,v),N.mutatedEvents=T,kD(N,a.dateProfile,v)||(D=!0,E=null,T=null,N.mutatedEvents=_s()))):v=null}this.displayDrag(v,N),D?Sx():Cx(),o||(y===v&&sy(g,a)&&(E=null),this.dragging.setMirrorNeedsRevert(!E),this.dragging.setMirrorIsVisible(!a||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=v,this.validMutation=E,this.mutatedRelevantEvents=T)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=a=>{if(this.isDragging){let o=this.component.context,p=o.viewApi,{receivingContext:g,validMutation:y}=this,v=this.eventRange.def,E=this.eventRange.instance,T=new ur(o,v,E),D=this.relevantEvents,N=this.mutatedRelevantEvents,{finalHit:B}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:T,jsEvent:a.origEvent,view:p}),y){if(g===o){let V=new ur(o,N.defs[v.defId],E?N.instances[E.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:N});let U={oldEvent:T,event:V,relatedEvents:Ac(N,o,E),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:D})}},K={};for(let Y of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(K,Y(y,o));o.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},U),K),{el:a.subjectEl,delta:y.datesDelta,jsEvent:a.origEvent,view:p})),o.emitter.trigger("eventChange",U)}else if(g){let V={event:T,relatedEvents:Ac(D,o,E),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:D})}};o.emitter.trigger("eventLeave",Object.assign(Object.assign({},V),{draggedEl:a.subjectEl,view:p})),o.dispatch({type:"REMOVE_EVENTS",eventStore:D}),o.emitter.trigger("eventRemove",V);let U=N.defs[v.defId],K=N.instances[E.instanceId],Y=new ur(g,U,K);g.dispatch({type:"MERGE_EVENTS",eventStore:N});let we={event:Y,relatedEvents:Ac(N,g,K),revert(){g.dispatch({type:"REMOVE_EVENTS",eventStore:N})}};g.emitter.trigger("eventAdd",we),a.isTouch&&g.dispatch({type:"SELECT_EVENT",eventInstanceId:E.instanceId}),g.emitter.trigger("drop",Object.assign(Object.assign({},xI(B.dateSpan,g)),{draggedEl:a.subjectEl,jsEvent:a.origEvent,view:B.context.viewApi})),g.emitter.trigger("eventReceive",Object.assign(Object.assign({},we),{draggedEl:a.subjectEl,view:B.context.viewApi}))}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,i=this.dragging=new bf(e.el);i.pointer.selector=_f.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new iy(this.dragging,tv);s.useSubjectCenter=e.useEventCenter,s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,i=this.receivingContext;i&&i!==e&&(i===r?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:_s(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}_f.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Zee(t,e,n,r){let i=t.dateSpan,s=e.dateSpan,a=i.range.start,o=s.range.start,p={};i.allDay!==s.allDay&&(p.allDay=s.allDay,p.hasEnd=e.context.options.allDayMaintainDuration,s.allDay?a=nr(n):a=n);let g=Qu(a,o,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);g.milliseconds&&(p.allDay=!1);let y={datesDelta:g,standardProps:p};for(let v of r)v(y,t,e);return y}function Xee(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Kee extends nd{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let{component:a}=this,o=this.querySegEl(s),p=td(o),g=this.eventRange=p.eventRange;this.dragging.minDistance=a.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(s.origEvent.target)||s.isTouch&&this.component.props.eventSelection!==g.instance.instanceId)},this.handleDragStart=s=>{let{context:a}=this.component,o=this.eventRange;this.relevantEvents=qx(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let p=this.querySegEl(s);this.draggingSegEl=p,this.draggingSeg=td(p),a.calendarApi.unselect(),a.emitter.trigger("eventResizeStart",{el:p,event:new ur(a,o.def,o.instance),jsEvent:s.origEvent,view:a.viewApi})},this.handleHitUpdate=(s,a,o)=>{let{context:p}=this.component,g=this.relevantEvents,y=this.hitDragging.initialHit,v=this.eventRange.instance,E=null,T=null,D=!1,N={affectedEvents:g,mutatedEvents:_s(),isEvent:!0};s&&(s.componentId===y.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(y,s)||(E=Jee(y,s,o.subjectEl.classList.contains("fc-event-resizer-start"),v.range))),E&&(T=Zx(g,p.getCurrentData().eventUiBases,E,p),N.mutatedEvents=T,kD(N,s.dateProfile,p)||(D=!0,E=null,T=null,N.mutatedEvents=null)),T?p.dispatch({type:"SET_EVENT_RESIZE",state:N}):p.dispatch({type:"UNSET_EVENT_RESIZE"}),D?Sx():Cx(),a||(E&&sy(y,s)&&(E=null),this.validMutation=E,this.mutatedRelevantEvents=T)},this.handleDragEnd=s=>{let{context:a}=this.component,o=this.eventRange.def,p=this.eventRange.instance,g=new ur(a,o,p),y=this.relevantEvents,v=this.mutatedRelevantEvents;if(a.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:g,jsEvent:s.origEvent,view:a.viewApi}),this.validMutation){let E=new ur(a,v.defs[o.defId],p?v.instances[p.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:v});let T={oldEvent:g,event:E,relatedEvents:Ac(v,a,p),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:y})}};a.emitter.trigger("eventResize",Object.assign(Object.assign({},T),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||Sn(0),endDelta:this.validMutation.endDelta||Sn(0),jsEvent:s.origEvent,view:a.viewApi})),a.emitter.trigger("eventChange",T)}else a.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new bf(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let i=this.hitDragging=new iy(this.dragging,ev(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return _i(e.subjectEl,".fc-event")}}function Jee(t,e,n,r){let i=t.context.dateEnv,s=t.dateSpan.range.start,a=e.dateSpan.range.start,o=Qu(s,a,i,t.largeUnit);if(n){if(i.add(r.start,o)<r.end)return{startDelta:o}}else if(i.add(r.end,o)>r.start)return{endDelta:o};return null}class Qee{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let i=this.context.options.unselectCancel,s=gM(r.origEvent);this.matchesCancel=!!_i(s,i),this.matchesEvent=!!_i(s,_f.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:i}=this,{documentPointer:s}=this,a=i.getCurrentData();if(!s.wasTouchScroll){if(a.dateSelection&&!this.isRecentPointerDateSelect){let o=i.options.unselectAuto;o&&(!o||!this.matchesCancel)&&i.calendarApi.unselect(r)}a.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new mI(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const ete={fixedMirrorParent:Ie},tte={dateClick:Ie,eventDragStart:Ie,eventDragStop:Ie,eventDrop:Ie,eventResizeStart:Ie,eventResizeStop:Ie,eventResize:Ie,drop:Ie,eventReceive:Ie,eventLeave:Ie};hv.dataAttrPrefix="";var nte=Oo({name:"@fullcalendar/interaction",componentInteractions:[Wee,qee,_f,Kee],calendarInteractions:[Qee],elementDraggingImpl:bf,optionRefiners:ete,listenerRefiners:tte});const rte={},ite={class:"bg-gray-100"},ste={class:"p-[0px] border-b"};function ote(t,e){const n=d.resolveComponent("VsCalendar");return d.openBlock(),d.createElementBlock("div",ite,[d.createElementVNode("div",ste,[d.createVNode(n,{class:"scale-[0.9]"})])])}const ate=Fe(rte,[["render",ote]]);var lte={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText(t){return"+ще "+t+"..."},noEventsText:"Немає подій для відображення"};const cte={},ute={class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function dte(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ute,e[0]||(e[0]=[d.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),d.createElementVNode("path",{d:"M15 3v18"},null,-1),d.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const vI=Fe(cte,[["render",dte]]),hte={components:{FullCalendar:oQ,VsWidgetCalendarBar:ate,IconOpenCard:vI},data(){return{isVisible:!0,isVisibleBar:!0,calendarOptions:{plugins:[BQ,xee,Ree,nte],initialView:"dayGridMonth",dateClick:this.handleDateClick,locale:lte,events:[{title:"event 1",date:"2025-01-23"},{title:"event 2",date:"2019-04-02"}]},currentView:"dayGridMonth",views:[{id:"timeGridDay",title:"День"},{id:"timeGridWeek",title:"Тиждень"},{id:"dayGridMonth",title:"Місяць"},{id:"listYear",title:"Рік"}]}},methods:{handleDateClick(t){alert("date click! "+t.dateStr)},changeView(t){this.isVisible=!1,this.currentView=t,this.calendarOptions={...this.calendarOptions,initialView:t},queueMicrotask(()=>this.isVisible=!0)}}},fte={class:"flex p-[10px] bg-gray-100"},pte={class:"flex-grow bg-white"},mte={class:"p-[10px] flex justify-between"},gte={class:"inline-flex justify-center space-x-1 bg-white border border-gray-200 rounded-md shadow-sm p- gap-x-1 dark:bg-neutral-800 dark:border-neutral-700"},yte={class:"relative flex first:before:hidden before:absolute before:top-1/2 before:-start-1 before:w-px before:h-3 before:bg-gray-200 before:-translate-y-1/2 dark:before:bg-neutral-700"},bte=["onClick"];function _te(t,e,n,r,i,s){const a=d.resolveComponent("VsWidgetCalendarBar"),o=d.resolveComponent("IconOpenCard"),p=d.resolveComponent("FullCalendar");return d.openBlock(),d.createElementBlock("div",fte,[d.createVNode(d.Transition,{name:"slide-fade"},{default:d.withCtx(()=>[d.withDirectives(d.createVNode(a,null,null,512),[[d.vShow,i.isVisibleBar]])]),_:1}),d.createElementVNode("div",pte,[d.createElementVNode("div",mte,[d.createElementVNode("button",{onClick:e[0]||(e[0]=g=>i.isVisibleBar=!i.isVisibleBar)},[d.createVNode(o)]),d.createElementVNode("div",gte,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.views,g=>(d.openBlock(),d.createElementBlock("div",yte,[d.createElementVNode("button",{class:d.normalizeClass(["inline-flex items-center px-2 py-1 text-xs text-gray-800 rounded gap-x-1 hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-500 dark:border-neutral-700 dark:text-neutral-300 dark:hover:text-neutral-400 dark:focus:text-neutral-400",[i.currentView===(g==null?void 0:g.id)?" bg-gray-100":""]]),onClick:y=>s.changeView(g==null?void 0:g.id)},d.toDisplayString(g==null?void 0:g.title),11,bte)]))),256))]),e[1]||(e[1]=d.createElementVNode("div",null,null,-1))]),i.isVisible?(d.openBlock(),d.createBlock(p,{key:0,options:i.calendarOptions,style:{height:"calc(100vh - 90px)"},class:"px-[10px] py-[4px]"},null,8,["options"])):d.createCommentVNode("",!0)])])}const wI=Fe(hte,[["render",_te]]),xte={"vs-widget-map":pb,"vs-widget-gallery":RF,"vs-widget-comments":wA,"vs-widget-file":D2,"vs-widget-history":Sq,"vs-widget-table":xG,"vs-widget-calendar":wI,"admin-notifications":TA,"vs-widget-print":Nq},vte={"table-format-text":qp,"table-format-select":Sk,"table-format-badge":kk,"table-format-switch":Zl,"table-format-check":Zl,"table-format-switch":Zl,"table-format-yes/no":Zl,"table-format-html":qp,"table-format-tags":Ck,"table-format-date":hb,"table-format-number":EE,"table-format-slot":SE},wte={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},kte={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Ete={class:"mb-4 xl:mb-8"},Ste={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},Cte={__name:"vs-dashboard",setup(t){return(e,n)=>{var r,i,s;return d.openBlock(),d.createElementBlock("div",wte,[d.createElementVNode("div",kte,[d.createElementVNode("div",Ete,[d.createElementVNode("h1",Ste," Members "+d.toDisplayString((r=e.$user)==null?void 0:r.user_name)+', "'+d.toDisplayString((s=(i=e.$settings)==null?void 0:i.admin)==null?void 0:s.title)+'" ',1),n[0]||(n[0]=d.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ",-1))]),n[1]||(n[1]=d.createElementVNode("div",{class:"space-y-5"},[d.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[d.createElementVNode("div",{class:"relative w-full"},[d.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[d.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),d.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),d.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),d.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[d.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[d.createElementVNode("span",{class:"sr-only"},"Close"),d.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),d.createElementVNode("path",{d:"m15 9-6 6"}),d.createElementVNode("path",{d:"m9 9 6 6"})])])])]),d.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[d.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[d.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),d.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),d.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),d.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[d.createElementVNode("span",{class:"hidden sm:block"},"Send"),d.createTextVNode("Invite ")])])]),d.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),d.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),d.createElementVNode("div",{class:"hs-tooltip inline-block"},[d.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[d.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),d.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),d.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),d.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),d.createElementVNode("div",{class:"hs-tooltip inline-block"},[d.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[d.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),d.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),d.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"})]),d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),d.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[d.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[d.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[d.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),d.createElementVNode("th",{scope:"col",class:"min-w-48"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),d.createElementVNode("th",{scope:"col"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),d.createElementVNode("th",{scope:"col",class:"min-w-36"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),d.createElementVNode("th",{scope:"col"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),d.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),d.createTextVNode(" Active ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),d.createTextVNode(" Active ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])])])])])])],-1))])])}}},Tte={methods:{notify(){this.$notify({type:"error",title:"Тестова нотифікація",text:"Нотифікація для показу функціонала"})}}};function Ate(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",{onClick:e[0]||(e[0]=(...a)=>s.notify&&s.notify(...a)),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50"}," Custom component ")}const Mte=Fe(Tte,[["render",Ate]]),Dte={props:{item:{type:Object},actions:{type:Array}},data(){return{toggletMap:{}}},methods:{toggleHandler(t){this.toggletMap[t]=!this.toggletMap[t],this.$emit("on:toggled",{optionID:t,toggled:this.toggletMap[t]})}}},Ite={class:"md:col-span-2"},Pte={class:"font-semibold text-gray-800 dark:text-neutral-200"},Nte={class:"md:block md:col-span-1 md:text-center"},Rte=["onClick"];function Ote(t,e,n,r,i,s){var a,o;return d.openBlock(),d.createElementBlock("ul",{class:d.normalizeClass(["grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700",`grid-cols-${((a=n.actions)==null?void 0:a.length)+2}`])},[d.createElementVNode("li",Ite,[d.createElementVNode("h3",Pte,d.toDisplayString(n.item.ua),1)]),(o=n.item.menu)!=null&&o.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(n.actions,p=>(d.openBlock(),d.createElementBlock("li",Nte,[d.createElementVNode("button",{onClick:g=>s.toggleHandler(p),type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline focus:outline-none focus:underline dark:text-blue-400 dark:hover:text-blue-500"}," Toggle all ",8,Rte)]))),256)):d.createCommentVNode("",!0)],2)}const Bte=Fe(Dte,[["render",Ote]]),Vte={props:{subitem:{type:Object,required:!0},toggled:{type:Boolean,default:!1},optionID:{type:Number},actions:{type:Array,default:()=>[]},routes:{type:Array,required:!0}},data(){return{checkedActions:[]}},watch:{routes:{handler(){this.initializeCheckedActions()},deep:!0,immediate:!0}},methods:{initializeCheckedActions(){const t=this.routes.find(e=>e.path===this.subitem.path);this.checkedActions=t?[...t.actions]:[]},inputHandler(t){var e;this.$emit("on:checked",{subitemPath:(e=this.subitem)==null?void 0:e.path,checkedActions:this.checkedActions})}},mounted(){this.initializeCheckedActions()}},zte={class:"md:col-span-2"},Lte={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Fte={class:"text-sm text-gray-500 dark:text-neutral-500"},$te={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},jte=["value","onChange"];function Hte(t,e,n,r,i,s){var a,o;return d.openBlock(),d.createElementBlock("ul",{class:d.normalizeClass(["grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3",`grid-cols-${n.actions.length+2}`])},[d.createElementVNode("li",zte,[d.createElementVNode("p",Lte,d.toDisplayString(((a=n.subitem)==null?void 0:a.ua)||""),1),d.createElementVNode("p",Fte,d.toDisplayString(((o=n.subitem)==null?void 0:o.path)||""),1)]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.actions,(p,g)=>(d.openBlock(),d.createElementBlock("li",{class:"col-span-1",key:p},[d.createElementVNode("div",$te,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:p,onChange:y=>s.inputHandler(p),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500","onUpdate:modelValue":e[0]||(e[0]=y=>i.checkedActions=y)},null,40,jte),[[d.vModelCheckbox,i.checkedActions]])])]))),128))],2)}const Ute=Fe(Vte,[["render",Hte]]),xs=d.ref(null),Tv=t=>{const e=[];return t.forEach(n=>{n.menu?e.push(...Tv(n.menu)):e.push(n)}),e},Wte={props:{options:{type:String},token:{type:String},routes:{type:Array,default:[]}},components:{VsGrouptFirstLevel:Bte,VsGroupSecondLevel:Ute,AdminNodata:px},data(){return{list:xs.value,history:this.routes,toggledInputs:!1,searchValue:""}},computed:{getList(){var e,n;const t={ua:"Без категорії",menu:(e=this.list)==null?void 0:e.filter(r=>!(r!=null&&r.menu))};return this.filterMenu([t,...(n=this.list)==null?void 0:n.filter(r=>r==null?void 0:r.menu)],this.searchValue).filter(r=>{var i;return(i=r==null?void 0:r.menu)==null?void 0:i.length})}},methods:{async Save(){var t,e;try{const n=location.href.split("/").pop();await je.post(`/api/access-group/${n}`,{routes:(t=this.history)==null?void 0:t.filter(r=>{var i;return(i=r==null?void 0:r.actions)==null?void 0:i.length}).map(({path:r,actions:i})=>({path:r,actions:[...new Set(i)]}))}),await this.$notify({type:"success",title:"Успішно!",message:"Данні успішно оновлені"}),await $p()}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message),this.$notify({type:"error",title:"Помилка!",message:"При спробі оновити данні виникла помилка"})}},resetAll(){debugger;this.history=this.history.map(t=>({...t,actions:[]}))},async getData(){var t,e;try{const n=location.href.split("/").pop(),i=(await je.get(`/api/access-group/${n}`)).data;this.history=this.getUniqueByPath([...i.routes,...(t=Tv(this.list))==null?void 0:t.map(s=>({path:s==null?void 0:s.path,actions:[]}))])}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message)}},toggleCheck(t){var n,r;if(!((n=this.history)!=null&&n.length))return;const e=(r=this.history)==null?void 0:r.findIndex(i=>(i==null?void 0:i.path)===(t==null?void 0:t.subitemPath));this.history[e].actions=t==null?void 0:t.checkedActions},toggleAll(t,e){var r,i,s,a,o,p,g;const n=(s=(i=(r=this.getList)==null?void 0:r[e])==null?void 0:i.menu)==null?void 0:s.map(y=>y==null?void 0:y.path);t!=null&&t.toggled?(o=(a=this.history)==null?void 0:a.filter(y=>n==null?void 0:n.includes(y==null?void 0:y.path)))==null||o.forEach(y=>{var v;(v=y==null?void 0:y.actions)==null||v.push(t==null?void 0:t.optionID)}):(g=(p=this.history)==null?void 0:p.filter(y=>n==null?void 0:n.includes(y==null?void 0:y.path)))==null||g.forEach(y=>{var v;y.actions=(v=y==null?void 0:y.actions)==null?void 0:v.filter(E=>E!==(t==null?void 0:t.optionID))})},getUniqueByPath(t){return t.reduce((e,n)=>(e.some(i=>i.path===n.path)||e.push(n),e),[])},filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s}}return(i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e==null?void 0:e.toLowerCase())?n:null}).filter(Boolean)}},async mounted(){await this.getData()}},qte={class:"flex gap-[6px]"},Gte={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Yte={key:0,class:"space-y-8"},Zte={class:"space-y-5"};function Xte(t,e,n,r,i,s){var y;const a=d.resolveComponent("VsText"),o=d.resolveComponent("VsGrouptFirstLevel"),p=d.resolveComponent("VsGroupSecondLevel"),g=d.resolveComponent("AdminNodata");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",qte,[d.createVNode(a,{placeholder:"Пошук",class:"flex-grow",modelValue:i.searchValue,"onUpdate:modelValue":e[0]||(e[0]=v=>i.searchValue=v)},null,8,["modelValue"]),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100",onClick:e[1]||(e[1]=(...v)=>s.resetAll&&s.resetAll(...v))}," Скинути всі "),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...v)=>s.Save&&s.Save(...v))}," Зберегти ")]),d.createElementVNode("div",{class:d.normalizeClass(["grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5",`grid-cols-${n.options.length+2}`])},[e[3]||(e[3]=d.createElementVNode("div",{class:"self-center col-span-2"},[d.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.options,(v,E)=>(d.openBlock(),d.createElementBlock("div",{class:"col-span-1 text-center",key:E},[d.createElementVNode("h3",Gte,d.toDisplayString(v),1)]))),128))],2),(y=s.getList)!=null&&y.length?(d.openBlock(),d.createElementBlock("div",Yte,[d.createElementVNode("div",Zte,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.getList,(v,E)=>(d.openBlock(),d.createElementBlock("div",{key:E},[d.createVNode(o,{item:v,"onOn:toggled":T=>s.toggleAll(T,E),actions:n.options},null,8,["item","onOn:toggled","actions"]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(v.menu,T=>(d.openBlock(),d.createBlock(p,{toggled:(v==null?void 0:v.toggled)||!1,optionID:v==null?void 0:v.optionID,key:T==null?void 0:T.path,subitem:T,actions:n.options,"onOn:checked":D=>s.toggleCheck(D,E),routes:i.history},null,8,["toggled","optionID","subitem","actions","onOn:checked","routes"]))),128))]))),128))])])):(d.openBlock(),d.createBlock(g,{key:1}))])}const Kte=Fe(Wte,[["render",Xte]]),Jte={__name:"vs-group-interface-page",setup(t){const e=["view","add","edit","del"];return(n,r)=>(d.openBlock(),d.createBlock(d.unref(Kte),{options:e,routes:n.routes},null,8,["routes"]))}},Qte={},ene={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function tne(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ene,e[0]||(e[0]=[d.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),d.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const Av=Fe(Qte,[["render",tne]]),nne={components:{IconSearch:Av,IconPlus:Zu},data(){return{link:null,color:void 0,data:null,searchValue:"",isFormAdd:!1,formValues:{},scheme:{name:{type:"text",ua:"Назва",placeholder:"Назва",validators:["required"]}}}},mounted(){this.link="/admin.user-cls",this.getData()},computed:{rows(){var t,e;return((e=(t=this.data)==null?void 0:t.rows)==null?void 0:e.filter(n=>{var r;return(r=n==null?void 0:n.name)==null?void 0:r.includes(this.searchValue)}))||null}},methods:{async getData(){try{const{data:t}=await je.get("/api/user-cls?type=json");this.data=t}catch{}},async createNewCls(){var t;try{await((t=this.$refs.form)==null?void 0:t.doValidation()),await je.post("/api/user-cls",{...this.formValues}),this.isFormAdd=!1,this.formValues={},await this.getData(),this.$notify({type:"success",title:"Успішно!",message:"Новий об'єкт успішно створений"})}catch{this.$notify({type:"error",title:"Помилка",message:"При спробі створити новий об'єкт виникла помилка"})}}}},rne={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},ine={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},sne={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},one={class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},ane=["data-index"],lne={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},cne={class:"ml-auto flex items-center gap-[12px]"},une={class:"text-xs opacity-60"},dne={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function hne(t,e,n,r,i,s){const a=d.resolveComponent("IconPlus"),o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link"),g=d.resolveComponent("VsForm"),y=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",rne,[d.createElementVNode("div",ine,[e[7]||(e[7]=d.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Довідники ",-1)),d.createElementVNode("button",{onClick:e[0]||(e[0]=v=>i.isFormAdd=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[d.createVNode(a,{height:"16",width:"16"})])]),d.createElementVNode("div",sne,[d.createVNode(o,{type:"text",modelValue:i.searchValue,"onUpdate:modelValue":e[1]||(e[1]=v=>i.searchValue=v),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),d.createElementVNode("ul",one,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.rows,v=>{var E,T;return d.openBlock(),d.createElementBlock("li",{key:v==null?void 0:v.id,"data-index":t.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(E=t.$route)==null?void 0:E.query)==null?void 0:T.name)===(v==null?void 0:v.name)}]),to:i.link+"?name="+((v==null?void 0:v.name)||(v==null?void 0:v.id))},{default:d.withCtx(()=>[d.createElementVNode("span",lne,d.toDisplayString((v==null?void 0:v.name)||(v==null?void 0:v.id)||"Не вказано"),1),d.createElementVNode("div",cne,[d.createElementVNode("div",une,d.toDisplayString((v==null?void 0:v.children)||"0"),1)])]),_:2},1032,["to","class"])],8,ane)}),128))])]),d.createVNode(y,{visible:i.isFormAdd,"onUpdate:visible":e[5]||(e[5]=v=>i.isFormAdd=v),title:"Створити давідник",onOnClose:e[6]||(e[6]=v=>i.formValues={})},{footer:d.withCtx(()=>[d.createElementVNode("div",dne,[d.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[3]||(e[3]=v=>{i.isFormAdd=!1,i.formValues={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:e[4]||(e[4]=(...v)=>s.createNewCls&&s.createNewCls(...v)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(g,{scheme:i.scheme,ref:"form",modelValue:i.formValues,"onUpdate:modelValue":e[2]||(e[2]=v=>i.formValues=v),class:"p-[10px]"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}const fne=Fe(nne,[["render",hne]]),pne={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},mne={class:"w-full"},gne={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},yne={class:"max-w-sm mx-auto mt-6"},bne={class:"font-medium text-gray-800 dark:text-neutral-200"},_ne={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function xne(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",mne,[d.createElementVNode("div",gne,[e[0]||(e[0]=d.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),d.createElementVNode("div",yne,[d.createElementVNode("p",bne,d.toDisplayString(n.title),1),d.createElementVNode("p",_ne,d.toDisplayString(n.text),1)])])])}const ad=Fe(pne,[["render",xne]]),vne={props:{modelValue:{type:String,default:()=>"#172B4D"},colors:{type:Array,default:()=>["#172B4D","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{updateColor(t){this.$emit("update:modelValue",t),this.$refs.popover.togglePopover()}}},wne={class:"flex w-[160px] flex-wrap gap-[4px]"},kne=["onClick"];function Ene(t,e,n,r,i,s){const a=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(a,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",{class:"h-[37px] w-[37px] rounded-lg flex items-center justify-center",style:d.normalizeStyle({backgroundColor:n.modelValue})},null,4)]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("ul",wne,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.colors,o=>(d.openBlock(),d.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:d.normalizeStyle({backgroundColor:o}),onClick:p=>s.updateColor(o),key:o},null,12,kne))),128))])])]),_:1},512)}const kI=Fe(vne,[["render",Ene]]),Sne={components:{VsChoceColor:kI},props:{item:Object},data(){var t,e,n;return{color:((t=this.item)==null?void 0:t.color)||"#D1D5DB",text:((e=this.item)==null?void 0:e.text)||"",id:(n=this.item)==null?void 0:n.id}},watch:{color(t){this.$emit("update-item",{...this.item,color:t})},text(t){this.$emit("update-item",{...this.item,text:t})},id(t){this.$emit("update-item",{...this.item},t)}}},Cne={class:"relative flex items-center p-3 bg-white border border-gray-200 group gap-x-3 rounded-xl"},Tne={class:"flex flex-col"},Ane={class:"flex gap-[30px]"},Mne={class:"block text-sm font-semibold text-gray-800 text-start z-[10] cursor-pointer"},Dne={class:"block text-sm font-semibold text-gray-400 text-start z-[10] cursor-pointer"},Ine={class:"block text-xs text-gray-500 truncate dark:text-neutral-500"};function Pne(t,e,n,r,i,s){var p;const a=d.resolveComponent("VsChoceColor"),o=d.resolveComponent("VsInlineEdit");return d.openBlock(),d.createElementBlock("div",Cne,[d.createVNode(a,{modelValue:i.color,"onUpdate:modelValue":e[0]||(e[0]=g=>i.color=g)},null,8,["modelValue"]),d.createElementVNode("div",Tne,[d.createElementVNode("div",Ane,[d.createVNode(o,{modelValue:i.text,"onUpdate:modelValue":e[1]||(e[1]=g=>i.text=g),onUpdateValue:e[2]||(e[2]=g=>i.text=g)},{default:d.withCtx(()=>[d.createElementVNode("p",Mne,d.toDisplayString(i.text),1)]),_:1},8,["modelValue"]),d.createVNode(o,{modelValue:i.id,"onUpdate:modelValue":e[3]||(e[3]=g=>i.id=g),onUpdateValue:e[4]||(e[4]=g=>i.id=g)},{default:d.withCtx(()=>[d.createElementVNode("p",Dne,d.toDisplayString(i.id),1)]),_:1},8,["modelValue"])]),d.createElementVNode("p",Ine,d.toDisplayString((p=n.item)==null?void 0:p.parent),1)])])}const Nne={components:{VsReesterUsersItem:Fe(Sne,[["render",Pne]])},props:{list:Array},data(){return{draggedItemIndex:null}},methods:{dragStart(t,e){this.draggedItemIndex=e,t.dataTransfer.effectAllowed="move"},dragOver(t){t.preventDefault()},drop(t,e){t.preventDefault();const n=this.draggedItemIndex;if(n!==e){const r=[...this.list],i=r[n];r.splice(n,1),r.splice(e,0,i),this.$emit("update-list",r)}this.draggedItemIndex=null},dragEnd(){this.draggedItemIndex=null},updateItem(t,e){var r;const n=(r=this.list)==null?void 0:r.findIndex(i=>(i==null?void 0:i.id)===(t==null?void 0:t.id));this.list[n]=t,e&&(this.list[n].id=e),this.$emit("update-list",this.list)}}},Rne={class:"flex flex w-full flex-col gap-[10px] p-[10px] pt-[40px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{"max-height":"calc(100vh - 430px)"}},One=["onDragstart","onDrop"];function Bne(t,e,n,r,i,s){const a=d.resolveComponent("VsReesterUsersItem");return d.openBlock(),d.createElementBlock("ul",Rne,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,(o,p)=>(d.openBlock(),d.createElementBlock("li",{key:o==null?void 0:o.id,draggable:!0,onDragstart:g=>s.dragStart(g,p),onDragover:e[0]||(e[0]=g=>s.dragOver(g)),onDrop:g=>s.drop(g,p),onDragend:e[1]||(e[1]=(...g)=>s.dragEnd&&s.dragEnd(...g))},[d.createVNode(a,{item:o,onUpdateItem:s.updateItem},null,8,["item","onUpdateItem"])],40,One))),128))])}const Vne={components:{VsNoData:ad,VsChoceColor:kI,IconCheck:Ek,VsReesterUsersList:Fe(Nne,[["render",Bne],["__scopeId","data-v-17ce7688"]])},data(){return{scheme:{text:{type:"Text",ua:"Ім'я",placeholder:"Ім'я нового класифікатора",validators:["required"]}},formVisible:!0,formValues:{},color:"#172B4D",data:null}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()}}},mounted(){this.getData()},methods:{async getData(){var t;this.data=null;try{const{data:e}=await je.get(`/api/user-cls/${(t=this.$route.query)==null?void 0:t.name}`);this.data=e}catch{}},async addOneChild(){var t,e,n,r;try{const{form:i}=this.$refs;await i.doValidation(),await je.post("/api/user-cls",{name:(t=this.$route.query)==null?void 0:t.name,children:[...((e=this.data)==null?void 0:e.children)||[],{...this.formValues,color:this.color,id:(((r=(n=this.data)==null?void 0:n.children)==null?void 0:r.length)||0)+1}]}),this.formVisible=!1,this.formValues={},setTimeout(()=>this.formVisible=!0),await this.getData()}catch(i){console.log(i)}},async updateChildren(t){var e,n;this.data.children=t;try{await je.post("/api/user-cls",{name:(e=this.$route.query)==null?void 0:e.name,children:[...((n=this.data)==null?void 0:n.children)||[]]}),await this.getData()}catch(r){console.log(r)}}}},zne={class:"flex justify-center bg-gray-50",style:{height:"calc(100vh - 60px)",width:"calc(100vw - 560px)"}},Lne={key:0,class:"mt-[100px] p-[10px] w-full max-w-[1000px]",style:{"max-height":"calc(100vh - 300px)"}},Fne={class:"font-bold mb-[10px]"},$ne={class:"flex items-end max-w-[1000px] gap-[4px]"};function jne(t,e,n,r,i,s){var v,E,T,D,N,B,V;const a=d.resolveComponent("VsForm"),o=d.resolveComponent("VsChoceColor"),p=d.resolveComponent("IconCheck"),g=d.resolveComponent("VsReesterUsersList"),y=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",zne,[(E=(v=t.$route)==null?void 0:v.query)!=null&&E.name?(d.openBlock(),d.createElementBlock("div",Lne,[d.createElementVNode("h2",Fne,d.toDisplayString((D=(T=t.$route)==null?void 0:T.query)==null?void 0:D.name),1),d.createElementVNode("div",$ne,[i.formVisible?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,modelValue:i.formValues,"onUpdate:modelValue":e[0]||(e[0]=U=>i.formValues=U),class:"p-0 m-0 h-[65px] w-full"},null,8,["scheme","modelValue"])):d.createCommentVNode("",!0),d.createVNode(o,{modelValue:i.color,"onUpdate:modelValue":e[1]||(e[1]=U=>i.color=U)},null,8,["modelValue"]),d.createElementVNode("button",{onClick:e[2]||(e[2]=(...U)=>s.addOneChild&&s.addOneChild(...U)),class:"h-[37px] w-[37px] rounded-lg bg-blue-600 ml-[6px] flex items-center justify-center text-white hover:bg-blue-700 duration-300"},[d.createVNode(p,{height:"20",width:"20"})])]),(B=(N=i.data)==null?void 0:N.children)!=null&&B.length?(d.openBlock(),d.createBlock(g,{key:0,class:"w-full max-w-[1000px]",list:(V=i.data)==null?void 0:V.children,onUpdateList:s.updateChildren},null,8,["list","onUpdateList"])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createBlock(y,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const Hne={components:{VsReesterNavList:fne,VsReesterContent:Fe(Vne,[["render",jne]])}},Une={class:"flex items-start gap-0"};function Wne(t,e,n,r,i,s){const a=d.resolveComponent("VsReesterNavList"),o=d.resolveComponent("VsReesterContent");return d.openBlock(),d.createElementBlock("div",Une,[d.createVNode(a),d.createVNode(o)])}const qne=Fe(Hne,[["render",Wne]]),Gne={class:"h-[76px] bg-white border rounded-xl flex items-center justify-start px-[20px] mb-[16px]"},Yne={class:"mr-[10px]"},Zne={class:"text-[20px] font-semibold"},Xne={key:0,class:"text-[14px] font-medium text-[#676A6C]"},Kne={class:""},Jne={__name:"admin-card-header",props:{title:{type:String},tableName:{type:String},getRoute:{type:String,required:!0},slots:{type:Object},isHeaderEditButton:{type:Boolean,default:()=>!0}},setup(t){var v,E,T,D,N;const{asyncTemplateSlot:e}=(N=(D=(T=(E=(v=d.getCurrentInstance())==null?void 0:v.appContext)==null?void 0:E.app)==null?void 0:T.config)==null?void 0:D.globalProperties)==null?void 0:N.utils,n=t,r=wB(),i=uh(),s=d.ref(""),a=d.ref(""),o=()=>{r.back()},p=d.computed(()=>{var B;return`/edit?table=${n.getRoute}&id=${(B=i==null?void 0:i.params)==null?void 0:B.id}`}),g=()=>{var B,V,U,K;if(!((B=n.slots)!=null&&B.panelLeft))return"div";if((V=n.slots)!=null&&V.panelLeft.includes("<")){const Y=e("PanelLeft",(U=n.slots)==null?void 0:U.panelLeft,["name"]);a.value=Y}else a.value=(K=n.slots)==null?void 0:K.panelLeft},y=()=>{var B,V,U,K;if(!((B=n.slots)!=null&&B.panelRight))return"div";if((V=n.slots)!=null&&V.panelRight.includes("<")){const Y=e("PanelRight",(U=n.slots)==null?void 0:U.panelRight,["name"]);s.value=Y}else s.value=(K=n.slots)==null?void 0:K.panelRight};return g(),y(),(B,V)=>{const U=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",Gne,[d.createElementVNode("div",Yne,[d.createElementVNode("h2",Zne,d.toDisplayString(t.title),1),t.tableName?(d.openBlock(),d.createElementBlock("div",Xne,d.toDisplayString(t.tableName),1)):d.createCommentVNode("",!0)]),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a.value))),d.createElementVNode("div",{class:d.normalizeClass([{"gap-[6px]":t.isHeaderEditButton},"flex items-center ml-auto"])},[d.createElementVNode("button",{onClick:o,class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},V[0]||(V[0]=[d.createElementVNode("svg",{class:"transition duration-200 ease-in-out group-hover:stroke-white",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d.createElementVNode("path",{d:"M7.00008 11.5833L2.91675 7.49999L7.00008 3.41666",stroke:"#1f2937","stroke-linecap":"round","stroke-linejoin":"round"}),d.createElementVNode("path",{d:"M11.0834 7.5H2.91675",stroke:"#2563EB","stroke-linecap":"round","stroke-linejoin":"round"})],-1),d.createElementVNode("span",{class:"hidden sm:block ml-[8px]"},"Повернутися до реєстру",-1)])),d.createElementVNode("div",Kne,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(s.value)))]),t.isHeaderEditButton?(d.openBlock(),d.createBlock(U,{key:0,to:p.value,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:d.withCtx(()=>V[1]||(V[1]=[d.createTextVNode(" Редагувати ")])),_:1},8,["to"])):d.createCommentVNode("",!0)],2)])}}},Qne={__name:"admin-card-async-component",props:{slot:String,data:Object,objectData:Object},setup(t){var s,a,o,p,g;const{asyncTemplateSlot:e}=(g=(p=(o=(a=(s=d.getCurrentInstance())==null?void 0:s.appContext)==null?void 0:a.app)==null?void 0:o.config)==null?void 0:p.globalProperties)==null?void 0:g.utils,n=d.ref(""),r=t;return(()=>{const y=e("CustomComponent",r.slot,["data"]);n.value=y})(),(y,v)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{data:t.objectData},null,8,["data"]))}},ere={},tre={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function nre(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",tre,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Mv=Fe(ere,[["render",nre]]),rre={},ire={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function sre(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ire,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Dv=Fe(rre,[["render",sre]]),ore={class:"px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none"},are={class:"flex flex-col gap-[4px]"},lre=["onClick"],cre={props:["table","id"],components:{AdminCardHeader:Jne,AdminCardAsyncComponent:Qne,IconChevron:Mv,AdminCardTabsDropdown:{__name:"admin-card-tabs-dropdown",props:d.mergeModels({options:{type:Array}},{activeTab:{},activeTabModifiers:{}}),emits:["update:activeTab"],setup(t){const e=t,n=d.useModel(t,"activeTab"),r=d.ref(),i=d.computed(()=>{var o;const a=(o=e.options)==null?void 0:o.find(p=>(p==null?void 0:p.name)===n.value||(p==null?void 0:p.component)===n.value);return(a==null?void 0:a.title)||"Показати більше"}),s=a=>{var o;n.value=a,(o=r.value)==null||o.togglePopover()};return(a,o)=>{const p=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(p,{ref_key:"popover",ref:r,placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",ore,[d.createTextVNode(d.toDisplayString(i.value)+" ",1),d.createVNode(Dv,{height:"12",width:"12"})])]),default:d.withCtx(()=>[d.createElementVNode("div",are,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.options,g=>(d.openBlock(),d.createElementBlock("button",{class:d.normalizeClass(["cursor-pointer py-1.5 px-2 text-[13px] text-start text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100",{"bg-gray-100":n.value===(g==null?void 0:g.component)||n.value===(g==null?void 0:g.name)}]),onClick:y=>s((g==null?void 0:g.component)||(g==null?void 0:g.name))},d.toDisplayString(g==null?void 0:g.title),11,lre))),256))])]),_:1},512)}}}},data(){return{objectData:null,showTabs:!1,component:""}},computed:{getRoute(){const t=this.flattenMenu(xs.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,i;return(n==null?void 0:n.table)==((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)});return e||this.$router.replace("/404"),e==null?void 0:e.path},getTable(){const t=this.flattenMenu(xs.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,i;return(n==null?void 0:n.table)==((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)});return e||this.$router.replace("/404"),e==null?void 0:e.ua},getTitle(){var t,e,n,r,i,s,a,o,p,g,y,v;return((i=(e=(t=this.objectData)==null?void 0:t.rows)==null?void 0:e[0])==null?void 0:i[(r=(n=this.objectData)==null?void 0:n.meta)==null?void 0:r.title])||((y=(a=(s=this.objectData)==null?void 0:s.rows)==null?void 0:a[0])==null?void 0:y[(g=(p=(o=this.objectData)==null?void 0:o.columns)==null?void 0:p.find(E=>(E==null?void 0:E.meta)==="title"))==null?void 0:g.name])||((v=this.objectData)==null?void 0:v.title)||this.getTable}},async mounted(){await this.getObjectData(),await this.checkActiveComponent(),addEventListener("reloadCardPage",this.getObjectData)},unmounted(){removeEventListener("reloadCardPage",this.getObjectData)},watch:{component(t){var e;this.showTabs=!1,this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,tab:t}})},$route:{async handler(t,e){var n,r,i,s;(((n=t==null?void 0:t.params)==null?void 0:n.table)!==((r=e==null?void 0:e.params)==null?void 0:r.table)||((i=t==null?void 0:t.params)==null?void 0:i.id)!==((s=e==null?void 0:e.params)==null?void 0:s.id))&&await this.getObjectData(),await this.checkActiveComponent()}}},methods:{async getObjectData(){var n,r;const t=this.table||((n=this.$route)==null?void 0:n.params.table),e=this.id||((r=this.$route)==null?void 0:r.params.id);(!t||!e)&&this.$router.replace("/404");try{const{data:i}=await je.get(`/api/table-data/${t}/${e}`);this.objectData=i}catch(i){console.error(i)}},getColClass(t){return`lg:col-span-${t||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var t,e,n,r,i,s,a,o,p;if((e=(t=this.$route)==null?void 0:t.query)!=null&&e.tab)this.component=(r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.tab;else{const g=(s=(i=this.objectData)==null?void 0:i.panels)==null?void 0:s.find(y=>(y==null?void 0:y.type)==="tabs"||(y==null?void 0:y.type)==="vertical-tabs");(a=g==null?void 0:g.items)!=null&&a.length&&(this.component=((o=g.items[0])==null?void 0:o.component)||((p=g.items[0])==null?void 0:p.name))}},getProps(t){var n,r,i;const e={};for(const s in t)["name","component","title","token"].includes(s)||(e[s]=((i=(r=(n=this.objectData)==null?void 0:n.rows)==null?void 0:r[0])==null?void 0:i[t[s]])||t[s]);return e},columnClass(t=12){return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},flattenMenu(t){const e=[];return t==null||t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e}}},ure={style:{height:"calc(100vh - 60px)"},class:"p-4 overflow-y-auto bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw] text-[13px]"},dre={class:"flex gap-[20px]"},hre={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},fre=["innerHTML"],pre={key:0,class:"bg-white border rounded-xl"},mre={class:"p-[10px] pl-[20px] text-md font-[500]"},gre=["innerHTML"],yre={key:1},bre={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},_re={key:2,class:"p-[20px] border-t"},xre=["innerHTML"],vre={class:"flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]"},wre=["onClick"],kre={key:0},Ere={key:0,class:"bg-white border border-t-0 rounded-bl-xl rounded-br-xl"},Sre={key:0,class:"p-[20px] border-t"},Cre={key:1,class:"p-[20px] border-t"},Tre=["innerHTML"],Are={key:3,class:"flex"},Mre=["onClick"],Dre={class:"flex-grow w-[80%]"},Ire={key:0,class:"w-full h-full overflow-auto bg-white border rounded-xl [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Pre={key:0,class:"p-[20px]"},Nre={key:1,class:"p-[20px]"},Rre=["innerHTML"];function Ore(t,e,n,r,i,s){var y,v,E,T,D,N,B;const a=d.resolveComponent("AdminCardHeader"),o=d.resolveComponent("AdminCardAsyncComponent"),p=d.resolveComponent("AdminCardTabsDropdown"),g=d.resolveComponent("IconChevron");return d.openBlock(),d.createElementBlock("div",ure,[i.objectData&&((y=i.objectData)==null?void 0:y.isHeader)!==!1?(d.openBlock(),d.createBlock(a,{key:0,title:s.getTitle,tableName:s.getTable,"get-route":s.getRoute,slots:(v=i.objectData)==null?void 0:v.slots,isHeaderEditButton:(E=i.objectData)==null?void 0:E.isHeaderEditButton},null,8,["title","tableName","get-route","slots","isHeaderEditButton"])):d.createCommentVNode("",!0),d.createElementVNode("div",dre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((D=(T=i.objectData)==null?void 0:T.panels)==null?void 0:D.filter(V=>(V==null?void 0:V.type)==="pin"),(V,U)=>(d.openBlock(),d.createElementBlock("div",{key:U,class:d.normalizeClass(["col-span-12 shrink-0",s.columnClass(V.col)])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(K,Y)=>{var we,ye,Te,Re,Ne,Ye,qe,he,it,Ct,Ft,Bt,It,Ut;return d.openBlock(),d.createElementBlock("div",{key:Y,class:d.normalizeClass([{"mb-[20px]":V.items.length>1},"bg-white border rounded-xl"])},[K!=null&&K.title?(d.openBlock(),d.createElementBlock("h2",hre,d.toDisplayString((K==null?void 0:K.title)||"Панель"),1)):d.createCommentVNode("",!0),K!=null&&K.component?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["p-[20px]",{"border-t":K==null?void 0:K.title}])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(K.component),d.mergeProps({geometry:(ye=(we=i.objectData)==null?void 0:we.rows[0])==null?void 0:ye.geom,columns:K==null?void 0:K.columns,token:(Re=(Te=i.objectData)==null?void 0:Te.tokens)==null?void 0:Re[K==null?void 0:K.token],zoom:16,ref_for:!0},s.getProps(K),{data:i.objectData,id:(Ye=(Ne=t.$route)==null?void 0:Ne.params)==null?void 0:Ye.id}),null,16,["geometry","columns","token","data","id"]))],2)):d.createCommentVNode("",!0),K!=null&&K.name?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["p-[20px]",{"border-t":K==null?void 0:K.title}])},[(he=(qe=i.objectData)==null?void 0:qe.html)!=null&&he[K==null?void 0:K.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(Ct=(it=i.objectData)==null?void 0:it.html)==null?void 0:Ct[K==null?void 0:K.name]},null,8,fre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(Bt=(Ft=i.objectData)==null?void 0:Ft.vue)==null?void 0:Bt[K==null?void 0:K.name],data:(Ut=(It=i.objectData)==null?void 0:It.rows)==null?void 0:Ut[0],objectData:i.objectData},null,8,["slot","data","objectData"]))],2)):d.createCommentVNode("",!0)],2)}),128))],2))),128)),d.createElementVNode("div",{class:d.normalizeClass(["grid gap-[20px] flex-grow h-fit",s.getGridClass()])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((B=(N=i.objectData)==null?void 0:N.panels)==null?void 0:B.filter(V=>(V==null?void 0:V.type)!=="pin"),(V,U)=>{var K,Y,we,ye,Te,Re,Ne,Ye,qe;return d.openBlock(),d.createElementBlock("div",{key:U,class:d.normalizeClass(["col-span-12",s.getColClass(V.col)])},[V!=null&&V.name?(d.openBlock(),d.createElementBlock("div",pre,[d.createElementVNode("h2",mre,d.toDisplayString((V==null?void 0:V.title)||"Панель"),1),(K=i.objectData)!=null&&K.html[V==null?void 0:V.name]?(d.openBlock(),d.createElementBlock("div",{key:0,class:"p-[20px] border-t",innerHTML:(Y=i.objectData)==null?void 0:Y.html[V==null?void 0:V.name]},null,8,gre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(we=i.objectData)==null?void 0:we.vue[V==null?void 0:V.name],data:(Te=(ye=i.objectData)==null?void 0:ye.rows)==null?void 0:Te[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):V.type==="container"?(d.openBlock(),d.createElementBlock("div",yre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn,zn,Me;return d.openBlock(),d.createElementBlock("div",{key:it,class:d.normalizeClass([{"mb-[20px]":V.items.length>1},"bg-white border rounded-xl"])},[he!=null&&he.title?(d.openBlock(),d.createElementBlock("h2",bre,d.toDisplayString((he==null?void 0:he.title)||"Панель"),1)):d.createCommentVNode("",!0),he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["p-[20px]",{"border-t":he==null?void 0:he.title}])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({geometry:(Ft=(Ct=i.objectData)==null?void 0:Ct.rows[0])==null?void 0:Ft.geom,columns:he==null?void 0:he.columns,token:(It=(Bt=i.objectData)==null?void 0:Bt.tokens)==null?void 0:It[he==null?void 0:he.token],zoom:16,ref_for:!0},s.getProps(he),{data:i.objectData,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["geometry","columns","token","data","id"]))],2)):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",_re,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(wn=(rn=i.objectData)==null?void 0:rn.html)==null?void 0:wn[he==null?void 0:he.name]},null,8,xre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(mn=(bn=i.objectData)==null?void 0:bn.vue)==null?void 0:mn[he==null?void 0:he.name],data:(Me=(zn=i.objectData)==null?void 0:zn.rows)==null?void 0:Me[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)],2)}),128))])):d.createCommentVNode("",!0),(V==null?void 0:V.type)==="tabs"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createElementVNode("nav",vre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Re=V==null?void 0:V.items)==null?void 0:Re.slice(0,V==null?void 0:V.limit),he=>(d.openBlock(),d.createElementBlock("button",{key:(he==null?void 0:he.name)||(he==null?void 0:he.component),onClick:it=>i.component=(he==null?void 0:he.component)||(he==null?void 0:he.name),class:d.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{" font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-[1] after:h-0.5 after:bg-gray-800":i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name),"":i.component!==(he==null?void 0:he.component)&&i.component!==(he==null?void 0:he.name)}])},d.toDisplayString(he==null?void 0:he.title),11,wre))),128)),V!=null&&V.limit&&((Ye=(Ne=V==null?void 0:V.items)==null?void 0:Ne.slice(V==null?void 0:V.limit))!=null&&Ye.length)?(d.openBlock(),d.createElementBlock("div",kre,[d.createVNode(p,{options:(qe=V==null?void 0:V.items)==null?void 0:qe.slice(V==null?void 0:V.limit),"active-tab":i.component,"onUpdate:activeTab":e[0]||(e[0]=he=>i.component=he)},null,8,["options","active-tab"])])):d.createCommentVNode("",!0)]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn;return d.openBlock(),d.createElementBlock(d.Fragment,{key:it},[i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name)?(d.openBlock(),d.createElementBlock("div",Ere,[he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",Sre,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({data:i.objectData,token:(Ft=(Ct=i.objectData)==null?void 0:Ct.tokens)==null?void 0:Ft[he==null?void 0:he.token],columns:he==null?void 0:he.columns,geometry:(It=(Bt=i.objectData)==null?void 0:Bt.rows[0])==null?void 0:It.geom,ref_for:!0},s.getProps(he),{zoom:16,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["data","token","columns","geometry","id"]))])):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",Cre,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(rn=i.objectData)==null?void 0:rn.html[he==null?void 0:he.name]},null,8,Tre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(wn=i.objectData)==null?void 0:wn.vue[he==null?void 0:he.name],data:(mn=(bn=i.objectData)==null?void 0:bn.rows)==null?void 0:mn[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0)],64)}),128))],64)):d.createCommentVNode("",!0),(V==null?void 0:V.type)==="vertical-tabs"?(d.openBlock(),d.createElementBlock("div",Are,[d.createElementVNode("div",{class:d.normalizeClass(["p-[5px] bg-white absolute left-0 rounded-lg border rounded-tl-[0] rounded-bl-[0]",[{"left-[260px]":i.showTabs}]]),onClick:e[1]||(e[1]=he=>i.showTabs=!i.showTabs)},[d.createVNode(g,{height:"16",width:"16",class:"-rotate-90"})],2),d.createElementVNode("nav",{class:d.normalizeClass(["lg:relative lg:left-0 flex flex-col space-y-2 max-w-[260px] w-full border rounded-xl mr-4 items-start pl-[10px] z-[2] lg:z-0 bg-white py-[20px] absolute left-[-100%]",[{"left-0 rounded-tr-[0]":i.showTabs}]])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V==null?void 0:V.items,he=>(d.openBlock(),d.createElementBlock("button",{key:(he==null?void 0:he.name)||(he==null?void 0:he.component),onClick:it=>i.component=(he==null?void 0:he.component)||(he==null?void 0:he.name),class:d.normalizeClass(["relative inline-flex items-center w-full py-1 text-sm text-left whitespace-pre-wrap border-transparent pe-4 gap-x-2 border-e-2 hover:text-blue-600 focus:outline-none focus:text-blue-600",{"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ":i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name),"text-gray-500":i.component!==(he==null?void 0:he.component)&&i.component!==(he==null?void 0:he.name)}])},d.toDisplayString(he==null?void 0:he.title),11,Mre))),128))],2),d.createElementVNode("div",Dre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn;return d.openBlock(),d.createElementBlock(d.Fragment,{key:it},[i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name)?(d.openBlock(),d.createElementBlock("div",Ire,[he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",Pre,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({token:(Ft=(Ct=i.objectData)==null?void 0:Ct.tokens)==null?void 0:Ft[he==null?void 0:he.token],data:i.objectData,columns:he==null?void 0:he.columns,geometry:(It=(Bt=i.objectData)==null?void 0:Bt.rows[0])==null?void 0:It.geom,ref_for:!0},s.getProps(he),{zoom:16,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["token","data","columns","geometry","id"]))])):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",Nre,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(rn=i.objectData)==null?void 0:rn.html[he==null?void 0:he.name]},null,8,Rre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(wn=i.objectData)==null?void 0:wn.vue[he==null?void 0:he.name],data:(mn=(bn=i.objectData)==null?void 0:bn.rows)==null?void 0:mn[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0)],64)}),128))])])):d.createCommentVNode("",!0)],2)}),128))],2)])])}const Iv=Fe(cre,[["render",Ore],["__scopeId","data-v-33219290"]]),Bre=Object.freeze(Object.defineProperty({__proto__:null,default:Iv},Symbol.toStringTag,{value:"Module"})),Vre={__name:"vs-calendar-page",setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",null,[d.createVNode(wI)]))}},zre={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},Lre={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},Fre={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},$re=["data-index"],jre={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},Hre="/admin.interfaces",Ure={__name:"vs-table-settings-nav-list",setup(t){const e=d.ref(""),n=d.ref(null),r=d.computed(()=>{var s;return(s=n.value)==null?void 0:s.filter(a=>{var o,p,g;return(g=(o=a==null?void 0:a.title)==null?void 0:o.toLowerCase())==null?void 0:g.includes((p=e.value)==null?void 0:p.toLowerCase())})});return(async()=>{try{const{data:s}=await je.get("/api/interfaces");n.value=s}catch{}})(),(s,a)=>{var g;const o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",zre,[d.createElementVNode("div",Lre,[d.createVNode(o,{type:"text",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=y=>e.value=y),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(g=r.value)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",Fre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,y=>{var v,E;return d.openBlock(),d.createElementBlock("li",{key:y==null?void 0:y.name,"data-index":s.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((E=(v=s.$route)==null?void 0:v.query)==null?void 0:E.name)===(y==null?void 0:y.alias)}]),to:Hre+"?name="+(y==null?void 0:y.alias)},{default:d.withCtx(()=>[d.createElementVNode("span",jre,d.toDisplayString((y==null?void 0:y.title)||(y==null?void 0:y.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,$re)}),128))])):d.createCommentVNode("",!0)])}}},Wre={class:"bg-white"},qre={class:"flex flex-col gap-[5px]"},Gre={class:"flex items-center gap-2 cursor-pointer"},Yre=["checked","onChange"],Zre={class:"text-gray-800 underline decoration-dashed decoration-[1px] decoration-blue-600"},EI={__name:"vs-table-settings-tab-list",props:{columns:{type:Array,required:!0,default:()=>[]},table:{type:String,default:""}},emits:["update"],setup(t,{emit:e}){const n=d.getCurrentInstance().proxy.$notify,r=t,i=e,s=d.ref(r.columns.map(g=>({...g,editableValue:g.ua!==void 0?g.ua:g.title})));d.watch(()=>r.columns,g=>{s.value=g.map(y=>({...y,editableValue:y.ua!==void 0?y.ua:y.title}))},{deep:!0});const a=g=>{g.hidden=!g.hidden},o=async()=>{try{await je.post(`/api/settings-table/${r.table}`,{columns:s.value}),await n({type:"success",title:"Успішно!",message:"Дані було успішно оновлено"}),i("update")}catch(g){console.error("Помилка збереження:",g),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},p=(g,y)=>{g.editableValue=y,g.ua!==void 0?g.ua=y:g.title=y};return(g,y)=>{const v=d.resolveComponent("VsInlineEdit");return d.openBlock(),d.createElementBlock("div",Wre,[d.createElementVNode("div",{class:"flex justify-end p-3"},[d.createElementVNode("button",{onClick:o,class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),d.createElementVNode("div",qre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,E=>(d.openBlock(),d.createElementBlock("div",{key:E.name,class:"flex items-center justify-between p-3 border rounded-lg shadow-sm"},[d.createElementVNode("div",Gre,[d.createElementVNode("input",{type:"checkbox",checked:!E.hidden,onChange:()=>a(E),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Yre),d.createVNode(v,{modelValue:E.editableValue,"onUpdate:modelValue":T=>E.editableValue=T,component:"vs-text",onUpdateValue:T=>p(E,T)},{default:d.withCtx(()=>[d.createElementVNode("span",Zre,d.toDisplayString(E.editableValue),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onUpdateValue"])])]))),128))])])}}},Xre={created(){this.isVisible=!1},mounted(){this.type==="customColumns"&&(this.colModel=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",slots:{label:'<div class="flex w-[450px] items-center gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"file",text:"Файл",description:"Різноманітні файли"},{id:"select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}]),setTimeout(()=>this.isVisible=!0,100)},props:{data:Array,table:String,type:String},data(){return{localData:this.data?[...this.data]:[],isVisible:!1,colModel:[{key:"name",name:"name",type:"Text",ua:"Назва"},{key:"description",name:"description",type:"Text",ua:"Опис"},{key:"query",name:"query",type:"Text",ua:"Query"}]}},methods:{async handleSave(){try{await je.post(`/api/settings-table/${this.table}`,{[this.type]:this.localData}),this.$emit("update")}catch(t){console.error("Помилка збереження:",t)}}},watch:{data:{deep:!0,handler(t){t?this.localData=[...t]:this.localData=[]}}}},Kre={class:"flex justify-end p-3"};function Jre(t,e,n,r,i,s){const a=d.resolveComponent("VsDataTable");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",Kre,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...o)=>s.handleSave&&s.handleSave(...o)),class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),i.isVisible?(d.openBlock(),d.createBlock(a,{class:"w-full",modelValue:i.localData,"onUpdate:modelValue":e[1]||(e[1]=o=>i.localData=o),colModel:i.colModel,key:i.localData,addition:!1,import:!1,additionBottom:!0},null,8,["modelValue","colModel"])):d.createCommentVNode("",!0)])}const SI=Fe(Xre,[["render",Jre]]),Qre={"vs-table-settings-tab-list":EI,"vs-table-settings-tab-datetable":SI},eie={components:{VsNoData:ad,IconMore:wg,IconEdit:fx,IconDelete:hx,TableSettingsTabList:EI,TableSettingsDataTable:SI},data(){return{tableSettingsTabs:Qre,tabs:{customColumns:{id:"vs-table-settings-tab-datetable",title:"Користувацькі колонки"},customFilters:{id:"vs-table-settings-tab-datetable",title:"Користувацькі фільтри"},columns:{id:"vs-table-settings-tab-list",title:"Колонки"}},currentTab:"customColumns",tableData:null}},computed:{table(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()},immediate:!0}},methods:{async getData(){var t,e;try{const n=(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name,r=await je.get(`/api/settings-table/${n}`);this.tableData=r.data}catch(n){console.error("Помилка завантаження даних таблиці:",n),this.tableData=null}},changeTab(t){this.currentTab=t}}},tie={class:"flex bg-gray-50",style:{height:"calc(-80px + 100vh)",width:"calc(-560px + 100vw)"}},nie={key:0,class:"flex flex-col flex-1 w-full p-2 space-y-3 sm:p-5 sm:py-0 md:pt-5"},rie={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},iie=["onClick"],sie={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700 flex-1 overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},oie={key:0},aie={key:1,class:"text-gray-500"};function lie(t,e,n,r,i,s){const a=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",tie,[s.table?(d.openBlock(),d.createElementBlock("div",nie,[d.createElementVNode("div",rie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.tabs,(o,p)=>(d.openBlock(),d.createElementBlock("button",{key:p,onClick:g=>s.changeTab(p),class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[i.currentTab===p?"bg-white shadow-sm !border-gray-200":""]])},d.toDisplayString(o.title),11,iie))),128))]),d.createElementVNode("div",sie,[i.tableData?(d.openBlock(),d.createElementBlock("div",oie,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.tableSettingsTabs[i.tabs[i.currentTab].id]),d.mergeProps({key:i.currentTab},i.tableData,{data:i.tableData[i.currentTab],type:i.currentTab,table:s.table,onUpdate:s.getData}),null,16,["data","type","table","onUpdate"]))])):(d.openBlock(),d.createElementBlock("div",aie," Дані завантажуються або відсутні... "))])])):(d.openBlock(),d.createBlock(a,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const cie={components:{TableSettingsNavList:Ure,TableSettingsContent:Fe(eie,[["render",lie]])}},uie={class:"flex items-start gap-0"};function die(t,e,n,r,i,s){const a=d.resolveComponent("TableSettingsNavList"),o=d.resolveComponent("TableSettingsContent");return d.openBlock(),d.createElementBlock("div",uie,[d.createVNode(a),d.createVNode(o)])}const hie=Fe(cie,[["render",die]]),Pv=d.ref({}),fie={components:{VsNoData:ad},data(){return{forms:[],formValues:[]}},created(){this.getSettingsAfterEditing()},computed:{activeForm(){return this.forms.find(t=>{var e,n;return t.name===((n=(e=this.$route)==null?void 0:e.query)==null?void 0:n.name)})},properties(){return Pv.value}},watch:{properties:{handler(t){t&&(this.forms=t.forms||[],this.formValues=t.settings||{},!this.$route.query.name&&this.forms.length>0&&this.changeTab(this.forms[0]))},deep:!0,immediate:!0}},methods:{changeTab(t){this.$router.push({path:this.link,query:{name:t.name}})},async saveForm(){try{const t=Object.keys(this.activeForm.body).reduce((e,n)=>{var a;const[r,i]=n.split("."),s=this.formValues[n]||((a=this.formValues[r])==null?void 0:a[i]);return{...e,[n]:s}},{});await je.post("/api/settings-app",t),await this.getSettingsAfterEditing(),this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"})}catch(t){console.error("Помилка збереження даних:",t)}},async getSettingsAfterEditing(){try{const{data:t}=await je.get("/api/settings-app");Pv.value=t}catch(t){console.error("Помилка збереження даних:",t)}}}},pie={style:{height:"calc(-60px + 100vh)"},class:"p-2 space-y-3 bg-gray-50 sm:p-5 sm:py-0 md:pt-5"},mie={class:"flex flex-col flex-1 space-y-3"},gie={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},yie=["onClick"],bie={class:"flex justify-end w-full"},_ie={key:0,class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"};function xie(t,e,n,r,i,s){const a=d.resolveComponent("VsForm"),o=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",pie,[d.createElementVNode("div",mie,[d.createElementVNode("div",gie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.forms,p=>{var g,y;return d.openBlock(),d.createElementBlock("button",{key:p.name,onClick:v=>s.changeTab(p),class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[((y=(g=t.$route)==null?void 0:g.query)==null?void 0:y.name)===p.name?"bg-white shadow-sm !border-gray-200":""]])},d.toDisplayString(p.body.ua||p.body.title||p.name||"Не вказано"),11,yie)}),128)),d.createElementVNode("div",bie,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.saveForm&&s.saveForm(...p)),class:"mи-4 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")])])]),s.activeForm?(d.openBlock(),d.createElementBlock("div",_ie,[s.activeForm.body?(d.openBlock(),d.createBlock(a,{key:s.activeForm,scheme:s.activeForm.body,style:d.normalizeStyle(t.style),modelValue:i.formValues,"onUpdate:modelValue":e[1]||(e[1]=p=>i.formValues=p)},null,8,["scheme","style","modelValue"])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),i.forms.length?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(o,{key:1,class:"mt-[100px]",text:""}))])}const vie=Fe(fie,[["render",xie]]),wie={},kie={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Eie(t,e){return d.openBlock(),d.createElementBlock("svg",kie,e[0]||(e[0]=[d.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),d.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]))}const Sie=Fe(wie,[["render",Eie]]),Cie={class:"h-full w-full flex overflow-auto relative [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Tie={class:"flex-grow"},Aie={class:"px-[10px] shrink-0 w-[400px]"},Mie={class:"max-h-[calc(100%-50px)] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Die={class:"text-sm text-gray-500 dark:text-neutral-500"},Iie={class:"inline-flex items-center justify-end text-sm font-medium text-gray-800 gap-x-2 text-end dark:text-neutral-200"},Pie=["onClick"],Nie={__name:"print-tab-editor",props:{templateData:{type:Object,default:()=>{}}},emits:["update-template"],setup(t,{emit:e}){var y;const n=d.getCurrentInstance().proxy.$notify,r=uh(),i=d.computed(()=>{var v;return(v=r==null?void 0:r.query)==null?void 0:v.name}),s=t,a=e,o=d.ref(((y=s.templateData)==null?void 0:y.html)||""),p=async()=>{try{await je.put(`/api/print-template/${i.value}`,{...s.templateData,html:o.value}),a("update-template"),n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"})}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}},g=v=>{const E=`{{ ${v} }}`;try{const T=document.createElement("textarea");T.value=E,document.body.appendChild(T),T.select(),T.setSelectionRange(0,E.length);const D=document.execCommand("copy");document.body.removeChild(T),n(D?{type:"success",title:"Успішно!",message:"Ключ успішно скопійовано"}:{type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"})}catch(T){n({type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"}),console.error("Copy failed",T)}};return(v,E)=>{var N;const T=d.resolveComponent("VsTiptapEditor"),D=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("div",Cie,[d.createElementVNode("div",Tie,[d.createElementVNode("div",{class:"sticky top-0 flex justify-end gap-1 pb-[10px] bg-white z-[1] px-[10px]"},[d.createElementVNode("button",{onClick:p,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")]),d.createVNode(T,{modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=B=>o.value=B),class:"text-[13px] h-[calc(100%-50px)]"},null,8,["modelValue"])]),d.createElementVNode("div",Aie,[E[2]||(E[2]=d.createElementVNode("h2",{class:"block font-semibold mb-[20px] text-gray-800 truncate dark:text-neutral-200"}," Список колонок ",-1)),d.createElementVNode("dl",Mie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((N=t.templateData)==null?void 0:N.columns,B=>(d.openBlock(),d.createElementBlock("div",{key:B==null?void 0:B.name,class:"flex items-center justify-between w-full"},[d.createElementVNode("dt",Die,d.toDisplayString(B==null?void 0:B.title)+": ",1),d.createElementVNode("dd",Iie,[d.createTextVNode(d.toDisplayString(B==null?void 0:B.name)+" ",1),d.createVNode(D,{trigger:"hover",placement:"left"},{reference:d.withCtx(()=>[d.createElementVNode("button",{onClick:V=>g(B==null?void 0:B.name),class:"h-[24px] w-[24px] flex items-center justify-center hover:bg-gray-100 rounded-lg duration-300"},[d.createVNode(Sie)],8,Pie)]),default:d.withCtx(()=>[E[1]||(E[1]=d.createTextVNode(" Скопіювати ключ "))]),_:2},1024)])]))),128))])])])}}},Nv=(t,e=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}},Rie={class:"h-full"},Oie={class:"flex justify-between mb-[10px]"},Bie={class:"flex items-center gap-2"},Vie=["disabled"],zie={class:"flex h-full"},Lie={class:"w-[50%]"},Fie={class:"flex flex-wrap items-center lg:justify-between lg:grow"},$ie={class:"relative min-h-[30px] gap-[20px] inline-flex items-center"},jie={class:"text-xs text-gray-800 me-1 sm:text-sm dark:text-neutral-200"},Hie={class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"},Uie={class:"w-[300px] relative p-1 max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Wie={class:""},qie={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},Gie=["value"],Yie={class:"pr-2"},Zie={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},Xie=["value"],Kie=["src"],Jie={__name:"print-tab-list",props:{templateData:Object},setup(t){const e=uh(),n=d.computed(()=>{var U;return(U=e==null?void 0:e.query)==null?void 0:U.name}),r=t,i=d.ref(null),s=d.ref(null),a=d.ref(""),o=d.ref([]),p=d.ref(null),g=d.ref([]),y=async(U=null)=>{i.value=null;try{const{data:K}=await je.get(`/api/table-data/${r.templateData.alias}`,{params:{filter:p.value,search:U}});i.value=K}catch{}},v=async()=>{try{const{data:{list:U}}=await je.get(`/api/table-filter/${r.templateData.alias}`);s.value=U==null?void 0:U.map(K=>({...K,label:(K==null?void 0:K.label)||(K==null?void 0:K.ua)}))}catch{}},E=({url:U})=>{U==="no-url"?p.value=null:p.value=U},T=({target:U})=>{var K,Y;if(U.checked){const we=(K=i.value.rows)==null?void 0:K.find(ye=>(ye==null?void 0:ye.id)==U.value);o.value=[...o.value,we]}else o.value=(Y=o.value)==null?void 0:Y.filter(we=>(we==null?void 0:we.id)!=(U==null?void 0:U.value))},D=()=>{var U;(U=i.value.rows)==null||U.forEach(K=>{var Y;(Y=g.value)!=null&&Y.includes(K==null?void 0:K.id)||(g.value=[...g.value,K==null?void 0:K.id],o.value=[...o.value,K])})},N=()=>{var K,Y;const U=(K=o.value)==null?void 0:K.map(we=>we==null?void 0:we.id);g.value=(Y=g.value)==null?void 0:Y.filter(we=>!(U!=null&&U.includes(we))),o.value=[]},B=async()=>{if(g.value.length===0)return;const U=g.value.join(",");a.value=`/api/print-template/${n.value}/${U}`},V=Nv(y,300);return d.watch(p,()=>y()),d.onMounted(async()=>{await y(),await v()}),(U,K)=>{var ye,Te,Re;const Y=d.resolveComponent("VsFilterList"),we=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("div",Rie,[d.createElementVNode("div",Oie,[d.createElementVNode("div",Bie,[d.createElementVNode("input",{type:"text",class:"w-[200px] h-[38px] px-[10px] placeholder:text-[14px] placeholder:text-gray-600 rounded-lg bg-gray-100 focus:outline-blue-500",placeholder:"Пошук...",onInput:K[0]||(K[0]=({target:Ne})=>d.unref(V)(Ne.value))},null,32),s.value?(d.openBlock(),d.createBlock(Y,{key:0,view:"plain",scheme:s.value,isDialog:!1,"apply-vue-router":"",history:"",name:"filter",onFilterChange:E},null,8,["scheme"])):d.createCommentVNode("",!0)]),i.value?(d.openBlock(),d.createElementBlock("button",{key:0,onClick:B,disabled:!g.value.length,class:"py-2 px-3 inline-flex disabled:text-gray-200 disabled:cursor-not-allowed items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Згенерувати документ ",8,Vie)):d.createCommentVNode("",!0)]),d.createElementVNode("div",zie,[d.createElementVNode("div",Lie,[d.createElementVNode("div",Fie,[d.createElementVNode("div",$ie,[d.createElementVNode("span",jie," Знайдено "+d.toDisplayString((ye=i.value)==null?void 0:ye.filtered),1),d.createElementVNode("button",{onClick:D,class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"}," Обрати всі ")]),(Te=o.value)!=null&&Te.length?(d.openBlock(),d.createBlock(we,{key:0,placement:"bottom"},{reference:d.withCtx(()=>{var Ne;return[d.createElementVNode("button",Hie,[d.createTextVNode(" Обранo: "+d.toDisplayString((Ne=o.value)==null?void 0:Ne.length)+" ",1),d.createVNode(Dv,{height:"14",width:"14"})])]}),default:d.withCtx(()=>[d.createElementVNode("div",Uie,[d.createElementVNode("ul",Wie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,Ne=>{var Ye,qe;return d.openBlock(),d.createElementBlock("li",{key:Ne==null?void 0:Ne.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[d.createElementVNode("label",qie,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:T,"onUpdate:modelValue":K[1]||(K[1]=he=>g.value=he),value:Ne==null?void 0:Ne.id},null,40,Gie),[[d.vModelCheckbox,g.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",g.value.includes(Ne==null?void 0:Ne.id)?"bg-blue-600 border-0":"bg-white"])},[d.createVNode(dh,{height:"12",width:"12"})],2),d.createTextVNode(" "+d.toDisplayString(Ne[(qe=(Ye=i.value)==null?void 0:Ye.meta)==null?void 0:qe.title]),1)])])}),128))]),d.createElementVNode("button",{onClick:N,class:"w-full bg-white sticky bottom-0 h-[34px] border rounded-lg text-[16px] hover:bg-gray-100 duration-300 disabled:cursor-not-allowed disabled:hover:bg-white disabled:text-gray-200"}," Очистити ")])]),_:1})):d.createCommentVNode("",!0)]),d.createElementVNode("ul",Yie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Re=i.value)==null?void 0:Re.rows,Ne=>{var Ye,qe;return d.openBlock(),d.createElementBlock("li",{key:Ne==null?void 0:Ne.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[d.createElementVNode("label",Zie,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:T,"onUpdate:modelValue":K[2]||(K[2]=he=>g.value=he),value:Ne==null?void 0:Ne.id},null,40,Xie),[[d.vModelCheckbox,g.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",g.value.includes(Ne==null?void 0:Ne.id)?"bg-blue-600 border-0":"bg-white"])},[d.createVNode(dh,{height:"12",width:"12"})],2),d.createTextVNode(" "+d.toDisplayString(Ne[(qe=(Ye=i.value)==null?void 0:Ye.meta)==null?void 0:qe.title]),1)])])}),128))])]),d.createElementVNode("iframe",{class:"h-[calc(100%-60px)] w-[50%] bg-gray-100",src:a.value},null,8,Kie)])])}}},Qie={class:"p-[20px]"},ese={class:"flex gap-[10px]"},tse=["onClick"],nse={class:"rounded-xl flex justify-between overflow-hidden bg-white border max-w-[1400px] h-[calc(100vh-160px)] mt-[20px]"},rse={key:0,class:"p-[10px] w-full"},ise={key:1,class:"p-[10px]"},sse={__name:"print-content",setup(t){const e={"print-tab-editor":{text:"Шаблон",component:Nie},"print-tab-list":{text:"Друк",component:Jie}},n=uh(),r=d.computed(()=>{var p;return(p=n==null?void 0:n.query)==null?void 0:p.name}),i=d.ref("print-tab-editor"),s=d.ref(null),a=d.ref(!1),o=async()=>{a.value=!1;try{const{data:p}=await je.get(`/api/print-template/${r.value}`);s.value=p,a.value=!0}catch(p){console.log(p)}};return d.onMounted(o),d.watch(r,()=>o()),(p,g)=>(d.openBlock(),d.createElementBlock("div",Qie,[d.createElementVNode("div",ese,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(e,(y,v)=>d.createElementVNode("button",{key:v,onClick:E=>i.value=v,class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500",[i.value===v?" shadow bg-white":""]])},d.toDisplayString(y.text),11,tse)),64))]),d.createElementVNode("div",nse,[a.value?(d.openBlock(),d.createElementBlock("div",rse,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e[i.value].component),{templateData:s.value,onUpdateTemplate:o},null,40,["templateData"]))])):(d.openBlock(),d.createElementBlock("div",ise,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e[i.value].component),{templateData:s.value},null,8,["templateData"]))]))])]))}},ose={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},ase={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},lse={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},cse={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 170px)"}},use=["data-index"],dse={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},hse={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},fse="/admin.templates",pse={__name:"print-navbar",setup(t){const e={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"},html:{type:"TextEditor",ua:"Розмітка"}},n=d.ref(""),r=d.ref(null),i=d.ref({}),s=d.ref(!1),a=d.ref(),o=d.computed(()=>{var y;return(y=r.value)==null?void 0:y.filter(v=>{var E,T,D;return(D=(E=v==null?void 0:v.title)==null?void 0:E.toLowerCase())==null?void 0:D.includes((T=n.value)==null?void 0:T.toLowerCase())})}),p=async()=>{try{const{data:y}=await je.get("/api/print-template");r.value=y==null?void 0:y.rows}catch{}},g=async()=>{try{await a.value.doValidation(),await je.post("/api/print-template",i.value)}catch{}};return p(),(y,v)=>{var B;const E=d.resolveComponent("VsText"),T=d.resolveComponent("router-link"),D=d.resolveComponent("VsForm"),N=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",ose,[d.createElementVNode("div",ase,[v[5]||(v[5]=d.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Друк ",-1)),d.createElementVNode("button",{onClick:v[0]||(v[0]=V=>s.value=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[d.createVNode(Zu,{height:"16",width:"16"})])]),d.createElementVNode("div",lse,[d.createVNode(E,{type:"text",modelValue:n.value,"onUpdate:modelValue":v[1]||(v[1]=V=>n.value=V),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(B=o.value)!=null&&B.length?(d.openBlock(),d.createElementBlock("ul",cse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,V=>{var U,K;return d.openBlock(),d.createElementBlock("li",{key:V==null?void 0:V.name,"data-index":y.index,class:"w-full"},[d.createVNode(T,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((K=(U=y.$route)==null?void 0:U.query)==null?void 0:K.name)===(V==null?void 0:V.name)}]),to:fse+"?name="+(V==null?void 0:V.name)},{default:d.withCtx(()=>[d.createElementVNode("span",dse,d.toDisplayString((V==null?void 0:V.title)||(V==null?void 0:V.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,use)}),128))])):d.createCommentVNode("",!0)]),d.createVNode(N,{visible:s.value,"onUpdate:visible":v[4]||(v[4]=V=>s.value=V),title:"Створти шаблон"},{footer:d.withCtx(()=>[d.createElementVNode("div",hse,[d.createElementVNode("button",{style:{border:"1px solid #000"},onClick:v[3]||(v[3]=V=>{s.value=!1,i.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:g,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(D,{ref_key:"form",ref:a,scheme:e,modelValue:i.value,"onUpdate:modelValue":v[2]||(v[2]=V=>i.value=V)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},mse={class:"flex"},gse={class:"w-[calc(100vw-560px)] bg-gray-50"},yse={__name:"template-print-page",setup(t){return(e,n)=>{var r,i;return d.openBlock(),d.createElementBlock("div",mse,[d.createVNode(pse),d.createElementVNode("div",gse,[(i=(r=e.$route)==null?void 0:r.query)!=null&&i.name?(d.openBlock(),d.createBlock(sse,{key:0})):(d.openBlock(),d.createBlock(ad,{key:1}))])])}}},bse={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},_se={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},xse={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},vse=["data-index"],wse={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},kse="/admin.reports",Ese={__name:"reports-navbar",setup(t){const e=d.ref(""),n=d.ref(null),r=d.computed(()=>{var s;return(s=n.value)==null?void 0:s.filter(a=>{var o,p,g;return(g=(o=a==null?void 0:a.title)==null?void 0:o.toLowerCase())==null?void 0:g.includes((p=e.value)==null?void 0:p.toLowerCase())})});return(async()=>{try{const{data:s}=await je.get("/api/reports");n.value=s==null?void 0:s.rows}catch{}})(),(s,a)=>{var g;const o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",bse,[d.createElementVNode("div",_se,[d.createVNode(o,{type:"text",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=y=>e.value=y),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(g=r.value)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",xse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,y=>{var v,E;return d.openBlock(),d.createElementBlock("li",{key:y==null?void 0:y.name,"data-index":s.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((E=(v=s.$route)==null?void 0:v.query)==null?void 0:E.name)===(y==null?void 0:y.name)}]),to:kse+"?name="+(y==null?void 0:y.name)},{default:d.withCtx(()=>[d.createElementVNode("span",wse,d.toDisplayString((y==null?void 0:y.title)||(y==null?void 0:y.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,vse)}),128))])):d.createCommentVNode("",!0)])}}},Sse={class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Cse={class:"space-y-5"},Tse={class:"flex items-center gap-[4px]"},Ase={class:"flex items-center gap-2"},Mse={class:"flex flex-col flex-grow w-full p-4 border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Dse={class:"py-4 sm:py-0 ps-1 sm:pe-4"},Ise={class:"text-sm text-gray-800 dark:text-neutral-200"},Pse={class:"flex flex-wrap items-center gap-2 mt-3"},Nse={class:"block text-2xl font-medium text-gray-800 dark:text-neutral-200"},Rse={class:"overflow-x-auto h-[calc(100vh-430px)] [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Ose={class:"inline-block min-w-full align-middle"},Bse={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},Vse={class:"sticky top-[0px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},zse={class:"flex items-center py-3 text-sm font-medium text-gray-800 pe-4 text-start gap-x-1 dark:text-neutral-200"},Lse={class:"divide-y divide-gray-200 dark:divide-neutral-700"},Fse={class:"px-4 py-3 size-px whitespace-nowrap"},$se={class:"text-sm text-gray-600 dark:text-neutral-400"},jse={__name:"reports-table",setup(t){const e=[{id:"period",type:"date",inline:!0,placeholder:"Оберіть період"}],n=[{id:"spent",type:"check",label:"Spent",inline:!0,options:[{id:"1",text:"text 1"},{id:"2",text:"text 2"},{id:"3",text:"text 3"}]}],r=uh(),i=d.ref(null),s=d.ref(null),a=d.ref(null),o=d.ref(!0),p=d.computed(()=>{var T;return(T=r==null?void 0:r.query)==null?void 0:T.name}),g=async(T=null)=>{try{const{data:D}=await je.get(`/api/reports/${p.value}`,{params:{filter:s.value,period:a.value,search:T||null}});i.value=D}catch{}},y=Nv(g,300),v=({url:T})=>{T==="no-url"?s.value=null:s.value=T,g()},E=T=>{var D;(D=Object.keys(T))!=null&&D.length&&(a.value=T==null?void 0:T.period,g())};return d.watch(p,()=>{o.value=!1,setTimeout(()=>o.value=!0),s.value=null,a.value=null}),(T,D)=>{var V,U,K;const N=d.resolveComponent("VsText"),B=d.resolveComponent("VsFilterList");return d.openBlock(),d.createElementBlock("div",Sse,[D[0]||(D[0]=d.createElementVNode("div",{class:"mb-4 xl:mb-8"},[d.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),d.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")],-1)),d.createElementVNode("div",Cse,[d.createElementVNode("div",Tse,[d.createVNode(N,{type:"text",placeholder:"Пошук...","onUpdate:modelValue":d.unref(y),class:"flex-grow [&>input]:h-[38px] max-w-[300px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 admin-input-text [&>input]:border-0"},null,8,["onUpdate:modelValue"]),o.value?(d.openBlock(),d.createBlock(B,{key:0,scheme:e,isDialog:!1,view:"plain",clearable:!1,"onUpdate:modelValue":E})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(B,{key:1,scheme:n,isDialog:!1,view:"plain",clearable:!1,onFilterChange:v})):d.createCommentVNode("",!0)]),d.createElementVNode("div",Ase,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((V=i.value)==null?void 0:V.kpi,Y=>(d.openBlock(),d.createElementBlock("div",Mse,[d.createElementVNode("div",Dse,[d.createElementVNode("p",Ise,d.toDisplayString(Y==null?void 0:Y.title),1),d.createElementVNode("div",Pse,[d.createElementVNode("span",Nse,d.toDisplayString(Y==null?void 0:Y.count),1)])])]))),256))]),d.createElementVNode("div",Rse,[d.createElementVNode("div",Ose,[d.createElementVNode("table",Bse,[d.createElementVNode("thead",Vse,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((U=i.value)==null?void 0:U.columns,Y=>(d.openBlock(),d.createElementBlock("th",{scope:"col",class:"min-w-[250px]",key:Y==null?void 0:Y.name},[d.createElementVNode("div",zse,d.toDisplayString(Y==null?void 0:Y.title),1)]))),128))])]),d.createElementVNode("tbody",Lse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((K=i.value)==null?void 0:K.rows,Y=>{var we;return d.openBlock(),d.createElementBlock("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((we=i.value)==null?void 0:we.columns,ye=>(d.openBlock(),d.createElementBlock("td",Fse,[d.createElementVNode("span",$se,d.toDisplayString((Y==null?void 0:Y[ye==null?void 0:ye.name])||"-"),1)]))),256))])}),256))])])])])])])}}},Hse={class:"flex"},Use={class:"w-[calc(100vw-560px)] p-[20px] bg-gray-50"},Wse={"card-page":Iv,"user-cls-page":qne,"calendar-page":Vre,"table-settings-page":hie,"admin-properties-page":vie,"template-print-page":yse,"reports-page":{__name:"reports-page",setup(t){return(e,n)=>{var r,i;return d.openBlock(),d.createElementBlock("div",Hse,[d.createVNode(Ese),d.createElementVNode("div",Use,[(i=(r=e.$route)==null?void 0:r.query)!=null&&i.name?(d.openBlock(),d.createBlock(jse,{key:0})):(d.openBlock(),d.createBlock(ad,{key:1}))])])}}}},qse={},Gse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-info-circle"};function Yse(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Gse,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},null,-1),d.createElementVNode("path",{d:"M12 9h.01"},null,-1),d.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1)]))}const Zse=Fe(qse,[["render",Yse]]),Xse={},Kse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-loader"};function Jse(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Kse,e[0]||(e[0]=[d.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 6l0 -3"></path><path d="M16.25 7.75l2.15 -2.15"></path><path d="M18 12l3 0"></path><path d="M16.25 16.25l2.15 2.15"></path><path d="M12 18l0 3"></path><path d="M7.75 16.25l-2.15 2.15"></path><path d="M6 12l-3 0"></path><path d="M7.75 7.75l-2.15 -2.15"></path>',9)]))}const Qse=Fe(Xse,[["render",Jse]]),eoe=async(t,e,n,r=10)=>{var N,B,V,U;if(!e||!n)return;await d.nextTick();const i=await(n==null?void 0:n.getBoundingClientRect()),s=await(e==null?void 0:e.getBoundingClientRect());if(!s||!i)return;const a=await parseInt((N=e==null?void 0:e.getBoundingClientRect())==null?void 0:N.height),o=await parseInt((B=e==null?void 0:e.getBoundingClientRect())==null?void 0:B.width),p=await parseInt((V=n==null?void 0:n.getBoundingClientRect())==null?void 0:V.height),g=await parseInt((U=n==null?void 0:n.getBoundingClientRect())==null?void 0:U.width),y=await window.innerHeight,v=await window.innerWidth;let E=0,T=0;const D=s.bottom+r+p;switch(t){case"top":s.top-i.height-r<0?E=s.top-i.height+r+p+a:E=s.top-i.height-r,v>g+s.right+30?T=s.left-i.width/2+s.width/2:T=v-30-g;break;case"bottom":y>D?E=s.bottom+r:E=s.bottom-r-p-a,T=s.left-i.width/2+s.width/2;break;case"left":E=s.top-i.height/2+s.height/2,s.left-i.width-r>0?T=s.left-i.width-r:T=10;break;case"right":E=s.top-i.height/2+s.height/2,v-o>g?T=s.right+r:T=v-30-g;break;case"top-right":s.top-i.height-r<0?E=s.top-i.height+(void 0).gap+p+a:E=s.top-i.height-r,v-o>g?T=s.right+r:T=v-30-g;break;case"top-left":s.top-i.height-r<0?E=s.top-i.height+r+p+a:E=s.top-i.height-r,s.left-i.width-r>0?T=s.left-i.width-r:T=10;break;case"bottom-right":y>D?E=s.bottom+r:E=s.bottom-r-p-a,v-o>g?T=s.left:T=v-30-g;break;case"bottom-left":y>D?E=s.bottom+r:E=s.bottom-r-p-a,s.left>0?T=s.right-g:T=10;break;case"bottom-start":y>D?E=s.bottom+r:E=s.bottom-(void 0).gap-p-a,s.left>0?T=s.left:T=10;break}E+p>y?E=y-p-r:E<0&&(E=r),T+g>v?T=v-g-r:T<0&&(T=r),n instanceof HTMLElement&&(n.style.top=`${E}px`,n.style.left=`${T}px`,n.style.position="fixed")},toe={class:"flex items-center justify-between py-1 gap-x-4"},noe={class:"col-span-1"},roe={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},ioe={class:"col-span-2"},soe={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},ooe={key:1,class:"w-[300px] h-[300px] flex items-center justify-center"},CI={__name:"admin-info-popover",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""}},setup(t){var v,E;const e=(E=(v=d.getCurrentInstance())==null?void 0:v.appContext)==null?void 0:E.app;window.v3core.install(e),Object.entries(CE).forEach(([T,D])=>{e==null||e.component(T,D)});const n=t,r=d.ref(null),i=d.ref(!1),s=d.ref(null),a=d.ref(null);let o=null;const p=async()=>{try{const{data:T}=await je.get(`/api/table-info/${n.table}/${n.id}`);r.value=T}catch{}},g=async()=>{clearTimeout(o),i.value=!0,r.value||await p(),await eoe("right",s.value,a.value,40)},y=()=>{o=setTimeout(()=>{i.value=!1},300)};return d.onBeforeUnmount(()=>{clearTimeout(o)}),(T,D)=>(d.openBlock(),d.createElementBlock("div",{class:"relative inline-flex h-[30px] w-[30px] flex items-center justify-center",onMouseenter:g,onMouseleave:y,ref_key:"infoPopover",ref:s},[d.createVNode(Zse,{height:"20",width:"20",class:"text-gray-700 cursor-pointer"}),(d.openBlock(),d.createBlock(d.Teleport,{to:"#modal"},[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var N;return[d.withDirectives(d.createElementVNode("div",{onMouseenter:g,onMouseleave:y,ref_key:"infoPopoverContent",ref:a,class:"fixed p-[20px] border z-[10002] rounded-xl bg-white max-h-[400px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-[100px] [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[r.value?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList((N=r.value)==null?void 0:N.columns,B=>{var V,U;return d.openBlock(),d.createElementBlock("dl",toe,[d.createElementVNode("dt",noe,[d.createElementVNode("p",roe,d.toDisplayString((B==null?void 0:B.ua)||(B==null?void 0:B.title))+": ",1)]),d.createElementVNode("dd",ioe,[d.createElementVNode("p",soe,[d.createVNode(sf,{row:(U=(V=r.value)==null?void 0:V.rows)==null?void 0:U[0],column:{...B,edit:!1}},null,8,["row","column"])])])])}),256)):(d.openBlock(),d.createElementBlock("div",ooe,[d.createVNode(Qse,{height:"40",width:"40",class:"animate-spin"})]))],544),[[d.vShow,i.value]])]}),_:1})]))],544))}},Rv={...xte,...vte,"vs-dashboard":Cte,"vs-custom-button":Mte,"vs-group-interface":Jte,"vs-test-widget":{__name:"vs-test-widget",props:{data:Object,dataName:String,table:String,geom:null},setup(t){var s;const{$v3plugin:e,$confirm:n}=(s=d.getCurrentInstance())==null?void 0:s.appContext.app.config.globalProperties,r=d.ref(!1),i=()=>{n({title:"Are you sure?",message:"Are you sure you want to delete this message?"})};return(a,o)=>{var g,y,v,E;const p=d.resolveComponent("VsConfirm");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",null,[d.createVNode(CI,{table:(y=(g=a.$route)==null?void 0:g.params)==null?void 0:y.table,id:(E=(v=a.$route)==null?void 0:v.params)==null?void 0:E.id},null,8,["table","id"]),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:o[0]||(o[0]=T=>r.value=!0)}," Редагувати Tokens "),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:i}," Редагувати Tokens 1212 ")]),d.createVNode(p,{visible:r.value,"onUpdate:visible":o[1]||(o[1]=T=>r.value=T),title:"Are you sure?"},{footer:d.withCtx(()=>o[2]||(o[2]=[d.createElementVNode("div",{class:"flex gap-[4px] p-[16px]"},[d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50","data-hs-overlay":"#hs-pro-chhdl"}," Скасувати "),d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 disabled:opacity-50 disabled:pointer-events-none"}," Видалити ")],-1)])),default:d.withCtx(()=>[o[3]||(o[3]=d.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Are you sure you want to delete this message? ",-1)),o[4]||(o[4]=d.createElementVNode("div",{class:"flex items-center mt-5"},[d.createElementVNode("input",{type:"checkbox",class:"shrink-0 size-3.5 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"hs-pro-chhdlcch"}),d.createElementVNode("label",{for:"hs-pro-chhdlcch",class:"text-sm text-gray-600 ms-2 dark:text-neutral-400"}," Don't show me this again ")],-1))]),_:1},8,["visible"])],64)}}},"vs-card-list":Iv,...Wse},aoe=t=>new Promise(e=>{const n=new CustomEvent("openFormPlugin");n.options=t,window.dispatchEvent(n);const r=({message:i})=>{window.removeEventListener("closeFormPlugin",r),e(i)};window.addEventListener("closeFormPlugin",r)});function loe(t){const e=typeof t;return e==="object"?t:{title:"Підтвердити операцію",text:e==="string"?t:"Ви впевнені що хочете виконати операцію?",cancel:"Скасувати",confirm:"Виконати"}}const coe=({api:t,confirm:e,method:n,isId:r,id:i})=>new Promise(s=>{var v,E,T,D;const{VsDialog:a}=(E=(v=window.app)==null?void 0:v._context)==null?void 0:E.components,{$notify:o}=(D=(T=window.app)==null?void 0:T.config)==null?void 0:D.globalProperties,p=document.querySelector("#modal");if(!p){console.error('Modal root element with id "#modal" not found!');return}const g=document.createElement("div");p.appendChild(g);const y=d.createApp({components:{VsDialog:a},data(){return{visible:!1,getConfirm:loe(e)}},methods:{close(N){this.visible=!1,this.$el.remove(),y.unmount(),s(N||"Success")},async doRequest(){var N;try{const{data:B}=await je({url:t+(r?`/${i}`:""),method:n||"POST"});this.close(B),await o({title:"Успішно!",type:"success",message:"Операція виконана успішно"}),await $p()}catch(B){o({title:"Помилка!",type:"error",message:((N=B==null?void 0:B.response)==null?void 0:N.data)||"Сталася помилка"})}}},mounted(){e?this.visible=!0:this.doRequest()},template:`
|
737
|
+
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,p=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:g,dispatch:y})=>{if(y&&p&&a){const v=p.filter(E=>o.includes(E.type.name));g.ensureMarks(v)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),TU=Hs.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,Er(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>U_({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}});var xg=200,Wr=function(){};Wr.prototype.append=function(e){return e.length?(e=Wr.from(e),!this.length&&e||e.length<xg&&this.leafAppend(e)||this.length<xg&&e.leafPrepend(this)||this.appendInner(e)):this},Wr.prototype.prepend=function(e){return e.length?Wr.from(e).append(this):this},Wr.prototype.appendInner=function(e){return new AU(this,e)},Wr.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Wr.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Wr.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Wr.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Wr.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i},Wr.from=function(e){return e instanceof Wr?e:e&&e.length?new hA(e):Wr.empty};var hA=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,o){for(var p=s;p<a;p++)if(i(this.values[p],o+p)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,o){for(var p=s-1;p>=a;p--)if(i(this.values[p],o+p)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=xg)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=xg)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Wr);Wr.empty=new hA([]);var AU=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,a){var o=this.left.length;if(i<o&&this.left.forEachInner(r,i,Math.min(s,o),a)===!1||s>o&&this.right.forEachInner(r,Math.max(i-o,0),Math.min(this.length,s)-o,a+o)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var o=this.left.length;if(i>o&&this.right.forEachInvertedInner(r,i-o,Math.max(s,o)-o,a+o)===!1||s<o&&this.left.forEachInvertedInner(r,Math.min(i,o),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Wr);const MU=500;class lo{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=e.tr,o,p,g=[],y=[];return this.items.forEach((v,E)=>{if(!v.step){i||(i=this.remapping(r,E+1),s=i.maps.length),s--,y.push(v);return}if(i){y.push(new Po(v.map));let T=v.step.map(i.slice(s)),D;T&&a.maybeStep(T).doc&&(D=a.mapping.maps[a.mapping.maps.length-1],g.push(new Po(D,void 0,void 0,g.length+y.length))),s--,D&&i.appendMap(D,s)}else a.maybeStep(v.step);if(v.selection)return o=i?v.selection.map(i.slice(s)):v.selection,p=new lo(this.items.slice(0,r).append(y.reverse().concat(g)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:a,selection:o}}addTransform(e,n,r,i){let s=[],a=this.eventCount,o=this.items,p=!i&&o.length?o.get(o.length-1):null;for(let y=0;y<e.steps.length;y++){let v=e.steps[y].invert(e.docs[y]),E=new Po(e.mapping.maps[y],v,n),T;(T=p&&p.merge(E))&&(E=T,y?s.pop():o=o.slice(0,o.length-1)),s.push(E),n&&(a++,n=void 0),i||(p=E)}let g=a-r.depth;return g>IU&&(o=DU(o,g),a-=g),new lo(o.append(s),a)}remapping(e,n){let r=new Cu;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new lo(this.items.append(e.map(n=>new Po(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,o=this.eventCount;this.items.forEach(E=>{E.selection&&o--},i);let p=n;this.items.forEach(E=>{let T=s.getMirror(--p);if(T==null)return;a=Math.min(a,T);let D=s.maps[T];if(E.step){let N=e.steps[T].invert(e.docs[T]),B=E.selection&&E.selection.map(s.slice(p+1,T));B&&o++,r.push(new Po(D,N,B))}else r.push(new Po(D))},i);let g=[];for(let E=n;E<a;E++)g.push(new Po(s.maps[E]));let y=this.items.slice(0,i).append(g).append(r),v=new lo(y,o);return v.emptyItemCount()>MU&&(v=v.compress(this.items.length-r.length)),v}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((a,o)=>{if(o>=e)i.push(a),a.selection&&s++;else if(a.step){let p=a.step.map(n.slice(r)),g=p&&p.getMap();if(r--,g&&n.appendMap(g,r),p){let y=a.selection&&a.selection.map(n.slice(r));y&&s++;let v=new Po(g.invert(),p,y),E,T=i.length-1;(E=i.length&&i[T].merge(v))?i[T]=E:i.push(v)}}else a.map&&r--},this.items.length,0),new lo(Wr.from(i.reverse()),s)}}lo.empty=new lo(Wr.empty,0);function DU(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Po{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Po(n.getMap().invert(),n,this.selection)}}}class rl{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const IU=20;function PU(t,e,n,r){let i=n.getMeta(xc),s;if(i)return i.historyState;n.getMeta(OU)&&(t=new rl(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(xc))return a.getMeta(xc).redo?new rl(t.done.addTransform(n,void 0,r,vg(e)),t.undone,fA(n.mapping.maps),t.prevTime,t.prevComposition):new rl(t.done,t.undone.addTransform(n,void 0,r,vg(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let o=n.getMeta("composition"),p=t.prevTime==0||!a&&t.prevComposition!=o&&(t.prevTime<(n.time||0)-r.newGroupDelay||!NU(n,t.prevRanges)),g=a?cx(t.prevRanges,n.mapping):fA(n.mapping.maps);return new rl(t.done.addTransform(n,p?e.selection.getBookmark():void 0,r,vg(e)),lo.empty,g,n.time,o??t.prevComposition)}else return(s=n.getMeta("rebased"))?new rl(t.done.rebased(n,s),t.undone.rebased(n,s),cx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new rl(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),cx(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function NU(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function fA(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function cx(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function RU(t,e,n){let r=vg(e),i=xc.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),o=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),p=new rl(n?o:s.remaining,n?s.remaining:o,null,0,-1);return s.transform.setSelection(a).setMeta(xc,{redo:n,historyState:p})}let ux=!1,pA=null;function vg(t){let e=t.plugins;if(pA!=e){ux=!1,pA=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){ux=!0;break}}return ux}const xc=new Xi("history"),OU=new Xi("closeHistory");function BU(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ni({key:xc,state:{init(){return new rl(lo.empty,lo.empty,null,0,-1)},apply(e,n,r){return PU(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?gA:r=="historyRedo"?yA:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function mA(t,e){return(n,r)=>{let i=xc.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=RU(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const gA=mA(!1,!0),yA=mA(!0,!0),VU=Ur.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>gA(t,e),redo:()=>({state:t,dispatch:e})=>yA(t,e)}},addProseMirrorPlugins(){return[BU(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),zU=Hs.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",Er(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):yT(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:o})=>{var p;if(o){const{$to:g}=a.selection,y=g.end();if(g.nodeAfter)g.nodeAfter.isTextblock?a.setSelection(Zt.create(a.doc,g.pos+1)):g.nodeAfter.isBlock?a.setSelection(Lt.create(a.doc,g.pos)):a.setSelection(Zt.create(a.doc,g.pos));else{const v=(p=g.parent.type.contentMatch.defaultType)===null||p===void 0?void 0:p.create();v&&(a.insert(y,v),a.setSelection(Zt.create(a.doc,y+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[m7({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),LU=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,FU=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,$U=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,jU=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,HU=Ao.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[Fu({find:LU,type:this.type}),Fu({find:$U,type:this.type})]},addPasteRules(){return[$u({find:FU,type:this.type}),$u({find:jU,type:this.type})]}}),UU=Hs.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",Er(this.options.HTMLAttributes,t),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)}}}),WU="listItem",bA="textStyle",_A=/^(\d+)\.\s$/,qU=Hs.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",Er(this.options.HTMLAttributes,n),0]:["ol",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(WU,this.editor.getAttributes(bA)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Gh({find:_A,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Gh({find:_A,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(bA)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),GU=Hs.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),YU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,ZU=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,XU=Ao.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Fu({find:YU,type:this.type})]},addPasteRules(){return[$u({find:ZU,type:this.type})]}}),xA=Hs.create({name:"text",group:"inline"}),KU=Ur.create({name:"starterKit",addExtensions(){var t,e,n,r,i,s,a,o,p,g,y,v,E,T,D,N,B,V;const U=[];return this.options.bold!==!1&&U.push(oU.configure((t=this.options)===null||t===void 0?void 0:t.bold)),this.options.blockquote!==!1&&U.push(tU.configure((e=this.options)===null||e===void 0?void 0:e.blockquote)),this.options.bulletList!==!1&&U.push(lU.configure((n=this.options)===null||n===void 0?void 0:n.bulletList)),this.options.code!==!1&&U.push(dU.configure((r=this.options)===null||r===void 0?void 0:r.code)),this.options.codeBlock!==!1&&U.push(dA.configure((i=this.options)===null||i===void 0?void 0:i.codeBlock)),this.options.document!==!1&&U.push(pU.configure((s=this.options)===null||s===void 0?void 0:s.document)),this.options.dropcursor!==!1&&U.push(yU.configure((a=this.options)===null||a===void 0?void 0:a.dropcursor)),this.options.gapcursor!==!1&&U.push(SU.configure((o=this.options)===null||o===void 0?void 0:o.gapcursor)),this.options.hardBreak!==!1&&U.push(CU.configure((p=this.options)===null||p===void 0?void 0:p.hardBreak)),this.options.heading!==!1&&U.push(TU.configure((g=this.options)===null||g===void 0?void 0:g.heading)),this.options.history!==!1&&U.push(VU.configure((y=this.options)===null||y===void 0?void 0:y.history)),this.options.horizontalRule!==!1&&U.push(zU.configure((v=this.options)===null||v===void 0?void 0:v.horizontalRule)),this.options.italic!==!1&&U.push(HU.configure((E=this.options)===null||E===void 0?void 0:E.italic)),this.options.listItem!==!1&&U.push(UU.configure((T=this.options)===null||T===void 0?void 0:T.listItem)),this.options.orderedList!==!1&&U.push(qU.configure((D=this.options)===null||D===void 0?void 0:D.orderedList)),this.options.paragraph!==!1&&U.push(GU.configure((N=this.options)===null||N===void 0?void 0:N.paragraph)),this.options.strike!==!1&&U.push(XU.configure((B=this.options)===null||B===void 0?void 0:B.strike)),this.options.text!==!1&&U.push(xA.configure((V=this.options)===null||V===void 0?void 0:V.text)),U}}),JU=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,i;const s=n.getAttribute("style"),a=(i=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");n.setAttribute("style",`${a};${s}`)})},QU=Ao.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&JU(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(s=>!!s))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),e9=Ur.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function t9(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:o}=t,p=r&&!i,g=g7(n),y=new RegExp(`\\s${g}$`),v=a?"^":"",E=i?"":g,T=p?new RegExp(`${v}${g}.*?(?=\\s${E}|$)`,"gm"):new RegExp(`${v}(?:^)?${g}[^\\s${E}]*`,"gm"),D=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!D)return null;const N=o.pos-D.length,B=Array.from(D.matchAll(T)).pop();if(!B||B.input===void 0||B.index===void 0)return null;const V=B.input.slice(Math.max(0,B.index-1),B.index),U=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(V);if(s!==null&&!U)return null;const K=N+B.index;let Y=K+B[0].length;return p&&y.test(D.slice(Y-1,Y+1))&&(B[0]+=" ",Y+=1),K<o.pos&&Y>=o.pos?{range:{from:K,to:Y},query:B[0].slice(n.length),text:B[0]}:null}const n9=new Xi("suggestion");function r9({pluginKey:t=n9,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:o="span",decorationClass:p="suggestion",command:g=()=>null,items:y=()=>[],render:v=()=>({}),allow:E=()=>!0,findSuggestionMatch:T=t9}){let D;const N=v==null?void 0:v(),B=new ni({key:t,view(){return{update:async(V,U)=>{var K,Y,we,ye,Te,Re,Ne;const Ye=(K=this.key)===null||K===void 0?void 0:K.getState(U),qe=(Y=this.key)===null||Y===void 0?void 0:Y.getState(V.state),he=Ye.active&&qe.active&&Ye.range.from!==qe.range.from,it=!Ye.active&&qe.active,Ct=Ye.active&&!qe.active,Ft=!it&&!Ct&&Ye.query!==qe.query,Bt=it||he&&Ft,It=Ft||he,Ut=Ct||he&&Ft;if(!Bt&&!It&&!Ut)return;const Kt=Ut&&!Bt?Ye:qe,an=V.dom.querySelector(`[data-decoration-id="${Kt.decorationId}"]`);D={editor:e,range:Kt.range,query:Kt.query,text:Kt.text,items:[],command:Xt=>g({editor:e,range:Kt.range,props:Xt}),decorationNode:an,clientRect:an?()=>{var Xt;const{decorationId:rn}=(Xt=this.key)===null||Xt===void 0?void 0:Xt.getState(e.state),wn=V.dom.querySelector(`[data-decoration-id="${rn}"]`);return(wn==null?void 0:wn.getBoundingClientRect())||null}:null},Bt&&((we=N==null?void 0:N.onBeforeStart)===null||we===void 0||we.call(N,D)),It&&((ye=N==null?void 0:N.onBeforeUpdate)===null||ye===void 0||ye.call(N,D)),(It||Bt)&&(D.items=await y({editor:e,query:Kt.query})),Ut&&((Te=N==null?void 0:N.onExit)===null||Te===void 0||Te.call(N,D)),It&&((Re=N==null?void 0:N.onUpdate)===null||Re===void 0||Re.call(N,D)),Bt&&((Ne=N==null?void 0:N.onStart)===null||Ne===void 0||Ne.call(N,D))},destroy:()=>{var V;D&&((V=N==null?void 0:N.onExit)===null||V===void 0||V.call(N,D))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(V,U,K,Y){const{isEditable:we}=e,{composing:ye}=e.view,{selection:Te}=V,{empty:Re,from:Ne}=Te,Ye={...U};if(Ye.composing=ye,we&&(Re||e.view.composing)){(Ne<U.range.from||Ne>U.range.to)&&!ye&&!U.composing&&(Ye.active=!1);const qe=T({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:Te.$from}),he=`id_${Math.floor(Math.random()*4294967295)}`;qe&&E({editor:e,state:Y,range:qe.range,isActive:U.active})?(Ye.active=!0,Ye.decorationId=U.decorationId?U.decorationId:he,Ye.range=qe.range,Ye.query=qe.query,Ye.text=qe.text):Ye.active=!1}else Ye.active=!1;return Ye.active||(Ye.decorationId=null,Ye.range={from:0,to:0},Ye.query=null,Ye.text=null),Ye}},props:{handleKeyDown(V,U){var K;const{active:Y,range:we}=B.getState(V.state);return Y&&((K=N==null?void 0:N.onKeyDown)===null||K===void 0?void 0:K.call(N,{view:V,event:U,range:we}))||!1},decorations(V){const{active:U,range:K,decorationId:Y}=B.getState(V);return U?Ar.create(V.doc,[ms.inline(K.from,K.to,{nodeName:o,class:p,"data-decoration-id":Y})]):null}}});return B}const i9=new Xi("mention"),s9=Hs.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:t,node:e}){var n;return`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:t,node:e}){var n;return["span",Er(this.HTMLAttributes,t.HTMLAttributes),`${t.suggestion.char}${(n=e.attrs.label)!==null&&n!==void 0?n:e.attrs.id}`]},suggestion:{char:"@",pluginKey:i9,command:({editor:t,range:e,props:n})=>{var r,i,s;const a=t.view.state.selection.$to.nodeAfter;((r=a==null?void 0:a.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),t.chain().focus().insertContentAt(e,[{type:this.name,attrs:n},{type:"text",text:" "}]).run(),(s=(i=t.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||s===void 0||s.collapseToEnd()},allow:({state:t,range:e})=>{const n=t.doc.resolve(e.from),r=t.schema.nodes[this.name];return!!n.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id"),renderHTML:t=>t.id?{"data-id":t.id}:{}},label:{default:null,parseHTML:t=>t.getAttribute("data-label"),renderHTML:t=>t.label?{"data-label":t.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Er({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:t})];const n={...this.options};n.HTMLAttributes=Er({"data-type":this.name},this.options.HTMLAttributes,e);const r=this.options.renderHTML({options:n,node:t});return typeof r=="string"?["span",Er({"data-type":this.name},this.options.HTMLAttributes,e),r]:r},renderText({node:t}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:t})):this.options.renderText({options:this.options,node:t})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:t,state:e})=>{let n=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(a,o)=>{if(a.type.name===this.name)return n=!0,t.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",o,o+a.nodeSize),!1}),n):!1})}},addProseMirrorPlugins(){return[r9({editor:this.editor,...this.options.suggestion})]}}),o9=Ao.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",Er(this.options.HTMLAttributes,t),0]},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),a9={props:{editor:Object},methods:{toggleBlockquote(){this.editor&&this.editor.chain().toggleBlockquote().run()}}};function l9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBlockquote&&s.toggleBlockquote(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 24 24"},[d.createElementVNode("path",{"fill-rule":"evenodd",d:"M6 6a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a3 3 0 0 1-3 3H5a1 1 0 1 0 0 2h1a5 5 0 0 0 5-5V8a2 2 0 0 0-2-2H6Zm9 0a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h3a3 3 0 0 1-3 3h-1a1 1 0 1 0 0 2h1a5 5 0 0 0 5-5V8a2 2 0 0 0-2-2h-3Z"})],-1)]))}const c9=Fe(a9,[["render",l9]]),u9={props:{editor:Object},methods:{toggleBulletList(){this.editor&&this.editor.chain().focus().toggleBulletList().run()}}};function d9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBulletList&&s.toggleBulletList(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"M9 8h10M9 12h10M9 16h10M4.99 8H5m-.02 4h.01m0 4H5"})],-1)]))}const h9=Fe(u9,[["render",d9]]),f9={props:{editor:Object},methods:{toggleOrderedList(){this.editor&&this.editor.chain().focus().toggleOrderedList().run()}}};function p9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleOrderedList&&s.toggleOrderedList(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 6h8m-8 6h8m-8 6h8M4 16a2 2 0 1 1 3.321 1.5L4 20h5M4 5l2-1v6m-2 0h4"})],-1)]))}const m9=Fe(f9,[["render",p9]]),g9={props:{editor:Object},methods:{toggleCodeBlock(){this.editor&&this.editor.chain().focus().toggleCodeBlock().run()}}};function y9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleCodeBlock&&s.toggleCodeBlock(...a)),class:"p-1.5 text-gray-500 rounded hover:text-gray-900 dark:hover:text-white focus:outline-none"},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8 8-4 4 4 4m8 0 4-4-4-4m-2-3-4 14"})],-1)]))}const b9=Fe(g9,[["render",y9]]),_9={props:{editor:Object},methods:{toggleBold(){this.editor&&this.editor.chain().toggleBold().run()}}};function x9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleBold&&s.toggleBold(...a)),class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("bold")}])},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 5h4.5a3.5 3.5 0 1 1 0 7H8m0-7v7m0-7H6m2 7h6.5a3.5 3.5 0 1 1 0 7H8m0-7v7m0 0H6"})],-1),d.createElementVNode("span",{class:"sr-only"},"Bold",-1)]),2)}const v9=Fe(_9,[["render",x9]]),w9={props:{editor:Object},methods:{toggleItalic(){this.editor&&this.editor.chain().toggleItalic().run()}}};function k9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("button",{onClick:e[0]||(e[0]=(...a)=>s.toggleItalic&&s.toggleItalic(...a)),class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("italic")}])},e[1]||(e[1]=[d.createElementVNode("svg",{class:"w-5 h-5","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m8.874 19 6.143-14M6 19h6.33m-.66-14H18"})],-1),d.createElementVNode("span",{class:"sr-only"},"Italic",-1)]),2)}const E9=Fe(w9,[["render",k9]]),S9={},C9={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"};function T9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",C9,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",d:"M9 19.2H5.5c-.3 0-.5-.2-.5-.5V16c0-.2.2-.4.5-.4h13c.3 0 .5.2.5.4v2.7c0 .3-.2.5-.5.5H18m-6-1 1.4 1.8h.2l1.4-1.7m-7-5.4L12 4c0-.1 0-.1 0 0l4 8.8m-6-2.7h4m-7 2.7h2.5m5 0H17"},null,-1)]))}const A9={components:{IconA:Fe(S9,[["render",T9]])},props:{editor:Object},data(){return{color:"#000000",colors:["#000000","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{setColor(t){this.editor&&(this.editor.chain().focus().setColor(t).run(),this.$refs.popover.togglePopover(),this.color=t)}}},M9={class:"relative flex"},D9={class:"flex w-[160px] flex-wrap gap-[4px]"},I9=["onClick"];function P9(t,e,n,r,i,s){const a=d.resolveComponent("IconA"),o=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(o,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",M9,[d.createVNode(a,{height:"20",width:"20",class:"text-gray-500"}),d.createElementVNode("span",{class:"absolute h-[4px] w-[80%] bottom-[2px] left-[2px]",style:d.normalizeStyle({backgroundColor:i.color})},null,4)])]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("ul",D9,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.colors,p=>(d.openBlock(),d.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:d.normalizeStyle({backgroundColor:p}),onClick:g=>s.setColor(p),key:p},null,12,I9))),128))])])]),_:1},512)}const N9=Fe(A9,[["render",P9]]),R9={},O9={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-dots-vertical"};function B9(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",O9,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),d.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),d.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const wg=Fe(R9,[["render",B9]]),V9={components:{IconMore:wg},props:{editor:Object},methods:{toggleUnderline(){this.$refs.popover.togglePopover(),this.editor&&this.editor.chain().focus().toggleUnderline().run()},toggleStrike(){this.$refs.popover.togglePopover(),this.editor&&this.editor.chain().focus().toggleStrike().run()}}};function z9(t,e,n,r,i,s){const a=d.resolveComponent("IconMore"),o=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(o,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",{class:d.normalizeClass(["p-1.5 text-gray-500 rounded cursor-pointer hover:text-gray-900 hover:bg-gray-200",{"bg-gray-200 text-gray-900":n.editor.isActive("underline")||n.editor.isActive("strike")}])},[d.createVNode(a,{height:"18",width:"18",class:"rotate-90"})],2)]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.toggleUnderline&&s.toggleUnderline(...p)),class:d.normalizeClass(["p-[8px] block rounded-lg w-[140px] mb-[4px] text-start hover:bg-gray-100 !duration-300 underline underline-offset-1",{"bg-gray-100 text-gray-900":n.editor.isActive("underline")}])}," Підкресленний ",2),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...p)=>s.toggleStrike&&s.toggleStrike(...p)),class:d.normalizeClass(["p-[8px] block rounded-lg w-[140px] text-start hover:bg-gray-100 !duration-300 line-through",{"bg-gray-100 text-gray-900":n.editor.isActive("strike")}])}," Перекресленний ",2)])]),_:1},512)}const L9={bold:v9,italic:E9,text_more:Fe(V9,[["render",z9]]),color:N9,bullet_list:h9,ordered_list:m9,blockquote:c9,codeblock:b9},F9={components:{EditorContent:QH},props:{controls:{type:Array,default:()=>["bold","italic","color","blockquote","bullet_list","ordered_list","codeblock","text_more"]},options:{type:Array,default:()=>[]},modelValue:{type:String,default:()=>""}},data(){return{editor:null}},computed:{controlsList(){return Object.entries(L9).filter(([t])=>this.controls.includes(t)).map(([t,e])=>e)}},watch:{modelValue(t){this.editor&&this.editor.getHTML()!==t&&this.editor.commands.setContent(t)},editor(t){t&&this.editor.on("update",({editor:e})=>{const n=e.getHTML();n!==this.modelValue&&this.$emit("update:modelValue",n)})}},mounted(){this.editor&&this.editor.destroy(),this.initEditor()},beforeDestroy(){this.editor&&this.editor.destroy()},methods:{initEditor(){this.editor=new JH({content:this.modelValue,extensions:[KU,dA,QU,e9,o9,xA,s9.configure({HTMLAttributes:{class:"mention"},suggestion:{items:({query:t})=>{var n;const e=(n=this.options)==null?void 0:n.filter(r=>{var i,s;return(s=(i=r==null?void 0:r.email)==null?void 0:i.toLowerCase())==null?void 0:s.includes(t==null?void 0:t.toLowerCase())}).slice(0,5);return e.length?e:[{id:null,text:"Данні відсутні",email:null}]},render:()=>{let t,e;return{onStart:n=>{var s;t=document.createElement("div"),t.className="mention-popup",(s=n.items)==null||s.forEach(a=>{const o=document.createElement("div");o.className="mention-option",a.id===null?(o.textContent=a.text,o.style.pointerEvents="none",o.style.color="#999"):(o.textContent=a.text,o.addEventListener("click",()=>{n.command({id:a.id,label:a.email})})),t.appendChild(o)}),document.body.appendChild(t);const{from:r}=n.range,i=n.editor.view.coordsAtPos(r);t.style.position="absolute",t.style.left=`${i.left}px`,t.style.top=`${i.top-t.offsetHeight}px`,e=t},onUpdate:n=>{var s;for(;t.firstChild;)t.removeChild(t.firstChild);(s=n.items)==null||s.forEach(a=>{const o=document.createElement("div");o.className="mention-option",a.id===null?(o.textContent=a.text,o.style.pointerEvents="none",o.style.color="#999"):(o.textContent=a.text,o.addEventListener("click",()=>{n.command({id:a.id,label:a.email})})),t.appendChild(o)});const{from:r}=n.range,i=n.editor.view.coordsAtPos(r);t.style.left=`${i.left}px`,t.style.top=`${i.top-t.offsetHeight}px`},onExit:()=>{e&&e.remove()}}}}})]})},focusEditor(){this.editor&&!this.editor.isFocused&&this.editor.commands.focus()}}},$9={class:"w-full border border-gray-200 rounded-lg editor-container bg-gray-50 dark:bg-gray-700 dark:border-gray-600"},j9={key:0,class:"flex flex-wrap items-center w-full gap-2 px-3 py-2 border-b editor-toolbar dark:border-gray-600"};function H9(t,e,n,r,i,s){const a=d.resolveComponent("EditorContent");return d.openBlock(),d.createElementBlock("div",$9,[i.editor?(d.openBlock(),d.createElementBlock("div",j9,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.controlsList,(o,p)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(o),{key:p,editor:i.editor},null,8,["editor"]))),128))])):d.createCommentVNode("",!0),d.createElementVNode("div",{onClick:e[0]||(e[0]=(...o)=>s.focusEditor&&s.focusEditor(...o)),class:"relative w-full px-4 py-2 bg-white rounded-b-lg editor-content dark:bg-gray-800"},[d.createVNode(a,{editor:i.editor,class:"relative w-full"},null,8,["editor"])])])}const vA=Fe(F9,[["render",H9]]),U9={components:{VsTextEditor:vA},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""},options:Array},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,hovered:!1,windowWidth:null,textareaValue:""}},computed:{isElementVisible(){return this.windowWidth>=600?this.hovered:!0},isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const t=new Date(this.comment.cdate);return new Intl.DateTimeFormat("uk-UA",{day:"2-digit",month:"long",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(t)}catch{return""}}},mounted(){window.addEventListener("resize",this.updateWindowWidth)},beforeDestroy(){window.removeEventListener("resize",this.updateWindowWidth)},watch:{isOpen(t){t&&(this.textareaValue=this.comment.body)}},methods:{updateWindowWidth(){this.windowWidth=typeof window>"u"?null:window==null?void 0:window.innerWidth},confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await je.post(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isOpen=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},openEditModal(){document.body.click(),this.isOpen=!0},async deleteComment(){try{await je.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},W9={class:"relativen group-last:after:hidden after:absolute after:top-7 after:bottom-1 after:start-3 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 dark:after:bg-neutral-700"},q9={class:"relative flex items-center justify-center overflow-hidden rounded-full size-6"},G9=["src"],Y9={key:1,class:"flex shrink-0 justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-400"},Z9={class:"w-full"},X9={class:"flex w-full justify-between -mt-[5px]"},K9={class:"flex items-center"},J9={class:"text-sm font-semibold text-gray-800 dark:text-neutral-200"},Q9={class:"text-xs text-gray-400 ms-1 dark:text-neutral-500"},eW={class:"min-h-[32px]"},tW={class:"p-0.5 inline-flex items-center gap-x-0.5 bg-white border border-gray-200 shadow-sm rounded-lg dark:bg-neutral-800 dark:border-neutral-700"},nW=["innerHTML"],rW={class:"flex flex-col gap-[8px] p-[10px] text-sm font-medium text-gray-500"},iW={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function sW(t,e,n,r,i,s){var p,g;const a=d.resolveComponent("VsTextEditor"),o=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",{class:"group relative w-full flex gap-x-3.5",onMouseenter:e[2]||(e[2]=y=>i.hovered=!0),onMouseleave:e[3]||(e[3]=y=>i.hovered=!1)},[d.createElementVNode("div",W9,[d.createElementVNode("div",q9,[n.comment.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"object-cover shrink-0",src:n.comment.avatar,alt:"Avatar"},null,8,G9)):(d.openBlock(),d.createElementBlock("span",Y9,d.toDisplayString((p=n.comment.username)==null?void 0:p.charAt(0)),1))])]),d.createElementVNode("div",Z9,[d.createElementVNode("span",X9,[d.createElementVNode("div",K9,[d.createElementVNode("span",J9,d.toDisplayString((g=n.comment)==null?void 0:g.username),1),d.createElementVNode("span",Q9,d.toDisplayString(s.createDate),1)]),d.createElementVNode("div",eW,[d.withDirectives(d.createElementVNode("div",tW,[d.createElementVNode("div",{class:"inline-block",onClick:e[0]||(e[0]=y=>s.openEditModal())},e[8]||(e[8]=[d.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z"></path></svg><span class="sr-only">Edit message</span></button>',1),d.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Edit message ",-1)])),d.createElementVNode("div",{class:"inline-block",onClick:e[1]||(e[1]=y=>s.confirnDeleteComment())},e[9]||(e[9]=[d.createStaticVNode('<button type="button" class="hs-tooltip-toggle size-[26px] inline-flex justify-center items-center gap-x-1 text-xs font-medium rounded-md border border-transparent bg-white text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:bg-neutral-800 dark:border-transparent dark:text-neutral-500 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"><svg class="shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg><span class="sr-only">Delete message</span></button>',1),d.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg whitespace-nowrap dark:bg-neutral-700",role:"tooltip"}," Delete message ",-1)]))],512),[[d.vShow,s.isElementVisible]])])]),d.createElementVNode("p",{class:"mt-1 comment-body text-sm text-gray-800 dark:text-neutral-200",innerHTML:n.comment.body},null,8,nW)])],32),d.createVNode(o,{visible:i.isOpen,"onUpdate:visible":e[7]||(e[7]=y=>i.isOpen=y),title:"Редагувати",size:"small"},{footer:d.withCtx(()=>[d.createElementVNode("div",iW,[d.createElementVNode("button",{onClick:e[5]||(e[5]=y=>i.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:e[6]||(e[6]=(...y)=>s.updateComment&&s.updateComment(...y)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createElementVNode("div",rW,[d.createVNode(a,{modelValue:i.textareaValue,"onUpdate:modelValue":e[4]||(e[4]=y=>i.textareaValue=y),options:n.options},null,8,["modelValue","options"])])]),_:1},8,["visible"])],64)}const oW={components:{VsWidgetCommentsItem:Fe(U9,[["render",sW]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null},options:Array},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:t}=await je.get(`/api/widget/comment/${this.id}`);this.comments=t.rows,this.user=t.user}catch(t){this.isLoadFailed=!0,console.error(t)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(t){const e={...t};return t.cancel||(e.cancel=()=>{this.isModalVisible=!1}),t.updateListOnConfirm&&(e.confirm=async()=>{await t.confirm(),this.isModalVisible=!1}),e},handleOpenModal(t){this.modal=this.prepareModal(t),this.isModalVisible=!0}}},aW={class:"flex flex-col"},lW={key:0,class:"max-h-[300px] p-[10px] overflow-y-auto overflow-x-hidden [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},cW={class:"p-4"},uW={class:"mt-1 text-gray-500 dark:text-neutral-500"},dW={class:"mt-4 flex justify-end gap-x-3"};function hW(t,e,n,r,i,s){var y;const a=d.resolveComponent("VsErrorOnLoading"),o=d.resolveComponent("VsWidgetCommentsItem"),p=d.resolveComponent("VsLoader"),g=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock("div",aW,[i.isLoaded?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[i.isLoadFailed?(d.openBlock(),d.createBlock(a,{key:0})):(d.openBlock(),d.createElementBlock(d.Fragment,{key:1},[(y=i.comments)!=null&&y.length?(d.openBlock(),d.createElementBlock("div",lW,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.comments,(v,E)=>(d.openBlock(),d.createElementBlock("div",{class:"pb-8 last:pb-0",key:E},[d.createVNode(o,{comment:v,user:i.user,options:n.options,index:E,id:n.id,onListUpdate:s.getComments,onOpenModal:e[0]||(e[0]=T=>s.handleOpenModal(T))},null,8,["comment","user","options","index","id","onListUpdate"])]))),128))])):d.createCommentVNode("",!0)],64))],64)):(d.openBlock(),d.createBlock(p,{key:1,class:"justify-center",text:"Please wait..."})),d.createVNode(g,{title:i.modal.title,size:"small",visible:i.isModalVisible,"onUpdate:visible":e[3]||(e[3]=v=>i.isModalVisible=v)},{default:d.withCtx(()=>[d.createElementVNode("div",cW,[d.createElementVNode("p",uW,d.toDisplayString(i.modal.message),1),d.createElementVNode("div",dW,[d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:e[1]||(e[1]=(...v)=>i.modal.cancel&&i.modal.cancel(...v))},d.toDisplayString(i.modal.cancelButtonText),1),d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:e[2]||(e[2]=(...v)=>i.modal.confirm&&i.modal.confirm(...v))},d.toDisplayString(i.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const fW=Fe(oW,[["render",hW]]),pW={components:{VsTextEditor:vA},props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0},options:Array},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await je.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.closeEditor(),this.$emit("list-update")}catch(t){console.error(t)}},closeEditor(){this.isEditorOpen=!1,this.commentContent=""},handleKeydown(t){t.ctrlKey&&t.key==="Enter"&&this.addNewComment()}}},mW={class:"flex flex-col items-start w-full widget-comment-form"},gW={class:"w-full mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"},yW={key:0,class:"flex gap-[10px]"};function bW(t,e,n,r,i,s){const a=d.resolveComponent("VsTextEditor");return d.openBlock(),d.createElementBlock("div",mW,[d.createElementVNode("div",gW,[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[i.isEditorOpen?(d.openBlock(),d.createBlock(a,{key:0,modelValue:i.commentContent,"onUpdate:modelValue":e[0]||(e[0]=o=>i.commentContent=o),options:n.options,onKeydown:s.handleKeydown},null,8,["modelValue","options","onKeydown"])):d.createCommentVNode("",!0)]),_:1}),i.isEditorOpen?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",{key:0,onClick:e[1]||(e[1]=o=>i.isEditorOpen=!0),class:"border flex items-center pl-[20px] border-gray-200 rounded-lg h-[40px] hover:bg-gray-50 text-gray-500 duration-300 hover:text-gray-900"}," Додати коментар... "))]),i.isEditorOpen?(d.openBlock(),d.createElementBlock("div",yW,[d.createElementVNode("button",{ref:"buttonAdd",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...o)=>s.addNewComment&&s.addNewComment(...o))}," Відправити коментар ",512),d.createElementVNode("button",{onClick:e[3]||(e[3]=(...o)=>s.closeEditor&&s.closeEditor(...o)),class:"inline-flex items-center px-3 py-2 text-sm font-medium text-black duration-300 border rounded-lg gap-x-2 hover:bg-gray-100"}," Скасувати ")])):d.createCommentVNode("",!0)])}const _W={components:{VsWidgetCommentsList:fW,VsWidgetCommentsAddForm:Fe(pW,[["render",bW]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0",options:[]}},mounted(){this.comments=this.$refs.commentListRef.comments,this.getUsersList()},watch:{comments(t){this.$emit("count-change",t.length)}},methods:{async getUsersList(){try{const{data:t}=await je.get("/api/suggest/core.user_mentioned");this.options=t}catch(t){console.log(t)}},listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},xW={class:"w-full bg-white-200"};function vW(t,e,n,r,i,s){const a=d.resolveComponent("VsWidgetCommentsAddForm"),o=d.resolveComponent("VsWidgetCommentsList");return d.openBlock(),d.createElementBlock("div",xW,[e[2]||(e[2]=d.createElementVNode("div",{class:"flex items-center justify-between w-full mb-4 gap-x-2"},null,-1)),d.createVNode(a,{options:i.options,id:n.id,onListUpdate:e[0]||(e[0]=p=>s.listUpdate())},null,8,["options","id"]),d.createVNode(o,{options:i.options,id:n.id,onUpdateCommentCount:e[1]||(e[1]=p=>s.updateCommentCount()),"prefilled-data":n.prefilledData,ref:"commentListRef"},null,8,["options","id","prefilled-data"])])}const wA=Fe(_W,[["render",vW]]),kA=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"numeric"}),wW=t=>new Date(t).toLocaleDateString("uk-UK",{day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"}),kW={},EW={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-user"};function SW(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",EW,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"},null,-1),d.createElementVNode("path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"},null,-1)]))}const EA=Fe(kW,[["render",SW]]),CW=t=>{const e=/(\b\S)?/g,n=t.match(e);return n?n.join("").toUpperCase():""},TW=d.defineComponent({props:{username:{type:String,default:()=>""}},components:{IconUserOutline:EA},computed:{inItials(){return CW(this.username||"u")}}}),AW={class:"flex shrink-0 bg-white justify-center items-center size-[38px] border border-gray-200 text-sm font-semibold uppercase text-gray-800 rounded-full"},MW={key:0};function DW(t,e,n,r,i,s){const a=d.resolveComponent("IconUserOutline");return d.openBlock(),d.createElementBlock("div",AW,[t.inItials?(d.openBlock(),d.createElementBlock("span",MW,d.toDisplayString(t.inItials),1)):(d.openBlock(),d.createBlock(a,{key:1,class:"w-[16px] h-[16px]"}))])}const IW=Fe(TW,[["render",DW]]),dx={load(){try{const t=Array.from(arguments);window.headLoadedFiles||(window.headLoadedFiles=[]);const e=typeof arguments[arguments.length-1]=="function"?arguments[arguments.length-1]:null,n=t.filter(r=>typeof r!="function").reduce((r,i)=>r.concat(i),[]).filter(r=>r&&!window.headLoadedFiles[r.url||r.split("?")[0]]);Promise.all(n.map(r=>this.loadFile1(r))).then(()=>{e&&e()})}catch(t){console.log(t)}},promise(t){return new Promise((e,n)=>{dx.load(t,()=>{e()})})},loadFile1(t){let e=!1;typeof t=="object"&&(e=t.type,t=t.url);const n=t.split("?")[0];return new Promise((r,i)=>{function s(o){delete window.headLoadedFiles[`_${n}`],window.headLoadedFiles[n]=o.type,r(o.type)}let a;window.headLoadedFiles[`_${n}`]?a=window.headLoadedFiles[`_${n}`]:(n.includes(".css")?(a=document.createElement("link"),a.href=t,a.type="text/css",a.rel="stylesheet"):(a=document.createElement("script"),a.type="text/javascript",a.src=t,e&&(a.type=e)),window.headLoadedFiles[`_${n}`]=a,document.head.appendChild(a)),a.addEventListener("load",s),a.addEventListener("error",s)})}},PW={props:{point:{type:String,default:()=>""}},data(){return{zoom:18}},computed:{parsedPoint(){return JSON.parse(this.point)},tooltipText(){return this.parsedPoint.coordinates.join(", ")},coordinates(){return[...this.parsedPoint.coordinates].reverse()}},async mounted(){typeof window>"u"||(window!=null&&window.L||(await dx.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"),await dx.promise("https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js")),this.initMap())},methods:{initMap(){const t=window.L.map("map",{center:this.coordinates,zoom:this.zoom});window.L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(t),window.L.circle(this.coordinates,{color:"red",fillColor:"red",fillOpacity:.2,radius:10}).addTo(t).bindTooltip(this.tooltipText)}}},NW={id:"map",style:{height:"9rem",width:"24rem"}};function RW(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",NW)}const OW=Fe(PW,[["render",RW]]),BW=d.defineComponent({components:{VsWidgetHistoryItemAvatar:IW,VsWidgetHistoryItemMap:OW,IconFile:S2},props:{item:{type:Object,default:()=>{}}},methods:{getTitle(t){return t.title||t.attr},getOldValue(t){return t.old||"Не вказано"},getNewValue(t){return t.new||"Не вказано"},getDate(t){return wW(t.cdate)}}}),VW={class:"relative"},zW={class:"w-full flex gap-x-5"},LW={class:"grow"},FW={class:"text-sm font-semibold text-gray-800 dark:text-neutral-300"},$W={key:0},jW={key:1},HW={key:0,class:"text-sm text-gray-500 dark:text-neutral-500"},UW={key:1,class:"text-sm text-gray-500 dark:text-neutral-500"},WW={key:2,class:"text-sm text-gray-500 dark:text-neutral-500"},qW={key:3,class:"mt-2"},GW={class:"grid grid-cols-2 gap-2"},YW={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},ZW={class:"flex gap-x-2"},XW={class:"grow truncate"},KW={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},JW={class:"block text-xs text-gray-400 dark:text-neutral-500"},QW={key:4,class:"text-sm text-gray-500 dark:text-neutral-500"},eq={key:5,class:"text-sm text-gray-500 dark:text-neutral-500"},tq={key:6,class:"mt-2"},nq={class:"grid grid-cols-2 gap-2"},rq={class:"bg-white border border-gray-200 rounded-lg p-2 dark:bg-neutral-800 dark:border-neutral-700"},iq={class:"flex gap-x-2"},sq={class:"grow truncate"},oq={class:"block truncate text-xs text-gray-800 dark:text-neutral-300"},aq={class:"block text-xs text-gray-400 dark:text-neutral-500"},lq={class:"mt-2 text-[11px] uppercase text-gray-400 dark:text-neutral-500"};function cq(t,e,n,r,i,s){var p,g,y,v;const a=d.resolveComponent("VsWidgetHistoryItemAvatar"),o=d.resolveComponent("IconFile");return d.openBlock(),d.createElementBlock("div",VW,[d.createElementVNode("div",zW,[d.createVNode(a,{username:t.item.username},null,8,["username"]),d.createElementVNode("div",LW,[d.createElementVNode("h4",FW,d.toDisplayString(t.item.username||"User User"),1),t.item.entity_type==="crm.communications"?(d.openBlock(),d.createElementBlock("span",$W,"Коментар")):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"?(d.openBlock(),d.createElementBlock("span",jW,"Файл")):d.createCommentVNode("",!0),t.item.entity_type!=="crm.files"?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:2},d.renderList(t.item.changes,E=>(d.openBlock(),d.createElementBlock("li",null,[!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(E.entity_key)&&E.value_old&&E.value_new?(d.openBlock(),d.createElementBlock("p",HW," Дані "+d.toDisplayString(E.entity_key)+" змінились з "+d.toDisplayString(E.value_old)+" на "+d.toDisplayString(E.value_new),1)):d.createCommentVNode("",!0),!["entity_id","uid","cdate","editor_id","entity_type","editor_date"].includes(E.entity_key)&&!E.value_old&&E.value_new?(d.openBlock(),d.createElementBlock("p",UW," Дані "+d.toDisplayString(E.entity_key)+" внесено до БД: "+d.toDisplayString(E.value_new),1)):d.createCommentVNode("",!0),E.value_old&&!E.value_new?(d.openBlock(),d.createElementBlock("p",WW," Дані "+d.toDisplayString(E.entity_key)+" очищено ",1)):d.createCommentVNode("",!0)]))),256)):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="INSERT"&&((p=t.item.changes)!=null&&p[0])?(d.openBlock(),d.createElementBlock("div",qW,[d.createElementVNode("div",GW,[d.createElementVNode("div",YW,[d.createElementVNode("div",ZW,[d.createVNode(o,{class:"w-[24px] h-[24px] text-gray-800"}),d.createElementVNode("div",XW,[d.createElementVNode("p",KW,d.toDisplayString(t.item.changes[0]["Назва файлу"]||"example file_name"),1),d.createElementVNode("small",JW,d.toDisplayString(t.item.changes[0]["Розмір файлу"]||"example file_weight kb")+" KB ",1)])])])])])):d.createCommentVNode("",!0),t.item.entity_type==="crm.files"&&t.item.change_type==="DELETE"?(d.openBlock(),d.createElementBlock("p",QW," Видалено файл "+d.toDisplayString((y=(g=t.item.changes)==null?void 0:g[0])==null?void 0:y["Назва файлу"]),1)):d.createCommentVNode("",!0),t.item.change_type!=="DELETE"&&!((v=t.item.changes)!=null&&v.length)?(d.openBlock(),d.createElementBlock("p",eq," Зміни відсутні ")):d.createCommentVNode("",!0),t.item.change_type==="addFile"?(d.openBlock(),d.createElementBlock("div",tq,[d.createElementVNode("div",nq,[d.createElementVNode("div",rq,[d.createElementVNode("div",iq,[d.createVNode(o,{class:"w-[24px] h-[24px] text-gray-800"}),d.createElementVNode("div",sq,[d.createElementVNode("p",oq,d.toDisplayString(t.item.file_name||"example file_name"),1),d.createElementVNode("small",aq,d.toDisplayString(t.item.file_weight||"example file_weight kb"),1)])])])])])):d.createCommentVNode("",!0),d.createElementVNode("p",lq,d.toDisplayString(t.getDate(t.item)),1)])])])}const uq=Fe(BW,[["render",cq]]),dq={},hq={class:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function fq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",hq,e[0]||(e[0]=[d.createElementVNode("path",{d:"m7 15 5 5 5-5"},null,-1),d.createElementVNode("path",{d:"m7 9 5-5 5 5"},null,-1)]))}const pq=Fe(dq,[["render",fq]]),mq=d.defineComponent({components:{VsWidgetHistoryItem:uq,VsEmptyWidget:A2,IconUpDown:pq},props:{id:{type:String,default:""},prefilledData:{type:Object,default:null}},data:()=>({history:{},showAll:!1,limitVisible:5}),computed:{createdDate(){var t,e,n;return(t=this.history)!=null&&t.data?kA((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.cdate):""},lastEditDate(){var t,e,n;return(t=this.history)!=null&&t.data?kA((n=(e=this.history)==null?void 0:e.data)==null?void 0:n.edate):""},authorName(){var t;return(t=this.history)!=null&&t.data?this.history.data.author:""},displayedRows(){var t,e,n;return this.showAll?(t=this.history)==null?void 0:t.rows:(n=(e=this.history)==null?void 0:e.rows)==null?void 0:n.slice(0,this.limitVisible)}},methods:{async getHistoryData(){if(this.prefilledData){this.history=this.prefilledData;return}try{const{data:t}=await je.get(`/api/widget/history/${this.id}`);this.history=t}catch(t){console.error(t)}},showMore(){this.showAll=!0}},async mounted(){await this.getHistoryData()},watch:{"history.rows":function(t){this.$emit("count-change",t.length)}}}),gq={class:"bg-white"},yq={key:0,class:""},bq={key:0,class:"relative last:pb-0 pb-8 last:after:hidden after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700"},_q={class:"w-[38px]"},xq={class:"flex shrink-0 justify-center items-center w-6 h-7 border border-gray-200 text-sm font-semibold text-gray-800 rounded-md mx-auto dark:border-neutral-700 dark:text-neutral-400"},vq={class:"grow"},wq={class:"text-sm font-semibold text-gray-800 group-focus:text-blue-600 dark:text-neutral-300 dark:group-focus:text-blue-500"},kq={key:1,class:"w-full h-[330px] flex items-center justify-center"};function Eq(t,e,n,r,i,s){var p,g,y,v,E,T;const a=d.resolveComponent("VsWidgetHistoryItem"),o=d.resolveComponent("IconUpDown");return d.openBlock(),d.createElementBlock("div",gq,[e[1]||(e[1]=d.createElementVNode("div",{class:"flex items-center justify-between mb-4 gap-x-2"},null,-1)),(g=(p=t.history)==null?void 0:p.rows)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",yq,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.displayedRows,(D,N)=>{var B,V;return d.openBlock(),d.createElementBlock("li",{class:"list-none mr-[10px]",key:D.uid},[d.createVNode(a,{item:D,class:d.normalizeClass(N===((V=(B=t.history)==null?void 0:B.rows)==null?void 0:V.length)-1?"pb-0 after:hidden":"pb-8 after:absolute after:top-[38px] after:bottom-0 after:start-[19px] after:w-px after:bg-gray-200 dark:after:bg-neutral-700")},null,8,["item","class"])])}),128)),((v=(y=t.history)==null?void 0:y.rows)==null?void 0:v.length)>4&&!t.showAll?(d.openBlock(),d.createElementBlock("div",bq,[d.createElementVNode("button",{type:"button",onClick:e[0]||(e[0]=(...D)=>t.showMore&&t.showMore(...D)),class:"hs-collapse-toggle hs-collapse-open:hidden group w-full text-start flex items-center gap-x-5 focus:outline-none",id:"hs-pro-dnao","aria-expanded":"false","aria-controls":"hs-pro-dnao-button","data-hs-collapse":"#hs-pro-dnao-button"},[d.createElementVNode("span",_q,[d.createElementVNode("span",xq,[d.createVNode(o)])]),d.createElementVNode("span",vq,[d.createElementVNode("span",wq," Показати ще "+d.toDisplayString(((T=(E=t.history)==null?void 0:E.rows)==null?void 0:T.length)-t.limitVisible),1)])])])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createElementBlock("div",kq," Історія відсутні "))])}const Sq=Fe(mq,[["render",Eq]]),Cq={props:{id:{type:String,default:""},data:{type:Object,default:null}},data(){return{mode:"base"}},methods:{getPdfUrl(){const t=`/api/print-template/crm.accounts.doc/${this.id}`;return this.mode==="demo"?t+"?demo=1&format=pdf":this.mode==="preview"?t+"?preview=1&format=pdf":t},setMode(t){this.mode=t},downloadPdf(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}`,t.download=`document_${this.id}.pdf`,t.click()},downloadWord(){const t=document.createElement("a");t.href=`/api/print-template/crm.accounts.doc/${this.id}?format=word`,t.download=`document_${this.id}.docx`,t.click()}}},Tq={class:"flex flex-col h-[calc(100vh-300px)] text-sm"},Aq={class:"flex justify-between"},Mq={class:"flex gap-4 mb-4"},Dq={class:"flex mb-4 border rounded overflow-hidden"},Iq=["src"];function Pq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",Tq,[d.createElementVNode("div",Aq,[d.createElementVNode("div",Mq,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...a)=>s.downloadPdf&&s.downloadPdf(...a)),class:"px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"}," Завантажити PDF "),d.createElementVNode("button",{onClick:e[1]||(e[1]=(...a)=>s.downloadWord&&s.downloadWord(...a)),class:"px-4 py-2 bg-green-500 text-white rounded hover:bg-green-600"}," Завантажити Word ")]),d.createElementVNode("div",Dq,[d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="base","bg-white":i.mode!=="base"},"px-4 py-2 border-r text-black"]),onClick:e[2]||(e[2]=a=>s.setMode("base"))}," Базовий ",2),d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="demo","bg-white":i.mode!=="demo"},"px-4 py-2 border-r text-black"]),onClick:e[3]||(e[3]=a=>s.setMode("demo"))}," Демо ",2),d.createElementVNode("button",{class:d.normalizeClass([{"bg-gray-200":i.mode==="preview","bg-white":i.mode!=="preview"},"px-4 py-2 text-black"]),onClick:e[4]||(e[4]=a=>s.setMode("preview"))}," Перегляд шаблону ",2)])]),d.createElementVNode("iframe",{src:s.getPdfUrl(),type:"application/pdf",class:"flex-grow w-full border-0 rounded-lg shadow-lg"},null,8,Iq)])}const Nq=Fe(Cq,[["render",Pq]]),Rq={},Oq={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Bq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Oq,e[0]||(e[0]=[d.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const hx=Fe(Rq,[["render",Bq]]),Vq={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},zq={style:{display:"none"}},Lq=["height","width","fill"];function Fq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock(d.Fragment,null,[(d.openBlock(),d.createElementBlock("svg",zq,e[0]||(e[0]=[d.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[d.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(d.openBlock(),d.createElementBlock("svg",{height:n.height,width:n.width,fill:n.color},e[1]||(e[1]=[d.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,Lq))],64)}const fx=Fe(Vq,[["render",Fq]]),$q={class:"hs-dropdown [--placement:bottom-right] inline-flex"},jq={class:"inline-flex items-center justify-center bg-white border rounded-lg shadow-sm size-7 gap-x-2 border-stone-200 text-stone-800 hover:bg-stone-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-50"},Hq={class:"flex flex-col items-start"},Uq={key:0,class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto"},Wq={class:"p-4"},qq={class:"flex justify-end mt-4 gap-x-3"},Gq={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Yq={__name:"vs-widget-table-controls",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""},form:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""}},emits:["update-table"],setup(t,{emit:e}){const n=t,r=e,i=d.ref(!1),s=d.ref(!1),a=d.ref({}),o=d.ref(null),p=()=>{i.value=!0,document.body.click()},g=async()=>{var E;try{const T=await je.get(`/api/table/${n.table}/${n.id}`);a.value=T==null?void 0:T.data;const{data:D}=await je.get(`/api/form/${n.form}`);o.value=((E=D==null?void 0:D.form)==null?void 0:E.schema)||(D==null?void 0:D.form),document.body.click(),s.value=!0}catch{}},y=async()=>{try{await je.delete(`${n.apiDelete||"/api/table"}/${n.table}/${n.id}`),await r("update-table"),i.value=!1}catch(E){console.log(E)}},v=async()=>{try{await je.put(`/api/table/${n.table}/${n.id}`,a.value),s.value=!1,await r("update-table")}catch{}};return d.onMounted(()=>{n.isForm&&g()}),(E,T)=>{const D=d.resolveComponent("VsPopover"),N=d.resolveComponent("VsConfirm"),B=d.resolveComponent("VsForm"),V=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",$q,[d.createVNode(D,{trigger:"click",placement:"bottom-left"},{reference:d.withCtx(()=>[d.createElementVNode("button",jq,[d.createVNode(wg,{height:"16",width:"16"})])]),default:d.withCtx(()=>[d.createElementVNode("div",Hq,[d.createElementVNode("button",{onClick:g,class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[d.createVNode(fx,{color:"#000"}),T[5]||(T[5]=d.createTextVNode(" Редагувати "))]),E.isForm?(d.openBlock(),d.createElementBlock("div",Uq)):d.createCommentVNode("",!0),d.createElementVNode("button",{onClick:d.withModifiers(p,["stop"]),class:"w-full flex items-center gap-x-3 py-1.5 px-2 rounded-lg text-[13px] text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"},[d.createVNode(hx),T[6]||(T[6]=d.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]),_:1})]),d.createVNode(N,{visible:i.value,"onUpdate:visible":T[1]||(T[1]=U=>i.value=U),size:"small",title:"Ви впевнені?"},{default:d.withCtx(()=>[d.createElementVNode("div",Wq,[T[7]||(T[7]=d.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),d.createElementVNode("div",qq,[d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:T[0]||(T[0]=U=>i.value=!1)}," Скасувати "),d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:y}," Так, я впевнена/ий ")])])]),_:1},8,["visible"]),d.createVNode(V,{visible:s.value,"onUpdate:visible":T[4]||(T[4]=U=>s.value=U),title:"Редагувати об'єкт"},{footer:d.withCtx(()=>[d.createElementVNode("div",Gq,[d.createElementVNode("button",{onClick:T[3]||(T[3]=U=>s.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:v,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(B,{scheme:o.value,modelValue:a.value,"onUpdate:modelValue":T[2]||(T[2]=U=>a.value=U),ref:"form"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},Zq={},Xq={class:"hidden sm:block shrink-0 size-3",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 16"};function Kq(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Xq,e[0]||(e[0]=[d.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 1C8.55228 1 9 1.44772 9 2V7L14 7C14.5523 7 15 7.44771 15 8C15 8.55228 14.5523 9 14 9L9 9V14C9 14.5523 8.55228 15 8 15C7.44772 15 7 14.5523 7 14V9.00001L2 9.00001C1.44772 9.00001 1 8.5523 1 8.00001C0.999999 7.44773 1.44771 7.00001 2 7.00001L7 7.00001V2C7 1.44772 7.44772 1 8 1Z"},null,-1)]))}const Zu=Fe(Zq,[["render",Kq]]),Jq={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Qq={__name:"vs-widget-table-add-form",props:{token:{type:String,default:()=>""},form:{type:String,default:()=>""}},setup(t){const e=t,n=d.ref(!1),r=d.ref(null),i=d.ref({}),s=d.ref(),a=async()=>{var p;try{const{data:g}=await je.get(`/api/form/${e.form}`);r.value=((p=g==null?void 0:g.form)==null?void 0:p.schema)||(g==null?void 0:g.form),n.value=!0}catch{}},o=async()=>{var p;try{await((p=s.value)==null?void 0:p.doValidation()),await je.post(`/api/table/${e.token}`,i.value)}catch(g){console.log(g)}};return(p,g)=>{const y=d.resolveComponent("VsForm"),v=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:a,class:"h-[34px] w-[34px] shadow bg-blue-500 rounded-lg flex items-center justify-center text-white duration-300 hover:bg-blue-700"},[d.createVNode(Zu)]),d.createVNode(v,{visible:n.value,"onUpdate:visible":g[2]||(g[2]=E=>n.value=E),title:"Створити об'єкт"},{footer:d.withCtx(()=>[d.createElementVNode("div",Jq,[d.createElementVNode("button",{onClick:g[1]||(g[1]=E=>n.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:o,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(y,{scheme:r.value,modelValue:i.value,"onUpdate:modelValue":g[0]||(g[0]=E=>i.value=E),ref_key:"form",ref:s},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}}},eG={props:{row:Object,column:Object,table:String}};function tG(t,e,n,r,i,s){var a,o,p,g,y,v,E,T;return d.openBlock(),d.createBlock(d.resolveDynamicComponent(((a=n.column)==null?void 0:a.format)==="custom"?(o=n.column)==null?void 0:o.component:`table-format-${((g=(p=n.column)==null?void 0:p.format)==null?void 0:g.toLowerCase())||"text"}`),{onUpdateTable:e[0]||(e[0]=D=>t.$emit("update-table")),name:(y=n.column)==null?void 0:y.name,data:n.row,value:(E=n.row)==null?void 0:E[(v=n.column)==null?void 0:v.name],table:n.table,column:n.column,edit:(T=n.column)==null?void 0:T.edit},null,40,["name","data","value","table","column","edit"])}const sf=Fe(eG,[["render",tG]]),nG={},rG={class:"h21yx vs0hq",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function iG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",rG,e[0]||(e[0]=[d.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const SA=Fe(nG,[["render",iG]]),sG={emits:["filterChange"],props:{scheme:{type:Object},onFilters:{type:Number},table:{type:String},filter:{type:Array},data:{type:Object}},components:{IconFilter:SA},mounted(){setTimeout(()=>{var t,e;if(typeof this.filter=="string"){if(!filter)return;const[n,r]=filter==null?void 0:filter.split("=");this.filterValue[n]=(t=this.data)==null?void 0:t[r]}else typeof this.filter=="object"&&((e=this.filter)==null||e.forEach(n=>{var s;if(!n)return;const[r,i]=n==null?void 0:n.split("=");this.filterValue[r]=(s=this.data)==null?void 0:s[i]}))})},data(){return{isFilters:!1,filterValue:{}}},methods:{closeFilter({target:t}){this.isFilters&&t.classList.contains("filter-container")&&(this.isFilters=!1)}}},oG={key:0,class:"py-[1px] px-[6px] text-white text-[10px] rounded-full bg-blue-500"},aG={class:"filter-content h-screen bg-white w-[400px] overflow-x-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function lG(t,e,n,r,i,s){const a=d.resolveComponent("IconFilter"),o=d.resolveComponent("VsFilter");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("button",{onClick:e[0]||(e[0]=p=>i.isFilters=!i.isFilters),class:"py-2 px-2.5 max-h-[34px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none"},[d.createVNode(a,{height:"16",width:"16"}),e[5]||(e[5]=d.createTextVNode(" Фільтри ")),n.onFilters?(d.openBlock(),d.createElementBlock("span",oG,d.toDisplayString(n.onFilters),1)):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var p;return[d.withDirectives(d.createElementVNode("div",{onClick:e[4]||(e[4]=(...g)=>s.closeFilter&&s.closeFilter(...g)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.2)]"},[d.createElementVNode("div",aG,[(p=n.scheme)!=null&&p.length?(d.openBlock(),d.createBlock(o,{key:0,ref:"filter",scheme:n.scheme,layout:"default",modelValue:i.filterValue,"onUpdate:modelValue":e[1]||(e[1]=g=>i.filterValue=g),"apply-vue-router":"",history:"",token:n.table,name:"filter",footer:!0,background:!0,onFilterChange:e[2]||(e[2]=g=>t.$emit("filterChange",g)),closeFilterBtn:!0,onFilterClose:e[3]||(e[3]=g=>i.isFilters=!1)},null,8,["scheme","modelValue","token"])):d.createCommentVNode("",!0)])],512),[[d.vShow,i.isFilters]])]}),_:1})],64)}const cG=Fe(sG,[["render",lG]]),uG={class:"h-full"},dG={class:"flex justify-between mb-[4px]"},hG={class:"flex gap-[4px]"},fG={class:"inline-block w-full align-middle"},pG={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},mG={class:"dark:bg-neutral-700 sticky top-[-1px] bg-white"},gG={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px]"},yG={class:"divide-y divide-gray-200 dark:divide-neutral-700"},bG={key:0,class:"w-[70px] bg-white text-center sticky right-[-1px] px-[10px]"},_G={key:0,class:"h-[60px] flex relative items-center justify-center"},xG={__name:"vs-widget-table",props:{data:Object,columns:Array,token:String,table:{type:String,default:()=>""},id:{type:String,default:()=>""},api:{type:String,default:()=>""},apiDelete:{type:String,default:()=>""},data:{type:Object,default:()=>null},filter:{type:Array,default:()=>[]}},setup(t){const e=t,n=d.ref(null),r=d.ref([]),i=d.ref(1),s=d.ref(""),a=d.ref(null),o=d.ref(null),p=d.ref(0),g=async()=>{var E;try{const T=await je.get(`/api/table-filter/${e.table}`);a.value=(E=T==null?void 0:T.data)==null?void 0:E.list;const{data:D}=await je.get((e!=null&&e.api?e.api:"/api/table-data")+(e.token?`/${e.token}`:e.table&&e.id?`/${e.table}`:""),{params:{page:i.value,limit:10,search:s.value,filter:o.value}});n.value=D,r.value=(D==null?void 0:D.columns)||(e==null?void 0:e.columns)}catch(T){console.error("Ошибка при загрузке данных таблицы:",T)}},y=E=>{i.value=E,g()},v=async({url:E,state:T})=>{var D;o.value=E!=="no-url"?E:null,p.value=(D=Object.entries(T))==null?void 0:D.length,i.value=1,await g()};return d.watch(s,g),d.onMounted(()=>{g()}),(E,T)=>{var B,V,U,K,Y,we,ye,Te,Re,Ne,Ye,qe;const D=d.resolveComponent("VsText"),N=d.resolveComponent("VsPagination");return d.openBlock(),d.createElementBlock("div",uG,[d.createElementVNode("div",dG,[d.createVNode(D,{modelValue:s.value,"onUpdate:modelValue":T[0]||(T[0]=he=>s.value=he),class:"h-[40px] w-[300px]",placeholder:"Пошук..."},null,8,["modelValue"]),d.createElementVNode("div",hG,[a.value?(d.openBlock(),d.createBlock(cG,{key:0,scheme:a.value,table:t.table,onFilterChange:v,onFilters:p.value,filter:t.filter,data:(V=(B=t.data)==null?void 0:B.rows)==null?void 0:V[0]},null,8,["scheme","table","onFilters","filter","data"])):d.createCommentVNode("",!0),d.createVNode(Qq,{token:(U=n.value)==null?void 0:U.addToken,form:(K=n.value)==null?void 0:K.form},null,8,["token","form"])])]),d.createElementVNode("div",{class:d.normalizeClass(["overflow-x-auto w-full admin-widget-table [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",[((we=(Y=n.value)==null?void 0:Y.rows)==null?void 0:we.length)>E.limit?"h-[calc(100%-60px)]":"h-[100%]"]])},[d.createElementVNode("div",fG,[d.createElementVNode("table",pG,[(ye=r.value)!=null&&ye.length?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("thead",mG,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(he,it)=>(d.openBlock(),d.createElementBlock("th",{key:it,scope:"col",class:"px-6 py-3 text-start text-xs font-medium text-gray-500 uppercase dark:text-neutral-400 min-w-[200px]"},d.toDisplayString((he==null?void 0:he.title)||(he==null?void 0:he.description)||(he==null?void 0:he.ua)),1))),128)),(Re=(Te=n.value)==null?void 0:Te.actions)!=null&&Re.length?(d.openBlock(),d.createElementBlock("th",gG)):d.createCommentVNode("",!0)])]),d.createElementVNode("tbody",yG,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Ne=n.value)==null?void 0:Ne.rows,(he,it)=>{var Ct,Ft,Bt;return d.openBlock(),d.createElementBlock("tr",{key:it},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(It,Ut)=>(d.openBlock(),d.createElementBlock("td",{key:Ut,class:"px-6 py-4 text-sm text-gray-800 dark:text-neutral-200"},[d.createVNode(sf,{row:he,column:It,table:t.table},null,8,["row","column","table"])]))),128)),(Ft=(Ct=n.value)==null?void 0:Ct.actions)!=null&&Ft.length?(d.openBlock(),d.createElementBlock("td",bG,[d.createVNode(Yq,{id:he==null?void 0:he.id,table:t.table,apiDelete:t.apiDelete,token:he==null?void 0:he.token,form:(Bt=n.value)==null?void 0:Bt.form,onUpdateTable:g},null,8,["id","table","apiDelete","token","form"])])):d.createCommentVNode("",!0)])}),128))])],64)):d.createCommentVNode("",!0)])])],2),((Ye=n.value)==null?void 0:Ye.filtered)>20?(d.openBlock(),d.createElementBlock("div",_G,[d.createVNode(N,{goTo:!1,"default-page":i.value,total:(qe=n.value)==null?void 0:qe.filtered,class:"absolute w-fit",pageSize:10,onPageChange:y,backgroundColor:"#F3F4F6"},null,8,["default-page","total"])])):d.createCommentVNode("",!0)])}}},vG={},wG={class:"shrink-0",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function kG(t,e){return d.openBlock(),d.createElementBlock("svg",wG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M18 6 7 17l-5-5"},null,-1),d.createElementVNode("path",{d:"m22 10-7.5 7.5L13 16"},null,-1)]))}const EG=Fe(vG,[["render",kG]]),SG={},CG={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",class:"icon icon-tabler icons-tabler-filled icon-tabler-user"};function TG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",CG,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M12 2a5 5 0 1 1 -5 5l.005 -.217a5 5 0 0 1 4.995 -4.783z"},null,-1),d.createElementVNode("path",{d:"M14 14a5 5 0 0 1 5 5v1a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-1a5 5 0 0 1 5 -5h4z"},null,-1)]))}const CA=Fe(SG,[["render",TG]]),AG={},MG={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function DG(t,e){return d.openBlock(),d.createElementBlock("svg",MG,e[0]||(e[0]=[d.createElementVNode("polyline",{points:"9 11 12 14 22 4"},null,-1),d.createElementVNode("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"},null,-1)]))}const IG=Fe(AG,[["render",DG]]),PG={class:"relative shrink-0"},NG=["src"],RG={key:1,class:"h-[38px] w-[38px] bg-gray-200 rounded-full flex items-center justify-center"},OG={key:2,class:"absolute top-4 -start-3 size-2 bg-blue-600 rounded-full dark:bg-blue-500"},BG={class:"grow"},VG={class:"text-xs text-gray-500 dark:text-neutral-500"},zG={class:"block text-sm font-medium text-gray-800 dark:text-neutral-300"},LG={class:"text-sm text-gray-500 dark:text-neutral-500"},FG={key:0,class:"sm:group-hover:opacity-100 sm:opacity-0 sm:absolute sm:top-5 sm:end-5 inline-block p-0.5 bg-white border border-gray-200 rounded-lg shadow-sm transition ease-out"},$G={__name:"admin-notification-item",props:{item:Object},emits:["update-notification"],setup(t,{emit:e}){const n=e,r=d.ref(!1),i=()=>r.value=!0,s=()=>r.value=!1,a=async()=>{var o;try{await je.get(`/api/notification-read/${(o=t.item)==null?void 0:o.id}`),await n("update-notification")}catch{}};return(o,p)=>{var y,v,E,T,D,N;const g=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("li",{class:d.normalizeClass(["relative group w-full flex gap-x-5 text-start p-5 border-b",[(y=t.item)!=null&&y.read?"bg-gray-100":"bg-white"]]),onMouseenter:i,onMouseleave:s},[d.createElementVNode("div",PG,[(v=t.item)!=null&&v.avatar?(d.openBlock(),d.createElementBlock("img",{key:0,class:"shrink-0 size-[38px] rounded-full",src:(E=t.item)==null?void 0:E.avatar,alt:"Avatar"},null,8,NG)):(d.openBlock(),d.createElementBlock("div",RG,[d.createVNode(CA)])),(T=t.item)!=null&&T.read?(d.openBlock(),d.createElementBlock("span",OG)):d.createCommentVNode("",!0)]),d.createElementVNode("div",BG,[d.createElementVNode("p",VG,[d.createVNode(hb,{name:"cdate",data:t.item},null,8,["data"])]),d.createElementVNode("span",zG,d.toDisplayString((D=t.item)==null?void 0:D.author),1),d.createElementVNode("p",LG,d.toDisplayString((N=t.item)==null?void 0:N.subject),1)]),r.value?(d.openBlock(),d.createElementBlock("div",FG,[d.createVNode(g,{trigger:"hover",placement:"left"},{reference:d.withCtx(()=>[d.createElementVNode("button",{onClick:a,type:"button",class:"hs-tooltip-toggle hs-tooltip relative inline-block size-7 flex shrink-0 justify-center items-center text-gray-500 hover:bg-gray-100 hover:text-gray-800 rounded"},[d.createVNode(IG)])]),default:d.withCtx(()=>[p[0]||(p[0]=d.createTextVNode(" Прочитати "))]),_:1})])):d.createCommentVNode("",!0)],34)}}},jG={},HG={class:"flex-shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function UG(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",HG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),d.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const WG=Fe(jG,[["render",UG]]),qG={},GG={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function YG(t,e){return d.openBlock(),d.createElementBlock("svg",GG,e[0]||(e[0]=[d.createElementVNode("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"},null,-1),d.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))}const ZG=Fe(qG,[["render",YG]]),XG={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},KG={class:"w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit"},JG={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},QG={class:"max-w-sm mx-auto mt-6"},eY={class:"font-medium text-gray-800 dark:text-neutral-200"},tY={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function nY(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",KG,[d.createElementVNode("div",null,[d.createElementVNode("div",JG,[e[0]||(e[0]=d.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),d.createElementVNode("div",QG,[d.createElementVNode("p",eY,d.toDisplayString(n.title),1),d.createElementVNode("p",tY,d.toDisplayString(n.text),1)])])])])}const px=Fe(XG,[["render",nY]]),rY={key:0,class:"flex absolute top-0 end-0 -mt-1.5 -me-1.5"},iY={class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"},sY={key:0,class:"w-96 h-[100px] z-[11] absolute top-[40px] right-0"},oY={class:"h-[50px] px-[20px] border-b w-full flex items-center justify-between rounded-t-lg bg-white shadow-[0_10px_40px_10px_rgba(0,0,0,0.08)]"},aY={class:"h-[30px] w-[30px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100"},lY={class:"max-h-[400px] bg-white overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300"},cY={key:0},uY={key:1},TA={__name:"admin-notification",setup(t){const e=d.ref(0),n=d.ref([]),r=d.ref(!1),i=d.ref(null),{$notify:s}=d.getCurrentInstance().proxy,a=g=>{i.value&&!i.value.contains(g.target)&&(r.value=!1)};d.watch(r,g=>{g?window.addEventListener("click",a):window.removeEventListener("click",a)}),d.onBeforeUnmount(()=>{window.removeEventListener("click",a)});const o=async()=>{try{const{data:g}=await je.get("/api/notification");n.value=(g==null?void 0:g.rows)||[]}catch{s({type:"error",message:"При спробі завантаження нотифікацій виникла помилка",title:"Помилка!"})}};o();const p=async()=>{try{await je.get("/api/notification-read"),await o()}catch{s({type:"error",message:"Виникла помилка",title:"Помилка!"})}};return(g,y)=>(d.openBlock(),d.createElementBlock("div",{ref_key:"notificationRef",ref:i,class:"hs-tooltip [--placement:bottom] inline-block show relative"},[d.createElementVNode("button",{onClick:y[0]||(y[0]=v=>r.value=!r.value),class:"hs-tooltip-toggle relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"},[d.createVNode(WG,{height:"24",width:"24"}),e.value?(d.openBlock(),d.createElementBlock("span",rY,[y[1]||(y[1]=d.createElementVNode("span",{class:"absolute inline-flex bg-red-400 rounded-full opacity-75 animate-ping size-full dark:bg-red-600"},null,-1)),d.createElementVNode("span",iY,d.toDisplayString(e.value),1)])):d.createCommentVNode("",!0)]),d.createVNode(d.Transition,null,{default:d.withCtx(()=>{var v;return[r.value?(d.openBlock(),d.createElementBlock("div",sY,[d.createElementVNode("div",oY,[y[2]||(y[2]=d.createElementVNode("nav",{class:"flex"},[d.createElementVNode("button",{type:"button",class:"px-2 py-1.5 relative inline-flex justify-center items-center gap-x-2 text-nowrap hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm rounded-lg focus:outline-none focus:bg-gray-100 after:absolute after:bottom-[-9px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:bg-gray-800"}," Всі ")],-1)),d.createElementVNode("button",aY,[d.createVNode(ZG)])]),d.createElementVNode("div",lY,[(v=n.value)!=null&&v.length?(d.openBlock(),d.createElementBlock("ul",cY,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.value,E=>(d.openBlock(),d.createBlock($G,{key:E==null?void 0:E.id,item:E,onUpdateNotification:o},null,8,["item"]))),128))])):(d.openBlock(),d.createElementBlock("div",uY,[d.createVNode(px,{class:"[&>div>div]:min-h-[300px]",text:""})]))]),d.createElementVNode("button",{onClick:p,class:"h-[50px] border-t w-full rounded-b-lg bg-white shadow p-4 flex justify-center items-center gap-x-2 text-sm text-gray-500 font-medium sm:rounded-b-lg hover:text-blue-600 focus:outline-none"},[d.createVNode(EG,{height:"16",width:"16"}),y[3]||(y[3]=d.createTextVNode(" Прочитати усі "))])])):d.createCommentVNode("",!0)]}),_:1})],512))}};var kg,jt,AA,MA,Xu,vc,DA,IA,PA,Eg={},NA=[],dY=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function il(t,e){for(var n in e)t[n]=e[n];return t}function RA(t){var e=t.parentNode;e&&e.removeChild(t)}function ce(t,e,n){var r,i,s,a={};for(s in e)s=="key"?r=e[s]:s=="ref"?i=e[s]:a[s]=e[s];if(arguments.length>2&&(a.children=arguments.length>3?kg.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(s in t.defaultProps)a[s]===void 0&&(a[s]=t.defaultProps[s]);return Sg(t,a,r,i,null)}function Sg(t,e,n,r,i){var s={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++AA};return i==null&&jt.vnode!=null&&jt.vnode(s),s}function Pi(){return{current:null}}function tr(t){return t.children}function hY(t,e,n,r,i){var s;for(s in n)s==="children"||s==="key"||s in e||Cg(t,s,null,n[s],r);for(s in e)i&&typeof e[s]!="function"||s==="children"||s==="key"||s==="value"||s==="checked"||n[s]===e[s]||Cg(t,s,e[s],n[s],r)}function OA(t,e,n){e[0]==="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||dY.test(e)?n:n+"px"}function Cg(t,e,n,r,i){var s;e:if(e==="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||OA(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||OA(t.style,e,n[e])}else if(e[0]==="o"&&e[1]==="n")s=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+s]=n,n?r||t.addEventListener(e,s?VA:BA,s):t.removeEventListener(e,s?VA:BA,s);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e in t)try{t[e]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&e.indexOf("-")==-1?t.removeAttribute(e):t.setAttribute(e,n))}}function BA(t){Xu=!0;try{return this.l[t.type+!1](jt.event?jt.event(t):t)}finally{Xu=!1}}function VA(t){Xu=!0;try{return this.l[t.type+!0](jt.event?jt.event(t):t)}finally{Xu=!1}}function bs(t,e){this.props=t,this.context=e}function of(t,e){if(e==null)return t.__?of(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?of(t):null}function zA(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return zA(t)}}function fY(t){Xu?setTimeout(t):IA(t)}function mx(t){(!t.__d&&(t.__d=!0)&&vc.push(t)&&!Tg.__r++||DA!==jt.debounceRendering)&&((DA=jt.debounceRendering)||fY)(Tg)}function Tg(){var t,e,n,r,i,s,a,o;for(vc.sort(function(p,g){return p.__v.__b-g.__v.__b});t=vc.shift();)t.__d&&(e=vc.length,r=void 0,i=void 0,a=(s=(n=t).__v).__e,(o=n.__P)&&(r=[],(i=il({},s)).__v=s.__v+1,gx(o,s,i,n.__n,o.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??of(s),s.__h),HA(r,s),s.__e!=a&&zA(s)),vc.length>e&&vc.sort(function(p,g){return p.__v.__b-g.__v.__b}));Tg.__r=0}function LA(t,e,n,r,i,s,a,o,p,g){var y,v,E,T,D,N,B,V=r&&r.__k||NA,U=V.length;for(n.__k=[],y=0;y<e.length;y++)if((T=n.__k[y]=(T=e[y])==null||typeof T=="boolean"?null:typeof T=="string"||typeof T=="number"||typeof T=="bigint"?Sg(null,T,null,null,T):Array.isArray(T)?Sg(tr,{children:T},null,null,null):T.__b>0?Sg(T.type,T.props,T.key,T.ref?T.ref:null,T.__v):T)!=null){if(T.__=n,T.__b=n.__b+1,(E=V[y])===null||E&&T.key==E.key&&T.type===E.type)V[y]=void 0;else for(v=0;v<U;v++){if((E=V[v])&&T.key==E.key&&T.type===E.type){V[v]=void 0;break}E=null}gx(t,T,E=E||Eg,i,s,a,o,p,g),D=T.__e,(v=T.ref)&&E.ref!=v&&(B||(B=[]),E.ref&&B.push(E.ref,null,T),B.push(v,T.__c||D,T)),D!=null?(N==null&&(N=D),typeof T.type=="function"&&T.__k===E.__k?T.__d=p=FA(T,p,t):p=$A(t,T,E,V,D,p),typeof n.type=="function"&&(n.__d=p)):p&&E.__e==p&&p.parentNode!=t&&(p=of(E))}for(n.__e=N,y=U;y--;)V[y]!=null&&(typeof n.type=="function"&&V[y].__e!=null&&V[y].__e==n.__d&&(n.__d=jA(r).nextSibling),WA(V[y],V[y]));if(B)for(y=0;y<B.length;y++)UA(B[y],B[++y],B[++y])}function FA(t,e,n){for(var r,i=t.__k,s=0;i&&s<i.length;s++)(r=i[s])&&(r.__=t,e=typeof r.type=="function"?FA(r,e,n):$A(n,r,r,i,r.__e,e));return e}function Ag(t,e){return e=e||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(n){Ag(n,e)}):e.push(t)),e}function $A(t,e,n,r,i,s){var a,o,p;if(e.__d!==void 0)a=e.__d,e.__d=void 0;else if(n==null||i!=s||i.parentNode==null)e:if(s==null||s.parentNode!==t)t.appendChild(i),a=null;else{for(o=s,p=0;(o=o.nextSibling)&&p<r.length;p+=1)if(o==i)break e;t.insertBefore(i,s),a=s}return a!==void 0?a:i.nextSibling}function jA(t){var e,n,r;if(t.type==null||typeof t.type=="string")return t.__e;if(t.__k){for(e=t.__k.length-1;e>=0;e--)if((n=t.__k[e])&&(r=jA(n)))return r}return null}function gx(t,e,n,r,i,s,a,o,p){var g,y,v,E,T,D,N,B,V,U,K,Y,we,ye,Te,Re=e.type;if(e.constructor!==void 0)return null;n.__h!=null&&(p=n.__h,o=e.__e=n.__e,e.__h=null,s=[o]),(g=jt.__b)&&g(e);try{e:if(typeof Re=="function"){if(B=e.props,V=(g=Re.contextType)&&r[g.__c],U=g?V?V.props.value:g.__:r,n.__c?N=(y=e.__c=n.__c).__=y.__E:("prototype"in Re&&Re.prototype.render?e.__c=y=new Re(B,U):(e.__c=y=new bs(B,U),y.constructor=Re,y.render=mY),V&&V.sub(y),y.props=B,y.state||(y.state={}),y.context=U,y.__n=r,v=y.__d=!0,y.__h=[],y._sb=[]),y.__s==null&&(y.__s=y.state),Re.getDerivedStateFromProps!=null&&(y.__s==y.state&&(y.__s=il({},y.__s)),il(y.__s,Re.getDerivedStateFromProps(B,y.__s))),E=y.props,T=y.state,y.__v=e,v)Re.getDerivedStateFromProps==null&&y.componentWillMount!=null&&y.componentWillMount(),y.componentDidMount!=null&&y.__h.push(y.componentDidMount);else{if(Re.getDerivedStateFromProps==null&&B!==E&&y.componentWillReceiveProps!=null&&y.componentWillReceiveProps(B,U),!y.__e&&y.shouldComponentUpdate!=null&&y.shouldComponentUpdate(B,y.__s,U)===!1||e.__v===n.__v){for(e.__v!==n.__v&&(y.props=B,y.state=y.__s,y.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.forEach(function(Ne){Ne&&(Ne.__=e)}),K=0;K<y._sb.length;K++)y.__h.push(y._sb[K]);y._sb=[],y.__h.length&&a.push(y);break e}y.componentWillUpdate!=null&&y.componentWillUpdate(B,y.__s,U),y.componentDidUpdate!=null&&y.__h.push(function(){y.componentDidUpdate(E,T,D)})}if(y.context=U,y.props=B,y.__P=t,Y=jt.__r,we=0,"prototype"in Re&&Re.prototype.render){for(y.state=y.__s,y.__d=!1,Y&&Y(e),g=y.render(y.props,y.state,y.context),ye=0;ye<y._sb.length;ye++)y.__h.push(y._sb[ye]);y._sb=[]}else do y.__d=!1,Y&&Y(e),g=y.render(y.props,y.state,y.context),y.state=y.__s;while(y.__d&&++we<25);y.state=y.__s,y.getChildContext!=null&&(r=il(il({},r),y.getChildContext())),v||y.getSnapshotBeforeUpdate==null||(D=y.getSnapshotBeforeUpdate(E,T)),Te=g!=null&&g.type===tr&&g.key==null?g.props.children:g,LA(t,Array.isArray(Te)?Te:[Te],e,n,r,i,s,a,o,p),y.base=e.__e,e.__h=null,y.__h.length&&a.push(y),N&&(y.__E=y.__=null),y.__e=!1}else s==null&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=pY(n.__e,e,n,r,i,s,a,p);(g=jt.diffed)&&g(e)}catch(Ne){e.__v=null,(p||s!=null)&&(e.__e=o,e.__h=!!p,s[s.indexOf(o)]=null),jt.__e(Ne,e,n)}}function HA(t,e){jt.__c&&jt.__c(e,t),t.some(function(n){try{t=n.__h,n.__h=[],t.some(function(r){r.call(n)})}catch(r){jt.__e(r,n.__v)}})}function pY(t,e,n,r,i,s,a,o){var p,g,y,v=n.props,E=e.props,T=e.type,D=0;if(T==="svg"&&(i=!0),s!=null){for(;D<s.length;D++)if((p=s[D])&&"setAttribute"in p==!!T&&(T?p.localName===T:p.nodeType===3)){t=p,s[D]=null;break}}if(t==null){if(T===null)return document.createTextNode(E);t=i?document.createElementNS("http://www.w3.org/2000/svg",T):document.createElement(T,E.is&&E),s=null,o=!1}if(T===null)v===E||o&&t.data===E||(t.data=E);else{if(s=s&&kg.call(t.childNodes),g=(v=n.props||Eg).dangerouslySetInnerHTML,y=E.dangerouslySetInnerHTML,!o){if(s!=null)for(v={},D=0;D<t.attributes.length;D++)v[t.attributes[D].name]=t.attributes[D].value;(y||g)&&(y&&(g&&y.__html==g.__html||y.__html===t.innerHTML)||(t.innerHTML=y&&y.__html||""))}if(hY(t,E,v,i,o),y)e.__k=[];else if(D=e.props.children,LA(t,Array.isArray(D)?D:[D],e,n,r,i&&T!=="foreignObject",s,a,s?s[0]:n.__k&&of(n,0),o),s!=null)for(D=s.length;D--;)s[D]!=null&&RA(s[D]);o||("value"in E&&(D=E.value)!==void 0&&(D!==t.value||T==="progress"&&!D||T==="option"&&D!==v.value)&&Cg(t,"value",D,v.value,!1),"checked"in E&&(D=E.checked)!==void 0&&D!==t.checked&&Cg(t,"checked",D,v.checked,!1))}return t}function UA(t,e,n){try{typeof t=="function"?t(e):t.current=e}catch(r){jt.__e(r,n)}}function WA(t,e,n){var r,i;if(jt.unmount&&jt.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||UA(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){jt.__e(s,e)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&WA(r[i],e,n||typeof t.type!="function");n||t.__e==null||RA(t.__e),t.__=t.__e=t.__d=void 0}function mY(t,e,n){return this.constructor(t,n)}function af(t,e,n){var r,i,s;jt.__&&jt.__(t,e),i=(r=!1)?null:e.__k,s=[],gx(e,t=e.__k=ce(tr,null,[t]),i||Eg,Eg,e.ownerSVGElement!==void 0,i?null:e.firstChild?kg.call(e.childNodes):null,s,i?i.__e:e.firstChild,r),HA(s,t)}function gY(t,e){var n={__c:e="__cC"+PA++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,s;return this.getChildContext||(i=[],(s={})[e]=this,this.getChildContext=function(){return s},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&i.some(function(o){o.__e=!0,mx(o)})},this.sub=function(a){i.push(a);var o=a.componentWillUnmount;a.componentWillUnmount=function(){i.splice(i.indexOf(a),1),o&&o.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}kg=NA.slice,jt={__e:function(t,e,n,r){for(var i,s,a;e=e.__;)if((i=e.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(t)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),a=i.__d),a)return i.__E=i}catch(o){t=o}throw t}},AA=0,MA=function(t){return t!=null&&t.constructor===void 0},Xu=!1,bs.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=il({},this.state),typeof t=="function"&&(t=t(il({},n),this.props)),t&&il(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),mx(this))},bs.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),mx(this))},bs.prototype.render=tr,vc=[],IA=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Tg.__r=0,PA=0;var No,yx,qA,GA=[],bx=[],YA=jt.__b,ZA=jt.__r,XA=jt.diffed,KA=jt.__c,JA=jt.unmount;function yY(){for(var t;t=GA.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Mg),t.__H.__h.forEach(_x),t.__H.__h=[]}catch(e){t.__H.__h=[],jt.__e(e,t.__v)}}jt.__b=function(t){No=null,YA&&YA(t)},jt.__r=function(t){ZA&&ZA(t);var e=(No=t.__c).__H;e&&(yx===No?(e.__h=[],No.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=bx,n.__N=n.i=void 0})):(e.__h.forEach(Mg),e.__h.forEach(_x),e.__h=[])),yx=No},jt.diffed=function(t){XA&&XA(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(GA.push(e)!==1&&qA===jt.requestAnimationFrame||((qA=jt.requestAnimationFrame)||bY)(yY)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==bx&&(n.__=n.__V),n.i=void 0,n.__V=bx})),yx=No=null},jt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(Mg),n.__h=n.__h.filter(function(r){return!r.__||_x(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],jt.__e(r,n.__v)}}),KA&&KA(t,e)},jt.unmount=function(t){JA&&JA(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Mg(r)}catch(i){e=i}}),n.__H=void 0,e&&jt.__e(e,n.__v))};var QA=typeof requestAnimationFrame=="function";function bY(t){var e,n=function(){clearTimeout(r),QA&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);QA&&(e=requestAnimationFrame(n))}function Mg(t){var e=No,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),No=e}function _x(t){var e=No;t.__c=t.__(),No=e}function _Y(t,e){for(var n in e)t[n]=e[n];return t}function eM(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function tM(t){this.props=t}(tM.prototype=new bs).isPureReactComponent=!0,tM.prototype.shouldComponentUpdate=function(t,e){return eM(this.props,t)||eM(this.state,e)};var nM=jt.__b;jt.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),nM&&nM(t)};var xY=jt.__e;jt.__e=function(t,e,n,r){if(t.then){for(var i,s=e;s=s.__;)if((i=s.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}xY(t,e,n,r)};var rM=jt.unmount;function iM(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=_Y({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return iM(r,e,n)})),t}function sM(t,e,n){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return sM(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=n)),t}function xx(){this.__u=0,this.t=null,this.__b=null}function oM(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Dg(){this.u=null,this.o=null}jt.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),rM&&rM(t)},(xx.prototype=new bs).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=oM(r.__v),s=!1,a=function(){s||(s=!0,n.__R=null,i?i(o):o())};n.__R=a;var o=function(){if(!--r.__u){if(r.state.__a){var g=r.state.__a;r.__v.__k[0]=sM(g,g.__c.__P,g.__c.__O)}var y;for(r.setState({__a:r.__b=null});y=r.t.pop();)y.forceUpdate()}},p=e.__h===!0;r.__u++||p||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},xx.prototype.componentWillUnmount=function(){this.t=[]},xx.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=iM(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&ce(tr,null,t.fallback);return i&&(i.__h=null),[ce(tr,null,e.__a?null:t.children),i]};var aM=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.u=n=n[2]}};function vY(t){return this.getChildContext=function(){return t.context},t.children}function wY(t){var e=this,n=t.i;e.componentWillUnmount=function(){af(null,e.l),e.l=null,e.i=null},e.i&&e.i!==n&&e.componentWillUnmount(),t.__v?(e.l||(e.i=n,e.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),e.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.i.removeChild(r)}}),af(ce(vY,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function kY(t,e){var n=ce(wY,{__v:t,i:e});return n.containerInfo=e,n}(Dg.prototype=new bs).__a=function(t){var e=this,n=oM(e.__v),r=e.o.get(t);return r[0]++,function(i){var s=function(){e.props.revealOrder?(r.push(i),aM(e,t,r)):i()};n?n(s):s()}},Dg.prototype.render=function(t){this.u=null,this.o=new Map;var e=Ag(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.o.set(e[n],this.u=[1,0,this.u]);return t.children},Dg.prototype.componentDidUpdate=Dg.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,n){aM(t,n,e)})};var EY=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,SY=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,CY=typeof document<"u",TY=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};bs.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(bs.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var lM=jt.event;function AY(){}function MY(){return this.cancelBubble}function DY(){return this.defaultPrevented}jt.event=function(t){return lM&&(t=lM(t)),t.persist=AY,t.isPropagationStopped=MY,t.isDefaultPrevented=DY,t.nativeEvent=t};var cM={configurable:!0,get:function(){return this.class}},uM=jt.vnode;jt.vnode=function(t){var e=t.type,n=t.props,r=n;if(typeof e=="string"){var i=e.indexOf("-")===-1;for(var s in r={},n){var a=n[s];CY&&s==="children"&&e==="noscript"||s==="value"&&"defaultValue"in n&&a==null||(s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+e)&&!TY(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():i&&SY.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():a===null&&(a=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=a)}e=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=Ag(n.children).forEach(function(o){o.props.selected=r.value.indexOf(o.props.value)!=-1})),e=="select"&&r.defaultValue!=null&&(r.value=Ag(n.children).forEach(function(o){o.props.selected=r.multiple?r.defaultValue.indexOf(o.props.value)!=-1:r.defaultValue==o.props.value})),t.props=r,n.class!=n.className&&(cM.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",cM))}t.$$typeof=EY,uM&&uM(t)};var dM=jt.__r;jt.__r=function(t){dM&&dM(t),t.__c};const hM=[],vx=new Map;function Ig(t){hM.push(t),vx.forEach(e=>{pM(e,t)})}function IY(t){t.isConnected&&t.getRootNode&&fM(t.getRootNode())}function fM(t){let e=vx.get(t);if(!e||!e.isConnected){if(e=t.querySelector("style[data-fullcalendar]"),!e){e=document.createElement("style"),e.setAttribute("data-fullcalendar","");const n=NY();n&&(e.nonce=n);const r=t===document?document.head:t,i=t===document?r.querySelector("script,link[rel=stylesheet],link[as=style],style"):r.firstChild;r.insertBefore(e,i)}vx.set(t,e),PY(e)}}function PY(t){for(const e of hM)pM(t,e)}function pM(t,e){const{sheet:n}=t,r=n.cssRules.length;e.split("}").forEach((i,s)=>{i=i.trim(),i&&n.insertRule(i+"}",r+s)})}let wx;function NY(){return wx===void 0&&(wx=RY()),wx}function RY(){const t=document.querySelector('meta[name="csp-nonce"]');if(t&&t.hasAttribute("content"))return t.getAttribute("content");const e=document.querySelector("script[nonce]");return e&&e.nonce||""}typeof document<"u"&&fM(document);var OY=':root{--fc-small-font-size:.85em;--fc-page-bg-color:#fff;--fc-neutral-bg-color:hsla(0,0%,82%,.3);--fc-neutral-text-color:grey;--fc-border-color:#ddd;--fc-button-text-color:#fff;--fc-button-bg-color:#2c3e50;--fc-button-border-color:#2c3e50;--fc-button-hover-bg-color:#1e2b37;--fc-button-hover-border-color:#1a252f;--fc-button-active-bg-color:#1a252f;--fc-button-active-border-color:#151e27;--fc-event-bg-color:#3788d8;--fc-event-border-color:#3788d8;--fc-event-text-color:#fff;--fc-event-selected-overlay-color:rgba(0,0,0,.25);--fc-more-link-bg-color:#d0d0d0;--fc-more-link-text-color:inherit;--fc-event-resizer-thickness:8px;--fc-event-resizer-dot-total-width:8px;--fc-event-resizer-dot-border-width:1px;--fc-non-business-color:hsla(0,0%,84%,.3);--fc-bg-event-color:#8fdf82;--fc-bg-event-opacity:0.3;--fc-highlight-color:rgba(188,232,241,.3);--fc-today-bg-color:rgba(255,220,40,.15);--fc-now-indicator-color:red}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc{display:flex;flex-direction:column;font-size:1em}.fc,.fc *,.fc :after,.fc :before{box-sizing:border-box}.fc table{border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{padding:0;vertical-align:top}.fc a[data-navlink]{cursor:pointer}.fc a[data-navlink]:hover{text-decoration:underline}.fc-direction-ltr{direction:ltr;text-align:left}.fc-direction-rtl{direction:rtl;text-align:right}.fc-theme-standard td,.fc-theme-standard th{border:1px solid var(--fc-border-color)}.fc-liquid-hack td,.fc-liquid-hack th{position:relative}@font-face{font-family:fcicons;font-style:normal;font-weight:400;src:url("data:application/x-font-ttf;charset=utf-8;base64,AAEAAAALAIAAAwAwT1MvMg8SBfAAAAC8AAAAYGNtYXAXVtKNAAABHAAAAFRnYXNwAAAAEAAAAXAAAAAIZ2x5ZgYydxIAAAF4AAAFNGhlYWQUJ7cIAAAGrAAAADZoaGVhB20DzAAABuQAAAAkaG10eCIABhQAAAcIAAAALGxvY2ED4AU6AAAHNAAAABhtYXhwAA8AjAAAB0wAAAAgbmFtZXsr690AAAdsAAABhnBvc3QAAwAAAAAI9AAAACAAAwPAAZAABQAAApkCzAAAAI8CmQLMAAAB6wAzAQkAAAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAAAAAAAABAAADpBgPA/8AAQAPAAEAAAAABAAAAAAAAAAAAAAAgAAAAAAADAAAAAwAAABwAAQADAAAAHAADAAEAAAAcAAQAOAAAAAoACAACAAIAAQAg6Qb//f//AAAAAAAg6QD//f//AAH/4xcEAAMAAQAAAAAAAAAAAAAAAQAB//8ADwABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQAAAAAAAAAAAAIAADc5AQAAAAABAWIAjQKeAskAEwAAJSc3NjQnJiIHAQYUFwEWMjc2NCcCnuLiDQ0MJAz/AA0NAQAMJAwNDcni4gwjDQwM/wANIwz/AA0NDCMNAAAAAQFiAI0CngLJABMAACUBNjQnASYiBwYUHwEHBhQXFjI3AZ4BAA0N/wAMJAwNDeLiDQ0MJAyNAQAMIw0BAAwMDSMM4uINIwwNDQAAAAIA4gC3Ax4CngATACcAACUnNzY0JyYiDwEGFB8BFjI3NjQnISc3NjQnJiIPAQYUHwEWMjc2NCcB87e3DQ0MIw3VDQ3VDSMMDQ0BK7e3DQ0MJAzVDQ3VDCQMDQ3zuLcMJAwNDdUNIwzWDAwNIwy4twwkDA0N1Q0jDNYMDA0jDAAAAgDiALcDHgKeABMAJwAAJTc2NC8BJiIHBhQfAQcGFBcWMjchNzY0LwEmIgcGFB8BBwYUFxYyNwJJ1Q0N1Q0jDA0Nt7cNDQwjDf7V1Q0N1QwkDA0Nt7cNDQwkDLfWDCMN1Q0NDCQMt7gMIw0MDNYMIw3VDQ0MJAy3uAwjDQwMAAADAFUAAAOrA1UAMwBoAHcAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMhMjY1NCYjISIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAAVYRGRkR/qoRGRkRA1UFBAUOCQkVDAsZDf2rDRkLDBUJCA4FBQUFBQUOCQgVDAsZDQJVDRkLDBUJCQ4FBAVVAgECBQMCBwQECAX9qwQJAwQHAwMFAQICAgIBBQMDBwQDCQQCVQUIBAQHAgMFAgEC/oAZEhEZGRESGQAAAAADAFUAAAOrA1UAMwBoAIkAABMiBgcOAQcOAQcOARURFBYXHgEXHgEXHgEzITI2Nz4BNz4BNz4BNRE0JicuAScuAScuASMFITIWFx4BFx4BFx4BFREUBgcOAQcOAQcOASMhIiYnLgEnLgEnLgE1ETQ2Nz4BNz4BNz4BMxMzFRQWMzI2PQEzMjY1NCYrATU0JiMiBh0BIyIGFRQWM9UNGAwLFQkJDgUFBQUFBQ4JCRULDBgNAlYNGAwLFQkJDgUFBQUFBQ4JCRULDBgN/aoCVgQIBAQHAwMFAQIBAQIBBQMDBwQECAT9qgQIBAQHAwMFAQIBAQIBBQMDBwQECASAgBkSEhmAERkZEYAZEhIZgBEZGREDVQUEBQ4JCRUMCxkN/asNGQsMFQkIDgUFBQUFBQ4JCBUMCxkNAlUNGQsMFQkJDgUEBVUCAQIFAwIHBAQIBf2rBAkDBAcDAwUBAgICAgEFAwMHBAMJBAJVBQgEBAcCAwUCAQL+gIASGRkSgBkSERmAEhkZEoAZERIZAAABAOIAjQMeAskAIAAAExcHBhQXFjI/ARcWMjc2NC8BNzY0JyYiDwEnJiIHBhQX4uLiDQ0MJAzi4gwkDA0N4uINDQwkDOLiDCQMDQ0CjeLiDSMMDQ3h4Q0NDCMN4uIMIw0MDOLiDAwNIwwAAAABAAAAAQAAa5n0y18PPPUACwQAAAAAANivOVsAAAAA2K85WwAAAAADqwNVAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOrAAEAAAAAAAAAAAAAAAAAAAALBAAAAAAAAAAAAAAAAgAAAAQAAWIEAAFiBAAA4gQAAOIEAABVBAAAVQQAAOIAAAAAAAoAFAAeAEQAagCqAOoBngJkApoAAQAAAAsAigADAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAA4ArgABAAAAAAABAAcAAAABAAAAAAACAAcAYAABAAAAAAADAAcANgABAAAAAAAEAAcAdQABAAAAAAAFAAsAFQABAAAAAAAGAAcASwABAAAAAAAKABoAigADAAEECQABAA4ABwADAAEECQACAA4AZwADAAEECQADAA4APQADAAEECQAEAA4AfAADAAEECQAFABYAIAADAAEECQAGAA4AUgADAAEECQAKADQApGZjaWNvbnMAZgBjAGkAYwBvAG4Ac1ZlcnNpb24gMS4wAFYAZQByAHMAaQBvAG4AIAAxAC4AMGZjaWNvbnMAZgBjAGkAYwBvAG4Ac2ZjaWNvbnMAZgBjAGkAYwBvAG4Ac1JlZ3VsYXIAUgBlAGcAdQBsAGEAcmZjaWNvbnMAZgBjAGkAYwBvAG4Ac0ZvbnQgZ2VuZXJhdGVkIGJ5IEljb01vb24uAEYAbwBuAHQAIABnAGUAbgBlAHIAYQB0AGUAZAAgAGIAeQAgAEkAYwBvAE0AbwBvAG4ALgAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=") format("truetype")}.fc-icon{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font-family:fcicons!important;font-style:normal;font-variant:normal;font-weight:400;height:1em;line-height:1;text-align:center;text-transform:none;-moz-user-select:none;user-select:none;width:1em}.fc-icon-chevron-left:before{content:"\\e900"}.fc-icon-chevron-right:before{content:"\\e901"}.fc-icon-chevrons-left:before{content:"\\e902"}.fc-icon-chevrons-right:before{content:"\\e903"}.fc-icon-minus-square:before{content:"\\e904"}.fc-icon-plus-square:before{content:"\\e905"}.fc-icon-x:before{content:"\\e906"}.fc .fc-button{border-radius:0;font-family:inherit;font-size:inherit;line-height:inherit;margin:0;overflow:visible;text-transform:none}.fc .fc-button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.fc .fc-button{-webkit-appearance:button}.fc .fc-button:not(:disabled){cursor:pointer}.fc .fc-button{background-color:transparent;border:1px solid transparent;border-radius:.25em;display:inline-block;font-size:1em;font-weight:400;line-height:1.5;padding:.4em .65em;text-align:center;-moz-user-select:none;user-select:none;vertical-align:middle}.fc .fc-button:hover{text-decoration:none}.fc .fc-button:focus{box-shadow:0 0 0 .2rem rgba(44,62,80,.25);outline:0}.fc .fc-button:disabled{opacity:.65}.fc .fc-button-primary{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:hover{background-color:var(--fc-button-hover-bg-color);border-color:var(--fc-button-hover-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:disabled{background-color:var(--fc-button-bg-color);border-color:var(--fc-button-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):active{background-color:var(--fc-button-active-bg-color);border-color:var(--fc-button-active-border-color);color:var(--fc-button-text-color)}.fc .fc-button-primary:not(:disabled).fc-button-active:focus,.fc .fc-button-primary:not(:disabled):active:focus{box-shadow:0 0 0 .2rem rgba(76,91,106,.5)}.fc .fc-button .fc-icon{font-size:1.5em;vertical-align:middle}.fc .fc-button-group{display:inline-flex;position:relative;vertical-align:middle}.fc .fc-button-group>.fc-button{flex:1 1 auto;position:relative}.fc .fc-button-group>.fc-button.fc-button-active,.fc .fc-button-group>.fc-button:active,.fc .fc-button-group>.fc-button:focus,.fc .fc-button-group>.fc-button:hover{z-index:1}.fc-direction-ltr .fc-button-group>.fc-button:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0;margin-left:-1px}.fc-direction-ltr .fc-button-group>.fc-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.fc-direction-rtl .fc-button-group>.fc-button:not(:first-child){border-bottom-right-radius:0;border-top-right-radius:0;margin-right:-1px}.fc-direction-rtl .fc-button-group>.fc-button:not(:last-child){border-bottom-left-radius:0;border-top-left-radius:0}.fc .fc-toolbar{align-items:center;display:flex;justify-content:space-between}.fc .fc-toolbar.fc-header-toolbar{margin-bottom:1.5em}.fc .fc-toolbar.fc-footer-toolbar{margin-top:1.5em}.fc .fc-toolbar-title{font-size:1.75em;margin:0}.fc-direction-ltr .fc-toolbar>*>:not(:first-child){margin-left:.75em}.fc-direction-rtl .fc-toolbar>*>:not(:first-child){margin-right:.75em}.fc-direction-rtl .fc-toolbar-ltr{flex-direction:row-reverse}.fc .fc-scroller{-webkit-overflow-scrolling:touch;position:relative}.fc .fc-scroller-liquid{height:100%}.fc .fc-scroller-liquid-absolute{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-scroller-harness{direction:ltr;overflow:hidden;position:relative}.fc .fc-scroller-harness-liquid{height:100%}.fc-direction-rtl .fc-scroller-harness>.fc-scroller{direction:rtl}.fc-theme-standard .fc-scrollgrid{border:1px solid var(--fc-border-color)}.fc .fc-scrollgrid,.fc .fc-scrollgrid table{table-layout:fixed;width:100%}.fc .fc-scrollgrid table{border-left-style:hidden;border-right-style:hidden;border-top-style:hidden}.fc .fc-scrollgrid{border-bottom-width:0;border-collapse:separate;border-right-width:0}.fc .fc-scrollgrid-liquid{height:100%}.fc .fc-scrollgrid-section,.fc .fc-scrollgrid-section table,.fc .fc-scrollgrid-section>td{height:1px}.fc .fc-scrollgrid-section-liquid>td{height:100%}.fc .fc-scrollgrid-section>*{border-left-width:0;border-top-width:0}.fc .fc-scrollgrid-section-footer>*,.fc .fc-scrollgrid-section-header>*{border-bottom-width:0}.fc .fc-scrollgrid-section-body table,.fc .fc-scrollgrid-section-footer table{border-bottom-style:hidden}.fc .fc-scrollgrid-section-sticky>*{background:var(--fc-page-bg-color);position:sticky;z-index:3}.fc .fc-scrollgrid-section-header.fc-scrollgrid-section-sticky>*{top:0}.fc .fc-scrollgrid-section-footer.fc-scrollgrid-section-sticky>*{bottom:0}.fc .fc-scrollgrid-sticky-shim{height:1px;margin-bottom:-1px}.fc-sticky{position:sticky}.fc .fc-view-harness{flex-grow:1;position:relative}.fc .fc-view-harness-active>.fc-view{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-col-header-cell-cushion{display:inline-block;padding:2px 4px}.fc .fc-bg-event,.fc .fc-highlight,.fc .fc-non-business{bottom:0;left:0;position:absolute;right:0;top:0}.fc .fc-non-business{background:var(--fc-non-business-color)}.fc .fc-bg-event{background:var(--fc-bg-event-color);opacity:var(--fc-bg-event-opacity)}.fc .fc-bg-event .fc-event-title{font-size:var(--fc-small-font-size);font-style:italic;margin:.5em}.fc .fc-highlight{background:var(--fc-highlight-color)}.fc .fc-cell-shaded,.fc .fc-day-disabled{background:var(--fc-neutral-bg-color)}a.fc-event,a.fc-event:hover{text-decoration:none}.fc-event.fc-event-draggable,.fc-event[href]{cursor:pointer}.fc-event .fc-event-main{position:relative;z-index:2}.fc-event-dragging:not(.fc-event-selected){opacity:.75}.fc-event-dragging.fc-event-selected{box-shadow:0 2px 7px rgba(0,0,0,.3)}.fc-event .fc-event-resizer{display:none;position:absolute;z-index:4}.fc-event-selected .fc-event-resizer,.fc-event:hover .fc-event-resizer{display:block}.fc-event-selected .fc-event-resizer{background:var(--fc-page-bg-color);border-color:inherit;border-radius:calc(var(--fc-event-resizer-dot-total-width)/2);border-style:solid;border-width:var(--fc-event-resizer-dot-border-width);height:var(--fc-event-resizer-dot-total-width);width:var(--fc-event-resizer-dot-total-width)}.fc-event-selected .fc-event-resizer:before{bottom:-20px;content:"";left:-20px;position:absolute;right:-20px;top:-20px}.fc-event-selected,.fc-event:focus{box-shadow:0 2px 5px rgba(0,0,0,.2)}.fc-event-selected:before,.fc-event:focus:before{bottom:0;content:"";left:0;position:absolute;right:0;top:0;z-index:3}.fc-event-selected:after,.fc-event:focus:after{background:var(--fc-event-selected-overlay-color);bottom:-1px;content:"";left:-1px;position:absolute;right:-1px;top:-1px;z-index:1}.fc-h-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-h-event .fc-event-main{color:var(--fc-event-text-color)}.fc-h-event .fc-event-main-frame{display:flex}.fc-h-event .fc-event-time{max-width:100%;overflow:hidden}.fc-h-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-width:0}.fc-h-event .fc-event-title{display:inline-block;left:0;max-width:100%;overflow:hidden;right:0;vertical-align:top}.fc-h-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-start),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-end){border-bottom-left-radius:0;border-left-width:0;border-top-left-radius:0}.fc-direction-ltr .fc-daygrid-block-event:not(.fc-event-end),.fc-direction-rtl .fc-daygrid-block-event:not(.fc-event-start){border-bottom-right-radius:0;border-right-width:0;border-top-right-radius:0}.fc-h-event:not(.fc-event-selected) .fc-event-resizer{bottom:0;top:0;width:var(--fc-event-resizer-thickness)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end{cursor:w-resize;left:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-direction-ltr .fc-h-event:not(.fc-event-selected) .fc-event-resizer-end,.fc-direction-rtl .fc-h-event:not(.fc-event-selected) .fc-event-resizer-start{cursor:e-resize;right:calc(var(--fc-event-resizer-thickness)*-.5)}.fc-h-event.fc-event-selected .fc-event-resizer{margin-top:calc(var(--fc-event-resizer-dot-total-width)*-.5);top:50%}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-start,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-end{left:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc-direction-ltr .fc-h-event.fc-event-selected .fc-event-resizer-end,.fc-direction-rtl .fc-h-event.fc-event-selected .fc-event-resizer-start{right:calc(var(--fc-event-resizer-dot-total-width)*-.5)}.fc .fc-popover{box-shadow:0 2px 6px rgba(0,0,0,.15);position:absolute;z-index:9999}.fc .fc-popover-header{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:3px 4px}.fc .fc-popover-title{margin:0 2px}.fc .fc-popover-close{cursor:pointer;font-size:1.1em;opacity:.65}.fc-theme-standard .fc-popover{background:var(--fc-page-bg-color);border:1px solid var(--fc-border-color)}.fc-theme-standard .fc-popover-header{background:var(--fc-neutral-bg-color)}';Ig(OY);class kx{constructor(e){this.drainedOption=e,this.isRunning=!1,this.isDirty=!1,this.pauseDepths={},this.timeoutId=0}request(e){this.isDirty=!0,this.isPaused()||(this.clearTimeout(),e==null?this.tryDrain():this.timeoutId=setTimeout(this.tryDrain.bind(this),e))}pause(e=""){let{pauseDepths:n}=this;n[e]=(n[e]||0)+1,this.clearTimeout()}resume(e="",n){let{pauseDepths:r}=this;e in r&&(n?delete r[e]:(r[e]-=1,r[e]<=0&&delete r[e]),this.tryDrain())}isPaused(){return Object.keys(this.pauseDepths).length}tryDrain(){if(!this.isRunning&&!this.isPaused()){for(this.isRunning=!0;this.isDirty;)this.isDirty=!1,this.drained();this.isRunning=!1}}clear(){this.clearTimeout(),this.isDirty=!1,this.pauseDepths={}}clearTimeout(){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=0)}drained(){this.drainedOption&&this.drainedOption()}}function Ex(t){t.parentNode&&t.parentNode.removeChild(t)}function _i(t,e){if(t.closest)return t.closest(e);if(!document.documentElement.contains(t))return null;do{if(BY(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}function BY(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector).call(t,e)}function VY(t,e){let n=t instanceof HTMLElement?[t]:t,r=[];for(let i=0;i<n.length;i+=1){let s=n[i].querySelectorAll(e);for(let a=0;a<s.length;a+=1)r.push(s[a])}return r}const zY=/(top|left|right|bottom|width|height)$/i;function lf(t,e){for(let n in e)mM(t,n,e[n])}function mM(t,e,n){n==null?t.style[e]="":typeof n=="number"&&zY.test(e)?t.style[e]=`${n}px`:t.style[e]=n}function gM(t){var e,n;return(n=(e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])!==null&&n!==void 0?n:t.target}let yM=0;function sl(){return yM+=1,"fc-dom-"+yM}function Pg(t){t.preventDefault()}function LY(t,e){return n=>{let r=_i(n.target,t);r&&e.call(r,n,r)}}function bM(t,e,n,r){let i=LY(n,r);return t.addEventListener(e,i),()=>{t.removeEventListener(e,i)}}function FY(t,e,n,r){let i;return bM(t,"mouseover",e,(s,a)=>{if(a!==i){i=a,n(s,a);let o=p=>{i=null,r(p,a),a.removeEventListener("mouseleave",o)};a.addEventListener("mouseleave",o)}})}const _M=["webkitTransitionEnd","otransitionend","oTransitionEnd","msTransitionEnd","transitionend"];function $Y(t,e){let n=r=>{e(r),_M.forEach(i=>{t.removeEventListener(i,n)})};_M.forEach(r=>{t.addEventListener(r,n)})}function xM(t){return Object.assign({onClick:t},vM(t))}function vM(t){return{tabIndex:0,onKeyDown(e){(e.key==="Enter"||e.key===" ")&&(t(e),e.preventDefault())}}}let wM=0;function wc(){return wM+=1,String(wM)}function Sx(){document.body.classList.add("fc-not-allowed")}function Cx(){document.body.classList.remove("fc-not-allowed")}function jY(t){t.style.userSelect="none",t.style.webkitUserSelect="none",t.addEventListener("selectstart",Pg)}function HY(t){t.style.userSelect="",t.style.webkitUserSelect="",t.removeEventListener("selectstart",Pg)}function UY(t){t.addEventListener("contextmenu",Pg)}function WY(t){t.removeEventListener("contextmenu",Pg)}function qY(t){let e=[],n=[],r,i;for(typeof t=="string"?n=t.split(/\s*,\s*/):typeof t=="function"?n=[t]:Array.isArray(t)&&(n=t),r=0;r<n.length;r+=1)i=n[r],typeof i=="string"?e.push(i.charAt(0)==="-"?{field:i.substring(1),order:-1}:{field:i,order:1}):typeof i=="function"&&e.push({func:i});return e}function GY(t,e,n){let r,i;for(r=0;r<n.length;r+=1)if(i=YY(t,e,n[r]),i)return i;return 0}function YY(t,e,n){return n.func?n.func(t,e):ZY(t[n.field],e[n.field])*(n.order||1)}function ZY(t,e){return!t&&!e?0:e==null?-1:t==null?1:typeof t=="string"||typeof e=="string"?String(t).localeCompare(String(e)):t-e}function Ku(t,e){let n=String(t);return"000".substr(0,e-n.length)+n}function cf(t,e,n){return typeof t=="function"?t(...e):typeof t=="string"?e.reduce((r,i,s)=>r.replace("$"+s,i||""),t):n}function XY(t,e){return t-e}function Ng(t){return t%1===0}function KY(t){let e=t.querySelector(".fc-scrollgrid-shrink-frame"),n=t.querySelector(".fc-scrollgrid-shrink-cushion");if(!e)throw new Error("needs fc-scrollgrid-shrink-frame className");if(!n)throw new Error("needs fc-scrollgrid-shrink-cushion className");return t.getBoundingClientRect().width-e.getBoundingClientRect().width+n.getBoundingClientRect().width}const kM=["years","months","days","milliseconds"],JY=/^(-?)(?:(\d+)\.)?(\d+):(\d\d)(?::(\d\d)(?:\.(\d\d\d))?)?/;function Sn(t,e){return typeof t=="string"?QY(t):typeof t=="object"&&t?EM(t):typeof t=="number"?EM({[e||"milliseconds"]:t}):null}function QY(t){let e=JY.exec(t);if(e){let n=e[1]?-1:1;return{years:0,months:0,days:n*(e[2]?parseInt(e[2],10):0),milliseconds:n*((e[3]?parseInt(e[3],10):0)*60*60*1e3+(e[4]?parseInt(e[4],10):0)*60*1e3+(e[5]?parseInt(e[5],10):0)*1e3+(e[6]?parseInt(e[6],10):0))}}return null}function EM(t){let e={years:t.years||t.year||0,months:t.months||t.month||0,days:t.days||t.day||0,milliseconds:(t.hours||t.hour||0)*60*60*1e3+(t.minutes||t.minute||0)*60*1e3+(t.seconds||t.second||0)*1e3+(t.milliseconds||t.millisecond||t.ms||0)},n=t.weeks||t.week;return n&&(e.days+=n*7,e.specifiedWeeks=!0),e}function eZ(t,e){return t.years===e.years&&t.months===e.months&&t.days===e.days&&t.milliseconds===e.milliseconds}function Tx(t,e){return{years:t.years+e.years,months:t.months+e.months,days:t.days+e.days,milliseconds:t.milliseconds+e.milliseconds}}function tZ(t,e){return{years:t.years-e.years,months:t.months-e.months,days:t.days-e.days,milliseconds:t.milliseconds-e.milliseconds}}function nZ(t,e){return{years:t.years*e,months:t.months*e,days:t.days*e,milliseconds:t.milliseconds*e}}function rZ(t){return Ju(t)/365}function iZ(t){return Ju(t)/30}function Ju(t){return co(t)/864e5}function co(t){return t.years*(365*864e5)+t.months*(30*864e5)+t.days*864e5+t.milliseconds}function Ax(t,e){let n=null;for(let r=0;r<kM.length;r+=1){let i=kM[r];if(e[i]){let s=t[i]/e[i];if(!Ng(s)||n!==null&&n!==s)return null;n=s}else if(t[i])return null}return n}function Mx(t){let e=t.milliseconds;if(e){if(e%1e3!==0)return{unit:"millisecond",value:e};if(e%(1e3*60)!==0)return{unit:"second",value:e/1e3};if(e%(1e3*60*60)!==0)return{unit:"minute",value:e/(1e3*60)};if(e)return{unit:"hour",value:e/(1e3*60*60)}}return t.days?t.specifiedWeeks&&t.days%7===0?{unit:"week",value:t.days/7}:{unit:"day",value:t.days}:t.months?{unit:"month",value:t.months}:t.years?{unit:"year",value:t.years}:{unit:"millisecond",value:0}}function ol(t,e,n){if(t===e)return!0;let r=t.length,i;if(r!==e.length)return!1;for(i=0;i<r;i+=1)if(!(n?n(t[i],e[i]):t[i]===e[i]))return!1;return!0}const sZ=["sun","mon","tue","wed","thu","fri","sat"];function SM(t,e){let n=cl(t);return n[2]+=e*7,es(n)}function qr(t,e){let n=cl(t);return n[2]+=e,es(n)}function al(t,e){let n=cl(t);return n[6]+=e,es(n)}function oZ(t,e){return ll(t,e)/7}function ll(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60*24)}function aZ(t,e){return(e.valueOf()-t.valueOf())/(1e3*60*60)}function lZ(t,e){return(e.valueOf()-t.valueOf())/(1e3*60)}function cZ(t,e){return(e.valueOf()-t.valueOf())/1e3}function uZ(t,e){let n=nr(t),r=nr(e);return{years:0,months:0,days:Math.round(ll(n,r)),milliseconds:e.valueOf()-r.valueOf()-(t.valueOf()-n.valueOf())}}function dZ(t,e){let n=Rg(t,e);return n!==null&&n%7===0?n/7:null}function Rg(t,e){return ul(t)===ul(e)?Math.round(ll(t,e)):null}function nr(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()])}function hZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours()])}function fZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes()])}function pZ(t){return es([t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()])}function mZ(t,e,n){let r=t.getUTCFullYear(),i=Dx(t,r,e,n);if(i<1)return Dx(t,r-1,e,n);let s=Dx(t,r+1,e,n);return s>=1?Math.min(i,s):i}function Dx(t,e,n,r){let i=es([e,0,1+gZ(e,n,r)]),s=nr(t),a=Math.round(ll(i,s));return Math.floor(a/7)+1}function gZ(t,e,n){let r=7+e-n;return-((7+es([t,0,r]).getUTCDay()-e)%7)+r-1}function CM(t){return[t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()]}function TM(t){return new Date(t[0],t[1]||0,t[2]==null?1:t[2],t[3]||0,t[4]||0,t[5]||0)}function cl(t){return[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()]}function es(t){return t.length===1&&(t=t.concat([0])),new Date(Date.UTC(...t))}function AM(t){return!isNaN(t.valueOf())}function ul(t){return t.getUTCHours()*1e3*60*60+t.getUTCMinutes()*1e3*60+t.getUTCSeconds()*1e3+t.getUTCMilliseconds()}function MM(t,e,n=!1){let r=t.toISOString();return r=r.replace(".000",""),n&&(r=r.replace("T00:00:00Z","")),r.length>10&&(e==null?r=r.replace("Z",""):e!==0&&(r=r.replace("Z",Ix(e,!0)))),r}function uf(t){return t.toISOString().replace(/T.*$/,"")}function yZ(t){return t.toISOString().match(/^\d{4}-\d{2}/)[0]}function bZ(t){return Ku(t.getUTCHours(),2)+":"+Ku(t.getUTCMinutes(),2)+":"+Ku(t.getUTCSeconds(),2)}function Ix(t,e=!1){let n=t<0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),s=Math.round(r%60);return e?`${n+Ku(i,2)}:${Ku(s,2)}`:`GMT${n}${i}${s?`:${Ku(s,2)}`:""}`}function Ht(t,e,n){let r,i;return function(...s){if(!r)i=t.apply(this,s);else if(!ol(r,s)){let a=t.apply(this,s);(!e||!e(a,i))&&(i=a)}return r=s,i}}function Og(t,e,n){let r,i;return s=>(r?Ro(r,s)||(i=t.call(this,s)):i=t.call(this,s),r=s,i)}const DM={week:3,separator:0,omitZeroMinute:0,meridiem:0,omitCommas:0},Bg={timeZoneName:7,era:6,year:5,month:4,day:2,weekday:2,hour:1,minute:1,second:1},Vg=/\s*([ap])\.?m\.?/i,_Z=/,/g,xZ=/\s+/g,vZ=/\u200e/g,wZ=/UTC|GMT/;class kZ{constructor(e){let n={},r={},i=0;for(let s in e)s in DM?(r[s]=e[s],i=Math.max(DM[s],i)):(n[s]=e[s],s in Bg&&(i=Math.max(Bg[s],i)));this.standardDateProps=n,this.extendedSettings=r,this.severity=i,this.buildFormattingFunc=Ht(IM)}format(e,n){return this.buildFormattingFunc(this.standardDateProps,this.extendedSettings,n)(e)}formatRange(e,n,r,i){let{standardDateProps:s,extendedSettings:a}=this,o=MZ(e.marker,n.marker,r.calendarSystem);if(!o)return this.format(e,r);let p=o;p>1&&(s.year==="numeric"||s.year==="2-digit")&&(s.month==="numeric"||s.month==="2-digit")&&(s.day==="numeric"||s.day==="2-digit")&&(p=1);let g=this.format(e,r),y=this.format(n,r);if(g===y)return g;let v=DZ(s,p),E=IM(v,a,r),T=E(e),D=E(n),N=IZ(g,T,y,D),B=a.separator||i||r.defaultSeparator||"";return N?N.before+T+B+D+N.after:g+B+y}getLargestUnit(){switch(this.severity){case 7:case 6:case 5:return"year";case 4:return"month";case 3:return"week";case 2:return"day";default:return"time"}}}function IM(t,e,n){let r=Object.keys(t).length;return r===1&&t.timeZoneName==="short"?i=>Ix(i.timeZoneOffset):r===0&&e.week?i=>AZ(n.computeWeekNumber(i.marker),n.weekText,n.weekTextLong,n.locale,e.week):EZ(t,e,n)}function EZ(t,e,n){t=Object.assign({},t),e=Object.assign({},e),SZ(t,e),t.timeZone="UTC";let r=new Intl.DateTimeFormat(n.locale.codes,t),i;if(e.omitZeroMinute){let s=Object.assign({},t);delete s.minute,i=new Intl.DateTimeFormat(n.locale.codes,s)}return s=>{let{marker:a}=s,o;i&&!a.getUTCMinutes()?o=i:o=r;let p=o.format(a);return CZ(p,s,t,e,n)}}function SZ(t,e){t.timeZoneName&&(t.hour||(t.hour="2-digit"),t.minute||(t.minute="2-digit")),t.timeZoneName==="long"&&(t.timeZoneName="short"),e.omitZeroMinute&&(t.second||t.millisecond)&&delete e.omitZeroMinute}function CZ(t,e,n,r,i){return t=t.replace(vZ,""),n.timeZoneName==="short"&&(t=TZ(t,i.timeZone==="UTC"||e.timeZoneOffset==null?"UTC":Ix(e.timeZoneOffset))),r.omitCommas&&(t=t.replace(_Z,"").trim()),r.omitZeroMinute&&(t=t.replace(":00","")),r.meridiem===!1?t=t.replace(Vg,"").trim():r.meridiem==="narrow"?t=t.replace(Vg,(s,a)=>a.toLocaleLowerCase()):r.meridiem==="short"?t=t.replace(Vg,(s,a)=>`${a.toLocaleLowerCase()}m`):r.meridiem==="lowercase"&&(t=t.replace(Vg,s=>s.toLocaleLowerCase())),t=t.replace(xZ," "),t=t.trim(),t}function TZ(t,e){let n=!1;return t=t.replace(wZ,()=>(n=!0,e)),n||(t+=` ${e}`),t}function AZ(t,e,n,r,i){let s=[];return i==="long"?s.push(n):(i==="short"||i==="narrow")&&s.push(e),(i==="long"||i==="short")&&s.push(" "),s.push(r.simpleNumberFormat.format(t)),r.options.direction==="rtl"&&s.reverse(),s.join("")}function MZ(t,e,n){return n.getMarkerYear(t)!==n.getMarkerYear(e)?5:n.getMarkerMonth(t)!==n.getMarkerMonth(e)?4:n.getMarkerDay(t)!==n.getMarkerDay(e)?2:ul(t)!==ul(e)?1:0}function DZ(t,e){let n={};for(let r in t)(!(r in Bg)||Bg[r]<=e)&&(n[r]=t[r]);return n}function IZ(t,e,n,r){let i=0;for(;i<t.length;){let s=t.indexOf(e,i);if(s===-1)break;let a=t.substr(0,s);i=s+e.length;let o=t.substr(i),p=0;for(;p<n.length;){let g=n.indexOf(r,p);if(g===-1)break;let y=n.substr(0,g);p=g+r.length;let v=n.substr(p);if(a===y&&o===v)return{before:a,after:o}}}return null}function PM(t,e){let n=e.markerToArray(t.marker);return{marker:t.marker,timeZoneOffset:t.timeZoneOffset,array:n,year:n[0],month:n[1],day:n[2],hour:n[3],minute:n[4],second:n[5],millisecond:n[6]}}function zg(t,e,n,r){let i=PM(t,n.calendarSystem),s=e?PM(e,n.calendarSystem):null;return{date:i,start:i,end:s,timeZone:n.timeZone,localeCodes:n.locale.codes,defaultSeparator:r||n.defaultSeparator}}class PZ{constructor(e){this.cmdStr=e}format(e,n,r){return n.cmdFormatter(this.cmdStr,zg(e,null,n,r))}formatRange(e,n,r,i){return r.cmdFormatter(this.cmdStr,zg(e,n,r,i))}}class NZ{constructor(e){this.func=e}format(e,n,r){return this.func(zg(e,null,n,r))}formatRange(e,n,r,i){return this.func(zg(e,n,r,i))}}function or(t){return typeof t=="object"&&t?new kZ(t):typeof t=="string"?new PZ(t):typeof t=="function"?new NZ(t):null}const NM={navLinkDayClick:Ie,navLinkWeekClick:Ie,duration:Sn,bootstrapFontAwesome:Ie,buttonIcons:Ie,customButtons:Ie,defaultAllDayEventDuration:Sn,defaultTimedEventDuration:Sn,nextDayThreshold:Sn,scrollTime:Sn,scrollTimeReset:Boolean,slotMinTime:Sn,slotMaxTime:Sn,dayPopoverFormat:or,slotDuration:Sn,snapDuration:Sn,headerToolbar:Ie,footerToolbar:Ie,defaultRangeSeparator:String,titleRangeSeparator:String,forceEventDuration:Boolean,dayHeaders:Boolean,dayHeaderFormat:or,dayHeaderClassNames:Ie,dayHeaderContent:Ie,dayHeaderDidMount:Ie,dayHeaderWillUnmount:Ie,dayCellClassNames:Ie,dayCellContent:Ie,dayCellDidMount:Ie,dayCellWillUnmount:Ie,initialView:String,aspectRatio:Number,weekends:Boolean,weekNumberCalculation:Ie,weekNumbers:Boolean,weekNumberClassNames:Ie,weekNumberContent:Ie,weekNumberDidMount:Ie,weekNumberWillUnmount:Ie,editable:Boolean,viewClassNames:Ie,viewDidMount:Ie,viewWillUnmount:Ie,nowIndicator:Boolean,nowIndicatorClassNames:Ie,nowIndicatorContent:Ie,nowIndicatorDidMount:Ie,nowIndicatorWillUnmount:Ie,showNonCurrentDates:Boolean,lazyFetching:Boolean,startParam:String,endParam:String,timeZoneParam:String,timeZone:String,locales:Ie,locale:Ie,themeSystem:String,dragRevertDuration:Number,dragScroll:Boolean,allDayMaintainDuration:Boolean,unselectAuto:Boolean,dropAccept:Ie,eventOrder:qY,eventOrderStrict:Boolean,handleWindowResize:Boolean,windowResizeDelay:Number,longPressDelay:Number,eventDragMinDistance:Number,expandRows:Boolean,height:Ie,contentHeight:Ie,direction:String,weekNumberFormat:or,eventResizableFromStart:Boolean,displayEventTime:Boolean,displayEventEnd:Boolean,weekText:String,weekTextLong:String,progressiveEventRendering:Boolean,businessHours:Ie,initialDate:Ie,now:Ie,eventDataTransform:Ie,stickyHeaderDates:Ie,stickyFooterScrollbar:Ie,viewHeight:Ie,defaultAllDay:Boolean,eventSourceFailure:Ie,eventSourceSuccess:Ie,eventDisplay:String,eventStartEditable:Boolean,eventDurationEditable:Boolean,eventOverlap:Ie,eventConstraint:Ie,eventAllow:Ie,eventBackgroundColor:String,eventBorderColor:String,eventTextColor:String,eventColor:String,eventClassNames:Ie,eventContent:Ie,eventDidMount:Ie,eventWillUnmount:Ie,selectConstraint:Ie,selectOverlap:Ie,selectAllow:Ie,droppable:Boolean,unselectCancel:String,slotLabelFormat:Ie,slotLaneClassNames:Ie,slotLaneContent:Ie,slotLaneDidMount:Ie,slotLaneWillUnmount:Ie,slotLabelClassNames:Ie,slotLabelContent:Ie,slotLabelDidMount:Ie,slotLabelWillUnmount:Ie,dayMaxEvents:Ie,dayMaxEventRows:Ie,dayMinWidth:Number,slotLabelInterval:Sn,allDayText:String,allDayClassNames:Ie,allDayContent:Ie,allDayDidMount:Ie,allDayWillUnmount:Ie,slotMinWidth:Number,navLinks:Boolean,eventTimeFormat:or,rerenderDelay:Number,moreLinkText:Ie,moreLinkHint:Ie,selectMinDistance:Number,selectable:Boolean,selectLongPressDelay:Number,eventLongPressDelay:Number,selectMirror:Boolean,eventMaxStack:Number,eventMinHeight:Number,eventMinWidth:Number,eventShortHeight:Number,slotEventOverlap:Boolean,plugins:Ie,firstDay:Number,dayCount:Number,dateAlignment:String,dateIncrement:Sn,hiddenDays:Ie,fixedWeekCount:Boolean,validRange:Ie,visibleRange:Ie,titleFormat:Ie,eventInteractive:Boolean,noEventsText:String,viewHint:Ie,navLinkHint:Ie,closeHint:String,timeHint:String,eventHint:String,moreLinkClick:Ie,moreLinkClassNames:Ie,moreLinkContent:Ie,moreLinkDidMount:Ie,moreLinkWillUnmount:Ie,monthStartFormat:or,handleCustomRendering:Ie,customRenderingMetaMap:Ie,customRenderingReplaces:Boolean},df={eventDisplay:"auto",defaultRangeSeparator:" - ",titleRangeSeparator:" – ",defaultTimedEventDuration:"01:00:00",defaultAllDayEventDuration:{day:1},forceEventDuration:!1,nextDayThreshold:"00:00:00",dayHeaders:!0,initialView:"",aspectRatio:1.35,headerToolbar:{start:"title",center:"",end:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberCalculation:"local",editable:!1,nowIndicator:!1,scrollTime:"06:00:00",scrollTimeReset:!0,slotMinTime:"00:00:00",slotMaxTime:"24:00:00",showNonCurrentDates:!0,lazyFetching:!0,startParam:"start",endParam:"end",timeZoneParam:"timeZone",timeZone:"local",locales:[],locale:"",themeSystem:"standard",dragRevertDuration:500,dragScroll:!0,allDayMaintainDuration:!1,unselectAuto:!0,dropAccept:"*",eventOrder:"start,-duration,allDay,title",dayPopoverFormat:{month:"long",day:"numeric",year:"numeric"},handleWindowResize:!0,windowResizeDelay:100,longPressDelay:1e3,eventDragMinDistance:5,expandRows:!1,navLinks:!1,selectable:!1,eventMinHeight:15,eventMinWidth:30,eventShortHeight:30,monthStartFormat:{month:"long",day:"numeric"}},RM={datesSet:Ie,eventsSet:Ie,eventAdd:Ie,eventChange:Ie,eventRemove:Ie,windowResize:Ie,eventClick:Ie,eventMouseEnter:Ie,eventMouseLeave:Ie,select:Ie,unselect:Ie,loading:Ie,_unmount:Ie,_beforeprint:Ie,_afterprint:Ie,_noEventDrop:Ie,_noEventResize:Ie,_resize:Ie,_scrollRequest:Ie},OM={buttonText:Ie,buttonHints:Ie,views:Ie,plugins:Ie,initialEvents:Ie,events:Ie,eventSources:Ie},kc={headerToolbar:Ec,footerToolbar:Ec,buttonText:Ec,buttonHints:Ec,buttonIcons:Ec,dateIncrement:Ec,plugins:Lg,events:Lg,eventSources:Lg,resources:Lg};function Ec(t,e){return typeof t=="object"&&typeof e=="object"&&t&&e?Ro(t,e):t===e}function Lg(t,e){return Array.isArray(t)&&Array.isArray(e)?ol(t,e):t===e}const RZ={type:String,component:Ie,buttonText:String,buttonTextKey:String,dateProfileGeneratorClass:Ie,usesMinMaxTime:Boolean,classNames:Ie,content:Ie,didMount:Ie,willUnmount:Ie};function Px(t){return Rx(t,kc)}function Nx(t,e){let n={},r={};for(let i in e)i in t&&(n[i]=e[i](t[i]));for(let i in t)i in e||(r[i]=t[i]);return{refined:n,extra:r}}function Ie(t){return t}const{hasOwnProperty:Fg}=Object.prototype;function Rx(t,e){let n={};if(e){for(let r in e)if(e[r]===Ec){let i=[];for(let s=t.length-1;s>=0;s-=1){let a=t[s][r];if(typeof a=="object"&&a)i.unshift(a);else if(a!==void 0){n[r]=a;break}}i.length&&(n[r]=Rx(i))}}for(let r=t.length-1;r>=0;r-=1){let i=t[r];for(let s in i)s in n||(n[s]=i[s])}return n}function Sc(t,e){let n={};for(let r in t)e(t[r],r)&&(n[r]=t[r]);return n}function ha(t,e){let n={};for(let r in t)n[r]=e(t[r],r);return n}function BM(t){let e={};for(let n of t)e[n]=!0;return e}function Ox(t){let e=[];for(let n in t)e.push(t[n]);return e}function Ro(t,e){if(t===e)return!0;for(let n in t)if(Fg.call(t,n)&&!(n in e))return!1;for(let n in e)if(Fg.call(e,n)&&t[n]!==e[n])return!1;return!0}const OZ=/^on[A-Z]/;function BZ(t,e){const n=Bx(t,e);for(let r of n)if(!OZ.test(r))return!1;return!0}function Bx(t,e){let n=[];for(let r in t)Fg.call(t,r)&&(r in e||n.push(r));for(let r in e)Fg.call(e,r)&&t[r]!==e[r]&&n.push(r);return n}function Vx(t,e,n={}){if(t===e)return!0;for(let r in e)if(!(r in t&&VZ(t[r],e[r],n[r])))return!1;for(let r in t)if(!(r in e))return!1;return!0}function VZ(t,e,n){return t===e||n===!0?!0:n?n(t,e):!1}function zZ(t,e=0,n,r=1){let i=[];n==null&&(n=Object.keys(t).length);for(let s=e;s<n;s+=r){let a=t[s];a!==void 0&&i.push(a)}return i}let VM={};function LZ(t,e){VM[t]=e}function FZ(t){return new VM[t]}class $Z{getMarkerYear(e){return e.getUTCFullYear()}getMarkerMonth(e){return e.getUTCMonth()}getMarkerDay(e){return e.getUTCDate()}arrayToMarker(e){return es(e)}markerToArray(e){return cl(e)}}LZ("gregory",$Z);const jZ=/^\s*(\d{4})(-?(\d{2})(-?(\d{2})([T ](\d{2}):?(\d{2})(:?(\d{2})(\.(\d+))?)?(Z|(([-+])(\d{2})(:?(\d{2}))?))?)?)?)?$/;function HZ(t){let e=jZ.exec(t);if(e){let n=new Date(Date.UTC(Number(e[1]),e[3]?Number(e[3])-1:0,Number(e[5]||1),Number(e[7]||0),Number(e[8]||0),Number(e[10]||0),e[12]?+`0.${e[12]}`*1e3:0));if(AM(n)){let r=null;return e[13]&&(r=(e[15]==="-"?-1:1)*(Number(e[16]||0)*60+Number(e[18]||0))),{marker:n,isTimeUnspecified:!e[6],timeZoneOffset:r}}}return null}class UZ{constructor(e){let n=this.timeZone=e.timeZone,r=n!=="local"&&n!=="UTC";e.namedTimeZoneImpl&&r&&(this.namedTimeZoneImpl=new e.namedTimeZoneImpl(n)),this.canComputeOffset=!!(!r||this.namedTimeZoneImpl),this.calendarSystem=FZ(e.calendarSystem),this.locale=e.locale,this.weekDow=e.locale.week.dow,this.weekDoy=e.locale.week.doy,e.weekNumberCalculation==="ISO"&&(this.weekDow=1,this.weekDoy=4),typeof e.firstDay=="number"&&(this.weekDow=e.firstDay),typeof e.weekNumberCalculation=="function"&&(this.weekNumberFunc=e.weekNumberCalculation),this.weekText=e.weekText!=null?e.weekText:e.locale.options.weekText,this.weekTextLong=(e.weekTextLong!=null?e.weekTextLong:e.locale.options.weekTextLong)||this.weekText,this.cmdFormatter=e.cmdFormatter,this.defaultSeparator=e.defaultSeparator}createMarker(e){let n=this.createMarkerMeta(e);return n===null?null:n.marker}createNowMarker(){return this.canComputeOffset?this.timestampToMarker(new Date().valueOf()):es(CM(new Date))}createMarkerMeta(e){if(typeof e=="string")return this.parse(e);let n=null;return typeof e=="number"?n=this.timestampToMarker(e):e instanceof Date?(e=e.valueOf(),isNaN(e)||(n=this.timestampToMarker(e))):Array.isArray(e)&&(n=es(e)),n===null||!AM(n)?null:{marker:n,isTimeUnspecified:!1,forcedTzo:null}}parse(e){let n=HZ(e);if(n===null)return null;let{marker:r}=n,i=null;return n.timeZoneOffset!==null&&(this.canComputeOffset?r=this.timestampToMarker(r.valueOf()-n.timeZoneOffset*60*1e3):i=n.timeZoneOffset),{marker:r,isTimeUnspecified:n.isTimeUnspecified,forcedTzo:i}}getYear(e){return this.calendarSystem.getMarkerYear(e)}getMonth(e){return this.calendarSystem.getMarkerMonth(e)}getDay(e){return this.calendarSystem.getMarkerDay(e)}add(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n.years,r[1]+=n.months,r[2]+=n.days,r[6]+=n.milliseconds,this.calendarSystem.arrayToMarker(r)}subtract(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]-=n.years,r[1]-=n.months,r[2]-=n.days,r[6]-=n.milliseconds,this.calendarSystem.arrayToMarker(r)}addYears(e,n){let r=this.calendarSystem.markerToArray(e);return r[0]+=n,this.calendarSystem.arrayToMarker(r)}addMonths(e,n){let r=this.calendarSystem.markerToArray(e);return r[1]+=n,this.calendarSystem.arrayToMarker(r)}diffWholeYears(e,n){let{calendarSystem:r}=this;return ul(e)===ul(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)&&r.getMarkerMonth(e)===r.getMarkerMonth(n)?r.getMarkerYear(n)-r.getMarkerYear(e):null}diffWholeMonths(e,n){let{calendarSystem:r}=this;return ul(e)===ul(n)&&r.getMarkerDay(e)===r.getMarkerDay(n)?r.getMarkerMonth(n)-r.getMarkerMonth(e)+(r.getMarkerYear(n)-r.getMarkerYear(e))*12:null}greatestWholeUnit(e,n){let r=this.diffWholeYears(e,n);return r!==null?{unit:"year",value:r}:(r=this.diffWholeMonths(e,n),r!==null?{unit:"month",value:r}:(r=dZ(e,n),r!==null?{unit:"week",value:r}:(r=Rg(e,n),r!==null?{unit:"day",value:r}:(r=aZ(e,n),Ng(r)?{unit:"hour",value:r}:(r=lZ(e,n),Ng(r)?{unit:"minute",value:r}:(r=cZ(e,n),Ng(r)?{unit:"second",value:r}:{unit:"millisecond",value:n.valueOf()-e.valueOf()}))))))}countDurationsBetween(e,n,r){let i;return r.years&&(i=this.diffWholeYears(e,n),i!==null)?i/rZ(r):r.months&&(i=this.diffWholeMonths(e,n),i!==null)?i/iZ(r):r.days&&(i=Rg(e,n),i!==null)?i/Ju(r):(n.valueOf()-e.valueOf())/co(r)}startOf(e,n){return n==="year"?this.startOfYear(e):n==="month"?this.startOfMonth(e):n==="week"?this.startOfWeek(e):n==="day"?nr(e):n==="hour"?hZ(e):n==="minute"?fZ(e):n==="second"?pZ(e):null}startOfYear(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e)])}startOfMonth(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e)])}startOfWeek(e){return this.calendarSystem.arrayToMarker([this.calendarSystem.getMarkerYear(e),this.calendarSystem.getMarkerMonth(e),e.getUTCDate()-(e.getUTCDay()-this.weekDow+7)%7])}computeWeekNumber(e){return this.weekNumberFunc?this.weekNumberFunc(this.toDate(e)):mZ(e,this.weekDow,this.weekDoy)}format(e,n,r={}){return n.format({marker:e,timeZoneOffset:r.forcedTzo!=null?r.forcedTzo:this.offsetForMarker(e)},this)}formatRange(e,n,r,i={}){return i.isEndExclusive&&(n=al(n,-1)),r.formatRange({marker:e,timeZoneOffset:i.forcedStartTzo!=null?i.forcedStartTzo:this.offsetForMarker(e)},{marker:n,timeZoneOffset:i.forcedEndTzo!=null?i.forcedEndTzo:this.offsetForMarker(n)},this,i.defaultSeparator)}formatIso(e,n={}){let r=null;return n.omitTimeZoneOffset||(n.forcedTzo!=null?r=n.forcedTzo:r=this.offsetForMarker(e)),MM(e,r,n.omitTime)}timestampToMarker(e){return this.timeZone==="local"?es(CM(new Date(e))):this.timeZone==="UTC"||!this.namedTimeZoneImpl?new Date(e):es(this.namedTimeZoneImpl.timestampToArray(e))}offsetForMarker(e){return this.timeZone==="local"?-TM(cl(e)).getTimezoneOffset():this.timeZone==="UTC"?0:this.namedTimeZoneImpl?this.namedTimeZoneImpl.offsetForArray(cl(e)):null}toDate(e,n){return this.timeZone==="local"?TM(cl(e)):this.timeZone==="UTC"?new Date(e.valueOf()):this.namedTimeZoneImpl?new Date(e.valueOf()-this.namedTimeZoneImpl.offsetForArray(cl(e))*1e3*60):new Date(e.valueOf()-(n||0))}}class hf{constructor(e){this.iconOverrideOption&&this.setIconOverride(e[this.iconOverrideOption])}setIconOverride(e){let n,r;if(typeof e=="object"&&e){n=Object.assign({},this.iconClasses);for(r in e)n[r]=this.applyIconOverridePrefix(e[r]);this.iconClasses=n}else e===!1&&(this.iconClasses={})}applyIconOverridePrefix(e){let n=this.iconOverridePrefix;return n&&e.indexOf(n)!==0&&(e=n+e),e}getClass(e){return this.classes[e]||""}getIconClass(e,n){let r;return n&&this.rtlIconClasses?r=this.rtlIconClasses[e]||this.iconClasses[e]:r=this.iconClasses[e],r?`${this.baseIconClass} ${r}`:""}getCustomButtonIconClass(e){let n;return this.iconOverrideCustomButtonOption&&(n=e[this.iconOverrideCustomButtonOption],n)?`${this.baseIconClass} ${this.applyIconOverridePrefix(n)}`:""}}hf.prototype.classes={},hf.prototype.iconClasses={},hf.prototype.baseIconClass="",hf.prototype.iconOverridePrefix="";function $g(t){t();let e=jt.debounceRendering,n=[];function r(i){n.push(i)}for(jt.debounceRendering=r,af(ce(WZ,{}),document.createElement("div"));n.length;)n.shift()();jt.debounceRendering=e}class WZ extends bs{render(){return ce("div",{})}componentDidMount(){this.setState({})}}function zM(t){let e=gY(t),n=e.Provider;return e.Provider=function(){let r=!this.getChildContext,i=n.apply(this,arguments);if(r){let s=[];this.shouldComponentUpdate=a=>{this.props.value!==a.value&&s.forEach(o=>{o.context=a.value,o.forceUpdate()})},this.sub=a=>{s.push(a);let o=a.componentWillUnmount;a.componentWillUnmount=()=>{s.splice(s.indexOf(a),1),o&&o.call(a)}}}return i},e}class qZ{constructor(e,n,r,i){this.execFunc=e,this.emitter=n,this.scrollTime=r,this.scrollTimeReset=i,this.handleScrollRequest=s=>{this.queuedRequest=Object.assign({},this.queuedRequest||{},s),this.drain()},n.on("_scrollRequest",this.handleScrollRequest),this.fireInitialScroll()}detach(){this.emitter.off("_scrollRequest",this.handleScrollRequest)}update(e){e&&this.scrollTimeReset?this.fireInitialScroll():this.drain()}fireInitialScroll(){this.handleScrollRequest({time:this.scrollTime})}drain(){this.queuedRequest&&this.execFunc(this.queuedRequest)&&(this.queuedRequest=null)}}const fa=zM({});function GZ(t,e,n,r,i,s,a,o,p,g,y,v,E){return{dateEnv:i,options:n,pluginHooks:a,emitter:g,dispatch:o,getCurrentData:p,calendarApi:y,viewSpec:t,viewApi:e,dateProfileGenerator:r,theme:s,isRtl:n.direction==="rtl",addResizeHandler(T){g.on("_resize",T)},removeResizeHandler(T){g.off("_resize",T)},createScrollResponder(T){return new qZ(T,g,Sn(n.scrollTime),n.scrollTimeReset)},registerInteractiveComponent:v,unregisterInteractiveComponent:E}}class Cc extends bs{shouldComponentUpdate(e,n){return this.debug&&console.log(Bx(e,this.props),Bx(n,this.state)),!Vx(this.props,e,this.propEquality)||!Vx(this.state,n,this.stateEquality)}safeSetState(e){Vx(this.state,Object.assign(Object.assign({},this.state),e),this.stateEquality)||this.setState(e)}}Cc.addPropsEquality=YZ,Cc.addStateEquality=ZZ,Cc.contextType=fa,Cc.prototype.propEquality={},Cc.prototype.stateEquality={};class Rn extends Cc{}Rn.contextType=fa;function YZ(t){let e=Object.create(this.prototype.propEquality);Object.assign(e,t),this.prototype.propEquality=e}function ZZ(t){let e=Object.create(this.prototype.stateEquality);Object.assign(e,t),this.prototype.stateEquality=e}function pa(t,e){typeof t=="function"?t(e):t&&(t.current=e)}class zx extends Rn{constructor(){super(...arguments),this.id=wc(),this.queuedDomNodes=[],this.currentDomNodes=[],this.handleEl=e=>{const{options:n}=this.context,{generatorName:r}=this.props;(!n.customRenderingReplaces||!Lx(r,n))&&this.updateElRef(e)},this.updateElRef=e=>{this.props.elRef&&pa(this.props.elRef,e)}}render(){const{props:e,context:n}=this,{options:r}=n,{customGenerator:i,defaultGenerator:s,renderProps:a}=e,o=LM(e,[],this.handleEl);let p=!1,g,y=[],v;if(i!=null){const E=typeof i=="function"?i(a,ce):i;if(E===!0)p=!0;else{const T=E&&typeof E=="object";T&&"html"in E?o.dangerouslySetInnerHTML={__html:E.html}:T&&"domNodes"in E?y=Array.prototype.slice.call(E.domNodes):(T?MA(E):typeof E!="function")?g=E:v=E}}else p=!Lx(e.generatorName,r);return p&&s&&(g=s(a)),this.queuedDomNodes=y,this.currentGeneratorMeta=v,ce(e.elTag,o,g)}componentDidMount(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentDidUpdate(){this.applyQueueudDomNodes(),this.triggerCustomRendering(!0)}componentWillUnmount(){this.triggerCustomRendering(!1)}triggerCustomRendering(e){var n;const{props:r,context:i}=this,{handleCustomRendering:s,customRenderingMetaMap:a}=i.options;if(s){const o=(n=this.currentGeneratorMeta)!==null&&n!==void 0?n:a==null?void 0:a[r.generatorName];o&&s(Object.assign(Object.assign({id:this.id,isActive:e,containerEl:this.base,reportNewContainerEl:this.updateElRef,generatorMeta:o},r),{elClasses:(r.elClasses||[]).filter(XZ)}))}}applyQueueudDomNodes(){const{queuedDomNodes:e,currentDomNodes:n}=this,r=this.base;if(!ol(e,n)){n.forEach(Ex);for(let i of e)r.appendChild(i);this.currentDomNodes=e}}}zx.addPropsEquality({elClasses:ol,elStyle:Ro,elAttrs:BZ,renderProps:Ro});function Lx(t,e){var n;return!!(e.handleCustomRendering&&t&&(!((n=e.customRenderingMetaMap)===null||n===void 0)&&n[t]))}function LM(t,e,n){const r=Object.assign(Object.assign({},t.elAttrs),{ref:n});return(t.elClasses||e)&&(r.className=(t.elClasses||[]).concat(e||[]).concat(r.className||[]).filter(Boolean).join(" ")),t.elStyle&&(r.style=t.elStyle),r}function XZ(t){return!!t}const FM=zM(0);class xi extends bs{constructor(){super(...arguments),this.InnerContent=KZ.bind(void 0,this),this.handleEl=e=>{this.el=e,this.props.elRef&&(pa(this.props.elRef,e),e&&this.didMountMisfire&&this.componentDidMount())}}render(){const{props:e}=this,n=JZ(e.classNameGenerator,e.renderProps);if(e.children){const r=LM(e,n,this.handleEl),i=e.children(this.InnerContent,e.renderProps,r);return e.elTag?ce(e.elTag,r,i):i}else return ce(zx,Object.assign(Object.assign({},e),{elRef:this.handleEl,elTag:e.elTag||"div",elClasses:(e.elClasses||[]).concat(n),renderId:this.context}))}componentDidMount(){var e,n;this.el?(n=(e=this.props).didMount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el})):this.didMountMisfire=!0}componentWillUnmount(){var e,n;(n=(e=this.props).willUnmount)===null||n===void 0||n.call(e,Object.assign(Object.assign({},this.props.renderProps),{el:this.el}))}}xi.contextType=FM;function KZ(t,e){const n=t.props;return ce(zx,Object.assign({renderProps:n.renderProps,generatorName:n.generatorName,customGenerator:n.customGenerator,defaultGenerator:n.defaultGenerator,renderId:t.context},e))}function JZ(t,e){const n=typeof t=="function"?t(e):t||[];return typeof n=="string"?[n]:n}class ff extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,i={view:n.viewApi};return ce(xi,Object.assign({},e,{elTag:e.elTag||"div",elClasses:[...$M(e.viewSpec),...e.elClasses||[]],renderProps:i,classNameGenerator:r.viewClassNames,generatorName:void 0,didMount:r.viewDidMount,willUnmount:r.viewWillUnmount}),()=>e.children)}}function $M(t){return[`fc-${t.type}-view`,"fc-view"]}function QZ(t,e){let n=null,r=null;return t.start&&(n=e.createMarker(t.start)),t.end&&(r=e.createMarker(t.end)),!n&&!r||n&&r&&r<n?null:{start:n,end:r}}function jM(t,e){let n=[],{start:r}=e,i,s;for(t.sort(eX),i=0;i<t.length;i+=1)s=t[i],s.start>r&&n.push({start:r,end:s.start}),s.end>r&&(r=s.end);return r<e.end&&n.push({start:r,end:e.end}),n}function eX(t,e){return t.start.valueOf()-e.start.valueOf()}function dl(t,e){let{start:n,end:r}=t,i=null;return e.start!==null&&(n===null?n=e.start:n=new Date(Math.max(n.valueOf(),e.start.valueOf()))),e.end!=null&&(r===null?r=e.end:r=new Date(Math.min(r.valueOf(),e.end.valueOf()))),(n===null||r===null||n<r)&&(i={start:n,end:r}),i}function tX(t,e){return(t.start===null?null:t.start.valueOf())===(e.start===null?null:e.start.valueOf())&&(t.end===null?null:t.end.valueOf())===(e.end===null?null:e.end.valueOf())}function Fx(t,e){return(t.end===null||e.start===null||t.end>e.start)&&(t.start===null||e.end===null||t.start<e.end)}function jg(t,e){return(t.start===null||e.start!==null&&e.start>=t.start)&&(t.end===null||e.end!==null&&e.end<=t.end)}function ma(t,e){return(t.start===null||e>=t.start)&&(t.end===null||e<t.end)}function nX(t,e){return e.start!=null&&t<e.start?e.start:e.end!=null&&t>=e.end?new Date(e.end.valueOf()-1):t}function HM(t){let e=Math.floor(ll(t.start,t.end))||1,n=nr(t.start),r=qr(n,e);return{start:n,end:r}}function $x(t,e=Sn(0)){let n=null,r=null;if(t.end){r=nr(t.end);let i=t.end.valueOf()-r.valueOf();i&&i>=co(e)&&(r=qr(r,1))}return t.start&&(n=nr(t.start),r&&r<=n&&(r=qr(n,1))),{start:n,end:r}}function rX(t){let e=$x(t);return ll(e.start,e.end)>1}function Qu(t,e,n,r){return r==="year"?Sn(n.diffWholeYears(t,e),"year"):r==="month"?Sn(n.diffWholeMonths(t,e),"month"):uZ(t,e)}function iX(t,e){switch(e.type){case"CHANGE_DATE":return e.dateMarker;default:return t}}function sX(t,e){let n=t.initialDate;return n!=null?e.createMarker(n):pf(t.now,e)}function pf(t,e){return typeof t=="function"&&(t=t()),t==null?e.createNowMarker():e.createMarker(t)}class UM{constructor(e){this.props=e,this.nowDate=pf(e.nowInput,e.dateEnv),this.initHiddenDays()}buildPrev(e,n,r){let{dateEnv:i}=this.props,s=i.subtract(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,-1,r)}buildNext(e,n,r){let{dateEnv:i}=this.props,s=i.add(i.startOf(n,e.currentRangeUnit),e.dateIncrement);return this.build(s,1,r)}build(e,n,r=!0){let{props:i}=this,s,a,o,p,g,y;return s=this.buildValidRange(),s=this.trimHiddenDays(s),r&&(e=nX(e,s)),a=this.buildCurrentRangeInfo(e,n),o=/^(year|month|week|day)$/.test(a.unit),p=this.buildRenderRange(this.trimHiddenDays(a.range),a.unit,o),p=this.trimHiddenDays(p),g=p,i.showNonCurrentDates||(g=dl(g,a.range)),g=this.adjustActiveRange(g),g=dl(g,s),y=Fx(a.range,s),ma(p,e)||(e=p.start),{currentDate:e,validRange:s,currentRange:a.range,currentRangeUnit:a.unit,isRangeAllDay:o,activeRange:g,renderRange:p,slotMinTime:i.slotMinTime,slotMaxTime:i.slotMaxTime,isValid:y,dateIncrement:this.buildDateIncrement(a.duration)}}buildValidRange(){let e=this.props.validRangeInput,n=typeof e=="function"?e.call(this.props.calendarApi,this.nowDate):e;return this.refineRange(n)||{start:null,end:null}}buildCurrentRangeInfo(e,n){let{props:r}=this,i=null,s=null,a=null,o;return r.duration?(i=r.duration,s=r.durationUnit,a=this.buildRangeFromDuration(e,n,i,s)):(o=this.props.dayCount)?(s="day",a=this.buildRangeFromDayCount(e,n,o)):(a=this.buildCustomVisibleRange(e))?s=r.dateEnv.greatestWholeUnit(a.start,a.end).unit:(i=this.getFallbackDuration(),s=Mx(i).unit,a=this.buildRangeFromDuration(e,n,i,s)),{duration:i,unit:s,range:a}}getFallbackDuration(){return Sn({day:1})}adjustActiveRange(e){let{dateEnv:n,usesMinMaxTime:r,slotMinTime:i,slotMaxTime:s}=this.props,{start:a,end:o}=e;return r&&(Ju(i)<0&&(a=nr(a),a=n.add(a,i)),Ju(s)>1&&(o=nr(o),o=qr(o,-1),o=n.add(o,s))),{start:a,end:o}}buildRangeFromDuration(e,n,r,i){let{dateEnv:s,dateAlignment:a}=this.props,o,p,g;if(!a){let{dateIncrement:v}=this.props;v&&co(v)<co(r)?a=Mx(v).unit:a=i}Ju(r)<=1&&this.isHiddenDay(o)&&(o=this.skipHiddenDays(o,n),o=nr(o));function y(){o=s.startOf(e,a),p=s.add(o,r),g={start:o,end:p}}return y(),this.trimHiddenDays(g)||(e=this.skipHiddenDays(e,n),y()),g}buildRangeFromDayCount(e,n,r){let{dateEnv:i,dateAlignment:s}=this.props,a=0,o=e,p;s&&(o=i.startOf(o,s)),o=nr(o),o=this.skipHiddenDays(o,n),p=o;do p=qr(p,1),this.isHiddenDay(p)||(a+=1);while(a<r);return{start:o,end:p}}buildCustomVisibleRange(e){let{props:n}=this,r=n.visibleRangeInput,i=typeof r=="function"?r.call(n.calendarApi,n.dateEnv.toDate(e)):r,s=this.refineRange(i);return s&&(s.start==null||s.end==null)?null:s}buildRenderRange(e,n,r){return e}buildDateIncrement(e){let{dateIncrement:n}=this.props,r;return n||((r=this.props.dateAlignment)?Sn(1,r):e||Sn({days:1}))}refineRange(e){if(e){let n=QZ(e,this.props.dateEnv);return n&&(n=$x(n)),n}return null}initHiddenDays(){let e=this.props.hiddenDays||[],n=[],r=0,i;for(this.props.weekends===!1&&e.push(0,6),i=0;i<7;i+=1)(n[i]=e.indexOf(i)!==-1)||(r+=1);if(!r)throw new Error("invalid hiddenDays");this.isHiddenDayHash=n}trimHiddenDays(e){let{start:n,end:r}=e;return n&&(n=this.skipHiddenDays(n)),r&&(r=this.skipHiddenDays(r,-1,!0)),n==null||r==null||n<r?{start:n,end:r}:null}isHiddenDay(e){return e instanceof Date&&(e=e.getUTCDay()),this.isHiddenDayHash[e]}skipHiddenDays(e,n=1,r=!1){for(;this.isHiddenDayHash[(e.getUTCDay()+(r?n:0)+7)%7];)e=qr(e,n);return e}}function jx(t,e,n,r){return{instanceId:wc(),defId:t,range:e,forcedStartTzo:n??null,forcedEndTzo:r??null}}function oX(t,e,n,r){for(let i=0;i<r.length;i+=1){let s=r[i].parse(t,n);if(s){let{allDay:a}=t;return a==null&&(a=e,a==null&&(a=s.allDayGuess,a==null&&(a=!1))),{allDay:a,duration:s.duration,typeData:s.typeData,typeId:i}}}return null}function Tc(t,e,n){let{dateEnv:r,pluginHooks:i,options:s}=n,{defs:a,instances:o}=t;o=Sc(o,p=>!a[p.defId].recurringDef);for(let p in a){let g=a[p];if(g.recurringDef){let{duration:y}=g.recurringDef;y||(y=g.allDay?s.defaultAllDayEventDuration:s.defaultTimedEventDuration);let v=aX(g,y,e,r,i.recurringTypes);for(let E of v){let T=jx(p,{start:E,end:r.add(E,y)});o[T.instanceId]=T}}}return{defs:a,instances:o}}function aX(t,e,n,r,i){let a=i[t.recurringDef.typeId].expand(t.recurringDef.typeData,{start:r.subtract(n.start,e),end:n.end},r);return t.allDay&&(a=a.map(nr)),a}const Hg={id:String,groupId:String,title:String,url:String,interactive:Boolean},WM={start:Ie,end:Ie,date:Ie,allDay:Boolean},lX=Object.assign(Object.assign(Object.assign({},Hg),WM),{extendedProps:Ie});function qM(t,e,n,r,i=Hx(n),s,a){let{refined:o,extra:p}=GM(t,n,i),g=uX(e,n),y=oX(o,g,n.dateEnv,n.pluginHooks.recurringTypes);if(y){let E=Ux(o,p,e?e.sourceId:"",y.allDay,!!y.duration,n,s);return E.recurringDef={typeId:y.typeId,typeData:y.typeData,duration:y.duration},{def:E,instance:null}}let v=cX(o,g,n,r);if(v){let E=Ux(o,p,e?e.sourceId:"",v.allDay,v.hasEnd,n,s),T=jx(E.defId,v.range,v.forcedStartTzo,v.forcedEndTzo);return a&&E.publicId&&a[E.publicId]&&(T.instanceId=a[E.publicId]),{def:E,instance:T}}return null}function GM(t,e,n=Hx(e)){return Nx(t,n)}function Hx(t){return Object.assign(Object.assign(Object.assign({},Wg),lX),t.pluginHooks.eventRefiners)}function Ux(t,e,n,r,i,s,a){let o={title:t.title||"",groupId:t.groupId||"",publicId:t.id||"",url:t.url||"",recurringDef:null,defId:(a&&t.id?a[t.id]:"")||wc(),sourceId:n,allDay:r,hasEnd:i,interactive:t.interactive,ui:qg(t,s),extendedProps:Object.assign(Object.assign({},t.extendedProps||{}),e)};for(let p of s.pluginHooks.eventDefMemberAdders)Object.assign(o,p(t));return Object.freeze(o.ui.classNames),Object.freeze(o.extendedProps),o}function cX(t,e,n,r){let{allDay:i}=t,s,a=null,o=!1,p,g=null,y=t.start!=null?t.start:t.date;if(s=n.dateEnv.createMarkerMeta(y),s)a=s.marker;else if(!r)return null;return t.end!=null&&(p=n.dateEnv.createMarkerMeta(t.end)),i==null&&(e!=null?i=e:i=(!s||s.isTimeUnspecified)&&(!p||p.isTimeUnspecified)),i&&a&&(a=nr(a)),p&&(g=p.marker,i&&(g=nr(g)),a&&g<=a&&(g=null)),g?o=!0:r||(o=n.options.forceEventDuration||!1,g=n.dateEnv.add(a,i?n.options.defaultAllDayEventDuration:n.options.defaultTimedEventDuration)),{allDay:i,hasEnd:o,range:{start:a,end:g},forcedStartTzo:s?s.forcedTzo:null,forcedEndTzo:p?p.forcedTzo:null}}function uX(t,e){let n=null;return t&&(n=t.defaultAllDay),n==null&&(n=e.options.defaultAllDay),n}function mf(t,e,n,r,i,s){let a=_s(),o=Hx(n);for(let p of t){let g=qM(p,e,n,r,o,i,s);g&&Wx(g,a)}return a}function Wx(t,e=_s()){return e.defs[t.def.defId]=t.def,t.instance&&(e.instances[t.instance.instanceId]=t.instance),e}function qx(t,e){let n=t.instances[e];if(n){let r=t.defs[n.defId],i=Ug(t,s=>dX(r,s));return i.defs[r.defId]=r,i.instances[n.instanceId]=n,i}return _s()}function dX(t,e){return!!(t.groupId&&t.groupId===e.groupId)}function _s(){return{defs:{},instances:{}}}function Gx(t,e){return{defs:Object.assign(Object.assign({},t.defs),e.defs),instances:Object.assign(Object.assign({},t.instances),e.instances)}}function Ug(t,e){let n=Sc(t.defs,e),r=Sc(t.instances,i=>n[i.defId]);return{defs:n,instances:r}}function hX(t,e){let{defs:n,instances:r}=t,i={},s={};for(let a in n)e.defs[a]||(i[a]=n[a]);for(let a in r)!e.instances[a]&&i[r[a].defId]&&(s[a]=r[a]);return{defs:i,instances:s}}function fX(t,e){return Array.isArray(t)?mf(t,null,e,!0):typeof t=="object"&&t?mf([t],null,e,!0):t!=null?String(t):null}function YM(t){return Array.isArray(t)?t:typeof t=="string"?t.split(/\s+/):[]}const Wg={display:String,editable:Boolean,startEditable:Boolean,durationEditable:Boolean,constraint:Ie,overlap:Ie,allow:Ie,className:YM,classNames:YM,color:String,backgroundColor:String,borderColor:String,textColor:String},pX={display:null,startEditable:null,durationEditable:null,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]};function qg(t,e){let n=fX(t.constraint,e);return{display:t.display||null,startEditable:t.startEditable!=null?t.startEditable:t.editable,durationEditable:t.durationEditable!=null?t.durationEditable:t.editable,constraints:n!=null?[n]:[],overlap:t.overlap!=null?t.overlap:null,allows:t.allow!=null?[t.allow]:[],backgroundColor:t.backgroundColor||t.color||"",borderColor:t.borderColor||t.color||"",textColor:t.textColor||"",classNames:(t.className||[]).concat(t.classNames||[])}}function ZM(t){return t.reduce(mX,pX)}function mX(t,e){return{display:e.display!=null?e.display:t.display,startEditable:e.startEditable!=null?e.startEditable:t.startEditable,durationEditable:e.durationEditable!=null?e.durationEditable:t.durationEditable,constraints:t.constraints.concat(e.constraints),overlap:typeof e.overlap=="boolean"?e.overlap:t.overlap,allows:t.allows.concat(e.allows),backgroundColor:e.backgroundColor||t.backgroundColor,borderColor:e.borderColor||t.borderColor,textColor:e.textColor||t.textColor,classNames:t.classNames.concat(e.classNames)}}const gX={id:String,defaultAllDay:Boolean,url:String,format:String,events:Ie,eventDataTransform:Ie,success:Ie,failure:Ie};function XM(t,e,n=KM(e)){let r;if(typeof t=="string"?r={url:t}:typeof t=="function"||Array.isArray(t)?r={events:t}:typeof t=="object"&&t&&(r=t),r){let{refined:i,extra:s}=Nx(r,n),a=yX(i,e);if(a)return{_raw:t,isFetching:!1,latestFetchId:"",fetchRange:null,defaultAllDay:i.defaultAllDay,eventDataTransform:i.eventDataTransform,success:i.success,failure:i.failure,publicId:i.id||"",sourceId:wc(),sourceDefId:a.sourceDefId,meta:a.meta,ui:qg(i,e),extendedProps:s}}return null}function KM(t){return Object.assign(Object.assign(Object.assign({},Wg),gX),t.pluginHooks.eventSourceRefiners)}function yX(t,e){let n=e.pluginHooks.eventSourceDefs;for(let r=n.length-1;r>=0;r-=1){let s=n[r].parseMeta(t);if(s)return{sourceDefId:r,meta:s}}return null}function bX(t,e,n,r,i){switch(e.type){case"RECEIVE_EVENTS":return _X(t,n[e.sourceId],e.fetchId,e.fetchRange,e.rawEvents,i);case"RESET_RAW_EVENTS":return xX(t,n[e.sourceId],e.rawEvents,r.activeRange,i);case"ADD_EVENTS":return vX(t,e.eventStore,r?r.activeRange:null,i);case"RESET_EVENTS":return e.eventStore;case"MERGE_EVENTS":return Gx(t,e.eventStore);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return r?Tc(t,r.activeRange,i):t;case"REMOVE_EVENTS":return hX(t,e.eventStore);case"REMOVE_EVENT_SOURCE":return tD(t,e.sourceId);case"REMOVE_ALL_EVENT_SOURCES":return Ug(t,s=>!s.sourceId);case"REMOVE_ALL_EVENTS":return _s();default:return t}}function _X(t,e,n,r,i,s){if(e&&n===e.latestFetchId){let a=mf(JM(i,e,s),e,s);return r&&(a=Tc(a,r,s)),Gx(tD(t,e.sourceId),a)}return t}function xX(t,e,n,r,i){const{defIdMap:s,instanceIdMap:a}=kX(t);let o=mf(JM(n,e,i),e,i,!1,s,a);return Tc(o,r,i)}function JM(t,e,n){let r=n.options.eventDataTransform,i=e?e.eventDataTransform:null;return i&&(t=QM(t,i)),r&&(t=QM(t,r)),t}function QM(t,e){let n;if(!e)n=t;else{n=[];for(let r of t){let i=e(r);i?n.push(i):i==null&&n.push(r)}}return n}function vX(t,e,n,r){return n&&(e=Tc(e,n,r)),Gx(t,e)}function eD(t,e,n){let{defs:r}=t,i=ha(t.instances,s=>r[s.defId].allDay?s:Object.assign(Object.assign({},s),{range:{start:n.createMarker(e.toDate(s.range.start,s.forcedStartTzo)),end:n.createMarker(e.toDate(s.range.end,s.forcedEndTzo))},forcedStartTzo:n.canComputeOffset?null:s.forcedStartTzo,forcedEndTzo:n.canComputeOffset?null:s.forcedEndTzo}));return{defs:r,instances:i}}function tD(t,e){return Ug(t,n=>n.sourceId!==e)}function wX(t,e){return{defs:t.defs,instances:Sc(t.instances,n=>!e[n.instanceId])}}function kX(t){const{defs:e,instances:n}=t,r={},i={};for(let s in e){const a=e[s],{publicId:o}=a;o&&(r[o]=s)}for(let s in n){const a=n[s],o=e[a.defId],{publicId:p}=o;p&&(i[p]=s)}return{defIdMap:r,instanceIdMap:i}}class Gg{constructor(){this.handlers={},this.thisContext=null}setThisContext(e){this.thisContext=e}setOptions(e){this.options=e}on(e,n){EX(this.handlers,e,n)}off(e,n){SX(this.handlers,e,n)}trigger(e,...n){let r=this.handlers[e]||[],i=this.options&&this.options[e],s=[].concat(i||[],r);for(let a of s)a.apply(this.thisContext,n)}hasHandlers(e){return!!(this.handlers[e]&&this.handlers[e].length||this.options&&this.options[e])}}function EX(t,e,n){(t[e]||(t[e]=[])).push(n)}function SX(t,e,n){n?t[e]&&(t[e]=t[e].filter(r=>r!==n)):delete t[e]}const CX={startTime:"09:00",endTime:"17:00",daysOfWeek:[1,2,3,4,5],display:"inverse-background",classNames:"fc-non-business",groupId:"_businessHours"};function TX(t,e){return mf(AX(t),null,e)}function AX(t){let e;return t===!0?e=[{}]:Array.isArray(t)?e=t.filter(n=>n.daysOfWeek):typeof t=="object"&&t?e=[t]:e=[],e=e.map(n=>Object.assign(Object.assign({},CX),n)),e}function nD(t,e,n){n.emitter.trigger("select",Object.assign(Object.assign({},Yx(t,n)),{jsEvent:e?e.origEvent:null,view:n.viewApi||n.calendarApi.view}))}function MX(t,e){e.emitter.trigger("unselect",{jsEvent:t?t.origEvent:null,view:e.viewApi||e.calendarApi.view})}function Yx(t,e){let n={};for(let r of e.pluginHooks.dateSpanTransforms)Object.assign(n,r(t,e));return Object.assign(n,HX(t,e.dateEnv)),n}function rD(t,e,n){let{dateEnv:r,options:i}=n,s=e;return t?(s=nr(s),s=r.add(s,i.defaultAllDayEventDuration)):s=r.add(s,i.defaultTimedEventDuration),s}function Zx(t,e,n,r){let i=Yg(t.defs,e),s=_s();for(let a in t.defs){let o=t.defs[a];s.defs[a]=DX(o,i[a],n,r)}for(let a in t.instances){let o=t.instances[a],p=s.defs[o.defId];s.instances[a]=IX(o,p,i[o.defId],n,r)}return s}function DX(t,e,n,r){let i=n.standardProps||{};i.hasEnd==null&&e.durationEditable&&(n.startDelta||n.endDelta)&&(i.hasEnd=!0);let s=Object.assign(Object.assign(Object.assign({},t),i),{ui:Object.assign(Object.assign({},t.ui),i.ui)});n.extendedProps&&(s.extendedProps=Object.assign(Object.assign({},s.extendedProps),n.extendedProps));for(let a of r.pluginHooks.eventDefMutationAppliers)a(s,n,r);return!s.hasEnd&&r.options.forceEventDuration&&(s.hasEnd=!0),s}function IX(t,e,n,r,i){let{dateEnv:s}=i,a=r.standardProps&&r.standardProps.allDay===!0,o=r.standardProps&&r.standardProps.hasEnd===!1,p=Object.assign({},t);return a&&(p.range=HM(p.range)),r.datesDelta&&n.startEditable&&(p.range={start:s.add(p.range.start,r.datesDelta),end:s.add(p.range.end,r.datesDelta)}),r.startDelta&&n.durationEditable&&(p.range={start:s.add(p.range.start,r.startDelta),end:p.range.end}),r.endDelta&&n.durationEditable&&(p.range={start:p.range.start,end:s.add(p.range.end,r.endDelta)}),o&&(p.range={start:p.range.start,end:rD(e.allDay,p.range.start,i)}),e.allDay&&(p.range={start:nr(p.range.start),end:nr(p.range.end)}),p.range.end<p.range.start&&(p.range.end=rD(e.allDay,p.range.start,i)),p}class ed{constructor(e,n){this.context=e,this.internalEventSource=n}remove(){this.context.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:this.internalEventSource.sourceId})}refetch(){this.context.dispatch({type:"FETCH_EVENT_SOURCES",sourceIds:[this.internalEventSource.sourceId],isRefetch:!0})}get id(){return this.internalEventSource.publicId}get url(){return this.internalEventSource.meta.url}get format(){return this.internalEventSource.meta.format}}class ur{constructor(e,n,r){this._context=e,this._def=n,this._instance=r||null}setProp(e,n){if(e in WM)console.warn("Could not set date-related prop 'name'. Use one of the date-related methods instead.");else if(e==="id")n=Hg[e](n),this.mutate({standardProps:{publicId:n}});else if(e in Hg)n=Hg[e](n),this.mutate({standardProps:{[e]:n}});else if(e in Wg){let r=Wg[e](n);e==="color"?r={backgroundColor:n,borderColor:n}:e==="editable"?r={startEditable:n,durationEditable:n}:r={[e]:n},this.mutate({standardProps:{ui:r}})}else console.warn(`Could not set prop '${e}'. Use setExtendedProp instead.`)}setExtendedProp(e,n){this.mutate({extendedProps:{[e]:n}})}setStart(e,n={}){let{dateEnv:r}=this._context,i=r.createMarker(e);if(i&&this._instance){let s=this._instance.range,a=Qu(s.start,i,r,n.granularity);n.maintainDuration?this.mutate({datesDelta:a}):this.mutate({startDelta:a})}}setEnd(e,n={}){let{dateEnv:r}=this._context,i;if(!(e!=null&&(i=r.createMarker(e),!i))&&this._instance)if(i){let s=Qu(this._instance.range.end,i,r,n.granularity);this.mutate({endDelta:s})}else this.mutate({standardProps:{hasEnd:!1}})}setDates(e,n,r={}){let{dateEnv:i}=this._context,s={allDay:r.allDay},a=i.createMarker(e),o;if(a&&!(n!=null&&(o=i.createMarker(n),!o))&&this._instance){let p=this._instance.range;r.allDay===!0&&(p=HM(p));let g=Qu(p.start,a,i,r.granularity);if(o){let y=Qu(p.end,o,i,r.granularity);eZ(g,y)?this.mutate({datesDelta:g,standardProps:s}):this.mutate({startDelta:g,endDelta:y,standardProps:s})}else s.hasEnd=!1,this.mutate({datesDelta:g,standardProps:s})}}moveStart(e){let n=Sn(e);n&&this.mutate({startDelta:n})}moveEnd(e){let n=Sn(e);n&&this.mutate({endDelta:n})}moveDates(e){let n=Sn(e);n&&this.mutate({datesDelta:n})}setAllDay(e,n={}){let r={allDay:e},{maintainDuration:i}=n;i==null&&(i=this._context.options.allDayMaintainDuration),this._def.allDay!==e&&(r.hasEnd=i),this.mutate({standardProps:r})}formatRange(e){let{dateEnv:n}=this._context,r=this._instance,i=or(e);return this._def.hasEnd?n.formatRange(r.range.start,r.range.end,i,{forcedStartTzo:r.forcedStartTzo,forcedEndTzo:r.forcedEndTzo}):n.format(r.range.start,i,{forcedTzo:r.forcedStartTzo})}mutate(e){let n=this._instance;if(n){let r=this._def,i=this._context,{eventStore:s}=i.getCurrentData(),a=qx(s,n.instanceId);a=Zx(a,{"":{display:"",startEditable:!0,durationEditable:!0,constraints:[],overlap:null,allows:[],backgroundColor:"",borderColor:"",textColor:"",classNames:[]}},e,i);let p=new ur(i,r,n);this._def=a.defs[r.defId],this._instance=a.instances[n.instanceId],i.dispatch({type:"MERGE_EVENTS",eventStore:a}),i.emitter.trigger("eventChange",{oldEvent:p,event:this,relatedEvents:Ac(a,i,n),revert(){i.dispatch({type:"RESET_EVENTS",eventStore:s})}})}}remove(){let e=this._context,n=iD(this);e.dispatch({type:"REMOVE_EVENTS",eventStore:n}),e.emitter.trigger("eventRemove",{event:this,relatedEvents:[],revert(){e.dispatch({type:"MERGE_EVENTS",eventStore:n})}})}get source(){let{sourceId:e}=this._def;return e?new ed(this._context,this._context.getCurrentData().eventSources[e]):null}get start(){return this._instance?this._context.dateEnv.toDate(this._instance.range.start):null}get end(){return this._instance&&this._def.hasEnd?this._context.dateEnv.toDate(this._instance.range.end):null}get startStr(){let e=this._instance;return e?this._context.dateEnv.formatIso(e.range.start,{omitTime:this._def.allDay,forcedTzo:e.forcedStartTzo}):""}get endStr(){let e=this._instance;return e&&this._def.hasEnd?this._context.dateEnv.formatIso(e.range.end,{omitTime:this._def.allDay,forcedTzo:e.forcedEndTzo}):""}get id(){return this._def.publicId}get groupId(){return this._def.groupId}get allDay(){return this._def.allDay}get title(){return this._def.title}get url(){return this._def.url}get display(){return this._def.ui.display||"auto"}get startEditable(){return this._def.ui.startEditable}get durationEditable(){return this._def.ui.durationEditable}get constraint(){return this._def.ui.constraints[0]||null}get overlap(){return this._def.ui.overlap}get allow(){return this._def.ui.allows[0]||null}get backgroundColor(){return this._def.ui.backgroundColor}get borderColor(){return this._def.ui.borderColor}get textColor(){return this._def.ui.textColor}get classNames(){return this._def.ui.classNames}get extendedProps(){return this._def.extendedProps}toPlainObject(e={}){let n=this._def,{ui:r}=n,{startStr:i,endStr:s}=this,a={allDay:n.allDay};return n.title&&(a.title=n.title),i&&(a.start=i),s&&(a.end=s),n.publicId&&(a.id=n.publicId),n.groupId&&(a.groupId=n.groupId),n.url&&(a.url=n.url),r.display&&r.display!=="auto"&&(a.display=r.display),e.collapseColor&&r.backgroundColor&&r.backgroundColor===r.borderColor?a.color=r.backgroundColor:(r.backgroundColor&&(a.backgroundColor=r.backgroundColor),r.borderColor&&(a.borderColor=r.borderColor)),r.textColor&&(a.textColor=r.textColor),r.classNames.length&&(a.classNames=r.classNames),Object.keys(n.extendedProps).length&&(e.collapseExtendedProps?Object.assign(a,n.extendedProps):a.extendedProps=n.extendedProps),a}toJSON(){return this.toPlainObject()}}function iD(t){let e=t._def,n=t._instance;return{defs:{[e.defId]:e},instances:n?{[n.instanceId]:n}:{}}}function Ac(t,e,n){let{defs:r,instances:i}=t,s=[],a=n?n.instanceId:"";for(let o in i){let p=i[o],g=r[p.defId];p.instanceId!==a&&s.push(new ur(e,g,p))}return s}function Xx(t,e,n,r){let i={},s={},a={},o=[],p=[],g=Yg(t.defs,e);for(let y in t.defs){let v=t.defs[y];g[v.defId].display==="inverse-background"&&(v.groupId?(i[v.groupId]=[],a[v.groupId]||(a[v.groupId]=v)):s[y]=[])}for(let y in t.instances){let v=t.instances[y],E=t.defs[v.defId],T=g[E.defId],D=v.range,N=!E.allDay&&r?$x(D,r):D,B=dl(N,n);B&&(T.display==="inverse-background"?E.groupId?i[E.groupId].push(B):s[v.defId].push(B):T.display!=="none"&&(T.display==="background"?o:p).push({def:E,ui:T,instance:v,range:B,isStart:N.start&&N.start.valueOf()===B.start.valueOf(),isEnd:N.end&&N.end.valueOf()===B.end.valueOf()}))}for(let y in i){let v=i[y],E=jM(v,n);for(let T of E){let D=a[y],N=g[D.defId];o.push({def:D,ui:N,instance:null,range:T,isStart:!1,isEnd:!1})}}for(let y in s){let v=s[y],E=jM(v,n);for(let T of E)o.push({def:t.defs[y],ui:g[y],instance:null,range:T,isStart:!1,isEnd:!1})}return{bg:o,fg:p}}function PX(t){return t.ui.display==="background"||t.ui.display==="inverse-background"}function sD(t,e){t.fcSeg=e}function td(t){return t.fcSeg||t.parentNode.fcSeg||null}function Yg(t,e){return ha(t,n=>oD(n,e))}function oD(t,e){let n=[];return e[""]&&n.push(e[""]),e[t.defId]&&n.push(e[t.defId]),n.push(t.ui),ZM(n)}function Kx(t,e){let n=t.map(NX);return n.sort((r,i)=>GY(r,i,e)),n.map(r=>r._seg)}function NX(t){let{eventRange:e}=t,n=e.def,r=e.instance?e.instance.range:e.range,i=r.start?r.start.valueOf():0,s=r.end?r.end.valueOf():0;return Object.assign(Object.assign(Object.assign({},n.extendedProps),n),{id:n.publicId,start:i,end:s,duration:s-i,allDay:Number(n.allDay),_seg:t})}function RX(t,e){let{pluginHooks:n}=e,r=n.isDraggableTransformers,{def:i,ui:s}=t.eventRange,a=s.startEditable;for(let o of r)a=o(a,i,s,e);return a}function OX(t,e){return t.isStart&&t.eventRange.ui.durationEditable&&e.options.eventResizableFromStart}function BX(t,e){return t.isEnd&&t.eventRange.ui.durationEditable}function gf(t,e,n,r,i,s,a){let{dateEnv:o,options:p}=n,{displayEventTime:g,displayEventEnd:y}=p,v=t.eventRange.def,E=t.eventRange.instance;g==null&&(g=r!==!1),y==null&&(y=i!==!1);let T=E.range.start,D=E.range.end,N=s||t.start||t.eventRange.range.start,B=a||t.end||t.eventRange.range.end,V=nr(T).valueOf()===nr(N).valueOf(),U=nr(al(D,-1)).valueOf()===nr(al(B,-1)).valueOf();return g&&!v.allDay&&(V||U)?(N=V?T:N,B=U?D:B,y&&v.hasEnd?o.formatRange(N,B,e,{forcedStartTzo:s?null:E.forcedStartTzo,forcedEndTzo:a?null:E.forcedEndTzo}):o.format(N,e,{forcedTzo:s?null:E.forcedStartTzo})):""}function ga(t,e,n){let r=t.eventRange.range;return{isPast:r.end<=(n||e.start),isFuture:r.start>=(n||e.end),isToday:e&&ma(e,r.start)}}function VX(t){let e=["fc-event"];return t.isMirror&&e.push("fc-event-mirror"),t.isDraggable&&e.push("fc-event-draggable"),(t.isStartResizable||t.isEndResizable)&&e.push("fc-event-resizable"),t.isDragging&&e.push("fc-event-dragging"),t.isResizing&&e.push("fc-event-resizing"),t.isSelected&&e.push("fc-event-selected"),t.isStart&&e.push("fc-event-start"),t.isEnd&&e.push("fc-event-end"),t.isPast&&e.push("fc-event-past"),t.isToday&&e.push("fc-event-today"),t.isFuture&&e.push("fc-event-future"),e}function aD(t){return t.instance?t.instance.instanceId:`${t.def.defId}:${t.range.start.toISOString()}`}function Jx(t,e){let{def:n,instance:r}=t.eventRange,{url:i}=n;if(i)return{href:i};let{emitter:s,options:a}=e,{eventInteractive:o}=a;return o==null&&(o=n.interactive,o==null&&(o=!!s.hasHandlers("eventClick"))),o?vM(p=>{s.trigger("eventClick",{el:p.target,event:new ur(e,n,r),jsEvent:p,view:e.viewApi})}):{}}const zX={start:Ie,end:Ie,allDay:Boolean};function LX(t,e,n){let r=FX(t,e),{range:i}=r;if(!i.start)return null;if(!i.end){if(n==null)return null;i.end=e.add(i.start,n)}return r}function FX(t,e){let{refined:n,extra:r}=Nx(t,zX),i=n.start?e.createMarkerMeta(n.start):null,s=n.end?e.createMarkerMeta(n.end):null,{allDay:a}=n;return a==null&&(a=i&&i.isTimeUnspecified&&(!s||s.isTimeUnspecified)),Object.assign({range:{start:i?i.marker:null,end:s?s.marker:null},allDay:a},r)}function $X(t,e){return tX(t.range,e.range)&&t.allDay===e.allDay&&jX(t,e)}function jX(t,e){for(let n in e)if(n!=="range"&&n!=="allDay"&&t[n]!==e[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}function HX(t,e){return Object.assign(Object.assign({},cD(t.range,e,t.allDay)),{allDay:t.allDay})}function lD(t,e,n){return Object.assign(Object.assign({},cD(t,e,n)),{timeZone:e.timeZone})}function cD(t,e,n){return{start:e.toDate(t.start),end:e.toDate(t.end),startStr:e.formatIso(t.start,{omitTime:n}),endStr:e.formatIso(t.end,{omitTime:n})}}function UX(t,e,n){let r=GM({editable:!1},n),i=Ux(r.refined,r.extra,"",t.allDay,!0,n);return{def:i,ui:oD(i,e),instance:jx(i.defId,t.range),range:t.range,isStart:!0,isEnd:!0}}function WX(t,e,n){let r=!1,i=function(o){r||(r=!0,e(o))},s=function(o){r||(r=!0,n(o))},a=t(i,s);a&&typeof a.then=="function"&&a.then(i,s)}class uD extends Error{constructor(e,n){super(e),this.response=n}}function qX(t,e,n){t=t.toUpperCase();const r={method:t};return t==="GET"?e+=(e.indexOf("?")===-1?"?":"&")+new URLSearchParams(n):(r.body=new URLSearchParams(n),r.headers={"Content-Type":"application/x-www-form-urlencoded"}),fetch(e,r).then(i=>{if(i.ok)return i.json().then(s=>[s,i],()=>{throw new uD("Failure parsing JSON",i)});throw new uD("Request failed",i)})}let Qx;function dD(){return Qx==null&&(Qx=GX()),Qx}function GX(){if(typeof document>"u")return!0;let t=document.createElement("div");t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.innerHTML="<table><tr><td><div></div></td></tr></table>",t.querySelector("table").style.height="100px",t.querySelector("div").style.height="100%",document.body.appendChild(t);let n=t.querySelector("div").offsetHeight>0;return document.body.removeChild(t),n}class YX extends Rn{constructor(){super(...arguments),this.state={forPrint:!1},this.handleBeforePrint=()=>{$g(()=>{this.setState({forPrint:!0})})},this.handleAfterPrint=()=>{$g(()=>{this.setState({forPrint:!1})})}}render(){let{props:e}=this,{options:n}=e,{forPrint:r}=this.state,i=r||n.height==="auto"||n.contentHeight==="auto",s=!i&&n.height!=null?n.height:"",a=["fc",r?"fc-media-print":"fc-media-screen",`fc-direction-${n.direction}`,e.theme.getClass("root")];return dD()||a.push("fc-liquid-hack"),e.children(a,s,i,r)}componentDidMount(){let{emitter:e}=this.props;e.on("_beforeprint",this.handleBeforePrint),e.on("_afterprint",this.handleAfterPrint)}componentWillUnmount(){let{emitter:e}=this.props;e.off("_beforeprint",this.handleBeforePrint),e.off("_afterprint",this.handleAfterPrint)}}class nd{constructor(e){this.component=e.component,this.isHitComboAllowed=e.isHitComboAllowed||null}destroy(){}}function ZX(t,e){return{component:t,el:e.el,useEventCenter:e.useEventCenter!=null?e.useEventCenter:!0,isHitComboAllowed:e.isHitComboAllowed||null}}function ev(t){return{[t.component.uid]:t}}const tv={};class XX{getCurrentData(){return this.currentDataManager.getCurrentData()}dispatch(e){this.currentDataManager.dispatch(e)}get view(){return this.getCurrentData().viewApi}batchRendering(e){e()}updateSize(){this.trigger("_resize",!0)}setOption(e,n){this.dispatch({type:"SET_OPTION",optionName:e,rawOptionValue:n})}getOption(e){return this.currentDataManager.currentCalendarOptionsInput[e]}getAvailableLocaleCodes(){return Object.keys(this.getCurrentData().availableRawLocales)}on(e,n){let{currentDataManager:r}=this;r.currentCalendarOptionsRefiners[e]?r.emitter.on(e,n):console.warn(`Unknown listener name '${e}'`)}off(e,n){this.currentDataManager.emitter.off(e,n)}trigger(e,...n){this.currentDataManager.emitter.trigger(e,...n)}changeView(e,n){this.batchRendering(()=>{if(this.unselect(),n)if(n.start&&n.end)this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e}),this.dispatch({type:"SET_OPTION",optionName:"visibleRange",rawOptionValue:n});else{let{dateEnv:r}=this.getCurrentData();this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e,dateMarker:r.createMarker(n)})}else this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:e})})}zoomTo(e,n){let r=this.getCurrentData(),i;n=n||"day",i=r.viewSpecs[n]||this.getUnitViewSpec(n),this.unselect(),i?this.dispatch({type:"CHANGE_VIEW_TYPE",viewType:i.type,dateMarker:e}):this.dispatch({type:"CHANGE_DATE",dateMarker:e})}getUnitViewSpec(e){let{viewSpecs:n,toolbarConfig:r}=this.getCurrentData(),i=[].concat(r.header?r.header.viewsWithButtons:[],r.footer?r.footer.viewsWithButtons:[]),s,a;for(let o in n)i.push(o);for(s=0;s<i.length;s+=1)if(a=n[i[s]],a&&a.singleUnit===e)return a;return null}prev(){this.unselect(),this.dispatch({type:"PREV"})}next(){this.unselect(),this.dispatch({type:"NEXT"})}prevYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,-1)})}nextYear(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:e.dateEnv.addYears(e.currentDate,1)})}today(){let e=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:pf(e.calendarOptions.now,e.dateEnv)})}gotoDate(e){let n=this.getCurrentData();this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.createMarker(e)})}incrementDate(e){let n=this.getCurrentData(),r=Sn(e);r&&(this.unselect(),this.dispatch({type:"CHANGE_DATE",dateMarker:n.dateEnv.add(n.currentDate,r)}))}getDate(){let e=this.getCurrentData();return e.dateEnv.toDate(e.currentDate)}formatDate(e,n){let{dateEnv:r}=this.getCurrentData();return r.format(r.createMarker(e),or(n))}formatRange(e,n,r){let{dateEnv:i}=this.getCurrentData();return i.formatRange(i.createMarker(e),i.createMarker(n),or(r),r)}formatIso(e,n){let{dateEnv:r}=this.getCurrentData();return r.formatIso(r.createMarker(e),{omitTime:n})}select(e,n){let r;n==null?e.start!=null?r=e:r={start:e,end:null}:r={start:e,end:n};let i=this.getCurrentData(),s=LX(r,i.dateEnv,Sn({days:1}));s&&(this.dispatch({type:"SELECT_DATES",selection:s}),nD(s,null,i))}unselect(e){let n=this.getCurrentData();n.dateSelection&&(this.dispatch({type:"UNSELECT_DATES"}),MX(e,n))}addEvent(e,n){if(e instanceof ur){let a=e._def,o=e._instance;return this.getCurrentData().eventStore.defs[a.defId]||(this.dispatch({type:"ADD_EVENTS",eventStore:Wx({def:a,instance:o})}),this.triggerEventAdd(e)),e}let r=this.getCurrentData(),i;if(n instanceof ed)i=n.internalEventSource;else if(typeof n=="boolean")n&&([i]=Ox(r.eventSources));else if(n!=null){let a=this.getEventSourceById(n);if(!a)return console.warn(`Could not find an event source with ID "${n}"`),null;i=a.internalEventSource}let s=qM(e,i,r,!1);if(s){let a=new ur(r,s.def,s.def.recurringDef?null:s.instance);return this.dispatch({type:"ADD_EVENTS",eventStore:Wx(s)}),this.triggerEventAdd(a),a}return null}triggerEventAdd(e){let{emitter:n}=this.getCurrentData();n.trigger("eventAdd",{event:e,relatedEvents:[],revert:()=>{this.dispatch({type:"REMOVE_EVENTS",eventStore:iD(e)})}})}getEventById(e){let n=this.getCurrentData(),{defs:r,instances:i}=n.eventStore;e=String(e);for(let s in r){let a=r[s];if(a.publicId===e){if(a.recurringDef)return new ur(n,a,null);for(let o in i){let p=i[o];if(p.defId===a.defId)return new ur(n,a,p)}}}return null}getEvents(){let e=this.getCurrentData();return Ac(e.eventStore,e)}removeAllEvents(){this.dispatch({type:"REMOVE_ALL_EVENTS"})}getEventSources(){let e=this.getCurrentData(),n=e.eventSources,r=[];for(let i in n)r.push(new ed(e,n[i]));return r}getEventSourceById(e){let n=this.getCurrentData(),r=n.eventSources;e=String(e);for(let i in r)if(r[i].publicId===e)return new ed(n,r[i]);return null}addEventSource(e){let n=this.getCurrentData();if(e instanceof ed)return n.eventSources[e.internalEventSource.sourceId]||this.dispatch({type:"ADD_EVENT_SOURCES",sources:[e.internalEventSource]}),e;let r=XM(e,n);return r?(this.dispatch({type:"ADD_EVENT_SOURCES",sources:[r]}),new ed(n,r)):null}removeAllEventSources(){this.dispatch({type:"REMOVE_ALL_EVENT_SOURCES"})}refetchEvents(){this.dispatch({type:"FETCH_EVENT_SOURCES",isRefetch:!0})}scrollToTime(e){let n=Sn(e);n&&this.trigger("_scrollRequest",{time:n})}}function KX(t,e){return t.left>=e.left&&t.left<e.right&&t.top>=e.top&&t.top<e.bottom}function hD(t,e){let n={left:Math.max(t.left,e.left),right:Math.min(t.right,e.right),top:Math.max(t.top,e.top),bottom:Math.min(t.bottom,e.bottom)};return n.left<n.right&&n.top<n.bottom?n:!1}function JX(t,e){return{left:Math.min(Math.max(t.left,e.left),e.right),top:Math.min(Math.max(t.top,e.top),e.bottom)}}function QX(t){return{left:(t.left+t.right)/2,top:(t.top+t.bottom)/2}}function eK(t,e){return{left:t.left-e.left,top:t.top-e.top}}const nv=_s();class tK{constructor(){this.getKeysForEventDefs=Ht(this._getKeysForEventDefs),this.splitDateSelection=Ht(this._splitDateSpan),this.splitEventStore=Ht(this._splitEventStore),this.splitIndividualUi=Ht(this._splitIndividualUi),this.splitEventDrag=Ht(this._splitInteraction),this.splitEventResize=Ht(this._splitInteraction),this.eventUiBuilders={}}splitProps(e){let n=this.getKeyInfo(e),r=this.getKeysForEventDefs(e.eventStore),i=this.splitDateSelection(e.dateSelection),s=this.splitIndividualUi(e.eventUiBases,r),a=this.splitEventStore(e.eventStore,r),o=this.splitEventDrag(e.eventDrag),p=this.splitEventResize(e.eventResize),g={};this.eventUiBuilders=ha(n,(y,v)=>this.eventUiBuilders[v]||Ht(nK));for(let y in n){let v=n[y],E=a[y]||nv,T=this.eventUiBuilders[y];g[y]={businessHours:v.businessHours||e.businessHours,dateSelection:i[y]||null,eventStore:E,eventUiBases:T(e.eventUiBases[""],v.ui,s[y]),eventSelection:E.instances[e.eventSelection]?e.eventSelection:"",eventDrag:o[y]||null,eventResize:p[y]||null}}return g}_splitDateSpan(e){let n={};if(e){let r=this.getKeysForDateSpan(e);for(let i of r)n[i]=e}return n}_getKeysForEventDefs(e){return ha(e.defs,n=>this.getKeysForEventDef(n))}_splitEventStore(e,n){let{defs:r,instances:i}=e,s={};for(let a in r)for(let o of n[a])s[o]||(s[o]=_s()),s[o].defs[a]=r[a];for(let a in i){let o=i[a];for(let p of n[o.defId])s[p]&&(s[p].instances[a]=o)}return s}_splitIndividualUi(e,n){let r={};for(let i in e)if(i)for(let s of n[i])r[s]||(r[s]={}),r[s][i]=e[i];return r}_splitInteraction(e){let n={};if(e){let r=this._splitEventStore(e.affectedEvents,this._getKeysForEventDefs(e.affectedEvents)),i=this._getKeysForEventDefs(e.mutatedEvents),s=this._splitEventStore(e.mutatedEvents,i),a=o=>{n[o]||(n[o]={affectedEvents:r[o]||nv,mutatedEvents:s[o]||nv,isEvent:e.isEvent})};for(let o in r)a(o);for(let o in s)a(o)}return n}}function nK(t,e,n){let r=[];t&&r.push(t),e&&r.push(e);let i={"":ZM(r)};return n&&Object.assign(i,n),i}function rv(t,e,n,r){return{dow:t.getUTCDay(),isDisabled:!!(r&&!ma(r.activeRange,t)),isOther:!!(r&&!ma(r.currentRange,t)),isToday:!!(e&&ma(e,t)),isPast:!!(n?t<n:e&&t<e.start),isFuture:!!(n?t>n:e&&t>=e.end)}}function Zg(t,e){let n=["fc-day",`fc-day-${sZ[t.dow]}`];return t.isDisabled?n.push("fc-day-disabled"):(t.isToday&&(n.push("fc-day-today"),n.push(e.getClass("today"))),t.isPast&&n.push("fc-day-past"),t.isFuture&&n.push("fc-day-future"),t.isOther&&n.push("fc-day-other")),n}const rK=or({year:"numeric",month:"long",day:"numeric"}),iK=or({week:"long"});function rd(t,e,n="day",r=!0){const{dateEnv:i,options:s,calendarApi:a}=t;let o=i.format(e,n==="week"?iK:rK);if(s.navLinks){let p=i.toDate(e);const g=y=>{let v=n==="day"?s.navLinkDayClick:n==="week"?s.navLinkWeekClick:null;typeof v=="function"?v.call(a,i.toDate(e),y):(typeof v=="string"&&(n=v),a.zoomTo(e,n))};return Object.assign({title:cf(s.navLinkHint,[o,p],o),"data-navlink":""},r?xM(g):{onClick:g})}return{"aria-label":o}}let iv=null;function sK(){return iv===null&&(iv=oK()),iv}function oK(){let t=document.createElement("div");lf(t,{position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}),t.innerHTML="<div></div>",document.body.appendChild(t);let n=t.firstChild.getBoundingClientRect().left>t.getBoundingClientRect().left;return Ex(t),n}let sv;function aK(){return sv||(sv=lK()),sv}function lK(){let t=document.createElement("div");t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t);let e=fD(t);return document.body.removeChild(t),e}function fD(t){return{x:t.offsetHeight-t.clientHeight,y:t.offsetWidth-t.clientWidth}}function cK(t,e=!1){let n=window.getComputedStyle(t),r=parseInt(n.borderLeftWidth,10)||0,i=parseInt(n.borderRightWidth,10)||0,s=parseInt(n.borderTopWidth,10)||0,a=parseInt(n.borderBottomWidth,10)||0,o=fD(t),p=o.y-r-i,g=o.x-s-a,y={borderLeft:r,borderRight:i,borderTop:s,borderBottom:a,scrollbarBottom:g,scrollbarLeft:0,scrollbarRight:0};return sK()&&n.direction==="rtl"?y.scrollbarLeft=p:y.scrollbarRight=p,e&&(y.paddingLeft=parseInt(n.paddingLeft,10)||0,y.paddingRight=parseInt(n.paddingRight,10)||0,y.paddingTop=parseInt(n.paddingTop,10)||0,y.paddingBottom=parseInt(n.paddingBottom,10)||0),y}function uK(t,e=!1,n){let r=ov(t),i=cK(t,e),s={left:r.left+i.borderLeft+i.scrollbarLeft,right:r.right-i.borderRight-i.scrollbarRight,top:r.top+i.borderTop,bottom:r.bottom-i.borderBottom-i.scrollbarBottom};return e&&(s.left+=i.paddingLeft,s.right-=i.paddingRight,s.top+=i.paddingTop,s.bottom-=i.paddingBottom),s}function ov(t){let e=t.getBoundingClientRect();return{left:e.left+window.scrollX,top:e.top+window.scrollY,right:e.right+window.scrollX,bottom:e.bottom+window.scrollY}}function dK(t){let e=pD(t),n=t.getBoundingClientRect();for(let r of e){let i=hD(n,r.getBoundingClientRect());if(i)n=i;else return null}return n}function pD(t){let e=[];for(;t instanceof HTMLElement;){let n=window.getComputedStyle(t);if(n.position==="fixed")break;/(auto|scroll)/.test(n.overflow+n.overflowY+n.overflowX)&&e.push(t),t=t.parentNode}return e}class id{constructor(e,n,r,i){this.els=n;let s=this.originClientRect=e.getBoundingClientRect();r&&this.buildElHorizontals(s.left),i&&this.buildElVerticals(s.top)}buildElHorizontals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.left-e),r.push(s.right-e)}this.lefts=n,this.rights=r}buildElVerticals(e){let n=[],r=[];for(let i of this.els){let s=i.getBoundingClientRect();n.push(s.top-e),r.push(s.bottom-e)}this.tops=n,this.bottoms=r}leftToIndex(e){let{lefts:n,rights:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}topToIndex(e){let{tops:n,bottoms:r}=this,i=n.length,s;for(s=0;s<i;s+=1)if(e>=n[s]&&e<r[s])return s}getWidth(e){return this.rights[e]-this.lefts[e]}getHeight(e){return this.bottoms[e]-this.tops[e]}similarTo(e){return Xg(this.tops||[],e.tops||[])&&Xg(this.bottoms||[],e.bottoms||[])&&Xg(this.lefts||[],e.lefts||[])&&Xg(this.rights||[],e.rights||[])}}function Xg(t,e){const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(Math.round(t[r])!==Math.round(e[r]))return!1;return!0}class av{getMaxScrollTop(){return this.getScrollHeight()-this.getClientHeight()}getMaxScrollLeft(){return this.getScrollWidth()-this.getClientWidth()}canScrollVertically(){return this.getMaxScrollTop()>0}canScrollHorizontally(){return this.getMaxScrollLeft()>0}canScrollUp(){return this.getScrollTop()>0}canScrollDown(){return this.getScrollTop()<this.getMaxScrollTop()}canScrollLeft(){return this.getScrollLeft()>0}canScrollRight(){return this.getScrollLeft()<this.getMaxScrollLeft()}}class hK extends av{constructor(e){super(),this.el=e}getScrollTop(){return this.el.scrollTop}getScrollLeft(){return this.el.scrollLeft}setScrollTop(e){this.el.scrollTop=e}setScrollLeft(e){this.el.scrollLeft=e}getScrollWidth(){return this.el.scrollWidth}getScrollHeight(){return this.el.scrollHeight}getClientHeight(){return this.el.clientHeight}getClientWidth(){return this.el.clientWidth}}class fK extends av{getScrollTop(){return window.scrollY}getScrollLeft(){return window.scrollX}setScrollTop(e){window.scroll(window.scrollX,e)}setScrollLeft(e){window.scroll(e,window.scrollY)}getScrollWidth(){return document.documentElement.scrollWidth}getScrollHeight(){return document.documentElement.scrollHeight}getClientHeight(){return document.documentElement.clientHeight}getClientWidth(){return document.documentElement.clientWidth}}class uo extends Rn{constructor(){super(...arguments),this.uid=wc()}prepareHits(){}queryHit(e,n,r,i){return null}isValidSegDownEl(e){return!this.props.eventDrag&&!this.props.eventResize&&!_i(e,".fc-event-mirror")}isValidDateDownEl(e){return!_i(e,".fc-event:not(.fc-bg-event)")&&!_i(e,".fc-more-link")&&!_i(e,"a[data-navlink]")&&!_i(e,".fc-popover")}}class mD{constructor(e=n=>n.thickness||1){this.getEntryThickness=e,this.strictOrder=!1,this.allowReslicing=!1,this.maxCoord=-1,this.maxStackCnt=-1,this.levelCoords=[],this.entriesByLevel=[],this.stackCnts={}}addSegs(e){let n=[];for(let r of e)this.insertEntry(r,n);return n}insertEntry(e,n){let r=this.findInsertion(e);this.isInsertionValid(r,e)?this.insertEntryAt(e,r):this.handleInvalidInsertion(r,e,n)}isInsertionValid(e,n){return(this.maxCoord===-1||e.levelCoord+this.getEntryThickness(n)<=this.maxCoord)&&(this.maxStackCnt===-1||e.stackCnt<this.maxStackCnt)}handleInvalidInsertion(e,n,r){if(this.allowReslicing&&e.touchingEntry){const i=Object.assign(Object.assign({},n),{span:cv(n.span,e.touchingEntry.span)});r.push(i),this.splitEntry(n,e.touchingEntry,r)}else r.push(n)}splitEntry(e,n,r){let i=e.span,s=n.span;i.start<s.start&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:i.start,end:s.start}},r),i.end>s.end&&this.insertEntry({index:e.index,thickness:e.thickness,span:{start:s.end,end:i.end}},r)}insertEntryAt(e,n){let{entriesByLevel:r,levelCoords:i}=this;n.lateral===-1?(uv(i,n.level,n.levelCoord),uv(r,n.level,[e])):uv(r[n.level],n.lateral,e),this.stackCnts[Mc(e)]=n.stackCnt}findInsertion(e){let{levelCoords:n,entriesByLevel:r,strictOrder:i,stackCnts:s}=this,a=n.length,o=0,p=-1,g=-1,y=null,v=0;for(let D=0;D<a;D+=1){const N=n[D];if(!i&&N>=o+this.getEntryThickness(e))break;let B=r[D],V,U=dv(B,e.span.start,lv),K=U[0]+U[1];for(;(V=B[K])&&V.span.start<e.span.end;){let Y=N+this.getEntryThickness(V);Y>o&&(o=Y,y=V,p=D,g=K),Y===o&&(v=Math.max(v,s[Mc(V)]+1)),K+=1}}let E=0;if(y)for(E=p+1;E<a&&n[E]<o;)E+=1;let T=-1;return E<a&&n[E]===o&&(T=dv(r[E],e.span.end,lv)[0]),{touchingLevel:p,touchingLateral:g,touchingEntry:y,stackCnt:v,levelCoord:o,level:E,lateral:T}}toRects(){let{entriesByLevel:e,levelCoords:n}=this,r=e.length,i=[];for(let s=0;s<r;s+=1){let a=e[s],o=n[s];for(let p of a)i.push(Object.assign(Object.assign({},p),{thickness:this.getEntryThickness(p),levelCoord:o}))}return i}}function lv(t){return t.span.end}function Mc(t){return t.index+":"+t.span.start}function pK(t){let e=[];for(let n of t){let r=[],i={span:n.span,entries:[n]};for(let s of e)cv(s.span,i.span)?i={entries:s.entries.concat(i.entries),span:mK(s.span,i.span)}:r.push(s);r.push(i),e=r}return e}function mK(t,e){return{start:Math.min(t.start,e.start),end:Math.max(t.end,e.end)}}function cv(t,e){let n=Math.max(t.start,e.start),r=Math.min(t.end,e.end);return n<r?{start:n,end:r}:null}function uv(t,e,n){t.splice(e,0,n)}function dv(t,e,n){let r=0,i=t.length;if(!i||e<n(t[r]))return[0,0];if(e>n(t[i-1]))return[i,0];for(;r<i;){let s=Math.floor(r+(i-r)/2),a=n(t[s]);if(e<a)i=s;else if(e>a)r=s+1;else return[s,1]}return[r,0]}class gK{constructor(e,n){this.emitter=new Gg}destroy(){}setMirrorIsVisible(e){}setMirrorNeedsRevert(e){}setAutoScrollEnabled(e){}}const hv={};function yK(t,e){return!t||e>10?or({weekday:"short"}):e>1?or({weekday:"short",month:"numeric",day:"numeric",omitCommas:!0}):or({weekday:"long"})}const gD="fc-col-header-cell";function yD(t){return t.text}class bK extends Rn{render(){let{dateEnv:e,options:n,theme:r,viewApi:i}=this.context,{props:s}=this,{date:a,dateProfile:o}=s,p=rv(a,s.todayRange,null,o),g=[gD].concat(Zg(p,r)),y=e.format(a,s.dayHeaderFormat),v=!p.isDisabled&&s.colCnt>1?rd(this.context,a):{},E=Object.assign(Object.assign(Object.assign({date:e.toDate(a),view:i},s.extraRenderProps),{text:y}),p);return ce(xi,{elTag:"th",elClasses:g,elAttrs:Object.assign({role:"columnheader",colSpan:s.colSpan,"data-date":p.isDisabled?void 0:uf(a)},s.extraDataAttrs),renderProps:E,generatorName:"dayHeaderContent",customGenerator:n.dayHeaderContent,defaultGenerator:yD,classNameGenerator:n.dayHeaderClassNames,didMount:n.dayHeaderDidMount,willUnmount:n.dayHeaderWillUnmount},T=>ce("div",{className:"fc-scrollgrid-sync-inner"},!p.isDisabled&&ce(T,{elTag:"a",elAttrs:v,elClasses:["fc-col-header-cell-cushion",s.isSticky&&"fc-sticky"]})))}}const _K=or({weekday:"long"});class xK extends Rn{render(){let{props:e}=this,{dateEnv:n,theme:r,viewApi:i,options:s}=this.context,a=qr(new Date(2592e5),e.dow),o={dow:e.dow,isDisabled:!1,isFuture:!1,isPast:!1,isToday:!1,isOther:!1},p=n.format(a,e.dayHeaderFormat),g=Object.assign(Object.assign(Object.assign(Object.assign({date:a},o),{view:i}),e.extraRenderProps),{text:p});return ce(xi,{elTag:"th",elClasses:[gD,...Zg(o,r),...e.extraClassNames||[]],elAttrs:Object.assign({role:"columnheader",colSpan:e.colSpan},e.extraDataAttrs),renderProps:g,generatorName:"dayHeaderContent",customGenerator:s.dayHeaderContent,defaultGenerator:yD,classNameGenerator:s.dayHeaderClassNames,didMount:s.dayHeaderDidMount,willUnmount:s.dayHeaderWillUnmount},y=>ce("div",{className:"fc-scrollgrid-sync-inner"},ce(y,{elTag:"a",elClasses:["fc-col-header-cell-cushion",e.isSticky&&"fc-sticky"],elAttrs:{"aria-label":n.format(a,_K)}})))}}class sd extends bs{constructor(e,n){super(e,n),this.initialNowDate=pf(n.options.now,n.dateEnv),this.initialNowQueriedMs=new Date().valueOf(),this.state=this.computeTiming().currentState}render(){let{props:e,state:n}=this;return e.children(n.nowDate,n.todayRange)}componentDidMount(){this.setTimeout()}componentDidUpdate(e){e.unit!==this.props.unit&&(this.clearTimeout(),this.setTimeout())}componentWillUnmount(){this.clearTimeout()}computeTiming(){let{props:e,context:n}=this,r=al(this.initialNowDate,new Date().valueOf()-this.initialNowQueriedMs),i=n.dateEnv.startOf(r,e.unit),s=n.dateEnv.add(i,Sn(1,e.unit)),a=s.valueOf()-r.valueOf();return a=Math.min(1e3*60*60*24,a),{currentState:{nowDate:i,todayRange:bD(i)},nextState:{nowDate:s,todayRange:bD(s)},waitMs:a}}setTimeout(){let{nextState:e,waitMs:n}=this.computeTiming();this.timeoutId=setTimeout(()=>{this.setState(e,()=>{this.setTimeout()})},n)}clearTimeout(){this.timeoutId&&clearTimeout(this.timeoutId)}}sd.contextType=fa;function bD(t){let e=nr(t),n=qr(e,1);return{start:e,end:n}}class _D extends Rn{constructor(){super(...arguments),this.createDayHeaderFormatter=Ht(vK)}render(){let{context:e}=this,{dates:n,dateProfile:r,datesRepDistinctDays:i,renderIntro:s}=this.props,a=this.createDayHeaderFormatter(e.options.dayHeaderFormat,i,n.length);return ce(sd,{unit:"day"},(o,p)=>ce("tr",{role:"row"},s&&s("day"),n.map(g=>i?ce(bK,{key:g.toISOString(),date:g,dateProfile:r,todayRange:p,colCnt:n.length,dayHeaderFormat:a}):ce(xK,{key:g.getUTCDay(),dow:g.getUTCDay(),dayHeaderFormat:a}))))}}function vK(t,e,n){return t||yK(e,n)}class xD{constructor(e,n){let r=e.start,{end:i}=e,s=[],a=[],o=-1;for(;r<i;)n.isHiddenDay(r)?s.push(o+.5):(o+=1,s.push(o),a.push(r)),r=qr(r,1);this.dates=a,this.indices=s,this.cnt=a.length}sliceRange(e){let n=this.getDateDayIndex(e.start),r=this.getDateDayIndex(qr(e.end,-1)),i=Math.max(0,n),s=Math.min(this.cnt-1,r);return i=Math.ceil(i),s=Math.floor(s),i<=s?{firstIndex:i,lastIndex:s,isStart:n===i,isEnd:r===s}:null}getDateDayIndex(e){let{indices:n}=this,r=Math.floor(ll(this.dates[0],e));return r<0?n[0]-1:r>=n.length?n[n.length-1]+1:n[r]}}class vD{constructor(e,n){let{dates:r}=e,i,s,a;if(n){for(s=r[0].getUTCDay(),i=1;i<r.length&&r[i].getUTCDay()!==s;i+=1);a=Math.ceil(r.length/i)}else a=1,i=r.length;this.rowCnt=a,this.colCnt=i,this.daySeries=e,this.cells=this.buildCells(),this.headerDates=this.buildHeaderDates()}buildCells(){let e=[];for(let n=0;n<this.rowCnt;n+=1){let r=[];for(let i=0;i<this.colCnt;i+=1)r.push(this.buildCell(n,i));e.push(r)}return e}buildCell(e,n){let r=this.daySeries.dates[e*this.colCnt+n];return{key:r.toISOString(),date:r}}buildHeaderDates(){let e=[];for(let n=0;n<this.colCnt;n+=1)e.push(this.cells[0][n].date);return e}sliceRange(e){let{colCnt:n}=this,r=this.daySeries.sliceRange(e),i=[];if(r){let{firstIndex:s,lastIndex:a}=r,o=s;for(;o<=a;){let p=Math.floor(o/n),g=Math.min((p+1)*n,a+1);i.push({row:p,firstCol:o%n,lastCol:(g-1)%n,isStart:r.isStart&&o===s,isEnd:r.isEnd&&g-1===a}),o=g}}return i}}class wD{constructor(){this.sliceBusinessHours=Ht(this._sliceBusinessHours),this.sliceDateSelection=Ht(this._sliceDateSpan),this.sliceEventStore=Ht(this._sliceEventStore),this.sliceEventDrag=Ht(this._sliceInteraction),this.sliceEventResize=Ht(this._sliceInteraction),this.forceDayIfListItem=!1}sliceProps(e,n,r,i,...s){let{eventUiBases:a}=e,o=this.sliceEventStore(e.eventStore,a,n,r,...s);return{dateSelectionSegs:this.sliceDateSelection(e.dateSelection,n,r,a,i,...s),businessHourSegs:this.sliceBusinessHours(e.businessHours,n,r,i,...s),fgEventSegs:o.fg,bgEventSegs:o.bg,eventDrag:this.sliceEventDrag(e.eventDrag,a,n,r,...s),eventResize:this.sliceEventResize(e.eventResize,a,n,r,...s),eventSelection:e.eventSelection}}sliceNowDate(e,n,r,i,...s){return this._sliceDateSpan({range:{start:e,end:al(e,1)},allDay:!1},n,r,{},i,...s)}_sliceBusinessHours(e,n,r,i,...s){return e?this._sliceEventStore(Tc(e,Kg(n,!!r),i),{},n,r,...s).bg:[]}_sliceEventStore(e,n,r,i,...s){if(e){let a=Xx(e,n,Kg(r,!!i),i);return{bg:this.sliceEventRanges(a.bg,s),fg:this.sliceEventRanges(a.fg,s)}}return{bg:[],fg:[]}}_sliceInteraction(e,n,r,i,...s){if(!e)return null;let a=Xx(e.mutatedEvents,n,Kg(r,!!i),i);return{segs:this.sliceEventRanges(a.fg,s),affectedInstances:e.affectedEvents.instances,isEvent:e.isEvent}}_sliceDateSpan(e,n,r,i,s,...a){if(!e)return[];let o=Kg(n,!!r),p=dl(e.range,o);if(p){e=Object.assign(Object.assign({},e),{range:p});let g=UX(e,i,s),y=this.sliceRange(e.range,...a);for(let v of y)v.eventRange=g;return y}return[]}sliceEventRanges(e,n){let r=[];for(let i of e)r.push(...this.sliceEventRange(i,n));return r}sliceEventRange(e,n){let r=e.range;this.forceDayIfListItem&&e.ui.display==="list-item"&&(r={start:r.start,end:qr(r.start,1)});let i=this.sliceRange(r,...n);for(let s of i)s.eventRange=e,s.isStart=e.isStart&&s.isStart,s.isEnd=e.isEnd&&s.isEnd;return i}}function Kg(t,e){let n=t.activeRange;return e?n:{start:al(n.start,t.slotMinTime.milliseconds),end:al(n.end,t.slotMaxTime.milliseconds-864e5)}}function kD(t,e,n){let{instances:r}=t.mutatedEvents;for(let i in r)if(!jg(e.validRange,r[i].range))return!1;return ED({eventDrag:t},n)}function wK(t,e,n){return jg(e.validRange,t.range)?ED({dateSelection:t},n):!1}function ED(t,e){let n=e.getCurrentData(),r=Object.assign({businessHours:n.businessHours,dateSelection:"",eventStore:n.eventStore,eventUiBases:n.eventUiBases,eventSelection:"",eventDrag:null,eventResize:null},t);return(e.pluginHooks.isPropsValid||kK)(r,e)}function kK(t,e,n={},r){return!(t.eventDrag&&!EK(t,e,n,r)||t.dateSelection&&!SK(t,e,n,r))}function EK(t,e,n,r){let i=e.getCurrentData(),s=t.eventDrag,a=s.mutatedEvents,o=a.defs,p=a.instances,g=Yg(o,s.isEvent?t.eventUiBases:{"":i.selectionConfig});r&&(g=ha(g,r));let y=wX(t.eventStore,s.affectedEvents.instances),v=y.defs,E=y.instances,T=Yg(v,t.eventUiBases);for(let D in p){let N=p[D],B=N.range,V=g[N.defId],U=o[N.defId];if(!SD(V.constraints,B,y,t.businessHours,e))return!1;let{eventOverlap:K}=e.options,Y=typeof K=="function"?K:null;for(let ye in E){let Te=E[ye];if(Fx(B,Te.range)&&(T[Te.defId].overlap===!1&&s.isEvent||V.overlap===!1||Y&&!Y(new ur(e,v[Te.defId],Te),new ur(e,U,N))))return!1}let we=i.eventStore;for(let ye of V.allows){let Te=Object.assign(Object.assign({},n),{range:N.range,allDay:U.allDay}),Re=we.defs[U.defId],Ne=we.instances[D],Ye;if(Re?Ye=new ur(e,Re,Ne):Ye=new ur(e,U),!ye(Yx(Te,e),Ye))return!1}}return!0}function SK(t,e,n,r){let i=t.eventStore,s=i.defs,a=i.instances,o=t.dateSelection,p=o.range,{selectionConfig:g}=e.getCurrentData();if(r&&(g=r(g)),!SD(g.constraints,p,i,t.businessHours,e))return!1;let{selectOverlap:y}=e.options,v=typeof y=="function"?y:null;for(let E in a){let T=a[E];if(Fx(p,T.range)&&(g.overlap===!1||v&&!v(new ur(e,s[T.defId],T),null)))return!1}for(let E of g.allows){let T=Object.assign(Object.assign({},n),o);if(!E(Yx(T,e),null))return!1}return!0}function SD(t,e,n,r,i){for(let s of t)if(!TK(CK(s,e,n,r,i),e))return!1;return!0}function CK(t,e,n,r,i){return t==="businessHours"?fv(Tc(r,e,i)):typeof t=="string"?fv(Ug(n,s=>s.groupId===t)):typeof t=="object"&&t?fv(Tc(t,e,i)):[]}function fv(t){let{instances:e}=t,n=[];for(let r in e)n.push(e[r].range);return n}function TK(t,e){for(let n of t)if(jg(n,e))return!0;return!1}const Jg=/^(visible|hidden)$/;class CD extends Rn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,pa(this.props.elRef,e)}}render(){let{props:e}=this,{liquid:n,liquidIsAbsolute:r}=e,i=n&&r,s=["fc-scroller"];return n&&(r?s.push("fc-scroller-liquid-absolute"):s.push("fc-scroller-liquid")),ce("div",{ref:this.handleEl,className:s.join(" "),style:{overflowX:e.overflowX,overflowY:e.overflowY,left:i&&-(e.overcomeLeft||0)||"",right:i&&-(e.overcomeRight||0)||"",bottom:i&&-(e.overcomeBottom||0)||"",marginLeft:!i&&-(e.overcomeLeft||0)||"",marginRight:!i&&-(e.overcomeRight||0)||"",marginBottom:!i&&-(e.overcomeBottom||0)||"",maxHeight:e.maxHeight||""}},e.children)}needsXScrolling(){if(Jg.test(this.props.overflowX))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().width-this.getYScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().width>n)return!0;return!1}needsYScrolling(){if(Jg.test(this.props.overflowY))return!1;let{el:e}=this,n=this.el.getBoundingClientRect().height-this.getXScrollbarWidth(),{children:r}=e;for(let i=0;i<r.length;i+=1)if(r[i].getBoundingClientRect().height>n)return!0;return!1}getXScrollbarWidth(){return Jg.test(this.props.overflowX)?0:this.el.offsetHeight-this.el.clientHeight}getYScrollbarWidth(){return Jg.test(this.props.overflowY)?0:this.el.offsetWidth-this.el.clientWidth}}class ya{constructor(e){this.masterCallback=e,this.currentMap={},this.depths={},this.callbackMap={},this.handleValue=(n,r)=>{let{depths:i,currentMap:s}=this,a=!1,o=!1;n!==null?(a=r in s,s[r]=n,i[r]=(i[r]||0)+1,o=!0):(i[r]-=1,i[r]||(delete s[r],delete this.callbackMap[r],a=!0)),this.masterCallback&&(a&&this.masterCallback(null,String(r)),o&&this.masterCallback(n,String(r)))}}createRef(e){let n=this.callbackMap[e];return n||(n=this.callbackMap[e]=r=>{this.handleValue(r,String(e))}),n}collect(e,n,r){return zZ(this.currentMap,e,n,r)}getAll(){return Ox(this.currentMap)}}function AK(t){let e=VY(t,".fc-scrollgrid-shrink"),n=0;for(let r of e)n=Math.max(n,KY(r));return Math.ceil(n)}function TD(t,e){return t.liquid&&e.liquid}function MK(t,e){return e.maxHeight!=null||TD(t,e)}function DK(t,e,n,r){let{expandRows:i}=n;return typeof e.content=="function"?e.content(n):ce("table",{role:"presentation",className:[e.tableClassName,t.syncRowHeights?"fc-scrollgrid-sync-table":""].join(" "),style:{minWidth:n.tableMinWidth,width:n.clientWidth,height:i?n.clientHeight:""}},n.tableColGroupNode,ce(r?"thead":"tbody",{role:"presentation"},typeof e.rowContent=="function"?e.rowContent(n):e.rowContent))}function IK(t,e){return ol(t,e,Ro)}function PK(t,e){let n=[];for(let r of t){let i=r.span||1;for(let s=0;s<i;s+=1)n.push(ce("col",{style:{width:r.width==="shrink"?NK(e):r.width||"",minWidth:r.minWidth||""}}))}return ce("colgroup",{},...n)}function NK(t){return t??4}function RK(t){for(let e of t)if(e.width==="shrink")return!0;return!1}function OK(t,e){let n=["fc-scrollgrid",e.theme.getClass("table")];return t&&n.push("fc-scrollgrid-liquid"),n}function BK(t,e){let n=["fc-scrollgrid-section",`fc-scrollgrid-section-${t.type}`,t.className];return e&&t.liquid&&t.maxHeight==null&&n.push("fc-scrollgrid-section-liquid"),t.isSticky&&n.push("fc-scrollgrid-section-sticky"),n}function pv(t){return ce("div",{className:"fc-scrollgrid-sticky-shim",style:{width:t.clientWidth,minWidth:t.tableMinWidth}})}function Qg(t){let{stickyHeaderDates:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}function AD(t){let{stickyFooterScrollbar:e}=t;return(e==null||e==="auto")&&(e=t.height==="auto"||t.viewHeight==="auto"),e}class mv extends Rn{constructor(){super(...arguments),this.processCols=Ht(e=>e,IK),this.renderMicroColGroup=Ht(PK),this.scrollerRefs=new ya,this.scrollerElRefs=new ya(this._handleScrollerEl.bind(this)),this.state={shrinkWidth:null,forceYScrollbars:!1,scrollerClientWidths:{},scrollerClientHeights:{}},this.handleSizing=()=>{this.safeSetState(Object.assign({shrinkWidth:this.computeShrinkWidth()},this.computeScrollerDims()))}}render(){let{props:e,state:n,context:r}=this,i=e.sections||[],s=this.processCols(e.cols),a=this.renderMicroColGroup(s,n.shrinkWidth),o=OK(e.liquid,r);e.collapsibleWidth&&o.push("fc-scrollgrid-collapsible");let p=i.length,g=0,y,v=[],E=[],T=[];for(;g<p&&(y=i[g]).type==="header";)v.push(this.renderSection(y,a,!0)),g+=1;for(;g<p&&(y=i[g]).type==="body";)E.push(this.renderSection(y,a,!1)),g+=1;for(;g<p&&(y=i[g]).type==="footer";)T.push(this.renderSection(y,a,!0)),g+=1;let D=!dD();const N={role:"rowgroup"};return ce("table",{role:"grid",className:o.join(" "),style:{height:e.height}},!!(!D&&v.length)&&ce("thead",N,...v),!!(!D&&E.length)&&ce("tbody",N,...E),!!(!D&&T.length)&&ce("tfoot",N,...T),D&&ce("tbody",N,...v,...E,...T))}renderSection(e,n,r){return"outerContent"in e?ce(tr,{key:e.key},e.outerContent):ce("tr",{key:e.key,role:"presentation",className:BK(e,this.props.liquid).join(" ")},this.renderChunkTd(e,n,e.chunk,r))}renderChunkTd(e,n,r,i){if("outerContent"in r)return r.outerContent;let{props:s}=this,{forceYScrollbars:a,scrollerClientWidths:o,scrollerClientHeights:p}=this.state,g=MK(s,e),y=TD(s,e),v=s.liquid?a?"scroll":g?"auto":"hidden":"visible",E=e.key,T=DK(e,r,{tableColGroupNode:n,tableMinWidth:"",clientWidth:!s.collapsibleWidth&&o[E]!==void 0?o[E]:null,clientHeight:p[E]!==void 0?p[E]:null,expandRows:e.expandRows,syncRowHeights:!1,rowSyncHeights:[],reportRowHeightChange:()=>{}},i);return ce(i?"th":"td",{ref:r.elRef,role:"presentation"},ce("div",{className:`fc-scroller-harness${y?" fc-scroller-harness-liquid":""}`},ce(CD,{ref:this.scrollerRefs.createRef(E),elRef:this.scrollerElRefs.createRef(E),overflowY:v,overflowX:s.liquid?"hidden":"visible",maxHeight:e.maxHeight,liquid:y,liquidIsAbsolute:!0},T)))}_handleScrollerEl(e,n){let r=VK(this.props.sections,n);r&&pa(r.chunk.scrollerElRef,e)}componentDidMount(){this.handleSizing(),this.context.addResizeHandler(this.handleSizing)}componentDidUpdate(){this.handleSizing()}componentWillUnmount(){this.context.removeResizeHandler(this.handleSizing)}computeShrinkWidth(){return RK(this.props.cols)?AK(this.scrollerElRefs.getAll()):0}computeScrollerDims(){let e=aK(),{scrollerRefs:n,scrollerElRefs:r}=this,i=!1,s={},a={};for(let o in n.currentMap){let p=n.currentMap[o];if(p&&p.needsYScrolling()){i=!0;break}}for(let o of this.props.sections){let p=o.key,g=r.currentMap[p];if(g){let y=g.parentNode;s[p]=Math.floor(y.getBoundingClientRect().width-(i?e.y:0)),a[p]=Math.floor(y.getBoundingClientRect().height)}}return{forceYScrollbars:i,scrollerClientWidths:s,scrollerClientHeights:a}}}mv.addStateEquality({scrollerClientWidths:Ro,scrollerClientHeights:Ro});function VK(t,e){for(let n of t)if(n.key===e)return n;return null}class ey extends Rn{constructor(){super(...arguments),this.handleEl=e=>{this.el=e,e&&sD(e,this.props.seg)}}render(){const{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{eventRange:s}=i,{ui:a}=s,o={event:new ur(n,s.def,s.instance),view:n.viewApi,timeText:e.timeText,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,isDraggable:!e.disableDragging&&RX(i,n),isStartResizable:!e.disableResizing&&OX(i,n),isEndResizable:!e.disableResizing&&BX(i),isMirror:!!(e.isDragging||e.isResizing||e.isDateSelecting),isStart:!!i.isStart,isEnd:!!i.isEnd,isPast:!!e.isPast,isFuture:!!e.isFuture,isToday:!!e.isToday,isSelected:!!e.isSelected,isDragging:!!e.isDragging,isResizing:!!e.isResizing};return ce(xi,Object.assign({},e,{elRef:this.handleEl,elClasses:[...VX(o),...i.eventRange.ui.classNames,...e.elClasses||[]],renderProps:o,generatorName:"eventContent",customGenerator:r.eventContent,defaultGenerator:e.defaultGenerator,classNameGenerator:r.eventClassNames,didMount:r.eventDidMount,willUnmount:r.eventWillUnmount}))}componentDidUpdate(e){this.el&&this.props.seg!==e.seg&&sD(this.el,this.props.seg)}}class MD extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,{ui:s}=i.eventRange,a=r.eventTimeFormat||e.defaultTimeFormat,o=gf(i,a,n,e.defaultDisplayEventTime,e.defaultDisplayEventEnd);return ce(ey,Object.assign({},e,{elTag:"a",elStyle:{borderColor:s.borderColor,backgroundColor:s.backgroundColor},elAttrs:Jx(i,n),defaultGenerator:zK,timeText:o}),(p,g)=>ce(tr,null,ce(p,{elTag:"div",elClasses:["fc-event-main"],elStyle:{color:g.textColor}}),!!g.isStartResizable&&ce("div",{className:"fc-event-resizer fc-event-resizer-start"}),!!g.isEndResizable&&ce("div",{className:"fc-event-resizer fc-event-resizer-end"})))}}function zK(t){return ce("div",{className:"fc-event-main-frame"},t.timeText&&ce("div",{className:"fc-event-time"},t.timeText),ce("div",{className:"fc-event-title-container"},ce("div",{className:"fc-event-title fc-sticky"},t.event.title||ce(tr,null," "))))}const gv=t=>ce(fa.Consumer,null,e=>{let{options:n}=e,r={isAxis:t.isAxis,date:e.dateEnv.toDate(t.date),view:e.viewApi};return ce(xi,Object.assign({},t,{elTag:t.elTag||"div",renderProps:r,generatorName:"nowIndicatorContent",customGenerator:n.nowIndicatorContent,classNameGenerator:n.nowIndicatorClassNames,didMount:n.nowIndicatorDidMount,willUnmount:n.nowIndicatorWillUnmount}))}),LK=or({day:"numeric"});class yv extends Rn{constructor(){super(...arguments),this.refineRenderProps=Og(FK)}render(){let{props:e,context:n}=this,{options:r}=n,i=this.refineRenderProps({date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,isMonthStart:e.isMonthStart||!1,showDayNumber:e.showDayNumber,extraRenderProps:e.extraRenderProps,viewApi:n.viewApi,dateEnv:n.dateEnv,monthStartFormat:r.monthStartFormat});return ce(xi,Object.assign({},e,{elClasses:[...Zg(i,n.theme),...e.elClasses||[]],elAttrs:Object.assign(Object.assign({},e.elAttrs),i.isDisabled?{}:{"data-date":uf(e.date)}),renderProps:i,generatorName:"dayCellContent",customGenerator:r.dayCellContent,defaultGenerator:e.defaultGenerator,classNameGenerator:i.isDisabled?void 0:r.dayCellClassNames,didMount:r.dayCellDidMount,willUnmount:r.dayCellWillUnmount}))}}function bv(t){return!!(t.dayCellContent||Lx("dayCellContent",t))}function FK(t){let{date:e,dateEnv:n,dateProfile:r,isMonthStart:i}=t,s=rv(e,t.todayRange,null,r),a=t.showDayNumber?n.format(e,i?t.monthStartFormat:LK):"";return Object.assign(Object.assign(Object.assign({date:n.toDate(e),view:t.viewApi},s),{isMonthStart:i,dayNumberText:a}),t.extraRenderProps)}class DD extends Rn{render(){let{props:e}=this,{seg:n}=e;return ce(ey,{elTag:"div",elClasses:["fc-bg-event"],elStyle:{backgroundColor:n.eventRange.ui.backgroundColor},defaultGenerator:$K,seg:n,timeText:"",isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,isPast:e.isPast,isFuture:e.isFuture,isToday:e.isToday,disableDragging:!0,disableResizing:!0})}}function $K(t){let{title:e}=t.event;return e&&ce("div",{className:"fc-event-title"},t.event.title)}function ID(t){return ce("div",{className:`fc-${t}`})}const PD=t=>ce(fa.Consumer,null,e=>{let{dateEnv:n,options:r}=e,{date:i}=t,s=r.weekNumberFormat||t.defaultFormat,a=n.computeWeekNumber(i),o=n.format(i,s);return ce(xi,Object.assign({},t,{renderProps:{num:a,text:o,date:i},generatorName:"weekNumberContent",customGenerator:r.weekNumberContent,defaultGenerator:jK,classNameGenerator:r.weekNumberClassNames,didMount:r.weekNumberDidMount,willUnmount:r.weekNumberWillUnmount}))});function jK(t){return t.text}const _v=10;class HK extends Rn{constructor(){super(...arguments),this.state={titleId:sl()},this.handleRootEl=e=>{this.rootEl=e,this.props.elRef&&pa(this.props.elRef,e)},this.handleDocumentMouseDown=e=>{const n=gM(e);this.rootEl.contains(n)||this.handleCloseClick()},this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.handleCloseClick()},this.handleCloseClick=()=>{let{onClose:e}=this.props;e&&e()}}render(){let{theme:e,options:n}=this.context,{props:r,state:i}=this,s=["fc-popover",e.getClass("popover")].concat(r.extraClassNames||[]);return kY(ce("div",Object.assign({},r.extraAttrs,{id:r.id,className:s.join(" "),"aria-labelledby":i.titleId,ref:this.handleRootEl}),ce("div",{className:"fc-popover-header "+e.getClass("popoverHeader")},ce("span",{className:"fc-popover-title",id:i.titleId},r.title),ce("span",{className:"fc-popover-close "+e.getIconClass("close"),title:n.closeHint,onClick:this.handleCloseClick})),ce("div",{className:"fc-popover-body "+e.getClass("popoverContent")},r.children)),r.parentEl)}componentDidMount(){document.addEventListener("mousedown",this.handleDocumentMouseDown),document.addEventListener("keydown",this.handleDocumentKeyDown),this.updateSize()}componentWillUnmount(){document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("keydown",this.handleDocumentKeyDown)}updateSize(){let{isRtl:e}=this.context,{alignmentEl:n,alignGridTop:r}=this.props,{rootEl:i}=this,s=dK(n);if(s){let a=i.getBoundingClientRect(),o=r?_i(n,".fc-scrollgrid").getBoundingClientRect().top:s.top,p=e?s.right-a.width:s.left;o=Math.max(o,_v),p=Math.min(p,document.documentElement.clientWidth-_v-a.width),p=Math.max(p,_v);let g=i.offsetParent.getBoundingClientRect();lf(i,{top:o-g.top,left:p-g.left})}}}class UK extends uo{constructor(){super(...arguments),this.handleRootEl=e=>{this.rootEl=e,e?this.context.registerInteractiveComponent(this,{el:e,useEventCenter:!1}):this.context.unregisterInteractiveComponent(this)}}render(){let{options:e,dateEnv:n}=this.context,{props:r}=this,{startDate:i,todayRange:s,dateProfile:a}=r,o=n.format(i,e.dayPopoverFormat);return ce(yv,{elRef:this.handleRootEl,date:i,dateProfile:a,todayRange:s},(p,g,y)=>ce(HK,{elRef:y.ref,id:r.id,title:o,extraClassNames:["fc-more-popover"].concat(y.className||[]),extraAttrs:y,parentEl:r.parentEl,alignmentEl:r.alignmentEl,alignGridTop:r.alignGridTop,onClose:r.onClose},bv(e)&&ce(p,{elTag:"div",elClasses:["fc-more-popover-misc"]}),r.children))}queryHit(e,n,r,i){let{rootEl:s,props:a}=this;return e>=0&&e<r&&n>=0&&n<i?{dateProfile:a.dateProfile,dateSpan:Object.assign({allDay:!a.forceTimed,range:{start:a.startDate,end:a.endDate}},a.extraDateSpan),dayEl:s,rect:{left:0,top:0,right:r,bottom:i},layer:1}:null}}class ND extends Rn{constructor(){super(...arguments),this.state={isPopoverOpen:!1,popoverId:sl()},this.handleLinkEl=e=>{this.linkEl=e,this.props.elRef&&pa(this.props.elRef,e)},this.handleClick=e=>{let{props:n,context:r}=this,{moreLinkClick:i}=r.options,s=RD(n).start;function a(o){let{def:p,instance:g,range:y}=o.eventRange;return{event:new ur(r,p,g),start:r.dateEnv.toDate(y.start),end:r.dateEnv.toDate(y.end),isStart:o.isStart,isEnd:o.isEnd}}typeof i=="function"&&(i=i({date:s,allDay:!!n.allDayDate,allSegs:n.allSegs.map(a),hiddenSegs:n.hiddenSegs.map(a),jsEvent:e,view:r.viewApi})),!i||i==="popover"?this.setState({isPopoverOpen:!0}):typeof i=="string"&&r.calendarApi.zoomTo(s,i)},this.handlePopoverClose=()=>{this.setState({isPopoverOpen:!1})}}render(){let{props:e,state:n}=this;return ce(fa.Consumer,null,r=>{let{viewApi:i,options:s,calendarApi:a}=r,{moreLinkText:o}=s,{moreCnt:p}=e,g=RD(e),y=typeof o=="function"?o.call(a,p):`+${p} ${o}`,v=cf(s.moreLinkHint,[p],y),E={num:p,shortText:`+${p}`,text:y,view:i};return ce(tr,null,!!e.moreCnt&&ce(xi,{elTag:e.elTag||"a",elRef:this.handleLinkEl,elClasses:[...e.elClasses||[],"fc-more-link"],elStyle:e.elStyle,elAttrs:Object.assign(Object.assign(Object.assign({},e.elAttrs),xM(this.handleClick)),{title:v,"aria-expanded":n.isPopoverOpen,"aria-controls":n.isPopoverOpen?n.popoverId:""}),renderProps:E,generatorName:"moreLinkContent",customGenerator:s.moreLinkContent,defaultGenerator:e.defaultGenerator||WK,classNameGenerator:s.moreLinkClassNames,didMount:s.moreLinkDidMount,willUnmount:s.moreLinkWillUnmount},e.children),n.isPopoverOpen&&ce(UK,{id:n.popoverId,startDate:g.start,endDate:g.end,dateProfile:e.dateProfile,todayRange:e.todayRange,extraDateSpan:e.extraDateSpan,parentEl:this.parentEl,alignmentEl:e.alignmentElRef?e.alignmentElRef.current:this.linkEl,alignGridTop:e.alignGridTop,forceTimed:e.forceTimed,onClose:this.handlePopoverClose},e.popoverContent()))})}componentDidMount(){this.updateParentEl()}componentDidUpdate(){this.updateParentEl()}updateParentEl(){this.linkEl&&(this.parentEl=_i(this.linkEl,".fc-view-harness"))}}function WK(t){return t.text}function RD(t){if(t.allDayDate)return{start:t.allDayDate,end:qr(t.allDayDate,1)};let{hiddenSegs:e}=t;return{start:OD(e),end:GK(e)}}function OD(t){return t.reduce(qK).eventRange.range.start}function qK(t,e){return t.eventRange.range.start<e.eventRange.range.start?t:e}function GK(t){return t.reduce(YK).eventRange.range.end}function YK(t,e){return t.eventRange.range.end>e.eventRange.range.end?t:e}class ZK{constructor(){this.handlers=[]}set(e){this.currentValue=e;for(let n of this.handlers)n(e)}subscribe(e){this.handlers.push(e),this.currentValue!==void 0&&e(this.currentValue)}}class XK extends ZK{constructor(){super(...arguments),this.map=new Map}handle(e){const{map:n}=this;let r=!1;e.isActive?(n.set(e.id,e),r=!0):n.has(e.id)&&(n.delete(e.id),r=!0),r&&this.set(n)}}const KK=[],BD={code:"en",week:{dow:0,doy:4},direction:"ltr",buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day",list:"list"},weekText:"W",weekTextLong:"Week",closeHint:"Close",timeHint:"Time",eventHint:"Event",allDayText:"all-day",moreLinkText:"more",noEventsText:"No events to display"},VD=Object.assign(Object.assign({},BD),{buttonHints:{prev:"Previous $0",next:"Next $0",today(t,e){return e==="day"?"Today":`This ${t}`}},viewHint:"$0 view",navLinkHint:"Go to $0",moreLinkHint(t){return`Show ${t} more event${t===1?"":"s"}`}});function JK(t){let e=t.length>0?t[0].code:"en",n=KK.concat(t),r={en:VD};for(let i of n)r[i.code]=i;return{map:r,defaultCode:e}}function zD(t,e){return typeof t=="object"&&!Array.isArray(t)?LD(t.code,[t.code],t):QK(t,e)}function QK(t,e){let n=[].concat(t||[]),r=eJ(n,e)||VD;return LD(t,n,r)}function eJ(t,e){for(let n=0;n<t.length;n+=1){let r=t[n].toLocaleLowerCase().split("-");for(let i=r.length;i>0;i-=1){let s=r.slice(0,i).join("-");if(e[s])return e[s]}}return null}function LD(t,e,n){let r=Rx([BD,n],["buttonText"]);delete r.code;let{week:i}=r;return delete r.week,{codeArg:t,codes:e,week:i,simpleNumberFormat:new Intl.NumberFormat(t),options:r}}function Oo(t){return{id:wc(),name:t.name,premiumReleaseDate:t.premiumReleaseDate?new Date(t.premiumReleaseDate):void 0,deps:t.deps||[],reducers:t.reducers||[],isLoadingFuncs:t.isLoadingFuncs||[],contextInit:[].concat(t.contextInit||[]),eventRefiners:t.eventRefiners||{},eventDefMemberAdders:t.eventDefMemberAdders||[],eventSourceRefiners:t.eventSourceRefiners||{},isDraggableTransformers:t.isDraggableTransformers||[],eventDragMutationMassagers:t.eventDragMutationMassagers||[],eventDefMutationAppliers:t.eventDefMutationAppliers||[],dateSelectionTransformers:t.dateSelectionTransformers||[],datePointTransforms:t.datePointTransforms||[],dateSpanTransforms:t.dateSpanTransforms||[],views:t.views||{},viewPropsTransformers:t.viewPropsTransformers||[],isPropsValid:t.isPropsValid||null,externalDefTransforms:t.externalDefTransforms||[],viewContainerAppends:t.viewContainerAppends||[],eventDropTransformers:t.eventDropTransformers||[],componentInteractions:t.componentInteractions||[],calendarInteractions:t.calendarInteractions||[],themeClasses:t.themeClasses||{},eventSourceDefs:t.eventSourceDefs||[],cmdFormatter:t.cmdFormatter,recurringTypes:t.recurringTypes||[],namedTimeZonedImpl:t.namedTimeZonedImpl,initialView:t.initialView||"",elementDraggingImpl:t.elementDraggingImpl,optionChangeHandlers:t.optionChangeHandlers||{},scrollGridImpl:t.scrollGridImpl||null,listenerRefiners:t.listenerRefiners||{},optionRefiners:t.optionRefiners||{},propSetHandlers:t.propSetHandlers||{}}}function tJ(t,e){let n={},r={premiumReleaseDate:void 0,reducers:[],isLoadingFuncs:[],contextInit:[],eventRefiners:{},eventDefMemberAdders:[],eventSourceRefiners:{},isDraggableTransformers:[],eventDragMutationMassagers:[],eventDefMutationAppliers:[],dateSelectionTransformers:[],datePointTransforms:[],dateSpanTransforms:[],views:{},viewPropsTransformers:[],isPropsValid:null,externalDefTransforms:[],viewContainerAppends:[],eventDropTransformers:[],componentInteractions:[],calendarInteractions:[],themeClasses:{},eventSourceDefs:[],cmdFormatter:null,recurringTypes:[],namedTimeZonedImpl:null,initialView:"",elementDraggingImpl:null,optionChangeHandlers:{},scrollGridImpl:null,listenerRefiners:{},optionRefiners:{},propSetHandlers:{}};function i(s){for(let a of s){const o=a.name,p=n[o];p===void 0?(n[o]=a.id,i(a.deps),r=rJ(r,a)):p!==a.id&&console.warn(`Duplicate plugin '${o}'`)}}return t&&i(t),i(e),r}function nJ(){let t=[],e=[],n;return(r,i)=>((!n||!ol(r,t)||!ol(i,e))&&(n=tJ(r,i)),t=r,e=i,n)}function rJ(t,e){return{premiumReleaseDate:iJ(t.premiumReleaseDate,e.premiumReleaseDate),reducers:t.reducers.concat(e.reducers),isLoadingFuncs:t.isLoadingFuncs.concat(e.isLoadingFuncs),contextInit:t.contextInit.concat(e.contextInit),eventRefiners:Object.assign(Object.assign({},t.eventRefiners),e.eventRefiners),eventDefMemberAdders:t.eventDefMemberAdders.concat(e.eventDefMemberAdders),eventSourceRefiners:Object.assign(Object.assign({},t.eventSourceRefiners),e.eventSourceRefiners),isDraggableTransformers:t.isDraggableTransformers.concat(e.isDraggableTransformers),eventDragMutationMassagers:t.eventDragMutationMassagers.concat(e.eventDragMutationMassagers),eventDefMutationAppliers:t.eventDefMutationAppliers.concat(e.eventDefMutationAppliers),dateSelectionTransformers:t.dateSelectionTransformers.concat(e.dateSelectionTransformers),datePointTransforms:t.datePointTransforms.concat(e.datePointTransforms),dateSpanTransforms:t.dateSpanTransforms.concat(e.dateSpanTransforms),views:Object.assign(Object.assign({},t.views),e.views),viewPropsTransformers:t.viewPropsTransformers.concat(e.viewPropsTransformers),isPropsValid:e.isPropsValid||t.isPropsValid,externalDefTransforms:t.externalDefTransforms.concat(e.externalDefTransforms),viewContainerAppends:t.viewContainerAppends.concat(e.viewContainerAppends),eventDropTransformers:t.eventDropTransformers.concat(e.eventDropTransformers),calendarInteractions:t.calendarInteractions.concat(e.calendarInteractions),componentInteractions:t.componentInteractions.concat(e.componentInteractions),themeClasses:Object.assign(Object.assign({},t.themeClasses),e.themeClasses),eventSourceDefs:t.eventSourceDefs.concat(e.eventSourceDefs),cmdFormatter:e.cmdFormatter||t.cmdFormatter,recurringTypes:t.recurringTypes.concat(e.recurringTypes),namedTimeZonedImpl:e.namedTimeZonedImpl||t.namedTimeZonedImpl,initialView:t.initialView||e.initialView,elementDraggingImpl:t.elementDraggingImpl||e.elementDraggingImpl,optionChangeHandlers:Object.assign(Object.assign({},t.optionChangeHandlers),e.optionChangeHandlers),scrollGridImpl:e.scrollGridImpl||t.scrollGridImpl,listenerRefiners:Object.assign(Object.assign({},t.listenerRefiners),e.listenerRefiners),optionRefiners:Object.assign(Object.assign({},t.optionRefiners),e.optionRefiners),propSetHandlers:Object.assign(Object.assign({},t.propSetHandlers),e.propSetHandlers)}}function iJ(t,e){return t===void 0?e:e===void 0?t:new Date(Math.max(t.valueOf(),e.valueOf()))}class hl extends hf{}hl.prototype.classes={root:"fc-theme-standard",tableCellShaded:"fc-cell-shaded",buttonGroup:"fc-button-group",button:"fc-button fc-button-primary",buttonActive:"fc-button-active"},hl.prototype.baseIconClass="fc-icon",hl.prototype.iconClasses={close:"fc-icon-x",prev:"fc-icon-chevron-left",next:"fc-icon-chevron-right",prevYear:"fc-icon-chevrons-left",nextYear:"fc-icon-chevrons-right"},hl.prototype.rtlIconClasses={prev:"fc-icon-chevron-right",next:"fc-icon-chevron-left",prevYear:"fc-icon-chevrons-right",nextYear:"fc-icon-chevrons-left"},hl.prototype.iconOverrideOption="buttonIcons",hl.prototype.iconOverrideCustomButtonOption="icon",hl.prototype.iconOverridePrefix="fc-icon-";function sJ(t,e){let n={},r;for(r in t)xv(r,n,t,e);for(r in e)xv(r,n,t,e);return n}function xv(t,e,n,r){if(e[t])return e[t];let i=oJ(t,e,n,r);return i&&(e[t]=i),i}function oJ(t,e,n,r){let i=n[t],s=r[t],a=y=>i&&i[y]!==null?i[y]:s&&s[y]!==null?s[y]:null,o=a("component"),p=a("superType"),g=null;if(p){if(p===t)throw new Error("Can't have a custom view type that references itself");g=xv(p,e,n,r)}return!o&&g&&(o=g.component),o?{type:t,component:o,defaults:Object.assign(Object.assign({},g?g.defaults:{}),i?i.rawOptions:{}),overrides:Object.assign(Object.assign({},g?g.overrides:{}),s?s.rawOptions:{})}:null}function FD(t){return ha(t,aJ)}function aJ(t){let e=typeof t=="function"?{component:t}:t,{component:n}=e;return e.content?n=$D(e):n&&!(n.prototype instanceof Rn)&&(n=$D(Object.assign(Object.assign({},e),{content:n}))),{superType:e.type,component:n,rawOptions:e}}function $D(t){return e=>ce(fa.Consumer,null,n=>ce(xi,{elTag:"div",elClasses:$M(n.viewSpec),renderProps:Object.assign(Object.assign({},e),{nextDayThreshold:n.options.nextDayThreshold}),generatorName:void 0,customGenerator:t.content,classNameGenerator:t.classNames,didMount:t.didMount,willUnmount:t.willUnmount}))}function lJ(t,e,n,r){let i=FD(t),s=FD(e.views),a=sJ(i,s);return ha(a,o=>cJ(o,s,e,n,r))}function cJ(t,e,n,r,i){let s=t.overrides.duration||t.defaults.duration||r.duration||n.duration,a=null,o="",p="",g={};if(s&&(a=uJ(s),a)){let E=Mx(a);o=E.unit,E.value===1&&(p=o,g=e[o]?e[o].rawOptions:{})}let y=E=>{let T=E.buttonText||{},D=t.defaults.buttonTextKey;return D!=null&&T[D]!=null?T[D]:T[t.type]!=null?T[t.type]:T[p]!=null?T[p]:null},v=E=>{let T=E.buttonHints||{},D=t.defaults.buttonTextKey;return D!=null&&T[D]!=null?T[D]:T[t.type]!=null?T[t.type]:T[p]!=null?T[p]:null};return{type:t.type,component:t.component,duration:a,durationUnit:o,singleUnit:p,optionDefaults:t.defaults,optionOverrides:Object.assign(Object.assign({},g),t.overrides),buttonTextOverride:y(r)||y(n)||t.overrides.buttonText,buttonTextDefault:y(i)||t.defaults.buttonText||y(df)||t.type,buttonTitleOverride:v(r)||v(n)||t.overrides.buttonHint,buttonTitleDefault:v(i)||t.defaults.buttonHint||v(df)}}let jD={};function uJ(t){let e=JSON.stringify(t),n=jD[e];return n===void 0&&(n=Sn(t),jD[e]=n),n}function dJ(t,e){switch(e.type){case"CHANGE_VIEW_TYPE":t=e.viewType}return t}function hJ(t,e){switch(e.type){case"SET_OPTION":return Object.assign(Object.assign({},t),{[e.optionName]:e.rawOptionValue});default:return t}}function fJ(t,e,n,r){let i;switch(e.type){case"CHANGE_VIEW_TYPE":return r.build(e.dateMarker||n);case"CHANGE_DATE":return r.build(e.dateMarker);case"PREV":if(i=r.buildPrev(t,n),i.isValid)return i;break;case"NEXT":if(i=r.buildNext(t,n),i.isValid)return i;break}return t}function pJ(t,e,n){let r=e?e.activeRange:null;return UD({},vJ(t,n),r,n)}function mJ(t,e,n,r){let i=n?n.activeRange:null;switch(e.type){case"ADD_EVENT_SOURCES":return UD(t,e.sources,i,r);case"REMOVE_EVENT_SOURCE":return yJ(t,e.sourceId);case"PREV":case"NEXT":case"CHANGE_DATE":case"CHANGE_VIEW_TYPE":return n?WD(t,i,r):t;case"FETCH_EVENT_SOURCES":return vv(t,e.sourceIds?BM(e.sourceIds):qD(t,r),i,e.isRefetch||!1,r);case"RECEIVE_EVENTS":case"RECEIVE_EVENT_ERROR":return xJ(t,e.sourceId,e.fetchId,e.fetchRange);case"REMOVE_ALL_EVENT_SOURCES":return{};default:return t}}function gJ(t,e,n){let r=e?e.activeRange:null;return vv(t,qD(t,n),r,!0,n)}function HD(t){for(let e in t)if(t[e].isFetching)return!0;return!1}function UD(t,e,n,r){let i={};for(let s of e)i[s.sourceId]=s;return n&&(i=WD(i,n,r)),Object.assign(Object.assign({},t),i)}function yJ(t,e){return Sc(t,n=>n.sourceId!==e)}function WD(t,e,n){return vv(t,Sc(t,r=>bJ(r,e,n)),e,!1,n)}function bJ(t,e,n){return GD(t,n)?!n.options.lazyFetching||!t.fetchRange||t.isFetching||e.start<t.fetchRange.start||e.end>t.fetchRange.end:!t.latestFetchId}function vv(t,e,n,r,i){let s={};for(let a in t){let o=t[a];e[a]?s[a]=_J(o,n,r,i):s[a]=o}return s}function _J(t,e,n,r){let{options:i,calendarApi:s}=r,a=r.pluginHooks.eventSourceDefs[t.sourceDefId],o=wc();return a.fetch({eventSource:t,range:e,isRefetch:n,context:r},p=>{let{rawEvents:g}=p;i.eventSourceSuccess&&(g=i.eventSourceSuccess.call(s,g,p.response)||g),t.success&&(g=t.success.call(s,g,p.response)||g),r.dispatch({type:"RECEIVE_EVENTS",sourceId:t.sourceId,fetchId:o,fetchRange:e,rawEvents:g})},p=>{let g=!1;i.eventSourceFailure&&(i.eventSourceFailure.call(s,p),g=!0),t.failure&&(t.failure(p),g=!0),g||console.warn(p.message,p),r.dispatch({type:"RECEIVE_EVENT_ERROR",sourceId:t.sourceId,fetchId:o,fetchRange:e,error:p})}),Object.assign(Object.assign({},t),{isFetching:!0,latestFetchId:o})}function xJ(t,e,n,r){let i=t[e];return i&&n===i.latestFetchId?Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},i),{isFetching:!1,fetchRange:r})}):t}function qD(t,e){return Sc(t,n=>GD(n,e))}function vJ(t,e){let n=KM(e),r=[].concat(t.eventSources||[]),i=[];t.initialEvents&&r.unshift(t.initialEvents),t.events&&r.unshift(t.events);for(let s of r){let a=XM(s,e,n);a&&i.push(a)}return i}function GD(t,e){return!e.pluginHooks.eventSourceDefs[t.sourceDefId].ignoreRange}function wJ(t,e){switch(e.type){case"UNSELECT_DATES":return null;case"SELECT_DATES":return e.selection;default:return t}}function kJ(t,e){switch(e.type){case"UNSELECT_EVENT":return"";case"SELECT_EVENT":return e.eventInstanceId;default:return t}}function EJ(t,e){let n;switch(e.type){case"UNSET_EVENT_DRAG":return null;case"SET_EVENT_DRAG":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function SJ(t,e){let n;switch(e.type){case"UNSET_EVENT_RESIZE":return null;case"SET_EVENT_RESIZE":return n=e.state,{affectedEvents:n.affectedEvents,mutatedEvents:n.mutatedEvents,isEvent:n.isEvent};default:return t}}function CJ(t,e,n,r,i){let s=t.headerToolbar?YD(t.headerToolbar,t,e,n,r,i):null,a=t.footerToolbar?YD(t.footerToolbar,t,e,n,r,i):null;return{header:s,footer:a}}function YD(t,e,n,r,i,s){let a={},o=[],p=!1;for(let g in t){let y=t[g],v=TJ(y,e,n,r,i,s);a[g]=v.widgets,o.push(...v.viewsWithButtons),p=p||v.hasTitle}return{sectionWidgets:a,viewsWithButtons:o,hasTitle:p}}function TJ(t,e,n,r,i,s){let a=e.direction==="rtl",o=e.customButtons||{},p=n.buttonText||{},g=e.buttonText||{},y=n.buttonHints||{},v=e.buttonHints||{},E=t?t.split(" "):[],T=[],D=!1;return{widgets:E.map(B=>B.split(",").map(V=>{if(V==="title")return D=!0,{buttonName:V};let U,K,Y,we,ye,Te;if(U=o[V])Y=Re=>{U.click&&U.click.call(Re.target,Re,Re.target)},(we=r.getCustomButtonIconClass(U))||(we=r.getIconClass(V,a))||(ye=U.text),Te=U.hint||U.text;else if(K=i[V]){T.push(V),Y=()=>{s.changeView(V)},(ye=K.buttonTextOverride)||(we=r.getIconClass(V,a))||(ye=K.buttonTextDefault);let Re=K.buttonTextOverride||K.buttonTextDefault;Te=cf(K.buttonTitleOverride||K.buttonTitleDefault||e.viewHint,[Re,V],Re)}else if(s[V])if(Y=()=>{s[V]()},(ye=p[V])||(we=r.getIconClass(V,a))||(ye=g[V]),V==="prevYear"||V==="nextYear"){let Re=V==="prevYear"?"prev":"next";Te=cf(y[Re]||v[Re],[g.year||"year","year"],g[V])}else Te=Re=>cf(y[V]||v[V],[g[Re]||Re,Re],g[V]);return{buttonName:V,buttonClick:Y,buttonIcon:we,buttonText:ye,buttonHint:Te}})),viewsWithButtons:T,hasTitle:D}}class AJ{constructor(e,n,r){this.type=e,this.getCurrentData=n,this.dateEnv=r}get calendar(){return this.getCurrentData().calendarApi}get title(){return this.getCurrentData().viewTitle}get activeStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.start)}get activeEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.activeRange.end)}get currentStart(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.start)}get currentEnd(){return this.dateEnv.toDate(this.getCurrentData().dateProfile.currentRange.end)}getOption(e){return this.getCurrentData().options[e]}}const MJ=Oo({name:"array-event-source",eventSourceDefs:[{ignoreRange:!0,parseMeta(t){return Array.isArray(t.events)?t.events:null},fetch(t,e){e({rawEvents:t.eventSource.meta})}}]}),DJ=Oo({name:"func-event-source",eventSourceDefs:[{parseMeta(t){return typeof t.events=="function"?t.events:null},fetch(t,e,n){const{dateEnv:r}=t.context,i=t.eventSource.meta;WX(i.bind(null,lD(t.range,r)),s=>e({rawEvents:s}),n)}}]}),IJ=Oo({name:"json-event-source",eventSourceRefiners:{method:String,extraParams:Ie,startParam:String,endParam:String,timeZoneParam:String},eventSourceDefs:[{parseMeta(t){return t.url&&(t.format==="json"||!t.format)?{url:t.url,format:"json",method:(t.method||"GET").toUpperCase(),extraParams:t.extraParams,startParam:t.startParam,endParam:t.endParam,timeZoneParam:t.timeZoneParam}:null},fetch(t,e,n){const{meta:r}=t.eventSource,i=PJ(r,t.range,t.context);qX(r.method,r.url,i).then(([s,a])=>{e({rawEvents:s,response:a})},n)}}]});function PJ(t,e,n){let{dateEnv:r,options:i}=n,s,a,o,p,g={};return s=t.startParam,s==null&&(s=i.startParam),a=t.endParam,a==null&&(a=i.endParam),o=t.timeZoneParam,o==null&&(o=i.timeZoneParam),typeof t.extraParams=="function"?p=t.extraParams():p=t.extraParams||{},Object.assign(g,p),g[s]=r.formatIso(e.start),g[a]=r.formatIso(e.end),r.timeZone!=="local"&&(g[o]=r.timeZone),g}const NJ=Oo({name:"simple-recurring-event",recurringTypes:[{parse(t,e){if(t.daysOfWeek||t.startTime||t.endTime||t.startRecur||t.endRecur){let n={daysOfWeek:t.daysOfWeek||null,startTime:t.startTime||null,endTime:t.endTime||null,startRecur:t.startRecur?e.createMarker(t.startRecur):null,endRecur:t.endRecur?e.createMarker(t.endRecur):null},r;return t.duration&&(r=t.duration),!r&&t.startTime&&t.endTime&&(r=tZ(t.endTime,t.startTime)),{allDayGuess:!t.startTime&&!t.endTime,duration:r,typeData:n}}return null},expand(t,e,n){let r=dl(e,{start:t.startRecur,end:t.endRecur});return r?RJ(t.daysOfWeek,t.startTime,r,n):[]}}],eventRefiners:{daysOfWeek:Ie,startTime:Sn,endTime:Sn,duration:Sn,startRecur:Ie,endRecur:Ie}});function RJ(t,e,n,r){let i=t?BM(t):null,s=nr(n.start),a=n.end,o=[];for(;s<a;){let p;(!i||i[s.getUTCDay()])&&(e?p=r.add(s,e):p=s,o.push(p)),s=qr(s,1)}return o}const OJ=Oo({name:"change-handler",optionChangeHandlers:{events(t,e){ZD([t],e)},eventSources:ZD}});function ZD(t,e){let n=Ox(e.getCurrentData().eventSources);if(n.length===1&&t.length===1&&Array.isArray(n[0]._raw)&&Array.isArray(t[0])){e.dispatch({type:"RESET_RAW_EVENTS",sourceId:n[0].sourceId,rawEvents:t[0]});return}let r=[];for(let i of t){let s=!1;for(let a=0;a<n.length;a+=1)if(n[a]._raw===i){n.splice(a,1),s=!0;break}s||r.push(i)}for(let i of n)e.dispatch({type:"REMOVE_EVENT_SOURCE",sourceId:i.sourceId});for(let i of r)e.calendarApi.addEventSource(i)}function BJ(t,e){e.emitter.trigger("datesSet",Object.assign(Object.assign({},lD(t.activeRange,e.dateEnv)),{view:e.viewApi}))}function VJ(t,e){let{emitter:n}=e;n.hasHandlers("eventsSet")&&n.trigger("eventsSet",Ac(t,e))}const zJ=[MJ,DJ,IJ,NJ,OJ,Oo({name:"misc",isLoadingFuncs:[t=>HD(t.eventSources)],propSetHandlers:{dateProfile:BJ,eventStore:VJ}})];class LJ{constructor(e,n){this.runTaskOption=e,this.drainedOption=n,this.queue=[],this.delayedRunner=new kx(this.drain.bind(this))}request(e,n){this.queue.push(e),this.delayedRunner.request(n)}pause(e){this.delayedRunner.pause(e)}resume(e,n){this.delayedRunner.resume(e,n)}drain(){let{queue:e}=this;for(;e.length;){let n=[],r;for(;r=e.shift();)this.runTask(r),n.push(r);this.drained(n)}}runTask(e){this.runTaskOption&&this.runTaskOption(e)}drained(e){this.drainedOption&&this.drainedOption(e)}}function FJ(t,e,n){let r;return/^(year|month)$/.test(t.currentRangeUnit)?r=t.currentRange:r=t.activeRange,n.formatRange(r.start,r.end,or(e.titleFormat||$J(t)),{isEndExclusive:t.isRangeAllDay,defaultSeparator:e.titleRangeSeparator})}function $J(t){let{currentRangeUnit:e}=t;if(e==="year")return{year:"numeric"};if(e==="month")return{year:"numeric",month:"long"};let n=Rg(t.currentRange.start,t.currentRange.end);return n!==null&&n>1?{year:"numeric",month:"short",day:"numeric"}:{year:"numeric",month:"long",day:"numeric"}}class jJ{constructor(e){this.computeCurrentViewData=Ht(this._computeCurrentViewData),this.organizeRawLocales=Ht(JK),this.buildLocale=Ht(zD),this.buildPluginHooks=nJ(),this.buildDateEnv=Ht(HJ),this.buildTheme=Ht(UJ),this.parseToolbars=Ht(CJ),this.buildViewSpecs=Ht(lJ),this.buildDateProfileGenerator=Og(WJ),this.buildViewApi=Ht(qJ),this.buildViewUiProps=Og(ZJ),this.buildEventUiBySource=Ht(GJ,Ro),this.buildEventUiBases=Ht(YJ),this.parseContextBusinessHours=Og(XJ),this.buildTitle=Ht(FJ),this.emitter=new Gg,this.actionRunner=new LJ(this._handleAction.bind(this),this.updateData.bind(this)),this.currentCalendarOptionsInput={},this.currentCalendarOptionsRefined={},this.currentViewOptionsInput={},this.currentViewOptionsRefined={},this.currentCalendarOptionsRefiners={},this.optionsForRefining=[],this.optionsForHandling=[],this.getCurrentData=()=>this.data,this.dispatch=E=>{this.actionRunner.request(E)},this.props=e,this.actionRunner.pause();let n={},r=this.computeOptionsData(e.optionOverrides,n,e.calendarApi),i=r.calendarOptions.initialView||r.pluginHooks.initialView,s=this.computeCurrentViewData(i,r,e.optionOverrides,n);e.calendarApi.currentDataManager=this,this.emitter.setThisContext(e.calendarApi),this.emitter.setOptions(s.options);let a=sX(r.calendarOptions,r.dateEnv),o=s.dateProfileGenerator.build(a);ma(o.activeRange,a)||(a=o.currentRange.start);let p={dateEnv:r.dateEnv,options:r.calendarOptions,pluginHooks:r.pluginHooks,calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData};for(let E of r.pluginHooks.contextInit)E(p);let g=pJ(r.calendarOptions,o,p),y={dynamicOptionOverrides:n,currentViewType:i,currentDate:a,dateProfile:o,businessHours:this.parseContextBusinessHours(p),eventSources:g,eventUiBases:{},eventStore:_s(),renderableEventStore:_s(),dateSelection:null,eventSelection:"",eventDrag:null,eventResize:null,selectionConfig:this.buildViewUiProps(p).selectionConfig},v=Object.assign(Object.assign({},p),y);for(let E of r.pluginHooks.reducers)Object.assign(y,E(null,null,v));wv(y,p)&&this.emitter.trigger("loading",!0),this.state=y,this.updateData(),this.actionRunner.resume()}resetOptions(e,n){let{props:r}=this;n===void 0?r.optionOverrides=e:(r.optionOverrides=Object.assign(Object.assign({},r.optionOverrides||{}),e),this.optionsForRefining.push(...n)),(n===void 0||n.length)&&this.actionRunner.request({type:"NOTHING"})}_handleAction(e){let{props:n,state:r,emitter:i}=this,s=hJ(r.dynamicOptionOverrides,e),a=this.computeOptionsData(n.optionOverrides,s,n.calendarApi),o=dJ(r.currentViewType,e),p=this.computeCurrentViewData(o,a,n.optionOverrides,s);n.calendarApi.currentDataManager=this,i.setThisContext(n.calendarApi),i.setOptions(p.options);let g={dateEnv:a.dateEnv,options:a.calendarOptions,pluginHooks:a.pluginHooks,calendarApi:n.calendarApi,dispatch:this.dispatch,emitter:i,getCurrentData:this.getCurrentData},{currentDate:y,dateProfile:v}=r;this.data&&this.data.dateProfileGenerator!==p.dateProfileGenerator&&(v=p.dateProfileGenerator.build(y)),y=iX(y,e),v=fJ(v,e,y,p.dateProfileGenerator),(e.type==="PREV"||e.type==="NEXT"||!ma(v.currentRange,y))&&(y=v.currentRange.start);let E=mJ(r.eventSources,e,v,g),T=bX(r.eventStore,e,E,v,g),N=HD(E)&&!p.options.progressiveEventRendering&&r.renderableEventStore||T,{eventUiSingleBase:B,selectionConfig:V}=this.buildViewUiProps(g),U=this.buildEventUiBySource(E),K=this.buildEventUiBases(N.defs,B,U),Y={dynamicOptionOverrides:s,currentViewType:o,currentDate:y,dateProfile:v,eventSources:E,eventStore:T,renderableEventStore:N,selectionConfig:V,eventUiBases:K,businessHours:this.parseContextBusinessHours(g),dateSelection:wJ(r.dateSelection,e),eventSelection:kJ(r.eventSelection,e),eventDrag:EJ(r.eventDrag,e),eventResize:SJ(r.eventResize,e)},we=Object.assign(Object.assign({},g),Y);for(let Re of a.pluginHooks.reducers)Object.assign(Y,Re(r,e,we));let ye=wv(r,g),Te=wv(Y,g);!ye&&Te?i.trigger("loading",!0):ye&&!Te&&i.trigger("loading",!1),this.state=Y,n.onAction&&n.onAction(e)}updateData(){let{props:e,state:n}=this,r=this.data,i=this.computeOptionsData(e.optionOverrides,n.dynamicOptionOverrides,e.calendarApi),s=this.computeCurrentViewData(n.currentViewType,i,e.optionOverrides,n.dynamicOptionOverrides),a=this.data=Object.assign(Object.assign(Object.assign({viewTitle:this.buildTitle(n.dateProfile,s.options,i.dateEnv),calendarApi:e.calendarApi,dispatch:this.dispatch,emitter:this.emitter,getCurrentData:this.getCurrentData},i),s),n),o=i.pluginHooks.optionChangeHandlers,p=r&&r.calendarOptions,g=i.calendarOptions;if(p&&p!==g){p.timeZone!==g.timeZone&&(n.eventSources=a.eventSources=gJ(a.eventSources,n.dateProfile,a),n.eventStore=a.eventStore=eD(a.eventStore,r.dateEnv,a.dateEnv),n.renderableEventStore=a.renderableEventStore=eD(a.renderableEventStore,r.dateEnv,a.dateEnv));for(let y in o)(this.optionsForHandling.indexOf(y)!==-1||p[y]!==g[y])&&o[y](g[y],a)}this.optionsForHandling=[],e.onData&&e.onData(a)}computeOptionsData(e,n,r){if(!this.optionsForRefining.length&&e===this.stableOptionOverrides&&n===this.stableDynamicOptionOverrides)return this.stableCalendarOptionsData;let{refinedOptions:i,pluginHooks:s,localeDefaults:a,availableLocaleData:o,extra:p}=this.processRawCalendarOptions(e,n);XD(p);let g=this.buildDateEnv(i.timeZone,i.locale,i.weekNumberCalculation,i.firstDay,i.weekText,s,o,i.defaultRangeSeparator),y=this.buildViewSpecs(s.views,this.stableOptionOverrides,this.stableDynamicOptionOverrides,a),v=this.buildTheme(i,s),E=this.parseToolbars(i,this.stableOptionOverrides,v,y,r);return this.stableCalendarOptionsData={calendarOptions:i,pluginHooks:s,dateEnv:g,viewSpecs:y,theme:v,toolbarConfig:E,localeDefaults:a,availableRawLocales:o.map}}processRawCalendarOptions(e,n){let{locales:r,locale:i}=Px([df,e,n]),s=this.organizeRawLocales(r),a=s.map,o=this.buildLocale(i||s.defaultCode,a).options,p=this.buildPluginHooks(e.plugins||[],zJ),g=this.currentCalendarOptionsRefiners=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},NM),RM),OM),p.listenerRefiners),p.optionRefiners),y={},v=Px([df,o,e,n]),E={},T=this.currentCalendarOptionsInput,D=this.currentCalendarOptionsRefined,N=!1;for(let B in v)this.optionsForRefining.indexOf(B)===-1&&(v[B]===T[B]||kc[B]&&B in T&&kc[B](T[B],v[B]))?E[B]=D[B]:g[B]?(E[B]=g[B](v[B]),N=!0):y[B]=T[B];return N&&(this.currentCalendarOptionsInput=v,this.currentCalendarOptionsRefined=E,this.stableOptionOverrides=e,this.stableDynamicOptionOverrides=n),this.optionsForHandling.push(...this.optionsForRefining),this.optionsForRefining=[],{rawOptions:this.currentCalendarOptionsInput,refinedOptions:this.currentCalendarOptionsRefined,pluginHooks:p,availableLocaleData:s,localeDefaults:o,extra:y}}_computeCurrentViewData(e,n,r,i){let s=n.viewSpecs[e];if(!s)throw new Error(`viewType "${e}" is not available. Please make sure you've loaded all neccessary plugins`);let{refinedOptions:a,extra:o}=this.processRawViewOptions(s,n.pluginHooks,n.localeDefaults,r,i);XD(o);let p=this.buildDateProfileGenerator({dateProfileGeneratorClass:s.optionDefaults.dateProfileGeneratorClass,duration:s.duration,durationUnit:s.durationUnit,usesMinMaxTime:s.optionDefaults.usesMinMaxTime,dateEnv:n.dateEnv,calendarApi:this.props.calendarApi,slotMinTime:a.slotMinTime,slotMaxTime:a.slotMaxTime,showNonCurrentDates:a.showNonCurrentDates,dayCount:a.dayCount,dateAlignment:a.dateAlignment,dateIncrement:a.dateIncrement,hiddenDays:a.hiddenDays,weekends:a.weekends,nowInput:a.now,validRangeInput:a.validRange,visibleRangeInput:a.visibleRange,fixedWeekCount:a.fixedWeekCount}),g=this.buildViewApi(e,this.getCurrentData,n.dateEnv);return{viewSpec:s,options:a,dateProfileGenerator:p,viewApi:g}}processRawViewOptions(e,n,r,i,s){let a=Px([df,e.optionDefaults,r,i,e.optionOverrides,s]),o=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},NM),RM),OM),RZ),n.listenerRefiners),n.optionRefiners),p={},g=this.currentViewOptionsInput,y=this.currentViewOptionsRefined,v=!1,E={};for(let T in a)a[T]===g[T]||kc[T]&&kc[T](a[T],g[T])?p[T]=y[T]:(a[T]===this.currentCalendarOptionsInput[T]||kc[T]&&kc[T](a[T],this.currentCalendarOptionsInput[T])?T in this.currentCalendarOptionsRefined&&(p[T]=this.currentCalendarOptionsRefined[T]):o[T]?p[T]=o[T](a[T]):E[T]=a[T],v=!0);return v&&(this.currentViewOptionsInput=a,this.currentViewOptionsRefined=p),{rawOptions:this.currentViewOptionsInput,refinedOptions:this.currentViewOptionsRefined,extra:E}}}function HJ(t,e,n,r,i,s,a,o){let p=zD(e||a.defaultCode,a.map);return new UZ({calendarSystem:"gregory",timeZone:t,namedTimeZoneImpl:s.namedTimeZonedImpl,locale:p,weekNumberCalculation:n,firstDay:r,weekText:i,cmdFormatter:s.cmdFormatter,defaultSeparator:o})}function UJ(t,e){let n=e.themeClasses[t.themeSystem]||hl;return new n(t)}function WJ(t){let e=t.dateProfileGeneratorClass||UM;return new e(t)}function qJ(t,e,n){return new AJ(t,e,n)}function GJ(t){return ha(t,e=>e.ui)}function YJ(t,e,n){let r={"":e};for(let i in t){let s=t[i];s.sourceId&&n[s.sourceId]&&(r[i]=n[s.sourceId])}return r}function ZJ(t){let{options:e}=t;return{eventUiSingleBase:qg({display:e.eventDisplay,editable:e.editable,startEditable:e.eventStartEditable,durationEditable:e.eventDurationEditable,constraint:e.eventConstraint,overlap:typeof e.eventOverlap=="boolean"?e.eventOverlap:void 0,allow:e.eventAllow,backgroundColor:e.eventBackgroundColor,borderColor:e.eventBorderColor,textColor:e.eventTextColor,color:e.eventColor},t),selectionConfig:qg({constraint:e.selectConstraint,overlap:typeof e.selectOverlap=="boolean"?e.selectOverlap:void 0,allow:e.selectAllow},t)}}function wv(t,e){for(let n of e.pluginHooks.isLoadingFuncs)if(n(t))return!0;return!1}function XJ(t){return TX(t.options.businessHours,t)}function XD(t,e){for(let n in t)console.warn(`Unknown option '${n}'`)}class KJ extends Rn{render(){let e=this.props.widgetGroups.map(n=>this.renderWidgetGroup(n));return ce("div",{className:"fc-toolbar-chunk"},...e)}renderWidgetGroup(e){let{props:n}=this,{theme:r}=this.context,i=[],s=!0;for(let a of e){let{buttonName:o,buttonClick:p,buttonText:g,buttonIcon:y,buttonHint:v}=a;if(o==="title")s=!1,i.push(ce("h2",{className:"fc-toolbar-title",id:n.titleId},n.title));else{let E=o===n.activeButton,T=!n.isTodayEnabled&&o==="today"||!n.isPrevEnabled&&o==="prev"||!n.isNextEnabled&&o==="next",D=[`fc-${o}-button`,r.getClass("button")];E&&D.push(r.getClass("buttonActive")),i.push(ce("button",{type:"button",title:typeof v=="function"?v(n.navUnit):v,disabled:T,"aria-pressed":E,className:D.join(" "),onClick:p},g||(y?ce("span",{className:y,role:"img"}):"")))}}if(i.length>1){let a=s&&r.getClass("buttonGroup")||"";return ce("div",{className:a},...i)}return i[0]}}class KD extends Rn{render(){let{model:e,extraClassName:n}=this.props,r=!1,i,s,a=e.sectionWidgets,o=a.center;return a.left?(r=!0,i=a.left):i=a.start,a.right?(r=!0,s=a.right):s=a.end,ce("div",{className:[n||"","fc-toolbar",r?"fc-toolbar-ltr":""].join(" ")},this.renderSection("start",i||[]),this.renderSection("center",o||[]),this.renderSection("end",s||[]))}renderSection(e,n){let{props:r}=this;return ce(KJ,{key:e,widgetGroups:n,title:r.title,navUnit:r.navUnit,activeButton:r.activeButton,isTodayEnabled:r.isTodayEnabled,isPrevEnabled:r.isPrevEnabled,isNextEnabled:r.isNextEnabled,titleId:r.titleId})}}class JJ extends Rn{constructor(){super(...arguments),this.state={availableWidth:null},this.handleEl=e=>{this.el=e,pa(this.props.elRef,e),this.updateAvailableWidth()},this.handleResize=()=>{this.updateAvailableWidth()}}render(){let{props:e,state:n}=this,{aspectRatio:r}=e,i=["fc-view-harness",r||e.liquid||e.height?"fc-view-harness-active":"fc-view-harness-passive"],s="",a="";return r?n.availableWidth!==null?s=n.availableWidth/r:a=`${1/r*100}%`:s=e.height||"",ce("div",{"aria-labelledby":e.labeledById,ref:this.handleEl,className:i.join(" "),style:{height:s,paddingBottom:a}},e.children)}componentDidMount(){this.context.addResizeHandler(this.handleResize)}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}updateAvailableWidth(){this.el&&this.props.aspectRatio&&this.setState({availableWidth:this.el.offsetWidth})}}class QJ extends nd{constructor(e){super(e),this.handleSegClick=(n,r)=>{let{component:i}=this,{context:s}=i,a=td(r);if(a&&i.isValidSegDownEl(n.target)){let o=_i(n.target,".fc-event-forced-url"),p=o?o.querySelector("a[href]").href:"";s.emitter.trigger("eventClick",{el:r,event:new ur(i.context,a.eventRange.def,a.eventRange.instance),jsEvent:n,view:s.viewApi}),p&&!n.defaultPrevented&&(window.location.href=p)}},this.destroy=bM(e.el,"click",".fc-event",this.handleSegClick)}}class eQ extends nd{constructor(e){super(e),this.handleEventElRemove=n=>{n===this.currentSegEl&&this.handleSegLeave(null,this.currentSegEl)},this.handleSegEnter=(n,r)=>{td(r)&&(this.currentSegEl=r,this.triggerEvent("eventMouseEnter",n,r))},this.handleSegLeave=(n,r)=>{this.currentSegEl&&(this.currentSegEl=null,this.triggerEvent("eventMouseLeave",n,r))},this.removeHoverListeners=FY(e.el,".fc-event",this.handleSegEnter,this.handleSegLeave)}destroy(){this.removeHoverListeners()}triggerEvent(e,n,r){let{component:i}=this,{context:s}=i,a=td(r);(!n||i.isValidSegDownEl(n.target))&&s.emitter.trigger(e,{el:r,event:new ur(s,a.eventRange.def,a.eventRange.instance),jsEvent:n,view:s.viewApi})}}class tQ extends Cc{constructor(){super(...arguments),this.buildViewContext=Ht(GZ),this.buildViewPropTransformers=Ht(rQ),this.buildToolbarProps=Ht(nQ),this.headerRef=Pi(),this.footerRef=Pi(),this.interactionsStore={},this.state={viewLabelId:sl()},this.registerInteractiveComponent=(e,n)=>{let r=ZX(e,n),a=[QJ,eQ].concat(this.props.pluginHooks.componentInteractions).map(o=>new o(r));this.interactionsStore[e.uid]=a,tv[e.uid]=r},this.unregisterInteractiveComponent=e=>{let n=this.interactionsStore[e.uid];if(n){for(let r of n)r.destroy();delete this.interactionsStore[e.uid]}delete tv[e.uid]},this.resizeRunner=new kx(()=>{this.props.emitter.trigger("_resize",!0),this.props.emitter.trigger("windowResize",{view:this.props.viewApi})}),this.handleWindowResize=e=>{let{options:n}=this.props;n.handleWindowResize&&e.target===window&&this.resizeRunner.request(n.windowResizeDelay)}}render(){let{props:e}=this,{toolbarConfig:n,options:r}=e,i=this.buildToolbarProps(e.viewSpec,e.dateProfile,e.dateProfileGenerator,e.currentDate,pf(e.options.now,e.dateEnv),e.viewTitle),s=!1,a="",o;e.isHeightAuto||e.forPrint?a="":r.height!=null?s=!0:r.contentHeight!=null?a=r.contentHeight:o=Math.max(r.aspectRatio,.5);let p=this.buildViewContext(e.viewSpec,e.viewApi,e.options,e.dateProfileGenerator,e.dateEnv,e.theme,e.pluginHooks,e.dispatch,e.getCurrentData,e.emitter,e.calendarApi,this.registerInteractiveComponent,this.unregisterInteractiveComponent),g=n.header&&n.header.hasTitle?this.state.viewLabelId:void 0;return ce(fa.Provider,{value:p},n.header&&ce(KD,Object.assign({ref:this.headerRef,extraClassName:"fc-header-toolbar",model:n.header,titleId:g},i)),ce(JJ,{liquid:s,height:a,aspectRatio:o,labeledById:g},this.renderView(e),this.buildAppendContent()),n.footer&&ce(KD,Object.assign({ref:this.footerRef,extraClassName:"fc-footer-toolbar",model:n.footer,titleId:""},i)))}componentDidMount(){let{props:e}=this;this.calendarInteractions=e.pluginHooks.calendarInteractions.map(r=>new r(e)),window.addEventListener("resize",this.handleWindowResize);let{propSetHandlers:n}=e.pluginHooks;for(let r in n)n[r](e[r],e)}componentDidUpdate(e){let{props:n}=this,{propSetHandlers:r}=n.pluginHooks;for(let i in r)n[i]!==e[i]&&r[i](n[i],n)}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.resizeRunner.clear();for(let e of this.calendarInteractions)e.destroy();this.props.emitter.trigger("_unmount")}buildAppendContent(){let{props:e}=this,n=e.pluginHooks.viewContainerAppends.map(r=>r(e));return ce(tr,{},...n)}renderView(e){let{pluginHooks:n}=e,{viewSpec:r}=e,i={dateProfile:e.dateProfile,businessHours:e.businessHours,eventStore:e.renderableEventStore,eventUiBases:e.eventUiBases,dateSelection:e.dateSelection,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,isHeightAuto:e.isHeightAuto,forPrint:e.forPrint},s=this.buildViewPropTransformers(n.viewPropsTransformers);for(let o of s)Object.assign(i,o.transform(i,e));let a=r.component;return ce(a,Object.assign({},i))}}function nQ(t,e,n,r,i,s){let a=n.build(i,void 0,!1),o=n.buildPrev(e,r,!1),p=n.buildNext(e,r,!1);return{title:s,activeButton:t.type,navUnit:t.singleUnit,isTodayEnabled:a.isValid&&!ma(e.currentRange,i),isPrevEnabled:o.isValid,isNextEnabled:p.isValid}}function rQ(t){return t.map(e=>new e)}class iQ extends XX{constructor(e,n={}){super(),this.isRendering=!1,this.isRendered=!1,this.currentClassNames=[],this.customContentRenderId=0,this.handleAction=r=>{switch(r.type){case"SET_EVENT_DRAG":case"SET_EVENT_RESIZE":this.renderRunner.tryDrain()}},this.handleData=r=>{this.currentData=r,this.renderRunner.request(r.calendarOptions.rerenderDelay)},this.handleRenderRequest=()=>{if(this.isRendering){this.isRendered=!0;let{currentData:r}=this;$g(()=>{af(ce(YX,{options:r.calendarOptions,theme:r.theme,emitter:r.emitter},(i,s,a,o)=>(this.setClassNames(i),this.setHeight(s),ce(FM.Provider,{value:this.customContentRenderId},ce(tQ,Object.assign({isHeightAuto:a,forPrint:o},r))))),this.el)})}else this.isRendered&&(this.isRendered=!1,af(null,this.el),this.setClassNames([]),this.setHeight(""))},IY(e),this.el=e,this.renderRunner=new kx(this.handleRenderRequest),new jJ({optionOverrides:n,calendarApi:this,onAction:this.handleAction,onData:this.handleData})}render(){let e=this.isRendering;e?this.customContentRenderId+=1:this.isRendering=!0,this.renderRunner.request(),e&&this.updateSize()}destroy(){this.isRendering&&(this.isRendering=!1,this.renderRunner.request())}updateSize(){$g(()=>{super.updateSize()})}batchRendering(e){this.renderRunner.pause("batchRendering"),e(),this.renderRunner.resume("batchRendering")}pauseRendering(){this.renderRunner.pause("pauseRendering")}resumeRendering(){this.renderRunner.resume("pauseRendering",!0)}resetOptions(e,n){this.currentDataManager.resetOptions(e,n)}setClassNames(e){if(!ol(e,this.currentClassNames)){let{classList:n}=this.el;for(let r of this.currentClassNames)n.remove(r);for(let r of e)n.add(r);this.currentClassNames=e}}setHeight(e){mM(this.el,"height",e)}}const sQ={headerToolbar:!0,footerToolbar:!0,events:!0,eventSources:!0,resources:!0},oQ=d.defineComponent({props:{options:Object},data(){return{renderId:0,customRenderingMap:new Map}},methods:{getApi(){return this.calendar},buildOptions(t){return{...t,customRenderingMetaMap:cQ(this.$slots),handleCustomRendering:this.handleCustomRendering}}},render(){const t=[];for(const e of this.customRenderingMap.values())t.push(d.h(aQ,{key:e.id,customRendering:e}));return d.h("div",{attrs:{"data-fc-render-id":this.renderId}},d.h(d.Fragment,t))},mounted(){const t=new XK;this.handleCustomRendering=t.handle.bind(t);const e=this.buildOptions(this.options),n=new iQ(this.$el,e);this.calendar=n,n.render(),t.subscribe(r=>{this.customRenderingMap=r,this.renderId++,this.needCustomRenderingResize=!0})},beforeUpdate(){this.getApi().resumeRendering()},updated(){this.needCustomRenderingResize&&(this.needCustomRenderingResize=!1,this.getApi().updateSize())},beforeUnmount(){this.getApi().destroy()},watch:lQ()}),aQ=d.defineComponent({props:{customRendering:Object},render(){const t=this.customRendering,e=typeof t.generatorMeta=="function"?t.generatorMeta(t.renderProps):t.generatorMeta;return d.h(d.Teleport,{to:t.containerEl},e)}});function mfe(t){return t}function lQ(){let t={options:{deep:!0,handler(e){let n=this.getApi();n.pauseRendering();let r=this.buildOptions(e);n.resetOptions(r),this.renderId++}}};for(let e in sQ)t[`options.${e}`]={deep:!0,handler(n){if(n!==void 0){let r=this.getApi();r.pauseRendering(),r.resetOptions({[e]:n},[e]),this.renderId++}}};return t}function cQ(t){const e={};for(const n in t)e[uQ(n)]=t[n];return e}function uQ(t){return t.split("-").map((e,n)=>n?dQ(e):e).join("")}function dQ(t){return t.charAt(0).toUpperCase()+t.slice(1)}class hQ extends uo{constructor(){super(...arguments),this.headerElRef=Pi()}renderSimpleLayout(e,n){let{props:r,context:i}=this,s=[],a=Qg(i.options);return e&&s.push({type:"header",key:"header",isSticky:a,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),s.push({type:"body",key:"body",liquid:!0,chunk:{content:n}}),ce(ff,{elClasses:["fc-daygrid"],viewSpec:i.viewSpec},ce(mv,{liquid:!r.isHeightAuto&&!r.forPrint,collapsibleWidth:r.forPrint,cols:[],sections:s}))}renderHScrollLayout(e,n,r,i){let s=this.context.pluginHooks.scrollGridImpl;if(!s)throw new Error("No ScrollGrid implementation");let{props:a,context:o}=this,p=!a.forPrint&&Qg(o.options),g=!a.forPrint&&AD(o.options),y=[];return e&&y.push({type:"header",key:"header",isSticky:p,chunks:[{key:"main",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),y.push({type:"body",key:"body",liquid:!0,chunks:[{key:"main",content:n}]}),g&&y.push({type:"footer",key:"footer",isSticky:!0,chunks:[{key:"main",content:pv}]}),ce(ff,{elClasses:["fc-daygrid"],viewSpec:o.viewSpec},ce(s,{liquid:!a.isHeightAuto&&!a.forPrint,forPrint:a.forPrint,collapsibleWidth:a.forPrint,colGroups:[{cols:[{span:r,minWidth:i}]}],sections:y}))}}function ty(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.row].push(r);return n}function ny(t,e){let n=[];for(let r=0;r<e;r+=1)n[r]=[];for(let r of t)n[r.firstCol].push(r);return n}function JD(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.row].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}const QD=or({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"narrow"});function eI(t){let{display:e}=t.eventRange.ui;return e==="list-item"||e==="auto"&&!t.eventRange.def.allDay&&t.firstCol===t.lastCol&&t.isStart&&t.isEnd}class tI extends Rn{render(){let{props:e}=this;return ce(MD,Object.assign({},e,{elClasses:["fc-daygrid-event","fc-daygrid-block-event","fc-h-event"],defaultTimeFormat:QD,defaultDisplayEventEnd:e.defaultDisplayEventEnd,disableResizing:!e.seg.eventRange.def.allDay}))}}class nI extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i}=e,s=r.eventTimeFormat||QD,a=gf(i,s,n,!0,e.defaultDisplayEventEnd);return ce(ey,Object.assign({},e,{elTag:"a",elClasses:["fc-daygrid-event","fc-daygrid-dot-event"],elAttrs:Jx(e.seg,n),defaultGenerator:fQ,timeText:a,isResizing:!1,isDateSelecting:!1}))}}function fQ(t){return ce(tr,null,ce("div",{className:"fc-daygrid-event-dot",style:{borderColor:t.borderColor||t.backgroundColor}}),t.timeText&&ce("div",{className:"fc-event-time"},t.timeText),ce("div",{className:"fc-event-title"},t.event.title||ce(tr,null," ")))}class pQ extends Rn{constructor(){super(...arguments),this.compileSegs=Ht(mQ)}render(){let{props:e}=this,{allSegs:n,invisibleSegs:r}=this.compileSegs(e.singlePlacements);return ce(ND,{elClasses:["fc-daygrid-more-link"],dateProfile:e.dateProfile,todayRange:e.todayRange,allDayDate:e.allDayDate,moreCnt:e.moreCnt,allSegs:n,hiddenSegs:r,alignmentElRef:e.alignmentElRef,alignGridTop:e.alignGridTop,extraDateSpan:e.extraDateSpan,popoverContent:()=>{let i=(e.eventDrag?e.eventDrag.affectedInstances:null)||(e.eventResize?e.eventResize.affectedInstances:null)||{};return ce(tr,null,n.map(s=>{let a=s.eventRange.instance.instanceId;return ce("div",{className:"fc-daygrid-event-harness",key:a,style:{visibility:i[a]?"hidden":""}},eI(s)?ce(nI,Object.assign({seg:s,isDragging:!1,isSelected:a===e.eventSelection,defaultDisplayEventEnd:!1},ga(s,e.todayRange))):ce(tI,Object.assign({seg:s,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:a===e.eventSelection,defaultDisplayEventEnd:!1},ga(s,e.todayRange))))}))}})}}function mQ(t){let e=[],n=[];for(let r of t)e.push(r.seg),r.isVisible||n.push(r.seg);return{allSegs:e,invisibleSegs:n}}const gQ=or({week:"narrow"});class yQ extends uo{constructor(){super(...arguments),this.rootElRef=Pi(),this.state={dayNumberId:sl()},this.handleRootEl=e=>{pa(this.rootElRef,e),pa(this.props.elRef,e)}}render(){let{context:e,props:n,state:r,rootElRef:i}=this,{options:s,dateEnv:a}=e,{date:o,dateProfile:p}=n;const g=n.showDayNumber&&_Q(o,p.currentRange,a);return ce(yv,{elTag:"td",elRef:this.handleRootEl,elClasses:["fc-daygrid-day",...n.extraClassNames||[]],elAttrs:Object.assign(Object.assign(Object.assign({},n.extraDataAttrs),n.showDayNumber?{"aria-labelledby":r.dayNumberId}:{}),{role:"gridcell"}),defaultGenerator:bQ,date:o,dateProfile:p,todayRange:n.todayRange,showDayNumber:n.showDayNumber,isMonthStart:g,extraRenderProps:n.extraRenderProps},(y,v)=>ce("div",{ref:n.innerElRef,className:"fc-daygrid-day-frame fc-scrollgrid-sync-inner",style:{minHeight:n.minHeight}},n.showWeekNumber&&ce(PD,{elTag:"a",elClasses:["fc-daygrid-week-number"],elAttrs:rd(e,o,"week"),date:o,defaultFormat:gQ}),!v.isDisabled&&(n.showDayNumber||bv(s)||n.forceDayTop)?ce("div",{className:"fc-daygrid-day-top"},ce(y,{elTag:"a",elClasses:["fc-daygrid-day-number",g&&"fc-daygrid-month-start"],elAttrs:Object.assign(Object.assign({},rd(e,o)),{id:r.dayNumberId})})):n.showDayNumber?ce("div",{className:"fc-daygrid-day-top",style:{visibility:"hidden"}},ce("a",{className:"fc-daygrid-day-number"}," ")):void 0,ce("div",{className:"fc-daygrid-day-events",ref:n.fgContentElRef},n.fgContent,ce("div",{className:"fc-daygrid-day-bottom",style:{marginTop:n.moreMarginTop}},ce(pQ,{allDayDate:o,singlePlacements:n.singlePlacements,moreCnt:n.moreCnt,alignmentElRef:i,alignGridTop:!n.showDayNumber,extraDateSpan:n.extraDateSpan,dateProfile:n.dateProfile,eventSelection:n.eventSelection,eventDrag:n.eventDrag,eventResize:n.eventResize,todayRange:n.todayRange}))),ce("div",{className:"fc-daygrid-day-bg"},n.bgContent)))}}function bQ(t){return t.dayNumberText||ce(tr,null," ")}function _Q(t,e,n){const{start:r,end:i}=e,s=al(i,-1),a=n.getYear(r),o=n.getMonth(r),p=n.getYear(s),g=n.getMonth(s);return!(a===p&&o===g)&&(t.valueOf()===r.valueOf()||n.getDay(t)===1&&t.valueOf()<i.valueOf())}function rI(t){return t.eventRange.instance.instanceId+":"+t.firstCol}function iI(t){return rI(t)+":"+t.lastCol}function xQ(t,e,n,r,i,s,a){let o=new kQ(V=>{let U=t[V.index].eventRange.instance.instanceId+":"+V.span.start+":"+(V.span.end-1);return i[U]||1});o.allowReslicing=!0,o.strictOrder=r,e===!0||n===!0?(o.maxCoord=s,o.hiddenConsumes=!0):typeof e=="number"?o.maxStackCnt=e:typeof n=="number"&&(o.maxStackCnt=n,o.hiddenConsumes=!0);let p=[],g=[];for(let V=0;V<t.length;V+=1){let U=t[V],K=iI(U);i[K]!=null?p.push({index:V,span:{start:U.firstCol,end:U.lastCol+1}}):g.push(U)}let y=o.addSegs(p),v=o.toRects(),{singleColPlacements:E,multiColPlacements:T,leftoverMargins:D}=vQ(v,t,a),N=[],B=[];for(let V of g){T[V.firstCol].push({seg:V,isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let U=V.firstCol;U<=V.lastCol;U+=1)E[U].push({seg:od(V,U,U+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let V=0;V<a.length;V+=1)N.push(0);for(let V of y){let U=t[V.index],K=V.span;T[K.start].push({seg:od(U,K.start,K.end,a),isVisible:!1,isAbsolute:!0,absoluteTop:0,marginTop:0});for(let Y=K.start;Y<K.end;Y+=1)N[Y]+=1,E[Y].push({seg:od(U,Y,Y+1,a),isVisible:!1,isAbsolute:!1,absoluteTop:0,marginTop:0})}for(let V=0;V<a.length;V+=1)B.push(D[V]);return{singleColPlacements:E,multiColPlacements:T,moreCnts:N,moreMarginTops:B}}function vQ(t,e,n){let r=wQ(t,n.length),i=[],s=[],a=[];for(let o=0;o<n.length;o+=1){let p=r[o],g=[],y=0,v=0;for(let T of p){let D=e[T.index];g.push({seg:od(D,o,o+1,n),isVisible:!0,isAbsolute:!1,absoluteTop:T.levelCoord,marginTop:T.levelCoord-y}),y=T.levelCoord+T.thickness}let E=[];y=0,v=0;for(let T of p){let D=e[T.index],N=T.span.end-T.span.start>1,B=T.span.start===o;v+=T.levelCoord-y,y=T.levelCoord+T.thickness,N?(v+=T.thickness,B&&E.push({seg:od(D,T.span.start,T.span.end,n),isVisible:!0,isAbsolute:!0,absoluteTop:T.levelCoord,marginTop:0})):B&&(E.push({seg:od(D,T.span.start,T.span.end,n),isVisible:!0,isAbsolute:!1,absoluteTop:T.levelCoord,marginTop:v}),v=0)}i.push(g),s.push(E),a.push(v)}return{singleColPlacements:i,multiColPlacements:s,leftoverMargins:a}}function wQ(t,e){let n=[];for(let r=0;r<e;r+=1)n.push([]);for(let r of t)for(let i=r.span.start;i<r.span.end;i+=1)n[i].push(r);return n}function od(t,e,n,r){if(t.firstCol===e&&t.lastCol===n-1)return t;let i=t.eventRange,s=i.range,a=dl(s,{start:r[e].date,end:qr(r[n-1].date,1)});return Object.assign(Object.assign({},t),{firstCol:e,lastCol:n-1,eventRange:{def:i.def,ui:Object.assign(Object.assign({},i.ui),{durationEditable:!1}),instance:i.instance,range:a},isStart:t.isStart&&a.start.valueOf()===s.start.valueOf(),isEnd:t.isEnd&&a.end.valueOf()===s.end.valueOf()})}class kQ extends mD{constructor(){super(...arguments),this.hiddenConsumes=!1,this.forceHidden={}}addSegs(e){const n=super.addSegs(e),{entriesByLevel:r}=this,i=s=>!this.forceHidden[Mc(s)];for(let s=0;s<r.length;s+=1)r[s]=r[s].filter(i);return n}handleInvalidInsertion(e,n,r){const{entriesByLevel:i,forceHidden:s}=this,{touchingEntry:a,touchingLevel:o,touchingLateral:p}=e;if(this.hiddenConsumes&&a){const g=Mc(a);if(!s[g])if(this.allowReslicing){const y=Object.assign(Object.assign({},a),{span:cv(a.span,n.span)}),v=Mc(y);s[v]=!0,i[o][p]=y,r.push(y),this.splitEntry(a,n,r)}else s[g]=!0,r.push(a)}super.handleInvalidInsertion(e,n,r)}}class sI extends uo{constructor(){super(...arguments),this.cellElRefs=new ya,this.frameElRefs=new ya,this.fgElRefs=new ya,this.segHarnessRefs=new ya,this.rootElRef=Pi(),this.state={framePositions:null,maxContentHeight:null,segHeights:{}},this.handleResize=e=>{e&&this.updateSizing(!0)}}render(){let{props:e,state:n,context:r}=this,{options:i}=r,s=e.cells.length,a=ny(e.businessHourSegs,s),o=ny(e.bgEventSegs,s),p=ny(this.getHighlightSegs(),s),g=ny(this.getMirrorSegs(),s),{singleColPlacements:y,multiColPlacements:v,moreCnts:E,moreMarginTops:T}=xQ(Kx(e.fgEventSegs,i.eventOrder),e.dayMaxEvents,e.dayMaxEventRows,i.eventOrderStrict,n.segHeights,n.maxContentHeight,e.cells),D=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{};return ce("tr",{ref:this.rootElRef,role:"row"},e.renderIntro&&e.renderIntro(),e.cells.map((N,B)=>{let V=this.renderFgSegs(B,e.forPrint?y[B]:v[B],e.todayRange,D),U=this.renderFgSegs(B,EQ(g[B],v),e.todayRange,{},!!e.eventDrag,!!e.eventResize,!1);return ce(yQ,{key:N.key,elRef:this.cellElRefs.createRef(N.key),innerElRef:this.frameElRefs.createRef(N.key),dateProfile:e.dateProfile,date:N.date,showDayNumber:e.showDayNumbers,showWeekNumber:e.showWeekNumbers&&B===0,forceDayTop:e.showWeekNumbers,todayRange:e.todayRange,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,extraRenderProps:N.extraRenderProps,extraDataAttrs:N.extraDataAttrs,extraClassNames:N.extraClassNames,extraDateSpan:N.extraDateSpan,moreCnt:E[B],moreMarginTop:T[B],singlePlacements:y[B],fgContentElRef:this.fgElRefs.createRef(N.key),fgContent:ce(tr,null,ce(tr,null,V),ce(tr,null,U)),bgContent:ce(tr,null,this.renderFillSegs(p[B],"highlight"),this.renderFillSegs(a[B],"non-business"),this.renderFillSegs(o[B],"bg-event")),minHeight:e.cellMinHeight})}))}componentDidMount(){this.updateSizing(!0),this.context.addResizeHandler(this.handleResize)}componentDidUpdate(e,n){let r=this.props;this.updateSizing(!Ro(e,r))}componentWillUnmount(){this.context.removeResizeHandler(this.handleResize)}getHighlightSegs(){let{props:e}=this;return e.eventDrag&&e.eventDrag.segs.length?e.eventDrag.segs:e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:e.dateSelectionSegs}getMirrorSegs(){let{props:e}=this;return e.eventResize&&e.eventResize.segs.length?e.eventResize.segs:[]}renderFgSegs(e,n,r,i,s,a,o){let{context:p}=this,{eventSelection:g}=this.props,{framePositions:y}=this.state,v=this.props.cells.length===1,E=s||a||o,T=[];if(y)for(let D of n){let{seg:N}=D,{instanceId:B}=N.eventRange.instance,V=D.isVisible&&!i[B],U=D.isAbsolute,K="",Y="";U&&(p.isRtl?(Y=0,K=y.lefts[N.lastCol]-y.lefts[N.firstCol]):(K=0,Y=y.rights[N.firstCol]-y.rights[N.lastCol])),T.push(ce("div",{className:"fc-daygrid-event-harness"+(U?" fc-daygrid-event-harness-abs":""),key:rI(N),ref:E?null:this.segHarnessRefs.createRef(iI(N)),style:{visibility:V?"":"hidden",marginTop:U?"":D.marginTop,top:U?D.absoluteTop:"",left:K,right:Y}},eI(N)?ce(nI,Object.assign({seg:N,isDragging:s,isSelected:B===g,defaultDisplayEventEnd:v},ga(N,r))):ce(tI,Object.assign({seg:N,isDragging:s,isResizing:a,isDateSelecting:o,isSelected:B===g,defaultDisplayEventEnd:v},ga(N,r)))))}return T}renderFillSegs(e,n){let{isRtl:r}=this.context,{todayRange:i}=this.props,{framePositions:s}=this.state,a=[];if(s)for(let o of e){let p=r?{right:0,left:s.lefts[o.lastCol]-s.lefts[o.firstCol]}:{left:0,right:s.rights[o.firstCol]-s.rights[o.lastCol]};a.push(ce("div",{key:aD(o.eventRange),className:"fc-daygrid-bg-harness",style:p},n==="bg-event"?ce(DD,Object.assign({seg:o},ga(o,i))):ID(n)))}return ce(tr,{},...a)}updateSizing(e){let{props:n,state:r,frameElRefs:i}=this;if(!n.forPrint&&n.clientWidth!==null){if(e){let p=n.cells.map(g=>i.currentMap[g.key]);if(p.length){let g=this.rootElRef.current,y=new id(g,p,!0,!1);(!r.framePositions||!r.framePositions.similarTo(y))&&this.setState({framePositions:new id(g,p,!0,!1)})}}const s=this.state.segHeights,a=this.querySegHeights(),o=n.dayMaxEvents===!0||n.dayMaxEventRows===!0;this.safeSetState({segHeights:Object.assign(Object.assign({},s),a),maxContentHeight:o?this.computeMaxContentHeight():null})}}querySegHeights(){let e=this.segHarnessRefs.currentMap,n={};for(let r in e){let i=Math.round(e[r].getBoundingClientRect().height);n[r]=Math.max(n[r]||0,i)}return n}computeMaxContentHeight(){let e=this.props.cells[0].key,n=this.cellElRefs.currentMap[e],r=this.fgElRefs.currentMap[e];return n.getBoundingClientRect().bottom-r.getBoundingClientRect().top}getCellEls(){let e=this.cellElRefs.currentMap;return this.props.cells.map(n=>e[n.key])}}sI.addStateEquality({segHeights:Ro});function EQ(t,e){if(!t.length)return[];let n=SQ(e);return t.map(r=>({seg:r,isVisible:!0,isAbsolute:!0,absoluteTop:n[r.eventRange.instance.instanceId],marginTop:0}))}function SQ(t){let e={};for(let n of t)for(let r of n)e[r.seg.eventRange.instance.instanceId]=r.absoluteTop;return e}class CQ extends uo{constructor(){super(...arguments),this.splitBusinessHourSegs=Ht(ty),this.splitBgEventSegs=Ht(ty),this.splitFgEventSegs=Ht(ty),this.splitDateSelectionSegs=Ht(ty),this.splitEventDrag=Ht(JD),this.splitEventResize=Ht(JD),this.rowRefs=new ya}render(){let{props:e,context:n}=this,r=e.cells.length,i=this.splitBusinessHourSegs(e.businessHourSegs,r),s=this.splitBgEventSegs(e.bgEventSegs,r),a=this.splitFgEventSegs(e.fgEventSegs,r),o=this.splitDateSelectionSegs(e.dateSelectionSegs,r),p=this.splitEventDrag(e.eventDrag,r),g=this.splitEventResize(e.eventResize,r),y=r>=7&&e.clientWidth?e.clientWidth/n.options.aspectRatio/6:null;return ce(sd,{unit:"day"},(v,E)=>ce(tr,null,e.cells.map((T,D)=>ce(sI,{ref:this.rowRefs.createRef(D),key:T.length?T[0].date.toISOString():D,showDayNumbers:r>1,showWeekNumbers:e.showWeekNumbers,todayRange:E,dateProfile:e.dateProfile,cells:T,renderIntro:e.renderRowIntro,businessHourSegs:i[D],eventSelection:e.eventSelection,bgEventSegs:s[D].filter(TQ),fgEventSegs:a[D],dateSelectionSegs:o[D],eventDrag:p[D],eventResize:g[D],dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,clientWidth:e.clientWidth,clientHeight:e.clientHeight,cellMinHeight:y,forPrint:e.forPrint}))))}componentDidMount(){this.registerInteractiveComponent()}componentDidUpdate(){this.registerInteractiveComponent()}registerInteractiveComponent(){if(!this.rootEl){const e=this.rowRefs.currentMap[0].getCellEls()[0],n=e?e.closest(".fc-daygrid-body"):null;n&&(this.rootEl=n,this.context.registerInteractiveComponent(this,{el:n,isHitComboAllowed:this.props.isHitComboAllowed}))}}componentWillUnmount(){this.rootEl&&(this.context.unregisterInteractiveComponent(this),this.rootEl=null)}prepareHits(){this.rowPositions=new id(this.rootEl,this.rowRefs.collect().map(e=>e.getCellEls()[0]),!1,!0),this.colPositions=new id(this.rootEl,this.rowRefs.currentMap[0].getCellEls(),!0,!1)}queryHit(e,n){let{colPositions:r,rowPositions:i}=this,s=r.leftToIndex(e),a=i.topToIndex(n);if(a!=null&&s!=null){let o=this.props.cells[a][s];return{dateProfile:this.props.dateProfile,dateSpan:Object.assign({range:this.getCellRange(a,s),allDay:!0},o.extraDateSpan),dayEl:this.getCellEl(a,s),rect:{left:r.lefts[s],right:r.rights[s],top:i.tops[a],bottom:i.bottoms[a]},layer:0}}return null}getCellEl(e,n){return this.rowRefs.currentMap[e].getCellEls()[n]}getCellRange(e,n){let r=this.props.cells[e][n].date,i=qr(r,1);return{start:r,end:i}}}function TQ(t){return t.eventRange.def.allDay}class AQ extends uo{constructor(){super(...arguments),this.elRef=Pi(),this.needsScrollReset=!1}render(){let{props:e}=this,{dayMaxEventRows:n,dayMaxEvents:r,expandRows:i}=e,s=r===!0||n===!0;s&&!i&&(s=!1,n=null,r=null);let a=["fc-daygrid-body",s?"fc-daygrid-body-balanced":"fc-daygrid-body-unbalanced",i?"":"fc-daygrid-body-natural"];return ce("div",{ref:this.elRef,className:a.join(" "),style:{width:e.clientWidth,minWidth:e.tableMinWidth}},ce("table",{role:"presentation",className:"fc-scrollgrid-sync-table",style:{width:e.clientWidth,minWidth:e.tableMinWidth,height:i?e.clientHeight:""}},e.colGroupNode,ce("tbody",{role:"presentation"},ce(CQ,{dateProfile:e.dateProfile,cells:e.cells,renderRowIntro:e.renderRowIntro,showWeekNumbers:e.showWeekNumbers,clientWidth:e.clientWidth,clientHeight:e.clientHeight,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,dayMaxEvents:r,dayMaxEventRows:n,forPrint:e.forPrint,isHitComboAllowed:e.isHitComboAllowed}))))}componentDidMount(){this.requestScrollReset()}componentDidUpdate(e){e.dateProfile!==this.props.dateProfile?this.requestScrollReset():this.flushScrollReset()}requestScrollReset(){this.needsScrollReset=!0,this.flushScrollReset()}flushScrollReset(){if(this.needsScrollReset&&this.props.clientWidth){const e=MQ(this.elRef.current,this.props.dateProfile);if(e){const n=e.closest(".fc-daygrid-body"),r=n.closest(".fc-scroller"),i=e.getBoundingClientRect().top-n.getBoundingClientRect().top;r.scrollTop=i?i+1:0}this.needsScrollReset=!1}}}function MQ(t,e){let n;return e.currentRangeUnit.match(/year|month/)&&(n=t.querySelector(`[data-date="${yZ(e.currentDate)}-01"]`)),n||(n=t.querySelector(`[data-date="${uf(e.currentDate)}"]`)),n}class DQ extends wD{constructor(){super(...arguments),this.forceDayIfListItem=!0}sliceRange(e,n){return n.sliceRange(e)}}class oI extends uo{constructor(){super(...arguments),this.slicer=new DQ,this.tableRef=Pi()}render(){let{props:e,context:n}=this;return ce(AQ,Object.assign({ref:this.tableRef},this.slicer.sliceProps(e,e.dateProfile,e.nextDayThreshold,n,e.dayTableModel),{dateProfile:e.dateProfile,cells:e.dayTableModel.cells,colGroupNode:e.colGroupNode,tableMinWidth:e.tableMinWidth,renderRowIntro:e.renderRowIntro,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.showWeekNumbers,expandRows:e.expandRows,headerAlignElRef:e.headerAlignElRef,clientWidth:e.clientWidth,clientHeight:e.clientHeight,forPrint:e.forPrint}))}}class IQ extends hQ{constructor(){super(...arguments),this.buildDayTableModel=Ht(PQ),this.headerRef=Pi(),this.tableRef=Pi()}render(){let{options:e,dateProfileGenerator:n}=this.context,{props:r}=this,i=this.buildDayTableModel(r.dateProfile,n),s=e.dayHeaders&&ce(_D,{ref:this.headerRef,dateProfile:r.dateProfile,dates:i.headerDates,datesRepDistinctDays:i.rowCnt===1}),a=o=>ce(oI,{ref:this.tableRef,dateProfile:r.dateProfile,dayTableModel:i,businessHours:r.businessHours,dateSelection:r.dateSelection,eventStore:r.eventStore,eventUiBases:r.eventUiBases,eventSelection:r.eventSelection,eventDrag:r.eventDrag,eventResize:r.eventResize,nextDayThreshold:e.nextDayThreshold,colGroupNode:o.tableColGroupNode,tableMinWidth:o.tableMinWidth,dayMaxEvents:e.dayMaxEvents,dayMaxEventRows:e.dayMaxEventRows,showWeekNumbers:e.weekNumbers,expandRows:!r.isHeightAuto,headerAlignElRef:this.headerElRef,clientWidth:o.clientWidth,clientHeight:o.clientHeight,forPrint:r.forPrint});return e.dayMinWidth?this.renderHScrollLayout(s,a,i.colCnt,e.dayMinWidth):this.renderSimpleLayout(s,a)}}function PQ(t,e){let n=new xD(t.renderRange,e);return new vD(n,/year|month|week/.test(t.currentRangeUnit))}class NQ extends UM{buildRenderRange(e,n,r){let i=super.buildRenderRange(e,n,r),{props:s}=this;return RQ({currentRange:i,snapToWeek:/^(year|month)$/.test(n),fixedWeekCount:s.fixedWeekCount,dateEnv:s.dateEnv})}}function RQ(t){let{dateEnv:e,currentRange:n}=t,{start:r,end:i}=n,s;if(t.snapToWeek&&(r=e.startOfWeek(r),s=e.startOfWeek(i),s.valueOf()!==i.valueOf()&&(i=SM(s,1))),t.fixedWeekCount){let a=e.startOfWeek(e.startOfMonth(qr(n.end,-1))),o=Math.ceil(oZ(a,i));i=SM(i,6-o)}return{start:r,end:i}}var OQ=':root{--fc-daygrid-event-dot-width:8px}.fc-daygrid-day-events:after,.fc-daygrid-day-events:before,.fc-daygrid-day-frame:after,.fc-daygrid-day-frame:before,.fc-daygrid-event-harness:after,.fc-daygrid-event-harness:before{clear:both;content:"";display:table}.fc .fc-daygrid-body{position:relative;z-index:1}.fc .fc-daygrid-day.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-daygrid-day-frame{min-height:100%;position:relative}.fc .fc-daygrid-day-top{display:flex;flex-direction:row-reverse}.fc .fc-day-other .fc-daygrid-day-top{opacity:.3}.fc .fc-daygrid-day-number{padding:4px;position:relative;z-index:4}.fc .fc-daygrid-month-start{font-size:1.1em;font-weight:700}.fc .fc-daygrid-day-events{margin-top:1px}.fc .fc-daygrid-body-balanced .fc-daygrid-day-events{left:0;position:absolute;right:0}.fc .fc-daygrid-body-unbalanced .fc-daygrid-day-events{min-height:2em;position:relative}.fc .fc-daygrid-body-natural .fc-daygrid-day-events{margin-bottom:1em}.fc .fc-daygrid-event-harness{position:relative}.fc .fc-daygrid-event-harness-abs{left:0;position:absolute;right:0;top:0}.fc .fc-daygrid-bg-harness{bottom:0;position:absolute;top:0}.fc .fc-daygrid-day-bg .fc-non-business{z-index:1}.fc .fc-daygrid-day-bg .fc-bg-event{z-index:2}.fc .fc-daygrid-day-bg .fc-highlight{z-index:3}.fc .fc-daygrid-event{margin-top:1px;z-index:6}.fc .fc-daygrid-event.fc-event-mirror{z-index:7}.fc .fc-daygrid-day-bottom{font-size:.85em;margin:0 2px}.fc .fc-daygrid-day-bottom:after,.fc .fc-daygrid-day-bottom:before{clear:both;content:"";display:table}.fc .fc-daygrid-more-link{border-radius:3px;cursor:pointer;line-height:1;margin-top:1px;max-width:100%;overflow:hidden;padding:2px;position:relative;white-space:nowrap;z-index:4}.fc .fc-daygrid-more-link:hover{background-color:rgba(0,0,0,.1)}.fc .fc-daygrid-week-number{background-color:var(--fc-neutral-bg-color);color:var(--fc-neutral-text-color);min-width:1.5em;padding:2px;position:absolute;text-align:center;top:0;z-index:5}.fc .fc-more-popover .fc-popover-body{min-width:220px;padding:10px}.fc-direction-ltr .fc-daygrid-event.fc-event-start,.fc-direction-rtl .fc-daygrid-event.fc-event-end{margin-left:2px}.fc-direction-ltr .fc-daygrid-event.fc-event-end,.fc-direction-rtl .fc-daygrid-event.fc-event-start{margin-right:2px}.fc-direction-ltr .fc-daygrid-more-link{float:left}.fc-direction-ltr .fc-daygrid-week-number{border-radius:0 0 3px 0;left:0}.fc-direction-rtl .fc-daygrid-more-link{float:right}.fc-direction-rtl .fc-daygrid-week-number{border-radius:0 0 0 3px;right:0}.fc-liquid-hack .fc-daygrid-day-frame{position:static}.fc-daygrid-event{border-radius:3px;font-size:var(--fc-small-font-size);position:relative;white-space:nowrap}.fc-daygrid-block-event .fc-event-time{font-weight:700}.fc-daygrid-block-event .fc-event-time,.fc-daygrid-block-event .fc-event-title{padding:1px}.fc-daygrid-dot-event{align-items:center;display:flex;padding:2px 0}.fc-daygrid-dot-event .fc-event-title{flex-grow:1;flex-shrink:1;font-weight:700;min-width:0;overflow:hidden}.fc-daygrid-dot-event.fc-event-mirror,.fc-daygrid-dot-event:hover{background:rgba(0,0,0,.1)}.fc-daygrid-dot-event.fc-event-selected:before{bottom:-10px;top:-10px}.fc-daygrid-event-dot{border:calc(var(--fc-daygrid-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-daygrid-event-dot-width)/2);box-sizing:content-box;height:0;margin:0 4px;width:0}.fc-direction-ltr .fc-daygrid-event .fc-event-time{margin-right:3px}.fc-direction-rtl .fc-daygrid-event .fc-event-time{margin-left:3px}';Ig(OQ);var BQ=Oo({name:"@fullcalendar/daygrid",initialView:"dayGridMonth",views:{dayGrid:{component:IQ,dateProfileGeneratorClass:NQ},dayGridDay:{type:"dayGrid",duration:{days:1}},dayGridWeek:{type:"dayGrid",duration:{weeks:1}},dayGridMonth:{type:"dayGrid",duration:{months:1},fixedWeekCount:!0},dayGridYear:{type:"dayGrid",duration:{years:1}}}});class VQ extends tK{getKeyInfo(){return{allDay:{},timed:{}}}getKeysForDateSpan(e){return e.allDay?["allDay"]:["timed"]}getKeysForEventDef(e){return e.allDay?PX(e)?["timed","allDay"]:["allDay"]:["timed"]}}const zQ=or({hour:"numeric",minute:"2-digit",omitZeroMinute:!0,meridiem:"short"});function aI(t){let e=["fc-timegrid-slot","fc-timegrid-slot-label",t.isLabeled?"fc-scrollgrid-shrink":"fc-timegrid-slot-minor"];return ce(fa.Consumer,null,n=>{if(!t.isLabeled)return ce("td",{className:e.join(" "),"data-time":t.isoTimeStr});let{dateEnv:r,options:i,viewApi:s}=n,a=i.slotLabelFormat==null?zQ:Array.isArray(i.slotLabelFormat)?or(i.slotLabelFormat[0]):or(i.slotLabelFormat),o={level:0,time:t.time,date:r.toDate(t.date),view:s,text:r.format(t.date,a)};return ce(xi,{elTag:"td",elClasses:e,elAttrs:{"data-time":t.isoTimeStr},renderProps:o,generatorName:"slotLabelContent",customGenerator:i.slotLabelContent,defaultGenerator:LQ,classNameGenerator:i.slotLabelClassNames,didMount:i.slotLabelDidMount,willUnmount:i.slotLabelWillUnmount},p=>ce("div",{className:"fc-timegrid-slot-label-frame fc-scrollgrid-shrink-frame"},ce(p,{elTag:"div",elClasses:["fc-timegrid-slot-label-cushion","fc-scrollgrid-shrink-cushion"]})))})}function LQ(t){return t.text}class FQ extends Rn{render(){return this.props.slatMetas.map(e=>ce("tr",{key:e.key},ce(aI,Object.assign({},e))))}}const $Q=or({week:"short"}),jQ=5;class HQ extends uo{constructor(){super(...arguments),this.allDaySplitter=new VQ,this.headerElRef=Pi(),this.rootElRef=Pi(),this.scrollerElRef=Pi(),this.state={slatCoords:null},this.handleScrollTopRequest=e=>{let n=this.scrollerElRef.current;n&&(n.scrollTop=e)},this.renderHeadAxis=(e,n="")=>{let{options:r}=this.context,{dateProfile:i}=this.props,s=i.renderRange,o=ll(s.start,s.end)===1?rd(this.context,s.start,"week"):{};return r.weekNumbers&&e==="day"?ce(PD,{elTag:"th",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},date:s.start,defaultFormat:$Q},p=>ce("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame","fc-timegrid-axis-frame-liquid"].join(" "),style:{height:n}},ce(p,{elTag:"a",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"],elAttrs:o}))):ce("th",{"aria-hidden":!0,className:"fc-timegrid-axis"},ce("div",{className:"fc-timegrid-axis-frame",style:{height:n}}))},this.renderTableRowAxis=e=>{let{options:n,viewApi:r}=this.context,i={text:n.allDayText,view:r};return ce(xi,{elTag:"td",elClasses:["fc-timegrid-axis","fc-scrollgrid-shrink"],elAttrs:{"aria-hidden":!0},renderProps:i,generatorName:"allDayContent",customGenerator:n.allDayContent,defaultGenerator:UQ,classNameGenerator:n.allDayClassNames,didMount:n.allDayDidMount,willUnmount:n.allDayWillUnmount},s=>ce("div",{className:["fc-timegrid-axis-frame","fc-scrollgrid-shrink-frame",e==null?" fc-timegrid-axis-frame-liquid":""].join(" "),style:{height:e}},ce(s,{elTag:"span",elClasses:["fc-timegrid-axis-cushion","fc-scrollgrid-shrink-cushion","fc-scrollgrid-sync-inner"]})))},this.handleSlatCoords=e=>{this.setState({slatCoords:e})}}renderSimpleLayout(e,n,r){let{context:i,props:s}=this,a=[],o=Qg(i.options);return e&&a.push({type:"header",key:"header",isSticky:o,chunk:{elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}}),n&&(a.push({type:"body",key:"all-day",chunk:{content:n}}),a.push({type:"body",key:"all-day-divider",outerContent:ce("tr",{role:"presentation",className:"fc-scrollgrid-section"},ce("td",{className:"fc-timegrid-divider "+i.theme.getClass("tableCellShaded")}))})),a.push({type:"body",key:"body",liquid:!0,expandRows:!!i.options.expandRows,chunk:{scrollerElRef:this.scrollerElRef,content:r}}),ce(ff,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:i.viewSpec},ce(mv,{liquid:!s.isHeightAuto&&!s.forPrint,collapsibleWidth:s.forPrint,cols:[{width:"shrink"}],sections:a}))}renderHScrollLayout(e,n,r,i,s,a,o){let p=this.context.pluginHooks.scrollGridImpl;if(!p)throw new Error("No ScrollGrid implementation");let{context:g,props:y}=this,v=!y.forPrint&&Qg(g.options),E=!y.forPrint&&AD(g.options),T=[];e&&T.push({type:"header",key:"header",isSticky:v,syncRowHeights:!0,chunks:[{key:"axis",rowContent:N=>ce("tr",{role:"presentation"},this.renderHeadAxis("day",N.rowSyncHeights[0]))},{key:"cols",elRef:this.headerElRef,tableClassName:"fc-col-header",rowContent:e}]}),n&&(T.push({type:"body",key:"all-day",syncRowHeights:!0,chunks:[{key:"axis",rowContent:N=>ce("tr",{role:"presentation"},this.renderTableRowAxis(N.rowSyncHeights[0]))},{key:"cols",content:n}]}),T.push({key:"all-day-divider",type:"body",outerContent:ce("tr",{role:"presentation",className:"fc-scrollgrid-section"},ce("td",{colSpan:2,className:"fc-timegrid-divider "+g.theme.getClass("tableCellShaded")}))}));let D=g.options.nowIndicator;return T.push({type:"body",key:"body",liquid:!0,expandRows:!!g.options.expandRows,chunks:[{key:"axis",content:N=>ce("div",{className:"fc-timegrid-axis-chunk"},ce("table",{"aria-hidden":!0,style:{height:N.expandRows?N.clientHeight:""}},N.tableColGroupNode,ce("tbody",null,ce(FQ,{slatMetas:a}))),ce("div",{className:"fc-timegrid-now-indicator-container"},ce(sd,{unit:D?"minute":"day"},B=>{let V=D&&o&&o.safeComputeTop(B);return typeof V=="number"?ce(gv,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:V},isAxis:!0,date:B}):null})))},{key:"cols",scrollerElRef:this.scrollerElRef,content:r}]}),E&&T.push({key:"footer",type:"footer",isSticky:!0,chunks:[{key:"axis",content:pv},{key:"cols",content:pv}]}),ce(ff,{elRef:this.rootElRef,elClasses:["fc-timegrid"],viewSpec:g.viewSpec},ce(p,{liquid:!y.isHeightAuto&&!y.forPrint,forPrint:y.forPrint,collapsibleWidth:!1,colGroups:[{width:"shrink",cols:[{width:"shrink"}]},{cols:[{span:i,minWidth:s}]}],sections:T}))}getAllDayMaxEventProps(){let{dayMaxEvents:e,dayMaxEventRows:n}=this.context.options;return(e===!0||n===!0)&&(e=void 0,n=jQ),{dayMaxEvents:e,dayMaxEventRows:n}}}function UQ(t){return t.text}class WQ{constructor(e,n,r){this.positions=e,this.dateProfile=n,this.slotDuration=r}safeComputeTop(e){let{dateProfile:n}=this;if(ma(n.currentRange,e)){let r=nr(e),i=e.valueOf()-r.valueOf();if(i>=co(n.slotMinTime)&&i<co(n.slotMaxTime))return this.computeTimeTop(Sn(i))}return null}computeDateTop(e,n){return n||(n=nr(e)),this.computeTimeTop(Sn(e.valueOf()-n.valueOf()))}computeTimeTop(e){let{positions:n,dateProfile:r}=this,i=n.els.length,s=(e.milliseconds-co(r.slotMinTime))/co(this.slotDuration),a,o;return s=Math.max(0,s),s=Math.min(i,s),a=Math.floor(s),a=Math.min(a,i-1),o=s-a,n.tops[a]+n.getHeight(a)*o}}class qQ extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{slatElRefs:i}=e;return ce("tbody",null,e.slatMetas.map((s,a)=>{let o={time:s.time,date:n.dateEnv.toDate(s.date),view:n.viewApi};return ce("tr",{key:s.key,ref:i.createRef(s.key)},e.axis&&ce(aI,Object.assign({},s)),ce(xi,{elTag:"td",elClasses:["fc-timegrid-slot","fc-timegrid-slot-lane",!s.isLabeled&&"fc-timegrid-slot-minor"],elAttrs:{"data-time":s.isoTimeStr},renderProps:o,generatorName:"slotLaneContent",customGenerator:r.slotLaneContent,classNameGenerator:r.slotLaneClassNames,didMount:r.slotLaneDidMount,willUnmount:r.slotLaneWillUnmount}))}))}}class GQ extends Rn{constructor(){super(...arguments),this.rootElRef=Pi(),this.slatElRefs=new ya}render(){let{props:e,context:n}=this;return ce("div",{ref:this.rootElRef,className:"fc-timegrid-slots"},ce("table",{"aria-hidden":!0,className:n.theme.getClass("table"),style:{minWidth:e.tableMinWidth,width:e.clientWidth,height:e.minHeight}},e.tableColGroupNode,ce(qQ,{slatElRefs:this.slatElRefs,axis:e.axis,slatMetas:e.slatMetas})))}componentDidMount(){this.updateSizing()}componentDidUpdate(){this.updateSizing()}componentWillUnmount(){this.props.onCoords&&this.props.onCoords(null)}updateSizing(){let{context:e,props:n}=this;n.onCoords&&n.clientWidth!==null&&this.rootElRef.current.offsetHeight&&n.onCoords(new WQ(new id(this.rootElRef.current,YQ(this.slatElRefs.currentMap,n.slatMetas),!1,!0),this.props.dateProfile,e.options.slotDuration))}}function YQ(t,e){return e.map(n=>t[n.key])}function yf(t,e){let n=[],r;for(r=0;r<e;r+=1)n.push([]);if(t)for(r=0;r<t.length;r+=1)n[t[r].col].push(t[r]);return n}function lI(t,e){let n=[];if(t){for(let r=0;r<e;r+=1)n[r]={affectedInstances:t.affectedInstances,isEvent:t.isEvent,segs:[]};for(let r of t.segs)n[r.col].segs.push(r)}else for(let r=0;r<e;r+=1)n[r]=null;return n}class ZQ extends Rn{render(){let{props:e}=this;return ce(ND,{elClasses:["fc-timegrid-more-link"],elStyle:{top:e.top,bottom:e.bottom},allDayDate:null,moreCnt:e.hiddenSegs.length,allSegs:e.hiddenSegs,hiddenSegs:e.hiddenSegs,extraDateSpan:e.extraDateSpan,dateProfile:e.dateProfile,todayRange:e.todayRange,popoverContent:()=>hI(e.hiddenSegs,e),defaultGenerator:XQ,forceTimed:!0},n=>ce(n,{elTag:"div",elClasses:["fc-timegrid-more-link-inner","fc-sticky"]}))}}function XQ(t){return t.shortText}function KQ(t,e,n){let r=new mD;e!=null&&(r.strictOrder=e),n!=null&&(r.maxStackCnt=n);let i=r.addSegs(t),s=pK(i),a=JQ(r);return a=nee(a,1),{segRects:ree(a),hiddenGroups:s}}function JQ(t){const{entriesByLevel:e}=t,n=kv((r,i)=>r+":"+i,(r,i)=>{let s=tee(t,r,i),a=cI(s,n),o=e[r][i];return[Object.assign(Object.assign({},o),{nextLevelNodes:a[0]}),o.thickness+a[1]]});return cI(e.length?{level:0,lateralStart:0,lateralEnd:e[0].length}:null,n)[0]}function cI(t,e){if(!t)return[[],0];let{level:n,lateralStart:r,lateralEnd:i}=t,s=r,a=[];for(;s<i;)a.push(e(n,s)),s+=1;return a.sort(QQ),[a.map(eee),a[0][1]]}function QQ(t,e){return e[1]-t[1]}function eee(t){return t[0]}function tee(t,e,n){let{levelCoords:r,entriesByLevel:i}=t,s=i[e][n],a=r[e]+s.thickness,o=r.length,p=e;for(;p<o&&r[p]<a;p+=1);for(;p<o;p+=1){let g=i[p],y,v=dv(g,s.span.start,lv),E=v[0]+v[1],T=E;for(;(y=g[T])&&y.span.start<s.span.end;)T+=1;if(E<T)return{level:p,lateralStart:E,lateralEnd:T}}return null}function nee(t,e){const n=kv((r,i,s)=>Mc(r),(r,i,s)=>{let{nextLevelNodes:a,thickness:o}=r,p=o+s,g=o/p,y,v=[];if(!a.length)y=e;else for(let T of a)if(y===void 0){let D=n(T,i,p);y=D[0],v.push(D[1])}else{let D=n(T,y,0);v.push(D[1])}let E=(y-i)*g;return[y-E,Object.assign(Object.assign({},r),{thickness:E,nextLevelNodes:v})]});return t.map(r=>n(r,0,0)[1])}function ree(t){let e=[];const n=kv((i,s,a)=>Mc(i),(i,s,a)=>{let o=Object.assign(Object.assign({},i),{levelCoord:s,stackDepth:a,stackForward:0});return e.push(o),o.stackForward=r(i.nextLevelNodes,s+i.thickness,a+1)+1});function r(i,s,a){let o=0;for(let p of i)o=Math.max(n(p,s,a),o);return o}return r(t,0,0),e}function kv(t,e){const n={};return(...r)=>{let i=t(...r);return i in n?n[i]:n[i]=e(...r)}}function uI(t,e,n=null,r=0){let i=[];if(n)for(let s=0;s<t.length;s+=1){let a=t[s],o=n.computeDateTop(a.start,e),p=Math.max(o+(r||0),n.computeDateTop(a.end,e));i.push({start:Math.round(o),end:Math.round(p)})}return i}function iee(t,e,n,r){let i=[],s=[];for(let g=0;g<t.length;g+=1){let y=e[g];y?i.push({index:g,thickness:1,span:y}):s.push(t[g])}let{segRects:a,hiddenGroups:o}=KQ(i,n,r),p=[];for(let g of a)p.push({seg:t[g.index],rect:g});for(let g of s)p.push({seg:g,rect:null});return{segPlacements:p,hiddenGroups:o}}const see=or({hour:"numeric",minute:"2-digit",meridiem:!1});class dI extends Rn{render(){return ce(MD,Object.assign({},this.props,{elClasses:["fc-timegrid-event","fc-v-event",this.props.isShort&&"fc-timegrid-event-short"],defaultTimeFormat:see}))}}class oee extends Rn{constructor(){super(...arguments),this.sortEventSegs=Ht(Kx)}render(){let{props:e,context:n}=this,{options:r}=n,i=r.selectMirror,s=e.eventDrag&&e.eventDrag.segs||e.eventResize&&e.eventResize.segs||i&&e.dateSelectionSegs||[],a=e.eventDrag&&e.eventDrag.affectedInstances||e.eventResize&&e.eventResize.affectedInstances||{},o=this.sortEventSegs(e.fgEventSegs,r.eventOrder);return ce(yv,{elTag:"td",elRef:e.elRef,elClasses:["fc-timegrid-col",...e.extraClassNames||[]],elAttrs:Object.assign({role:"gridcell"},e.extraDataAttrs),date:e.date,dateProfile:e.dateProfile,todayRange:e.todayRange,extraRenderProps:e.extraRenderProps},p=>ce("div",{className:"fc-timegrid-col-frame"},ce("div",{className:"fc-timegrid-col-bg"},this.renderFillSegs(e.businessHourSegs,"non-business"),this.renderFillSegs(e.bgEventSegs,"bg-event"),this.renderFillSegs(e.dateSelectionSegs,"highlight")),ce("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(o,a,!1,!1,!1)),ce("div",{className:"fc-timegrid-col-events"},this.renderFgSegs(s,{},!!e.eventDrag,!!e.eventResize,!!i,"mirror")),ce("div",{className:"fc-timegrid-now-indicator-container"},this.renderNowIndicator(e.nowIndicatorSegs)),bv(r)&&ce(p,{elTag:"div",elClasses:["fc-timegrid-col-misc"]})))}renderFgSegs(e,n,r,i,s,a){let{props:o}=this;return o.forPrint?hI(e,o):this.renderPositionedFgSegs(e,n,r,i,s,a)}renderPositionedFgSegs(e,n,r,i,s,a){let{eventMaxStack:o,eventShortHeight:p,eventOrderStrict:g,eventMinHeight:y}=this.context.options,{date:v,slatCoords:E,eventSelection:T,todayRange:D,nowDate:N}=this.props,B=r||i||s,V=uI(e,v,E,y),{segPlacements:U,hiddenGroups:K}=iee(e,V,g,o);return ce(tr,null,this.renderHiddenGroups(K,e),U.map(Y=>{let{seg:we,rect:ye}=Y,Te=we.eventRange.instance.instanceId,Re=B||!!(!n[Te]&&ye),Ne=Ev(ye&&ye.span),Ye=!B&&ye?this.computeSegHStyle(ye):{left:0,right:0},qe=!!ye&&ye.stackForward>0,he=!!ye&&ye.span.end-ye.span.start<p;return ce("div",{className:"fc-timegrid-event-harness"+(qe?" fc-timegrid-event-harness-inset":""),key:a||Te,style:Object.assign(Object.assign({visibility:Re?"":"hidden"},Ne),Ye)},ce(dI,Object.assign({seg:we,isDragging:r,isResizing:i,isDateSelecting:s,isSelected:Te===T,isShort:he},ga(we,D,N))))}))}renderHiddenGroups(e,n){let{extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:a,eventSelection:o,eventDrag:p,eventResize:g}=this.props;return ce(tr,null,e.map(y=>{let v=Ev(y.span),E=aee(y.entries,n);return ce(ZQ,{key:MM(OD(E)),hiddenSegs:E,top:v.top,bottom:v.bottom,extraDateSpan:r,dateProfile:i,todayRange:s,nowDate:a,eventSelection:o,eventDrag:p,eventResize:g})}))}renderFillSegs(e,n){let{props:r,context:i}=this,a=uI(e,r.date,r.slatCoords,i.options.eventMinHeight).map((o,p)=>{let g=e[p];return ce("div",{key:aD(g.eventRange),className:"fc-timegrid-bg-harness",style:Ev(o)},n==="bg-event"?ce(DD,Object.assign({seg:g},ga(g,r.todayRange,r.nowDate))):ID(n))});return ce(tr,null,a)}renderNowIndicator(e){let{slatCoords:n,date:r}=this.props;return n?e.map((i,s)=>ce(gv,{key:s,elClasses:["fc-timegrid-now-indicator-line"],elStyle:{top:n.computeDateTop(i.start,r)},isAxis:!1,date:r})):null}computeSegHStyle(e){let{isRtl:n,options:r}=this.context,i=r.slotEventOverlap,s=e.levelCoord,a=e.levelCoord+e.thickness,o,p;i&&(a=Math.min(1,s+(a-s)*2)),n?(o=1-a,p=s):(o=s,p=1-a);let g={zIndex:e.stackDepth+1,left:o*100+"%",right:p*100+"%"};return i&&!e.stackForward&&(g[n?"marginLeft":"marginRight"]=10*2),g}}function hI(t,{todayRange:e,nowDate:n,eventSelection:r,eventDrag:i,eventResize:s}){let a=(i?i.affectedInstances:null)||(s?s.affectedInstances:null)||{};return ce(tr,null,t.map(o=>{let p=o.eventRange.instance.instanceId;return ce("div",{key:p,style:{visibility:a[p]?"hidden":""}},ce(dI,Object.assign({seg:o,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:p===r,isShort:!1},ga(o,e,n))))}))}function Ev(t){return t?{top:t.start,bottom:-t.end}:{top:"",bottom:""}}function aee(t,e){return t.map(n=>e[n.index])}class lee extends Rn{constructor(){super(...arguments),this.splitFgEventSegs=Ht(yf),this.splitBgEventSegs=Ht(yf),this.splitBusinessHourSegs=Ht(yf),this.splitNowIndicatorSegs=Ht(yf),this.splitDateSelectionSegs=Ht(yf),this.splitEventDrag=Ht(lI),this.splitEventResize=Ht(lI),this.rootElRef=Pi(),this.cellElRefs=new ya}render(){let{props:e,context:n}=this,r=n.options.nowIndicator&&e.slatCoords&&e.slatCoords.safeComputeTop(e.nowDate),i=e.cells.length,s=this.splitFgEventSegs(e.fgEventSegs,i),a=this.splitBgEventSegs(e.bgEventSegs,i),o=this.splitBusinessHourSegs(e.businessHourSegs,i),p=this.splitNowIndicatorSegs(e.nowIndicatorSegs,i),g=this.splitDateSelectionSegs(e.dateSelectionSegs,i),y=this.splitEventDrag(e.eventDrag,i),v=this.splitEventResize(e.eventResize,i);return ce("div",{className:"fc-timegrid-cols",ref:this.rootElRef},ce("table",{role:"presentation",style:{minWidth:e.tableMinWidth,width:e.clientWidth}},e.tableColGroupNode,ce("tbody",{role:"presentation"},ce("tr",{role:"row"},e.axis&&ce("td",{"aria-hidden":!0,className:"fc-timegrid-col fc-timegrid-axis"},ce("div",{className:"fc-timegrid-col-frame"},ce("div",{className:"fc-timegrid-now-indicator-container"},typeof r=="number"&&ce(gv,{elClasses:["fc-timegrid-now-indicator-arrow"],elStyle:{top:r},isAxis:!0,date:e.nowDate})))),e.cells.map((E,T)=>ce(oee,{key:E.key,elRef:this.cellElRefs.createRef(E.key),dateProfile:e.dateProfile,date:E.date,nowDate:e.nowDate,todayRange:e.todayRange,extraRenderProps:E.extraRenderProps,extraDataAttrs:E.extraDataAttrs,extraClassNames:E.extraClassNames,extraDateSpan:E.extraDateSpan,fgEventSegs:s[T],bgEventSegs:a[T],businessHourSegs:o[T],nowIndicatorSegs:p[T],dateSelectionSegs:g[T],eventDrag:y[T],eventResize:v[T],slatCoords:e.slatCoords,eventSelection:e.eventSelection,forPrint:e.forPrint}))))))}componentDidMount(){this.updateCoords()}componentDidUpdate(){this.updateCoords()}updateCoords(){let{props:e}=this;e.onColCoords&&e.clientWidth!==null&&e.onColCoords(new id(this.rootElRef.current,cee(this.cellElRefs.currentMap,e.cells),!0,!1))}}function cee(t,e){return e.map(n=>t[n.key])}class uee extends uo{constructor(){super(...arguments),this.processSlotOptions=Ht(dee),this.state={slatCoords:null},this.handleRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e,isHitComboAllowed:this.props.isHitComboAllowed}):this.context.unregisterInteractiveComponent(this)},this.handleScrollRequest=e=>{let{onScrollTopRequest:n}=this.props,{slatCoords:r}=this.state;if(n&&r){if(e.time){let i=r.computeTimeTop(e.time);i=Math.ceil(i),i&&(i+=1),n(i)}return!0}return!1},this.handleColCoords=e=>{this.colCoords=e},this.handleSlatCoords=e=>{this.setState({slatCoords:e}),this.props.onSlatCoords&&this.props.onSlatCoords(e)}}render(){let{props:e,state:n}=this;return ce("div",{className:"fc-timegrid-body",ref:this.handleRootEl,style:{width:e.clientWidth,minWidth:e.tableMinWidth}},ce(GQ,{axis:e.axis,dateProfile:e.dateProfile,slatMetas:e.slatMetas,clientWidth:e.clientWidth,minHeight:e.expandRows?e.clientHeight:"",tableMinWidth:e.tableMinWidth,tableColGroupNode:e.axis?e.tableColGroupNode:null,onCoords:this.handleSlatCoords}),ce(lee,{cells:e.cells,axis:e.axis,dateProfile:e.dateProfile,businessHourSegs:e.businessHourSegs,bgEventSegs:e.bgEventSegs,fgEventSegs:e.fgEventSegs,dateSelectionSegs:e.dateSelectionSegs,eventSelection:e.eventSelection,eventDrag:e.eventDrag,eventResize:e.eventResize,todayRange:e.todayRange,nowDate:e.nowDate,nowIndicatorSegs:e.nowIndicatorSegs,clientWidth:e.clientWidth,tableMinWidth:e.tableMinWidth,tableColGroupNode:e.tableColGroupNode,slatCoords:n.slatCoords,onColCoords:this.handleColCoords,forPrint:e.forPrint}))}componentDidMount(){this.scrollResponder=this.context.createScrollResponder(this.handleScrollRequest)}componentDidUpdate(e){this.scrollResponder.update(e.dateProfile!==this.props.dateProfile)}componentWillUnmount(){this.scrollResponder.detach()}queryHit(e,n){let{dateEnv:r,options:i}=this.context,{colCoords:s}=this,{dateProfile:a}=this.props,{slatCoords:o}=this.state,{snapDuration:p,snapsPerSlot:g}=this.processSlotOptions(this.props.slotDuration,i.snapDuration),y=s.leftToIndex(e),v=o.positions.topToIndex(n);if(y!=null&&v!=null){let E=this.props.cells[y],T=o.positions.tops[v],D=o.positions.getHeight(v),N=(n-T)/D,B=Math.floor(N*g),V=v*g+B,U=this.props.cells[y].date,K=Tx(a.slotMinTime,nZ(p,V)),Y=r.add(U,K),we=r.add(Y,p);return{dateProfile:a,dateSpan:Object.assign({range:{start:Y,end:we},allDay:!1},E.extraDateSpan),dayEl:s.els[y],rect:{left:s.lefts[y],right:s.rights[y],top:T,bottom:T+D},layer:0}}return null}}function dee(t,e){let n=e||t,r=Ax(t,n);return r===null&&(n=t,r=1),{snapDuration:n,snapsPerSlot:r}}class hee extends wD{sliceRange(e,n){let r=[];for(let i=0;i<n.length;i+=1){let s=dl(e,n[i]);s&&r.push({start:s.start,end:s.end,isStart:s.start.valueOf()===e.start.valueOf(),isEnd:s.end.valueOf()===e.end.valueOf(),col:i})}return r}}class fee extends uo{constructor(){super(...arguments),this.buildDayRanges=Ht(pee),this.slicer=new hee,this.timeColsRef=Pi()}render(){let{props:e,context:n}=this,{dateProfile:r,dayTableModel:i}=e,{nowIndicator:s,nextDayThreshold:a}=n.options,o=this.buildDayRanges(i,r,n.dateEnv);return ce(sd,{unit:s?"minute":"day"},(p,g)=>ce(uee,Object.assign({ref:this.timeColsRef},this.slicer.sliceProps(e,r,null,n,o),{forPrint:e.forPrint,axis:e.axis,dateProfile:r,slatMetas:e.slatMetas,slotDuration:e.slotDuration,cells:i.cells[0],tableColGroupNode:e.tableColGroupNode,tableMinWidth:e.tableMinWidth,clientWidth:e.clientWidth,clientHeight:e.clientHeight,expandRows:e.expandRows,nowDate:p,nowIndicatorSegs:s&&this.slicer.sliceNowDate(p,r,a,n,o),todayRange:g,onScrollTopRequest:e.onScrollTopRequest,onSlatCoords:e.onSlatCoords})))}}function pee(t,e,n){let r=[];for(let i of t.headerDates)r.push({start:n.add(i,e.slotMinTime),end:n.add(i,e.slotMaxTime)});return r}const fI=[{hours:1},{minutes:30},{minutes:15},{seconds:30},{seconds:15}];function mee(t,e,n,r,i){let s=new Date(0),a=t,o=Sn(0),p=n||gee(r),g=[];for(;co(a)<co(e);){let y=i.add(s,a),v=Ax(o,p)!==null;g.push({date:y,time:a,key:y.toISOString(),isoTimeStr:bZ(y),isLabeled:v}),a=Tx(a,r),o=Tx(o,r)}return g}function gee(t){let e,n,r;for(e=fI.length-1;e>=0;e-=1)if(n=Sn(fI[e]),r=Ax(n,t),r!==null&&r>1)return n;return t}class yee extends HQ{constructor(){super(...arguments),this.buildTimeColsModel=Ht(bee),this.buildSlatMetas=Ht(mee)}render(){let{options:e,dateEnv:n,dateProfileGenerator:r}=this.context,{props:i}=this,{dateProfile:s}=i,a=this.buildTimeColsModel(s,r),o=this.allDaySplitter.splitProps(i),p=this.buildSlatMetas(s.slotMinTime,s.slotMaxTime,e.slotLabelInterval,e.slotDuration,n),{dayMinWidth:g}=e,y=!g,v=g,E=e.dayHeaders&&ce(_D,{dates:a.headerDates,dateProfile:s,datesRepDistinctDays:!0,renderIntro:y?this.renderHeadAxis:null}),T=e.allDaySlot!==!1&&(N=>ce(oI,Object.assign({},o.allDay,{dateProfile:s,dayTableModel:a,nextDayThreshold:e.nextDayThreshold,tableMinWidth:N.tableMinWidth,colGroupNode:N.tableColGroupNode,renderRowIntro:y?this.renderTableRowAxis:null,showWeekNumbers:!1,expandRows:!1,headerAlignElRef:this.headerElRef,clientWidth:N.clientWidth,clientHeight:N.clientHeight,forPrint:i.forPrint},this.getAllDayMaxEventProps()))),D=N=>ce(fee,Object.assign({},o.timed,{dayTableModel:a,dateProfile:s,axis:y,slotDuration:e.slotDuration,slatMetas:p,forPrint:i.forPrint,tableColGroupNode:N.tableColGroupNode,tableMinWidth:N.tableMinWidth,clientWidth:N.clientWidth,clientHeight:N.clientHeight,onSlatCoords:this.handleSlatCoords,expandRows:N.expandRows,onScrollTopRequest:this.handleScrollTopRequest}));return v?this.renderHScrollLayout(E,T,D,a.colCnt,g,p,this.state.slatCoords):this.renderSimpleLayout(E,T,D)}}function bee(t,e){let n=new xD(t.renderRange,e);return new vD(n,!1)}var _ee='.fc-v-event{background-color:var(--fc-event-bg-color);border:1px solid var(--fc-event-border-color);display:block}.fc-v-event .fc-event-main{color:var(--fc-event-text-color);height:100%}.fc-v-event .fc-event-main-frame{display:flex;flex-direction:column;height:100%}.fc-v-event .fc-event-time{flex-grow:0;flex-shrink:0;max-height:100%;overflow:hidden}.fc-v-event .fc-event-title-container{flex-grow:1;flex-shrink:1;min-height:0}.fc-v-event .fc-event-title{bottom:0;max-height:100%;overflow:hidden;top:0}.fc-v-event:not(.fc-event-start){border-top-left-radius:0;border-top-right-radius:0;border-top-width:0}.fc-v-event:not(.fc-event-end){border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom-width:0}.fc-v-event.fc-event-selected:before{left:-10px;right:-10px}.fc-v-event .fc-event-resizer-start{cursor:n-resize}.fc-v-event .fc-event-resizer-end{cursor:s-resize}.fc-v-event:not(.fc-event-selected) .fc-event-resizer{height:var(--fc-event-resizer-thickness);left:0;right:0}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-start{top:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event:not(.fc-event-selected) .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-thickness)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer{left:50%;margin-left:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-start{top:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc-v-event.fc-event-selected .fc-event-resizer-end{bottom:calc(var(--fc-event-resizer-dot-total-width)/-2)}.fc .fc-timegrid .fc-daygrid-body{z-index:2}.fc .fc-timegrid-divider{padding:0 0 2px}.fc .fc-timegrid-body{min-height:100%;position:relative;z-index:1}.fc .fc-timegrid-axis-chunk{position:relative}.fc .fc-timegrid-axis-chunk>table,.fc .fc-timegrid-slots{position:relative;z-index:1}.fc .fc-timegrid-slot{border-bottom:0;height:1.5em}.fc .fc-timegrid-slot:empty:before{content:"\\00a0"}.fc .fc-timegrid-slot-minor{border-top-style:dotted}.fc .fc-timegrid-slot-label-cushion{display:inline-block;white-space:nowrap}.fc .fc-timegrid-slot-label{vertical-align:middle}.fc .fc-timegrid-axis-cushion,.fc .fc-timegrid-slot-label-cushion{padding:0 4px}.fc .fc-timegrid-axis-frame-liquid{height:100%}.fc .fc-timegrid-axis-frame{align-items:center;display:flex;justify-content:flex-end;overflow:hidden}.fc .fc-timegrid-axis-cushion{flex-shrink:0;max-width:60px}.fc-direction-ltr .fc-timegrid-slot-label-frame{text-align:right}.fc-direction-rtl .fc-timegrid-slot-label-frame{text-align:left}.fc-liquid-hack .fc-timegrid-axis-frame-liquid{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col.fc-day-today{background-color:var(--fc-today-bg-color)}.fc .fc-timegrid-col-frame{min-height:100%;position:relative}.fc-media-screen.fc-liquid-hack .fc-timegrid-col-frame{bottom:0;height:auto;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols{bottom:0;left:0;position:absolute;right:0;top:0}.fc-media-screen .fc-timegrid-cols>table{height:100%}.fc-media-screen .fc-timegrid-col-bg,.fc-media-screen .fc-timegrid-col-events,.fc-media-screen .fc-timegrid-now-indicator-container{left:0;position:absolute;right:0;top:0}.fc .fc-timegrid-col-bg{z-index:2}.fc .fc-timegrid-col-bg .fc-non-business{z-index:1}.fc .fc-timegrid-col-bg .fc-bg-event{z-index:2}.fc .fc-timegrid-col-bg .fc-highlight{z-index:3}.fc .fc-timegrid-bg-harness{left:0;position:absolute;right:0}.fc .fc-timegrid-col-events{z-index:3}.fc .fc-timegrid-now-indicator-container{bottom:0;overflow:hidden}.fc-direction-ltr .fc-timegrid-col-events{margin:0 2.5% 0 2px}.fc-direction-rtl .fc-timegrid-col-events{margin:0 2px 0 2.5%}.fc-timegrid-event-harness{position:absolute}.fc-timegrid-event-harness>.fc-timegrid-event{bottom:0;left:0;position:absolute;right:0;top:0}.fc-timegrid-event-harness-inset .fc-timegrid-event,.fc-timegrid-event.fc-event-mirror,.fc-timegrid-more-link{box-shadow:0 0 0 1px var(--fc-page-bg-color)}.fc-timegrid-event,.fc-timegrid-more-link{border-radius:3px;font-size:var(--fc-small-font-size)}.fc-timegrid-event{margin-bottom:1px}.fc-timegrid-event .fc-event-main{padding:1px 1px 0}.fc-timegrid-event .fc-event-time{font-size:var(--fc-small-font-size);margin-bottom:1px;white-space:nowrap}.fc-timegrid-event-short .fc-event-main-frame{flex-direction:row;overflow:hidden}.fc-timegrid-event-short .fc-event-time:after{content:"\\00a0-\\00a0"}.fc-timegrid-event-short .fc-event-title{font-size:var(--fc-small-font-size)}.fc-timegrid-more-link{background:var(--fc-more-link-bg-color);color:var(--fc-more-link-text-color);cursor:pointer;margin-bottom:1px;position:absolute;z-index:9999}.fc-timegrid-more-link-inner{padding:3px 2px;top:0}.fc-direction-ltr .fc-timegrid-more-link{right:0}.fc-direction-rtl .fc-timegrid-more-link{left:0}.fc .fc-timegrid-now-indicator-arrow,.fc .fc-timegrid-now-indicator-line{pointer-events:none}.fc .fc-timegrid-now-indicator-line{border-color:var(--fc-now-indicator-color);border-style:solid;border-width:1px 0 0;left:0;position:absolute;right:0;z-index:4}.fc .fc-timegrid-now-indicator-arrow{border-color:var(--fc-now-indicator-color);border-style:solid;margin-top:-5px;position:absolute;z-index:4}.fc-direction-ltr .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 0 5px 6px;left:0}.fc-direction-rtl .fc-timegrid-now-indicator-arrow{border-bottom-color:transparent;border-top-color:transparent;border-width:5px 6px 5px 0;right:0}';Ig(_ee);var xee=Oo({name:"@fullcalendar/timegrid",initialView:"timeGridWeek",optionRefiners:{allDaySlot:Boolean},views:{timeGrid:{component:yee,usesMinMaxTime:!0,allDaySlot:!0,slotDuration:"00:30:00",slotEventOverlap:!0},timeGridDay:{type:"timeGrid",duration:{days:1}},timeGridWeek:{type:"timeGrid",duration:{weeks:1}}}});class vee extends Rn{constructor(){super(...arguments),this.state={textId:sl()}}render(){let{theme:e,dateEnv:n,options:r,viewApi:i}=this.context,{cellId:s,dayDate:a,todayRange:o}=this.props,{textId:p}=this.state,g=rv(a,o),y=r.listDayFormat?n.format(a,r.listDayFormat):"",v=r.listDaySideFormat?n.format(a,r.listDaySideFormat):"",E=Object.assign({date:n.toDate(a),view:i,textId:p,text:y,sideText:v,navLinkAttrs:rd(this.context,a),sideNavLinkAttrs:rd(this.context,a,"day",!1)},g);return ce(xi,{elTag:"tr",elClasses:["fc-list-day",...Zg(g,e)],elAttrs:{"data-date":uf(a)},renderProps:E,generatorName:"dayHeaderContent",customGenerator:r.dayHeaderContent,defaultGenerator:wee,classNameGenerator:r.dayHeaderClassNames,didMount:r.dayHeaderDidMount,willUnmount:r.dayHeaderWillUnmount},T=>ce("th",{scope:"colgroup",colSpan:3,id:s,"aria-labelledby":p},ce(T,{elTag:"div",elClasses:["fc-list-day-cushion",e.getClass("tableCellShaded")]})))}}function wee(t){return ce(tr,null,t.text&&ce("a",Object.assign({id:t.textId,className:"fc-list-day-text"},t.navLinkAttrs),t.text),t.sideText&&ce("a",Object.assign({"aria-hidden":!0,className:"fc-list-day-side-text"},t.sideNavLinkAttrs),t.sideText))}const kee=or({hour:"numeric",minute:"2-digit",meridiem:"short"});class Eee extends Rn{render(){let{props:e,context:n}=this,{options:r}=n,{seg:i,timeHeaderId:s,eventHeaderId:a,dateHeaderId:o}=e,p=r.eventTimeFormat||kee;return ce(ey,Object.assign({},e,{elTag:"tr",elClasses:["fc-list-event",i.eventRange.def.url&&"fc-event-forced-url"],defaultGenerator:()=>See(i,n),seg:i,timeText:"",disableDragging:!0,disableResizing:!0}),(g,y)=>ce(tr,null,Cee(i,p,n,s,o),ce("td",{"aria-hidden":!0,className:"fc-list-event-graphic"},ce("span",{className:"fc-list-event-dot",style:{borderColor:y.borderColor||y.backgroundColor}})),ce(g,{elTag:"td",elClasses:["fc-list-event-title"],elAttrs:{headers:`${a} ${o}`}})))}}function See(t,e){let n=Jx(t,e);return ce("a",Object.assign({},n),t.eventRange.def.title)}function Cee(t,e,n,r,i){let{options:s}=n;if(s.displayEventTime!==!1){let a=t.eventRange.def,o=t.eventRange.instance,p=!1,g;if(a.allDay?p=!0:rX(t.eventRange.range)?t.isStart?g=gf(t,e,n,null,null,o.range.start,t.end):t.isEnd?g=gf(t,e,n,null,null,t.start,o.range.end):p=!0:g=gf(t,e,n),p){let y={text:n.options.allDayText,view:n.viewApi};return ce(xi,{elTag:"td",elClasses:["fc-list-event-time"],elAttrs:{headers:`${r} ${i}`},renderProps:y,generatorName:"allDayContent",customGenerator:s.allDayContent,defaultGenerator:Tee,classNameGenerator:s.allDayClassNames,didMount:s.allDayDidMount,willUnmount:s.allDayWillUnmount})}return ce("td",{className:"fc-list-event-time"},g)}return null}function Tee(t){return t.text}class Aee extends uo{constructor(){super(...arguments),this.computeDateVars=Ht(Dee),this.eventStoreToSegs=Ht(this._eventStoreToSegs),this.state={timeHeaderId:sl(),eventHeaderId:sl(),dateHeaderIdRoot:sl()},this.setRootEl=e=>{e?this.context.registerInteractiveComponent(this,{el:e}):this.context.unregisterInteractiveComponent(this)}}render(){let{props:e,context:n}=this,{dayDates:r,dayRanges:i}=this.computeDateVars(e.dateProfile),s=this.eventStoreToSegs(e.eventStore,e.eventUiBases,i);return ce(ff,{elRef:this.setRootEl,elClasses:["fc-list",n.theme.getClass("table"),n.options.stickyHeaderDates!==!1?"fc-list-sticky":""],viewSpec:n.viewSpec},ce(CD,{liquid:!e.isHeightAuto,overflowX:e.isHeightAuto?"visible":"hidden",overflowY:e.isHeightAuto?"visible":"auto"},s.length>0?this.renderSegList(s,r):this.renderEmptyMessage()))}renderEmptyMessage(){let{options:e,viewApi:n}=this.context,r={text:e.noEventsText,view:n};return ce(xi,{elTag:"div",elClasses:["fc-list-empty"],renderProps:r,generatorName:"noEventsContent",customGenerator:e.noEventsContent,defaultGenerator:Mee,classNameGenerator:e.noEventsClassNames,didMount:e.noEventsDidMount,willUnmount:e.noEventsWillUnmount},i=>ce(i,{elTag:"div",elClasses:["fc-list-empty-cushion"]}))}renderSegList(e,n){let{theme:r,options:i}=this.context,{timeHeaderId:s,eventHeaderId:a,dateHeaderIdRoot:o}=this.state,p=Iee(e);return ce(sd,{unit:"day"},(g,y)=>{let v=[];for(let E=0;E<p.length;E+=1){let T=p[E];if(T){let D=uf(n[E]),N=o+"-"+D;v.push(ce(vee,{key:D,cellId:N,dayDate:n[E],todayRange:y})),T=Kx(T,i.eventOrder);for(let B of T)v.push(ce(Eee,Object.assign({key:D+":"+B.eventRange.instance.instanceId,seg:B,isDragging:!1,isResizing:!1,isDateSelecting:!1,isSelected:!1,timeHeaderId:s,eventHeaderId:a,dateHeaderId:N},ga(B,y,g))))}}return ce("table",{className:"fc-list-table "+r.getClass("table")},ce("thead",null,ce("tr",null,ce("th",{scope:"col",id:s},i.timeHint),ce("th",{scope:"col","aria-hidden":!0}),ce("th",{scope:"col",id:a},i.eventHint))),ce("tbody",null,v))})}_eventStoreToSegs(e,n,r){return this.eventRangesToSegs(Xx(e,n,this.props.dateProfile.activeRange,this.context.options.nextDayThreshold).fg,r)}eventRangesToSegs(e,n){let r=[];for(let i of e)r.push(...this.eventRangeToSegs(i,n));return r}eventRangeToSegs(e,n){let{dateEnv:r}=this.context,{nextDayThreshold:i}=this.context.options,s=e.range,a=e.def.allDay,o,p,g,y=[];for(o=0;o<n.length;o+=1)if(p=dl(s,n[o]),p&&(g={component:this,eventRange:e,start:p.start,end:p.end,isStart:e.isStart&&p.start.valueOf()===s.start.valueOf(),isEnd:e.isEnd&&p.end.valueOf()===s.end.valueOf(),dayIndex:o},y.push(g),!g.isEnd&&!a&&o+1<n.length&&s.end<r.add(n[o+1].start,i))){g.end=s.end,g.isEnd=!0;break}return y}}function Mee(t){return t.text}function Dee(t){let e=nr(t.renderRange.start),n=t.renderRange.end,r=[],i=[];for(;e<n;)r.push(e),i.push({start:e,end:qr(e,1)}),e=qr(e,1);return{dayDates:r,dayRanges:i}}function Iee(t){let e=[],n,r;for(n=0;n<t.length;n+=1)r=t[n],(e[r.dayIndex]||(e[r.dayIndex]=[])).push(r);return e}var Pee=':root{--fc-list-event-dot-width:10px;--fc-list-event-hover-bg-color:#f5f5f5}.fc-theme-standard .fc-list{border:1px solid var(--fc-border-color)}.fc .fc-list-empty{align-items:center;background-color:var(--fc-neutral-bg-color);display:flex;height:100%;justify-content:center}.fc .fc-list-empty-cushion{margin:5em 0}.fc .fc-list-table{border-style:hidden;width:100%}.fc .fc-list-table tr>*{border-left:0;border-right:0}.fc .fc-list-sticky .fc-list-day>*{background:var(--fc-page-bg-color);position:sticky;top:0}.fc .fc-list-table thead{left:-10000px;position:absolute}.fc .fc-list-table tbody>tr:first-child th{border-top:0}.fc .fc-list-table th{padding:0}.fc .fc-list-day-cushion,.fc .fc-list-table td{padding:8px 14px}.fc .fc-list-day-cushion:after{clear:both;content:"";display:table}.fc-theme-standard .fc-list-day-cushion{background-color:var(--fc-neutral-bg-color)}.fc-direction-ltr .fc-list-day-text,.fc-direction-rtl .fc-list-day-side-text{float:left}.fc-direction-ltr .fc-list-day-side-text,.fc-direction-rtl .fc-list-day-text{float:right}.fc-direction-ltr .fc-list-table .fc-list-event-graphic{padding-right:0}.fc-direction-rtl .fc-list-table .fc-list-event-graphic{padding-left:0}.fc .fc-list-event.fc-event-forced-url{cursor:pointer}.fc .fc-list-event:hover td{background-color:var(--fc-list-event-hover-bg-color)}.fc .fc-list-event-graphic,.fc .fc-list-event-time{white-space:nowrap;width:1px}.fc .fc-list-event-dot{border:calc(var(--fc-list-event-dot-width)/2) solid var(--fc-event-border-color);border-radius:calc(var(--fc-list-event-dot-width)/2);box-sizing:content-box;display:inline-block;height:0;width:0}.fc .fc-list-event-title a{color:inherit;text-decoration:none}.fc .fc-list-event.fc-event-forced-url:hover a{text-decoration:underline}';Ig(Pee);const Nee={listDayFormat:pI,listDaySideFormat:pI,noEventsClassNames:Ie,noEventsContent:Ie,noEventsDidMount:Ie,noEventsWillUnmount:Ie};function pI(t){return t===!1?null:or(t)}var Ree=Oo({name:"@fullcalendar/list",optionRefiners:Nee,views:{list:{component:Aee,buttonTextKey:"list",listDayFormat:{month:"long",day:"numeric",year:"numeric"}},listDay:{type:"list",duration:{days:1},listDayFormat:{weekday:"long"}},listWeek:{type:"list",duration:{weeks:1},listDayFormat:{weekday:"long"},listDaySideFormat:{month:"long",day:"numeric",year:"numeric"}},listMonth:{type:"list",duration:{month:1},listDaySideFormat:{weekday:"long"}},listYear:{type:"list",duration:{year:1},listDaySideFormat:{weekday:"long"}}}});hv.touchMouseIgnoreWait=500;let Sv=0,ry=0,Cv=!1;class mI{constructor(e){this.subjectEl=null,this.selector="",this.handleSelector="",this.shouldIgnoreMove=!1,this.shouldWatchScroll=!0,this.isDragging=!1,this.isTouchDragging=!1,this.wasTouchScroll=!1,this.handleMouseDown=n=>{if(!this.shouldIgnoreMouse()&&Oee(n)&&this.tryStart(n)){let r=this.createEventFromMouse(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r),this.shouldIgnoreMove||document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},this.handleMouseMove=n=>{let r=this.createEventFromMouse(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleMouseUp=n=>{document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),this.emitter.trigger("pointerup",this.createEventFromMouse(n)),this.cleanup()},this.handleTouchStart=n=>{if(this.tryStart(n)){this.isTouchDragging=!0;let r=this.createEventFromTouch(n,!0);this.emitter.trigger("pointerdown",r),this.initScrollWatch(r);let i=n.target;this.shouldIgnoreMove||i.addEventListener("touchmove",this.handleTouchMove),i.addEventListener("touchend",this.handleTouchEnd),i.addEventListener("touchcancel",this.handleTouchEnd),window.addEventListener("scroll",this.handleTouchScroll,!0)}},this.handleTouchMove=n=>{let r=this.createEventFromTouch(n);this.recordCoords(r),this.emitter.trigger("pointermove",r)},this.handleTouchEnd=n=>{if(this.isDragging){let r=n.target;r.removeEventListener("touchmove",this.handleTouchMove),r.removeEventListener("touchend",this.handleTouchEnd),r.removeEventListener("touchcancel",this.handleTouchEnd),window.removeEventListener("scroll",this.handleTouchScroll,!0),this.emitter.trigger("pointerup",this.createEventFromTouch(n)),this.cleanup(),this.isTouchDragging=!1,Bee()}},this.handleTouchScroll=()=>{this.wasTouchScroll=!0},this.handleScroll=n=>{if(!this.shouldIgnoreMove){let r=window.scrollX-this.prevScrollX+this.prevPageX,i=window.scrollY-this.prevScrollY+this.prevPageY;this.emitter.trigger("pointermove",{origEvent:n,isTouch:this.isTouchDragging,subjectEl:this.subjectEl,pageX:r,pageY:i,deltaX:r-this.origPageX,deltaY:i-this.origPageY})}},this.containerEl=e,this.emitter=new Gg,e.addEventListener("mousedown",this.handleMouseDown),e.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),Vee()}destroy(){this.containerEl.removeEventListener("mousedown",this.handleMouseDown),this.containerEl.removeEventListener("touchstart",this.handleTouchStart,{passive:!0}),zee()}tryStart(e){let n=this.querySubjectEl(e),r=e.target;return n&&(!this.handleSelector||_i(r,this.handleSelector))?(this.subjectEl=n,this.isDragging=!0,this.wasTouchScroll=!1,!0):!1}cleanup(){Cv=!1,this.isDragging=!1,this.subjectEl=null,this.destroyScrollWatch()}querySubjectEl(e){return this.selector?_i(e.target,this.selector):this.containerEl}shouldIgnoreMouse(){return Sv||this.isTouchDragging}cancelTouchScroll(){this.isDragging&&(Cv=!0)}initScrollWatch(e){this.shouldWatchScroll&&(this.recordCoords(e),window.addEventListener("scroll",this.handleScroll,!0))}recordCoords(e){this.shouldWatchScroll&&(this.prevPageX=e.pageX,this.prevPageY=e.pageY,this.prevScrollX=window.scrollX,this.prevScrollY=window.scrollY)}destroyScrollWatch(){this.shouldWatchScroll&&window.removeEventListener("scroll",this.handleScroll,!0)}createEventFromMouse(e,n){let r=0,i=0;return n?(this.origPageX=e.pageX,this.origPageY=e.pageY):(r=e.pageX-this.origPageX,i=e.pageY-this.origPageY),{origEvent:e,isTouch:!1,subjectEl:this.subjectEl,pageX:e.pageX,pageY:e.pageY,deltaX:r,deltaY:i}}createEventFromTouch(e,n){let r=e.touches,i,s,a=0,o=0;return r&&r.length?(i=r[0].pageX,s=r[0].pageY):(i=e.pageX,s=e.pageY),n?(this.origPageX=i,this.origPageY=s):(a=i-this.origPageX,o=s-this.origPageY),{origEvent:e,isTouch:!0,subjectEl:this.subjectEl,pageX:i,pageY:s,deltaX:a,deltaY:o}}}function Oee(t){return t.button===0&&!t.ctrlKey}function Bee(){Sv+=1,setTimeout(()=>{Sv-=1},hv.touchMouseIgnoreWait)}function Vee(){ry+=1,ry===1&&window.addEventListener("touchmove",gI,{passive:!1})}function zee(){ry-=1,ry||window.removeEventListener("touchmove",gI,{passive:!1})}function gI(t){Cv&&t.preventDefault()}class Lee{constructor(){this.isVisible=!1,this.sourceEl=null,this.mirrorEl=null,this.sourceElRect=null,this.parentNode=document.body,this.zIndex=9999,this.revertDuration=0}start(e,n,r){this.sourceEl=e,this.sourceElRect=this.sourceEl.getBoundingClientRect(),this.origScreenX=n-window.scrollX,this.origScreenY=r-window.scrollY,this.deltaX=0,this.deltaY=0,this.updateElPosition()}handleMove(e,n){this.deltaX=e-window.scrollX-this.origScreenX,this.deltaY=n-window.scrollY-this.origScreenY,this.updateElPosition()}setIsVisible(e){e?this.isVisible||(this.mirrorEl&&(this.mirrorEl.style.display=""),this.isVisible=e,this.updateElPosition()):this.isVisible&&(this.mirrorEl&&(this.mirrorEl.style.display="none"),this.isVisible=e)}stop(e,n){let r=()=>{this.cleanup(),n()};e&&this.mirrorEl&&this.isVisible&&this.revertDuration&&(this.deltaX||this.deltaY)?this.doRevertAnimation(r,this.revertDuration):setTimeout(r,0)}doRevertAnimation(e,n){let r=this.mirrorEl,i=this.sourceEl.getBoundingClientRect();r.style.transition="top "+n+"ms,left "+n+"ms",lf(r,{left:i.left,top:i.top}),$Y(r,()=>{r.style.transition="",e()})}cleanup(){this.mirrorEl&&(Ex(this.mirrorEl),this.mirrorEl=null),this.sourceEl=null}updateElPosition(){this.sourceEl&&this.isVisible&&lf(this.getMirrorEl(),{left:this.sourceElRect.left+this.deltaX,top:this.sourceElRect.top+this.deltaY})}getMirrorEl(){let e=this.sourceElRect,n=this.mirrorEl;return n||(n=this.mirrorEl=this.sourceEl.cloneNode(!0),n.style.userSelect="none",n.style.webkitUserSelect="none",n.style.pointerEvents="none",n.classList.add("fc-event-dragging"),lf(n,{position:"fixed",zIndex:this.zIndex,visibility:"",boxSizing:"border-box",width:e.right-e.left,height:e.bottom-e.top,right:"auto",bottom:"auto",margin:0}),this.parentNode.appendChild(n)),n}}class yI extends av{constructor(e,n){super(),this.handleScroll=()=>{this.scrollTop=this.scrollController.getScrollTop(),this.scrollLeft=this.scrollController.getScrollLeft(),this.handleScrollChange()},this.scrollController=e,this.doesListening=n,this.scrollTop=this.origScrollTop=e.getScrollTop(),this.scrollLeft=this.origScrollLeft=e.getScrollLeft(),this.scrollWidth=e.getScrollWidth(),this.scrollHeight=e.getScrollHeight(),this.clientWidth=e.getClientWidth(),this.clientHeight=e.getClientHeight(),this.clientRect=this.computeClientRect(),this.doesListening&&this.getEventTarget().addEventListener("scroll",this.handleScroll)}destroy(){this.doesListening&&this.getEventTarget().removeEventListener("scroll",this.handleScroll)}getScrollTop(){return this.scrollTop}getScrollLeft(){return this.scrollLeft}setScrollTop(e){this.scrollController.setScrollTop(e),this.doesListening||(this.scrollTop=Math.max(Math.min(e,this.getMaxScrollTop()),0),this.handleScrollChange())}setScrollLeft(e){this.scrollController.setScrollLeft(e),this.doesListening||(this.scrollLeft=Math.max(Math.min(e,this.getMaxScrollLeft()),0),this.handleScrollChange())}getClientWidth(){return this.clientWidth}getClientHeight(){return this.clientHeight}getScrollWidth(){return this.scrollWidth}getScrollHeight(){return this.scrollHeight}handleScrollChange(){}}class bI extends yI{constructor(e,n){super(new hK(e),n)}getEventTarget(){return this.scrollController.el}computeClientRect(){return uK(this.scrollController.el)}}class Fee extends yI{constructor(e){super(new fK,e)}getEventTarget(){return window}computeClientRect(){return{left:this.scrollLeft,right:this.scrollLeft+this.clientWidth,top:this.scrollTop,bottom:this.scrollTop+this.clientHeight}}handleScrollChange(){this.clientRect=this.computeClientRect()}}const _I=typeof performance=="function"?performance.now:Date.now;class $ee{constructor(){this.isEnabled=!0,this.scrollQuery=[window,".fc-scroller"],this.edgeThreshold=50,this.maxVelocity=300,this.pointerScreenX=null,this.pointerScreenY=null,this.isAnimating=!1,this.scrollCaches=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.animate=()=>{if(this.isAnimating){let e=this.computeBestEdge(this.pointerScreenX+window.scrollX,this.pointerScreenY+window.scrollY);if(e){let n=_I();this.handleSide(e,(n-this.msSinceRequest)/1e3),this.requestAnimation(n)}else this.isAnimating=!1}}}start(e,n,r){this.isEnabled&&(this.scrollCaches=this.buildCaches(r),this.pointerScreenX=null,this.pointerScreenY=null,this.everMovedUp=!1,this.everMovedDown=!1,this.everMovedLeft=!1,this.everMovedRight=!1,this.handleMove(e,n))}handleMove(e,n){if(this.isEnabled){let r=e-window.scrollX,i=n-window.scrollY,s=this.pointerScreenY===null?0:i-this.pointerScreenY,a=this.pointerScreenX===null?0:r-this.pointerScreenX;s<0?this.everMovedUp=!0:s>0&&(this.everMovedDown=!0),a<0?this.everMovedLeft=!0:a>0&&(this.everMovedRight=!0),this.pointerScreenX=r,this.pointerScreenY=i,this.isAnimating||(this.isAnimating=!0,this.requestAnimation(_I()))}}stop(){if(this.isEnabled){this.isAnimating=!1;for(let e of this.scrollCaches)e.destroy();this.scrollCaches=null}}requestAnimation(e){this.msSinceRequest=e,requestAnimationFrame(this.animate)}handleSide(e,n){let{scrollCache:r}=e,{edgeThreshold:i}=this,s=i-e.distance,a=s*s/(i*i)*this.maxVelocity*n,o=1;switch(e.name){case"left":o=-1;case"right":r.setScrollLeft(r.getScrollLeft()+a*o);break;case"top":o=-1;case"bottom":r.setScrollTop(r.getScrollTop()+a*o);break}}computeBestEdge(e,n){let{edgeThreshold:r}=this,i=null,s=this.scrollCaches||[];for(let a of s){let o=a.clientRect,p=e-o.left,g=o.right-e,y=n-o.top,v=o.bottom-n;p>=0&&g>=0&&y>=0&&v>=0&&(y<=r&&this.everMovedUp&&a.canScrollUp()&&(!i||i.distance>y)&&(i={scrollCache:a,name:"top",distance:y}),v<=r&&this.everMovedDown&&a.canScrollDown()&&(!i||i.distance>v)&&(i={scrollCache:a,name:"bottom",distance:v}),p<=r&&this.everMovedLeft&&a.canScrollLeft()&&(!i||i.distance>p)&&(i={scrollCache:a,name:"left",distance:p}),g<=r&&this.everMovedRight&&a.canScrollRight()&&(!i||i.distance>g)&&(i={scrollCache:a,name:"right",distance:g}))}return i}buildCaches(e){return this.queryScrollEls(e).map(n=>n===window?new Fee(!1):new bI(n,!1))}queryScrollEls(e){let n=[];for(let r of this.scrollQuery)typeof r=="object"?n.push(r):n.push(...Array.prototype.slice.call(e.getRootNode().querySelectorAll(r)));return n}}class bf extends gK{constructor(e,n){super(e),this.containerEl=e,this.delay=null,this.minDistance=0,this.touchScrollAllowed=!0,this.mirrorNeedsRevert=!1,this.isInteracting=!1,this.isDragging=!1,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,this.delayTimeoutId=null,this.onPointerDown=i=>{this.isDragging||(this.isInteracting=!0,this.isDelayEnded=!1,this.isDistanceSurpassed=!1,jY(document.body),UY(document.body),i.isTouch||i.origEvent.preventDefault(),this.emitter.trigger("pointerdown",i),this.isInteracting&&!this.pointer.shouldIgnoreMove&&(this.mirror.setIsVisible(!1),this.mirror.start(i.subjectEl,i.pageX,i.pageY),this.startDelay(i),this.minDistance||this.handleDistanceSurpassed(i)))},this.onPointerMove=i=>{if(this.isInteracting){if(this.emitter.trigger("pointermove",i),!this.isDistanceSurpassed){let s=this.minDistance,a,{deltaX:o,deltaY:p}=i;a=o*o+p*p,a>=s*s&&this.handleDistanceSurpassed(i)}this.isDragging&&(i.origEvent.type!=="scroll"&&(this.mirror.handleMove(i.pageX,i.pageY),this.autoScroller.handleMove(i.pageX,i.pageY)),this.emitter.trigger("dragmove",i))}},this.onPointerUp=i=>{this.isInteracting&&(this.isInteracting=!1,HY(document.body),WY(document.body),this.emitter.trigger("pointerup",i),this.isDragging&&(this.autoScroller.stop(),this.tryStopDrag(i)),this.delayTimeoutId&&(clearTimeout(this.delayTimeoutId),this.delayTimeoutId=null))};let r=this.pointer=new mI(e);r.emitter.on("pointerdown",this.onPointerDown),r.emitter.on("pointermove",this.onPointerMove),r.emitter.on("pointerup",this.onPointerUp),n&&(r.selector=n),this.mirror=new Lee,this.autoScroller=new $ee}destroy(){this.pointer.destroy(),this.onPointerUp({})}startDelay(e){typeof this.delay=="number"?this.delayTimeoutId=setTimeout(()=>{this.delayTimeoutId=null,this.handleDelayEnd(e)},this.delay):this.handleDelayEnd(e)}handleDelayEnd(e){this.isDelayEnded=!0,this.tryStartDrag(e)}handleDistanceSurpassed(e){this.isDistanceSurpassed=!0,this.tryStartDrag(e)}tryStartDrag(e){this.isDelayEnded&&this.isDistanceSurpassed&&(!this.pointer.wasTouchScroll||this.touchScrollAllowed)&&(this.isDragging=!0,this.mirrorNeedsRevert=!1,this.autoScroller.start(e.pageX,e.pageY,this.containerEl),this.emitter.trigger("dragstart",e),this.touchScrollAllowed===!1&&this.pointer.cancelTouchScroll())}tryStopDrag(e){this.mirror.stop(this.mirrorNeedsRevert,this.stopDrag.bind(this,e))}stopDrag(e){this.isDragging=!1,this.emitter.trigger("dragend",e)}setIgnoreMove(e){this.pointer.shouldIgnoreMove=e}setMirrorIsVisible(e){this.mirror.setIsVisible(e)}setMirrorNeedsRevert(e){this.mirrorNeedsRevert=e}setAutoScrollEnabled(e){this.autoScroller.isEnabled=e}}class jee{constructor(e){this.el=e,this.origRect=ov(e),this.scrollCaches=pD(e).map(n=>new bI(n,!0))}destroy(){for(let e of this.scrollCaches)e.destroy()}computeLeft(){let e=this.origRect.left;for(let n of this.scrollCaches)e+=n.origScrollLeft-n.getScrollLeft();return e}computeTop(){let e=this.origRect.top;for(let n of this.scrollCaches)e+=n.origScrollTop-n.getScrollTop();return e}isWithinClipping(e,n){let r={left:e,top:n};for(let i of this.scrollCaches)if(!Hee(i.getEventTarget())&&!KX(r,i.clientRect))return!1;return!0}}function Hee(t){let e=t.tagName;return e==="HTML"||e==="BODY"}class iy{constructor(e,n){this.useSubjectCenter=!1,this.requireInitial=!0,this.disablePointCheck=!1,this.initialHit=null,this.movingHit=null,this.finalHit=null,this.handlePointerDown=r=>{let{dragging:i}=this;this.initialHit=null,this.movingHit=null,this.finalHit=null,this.prepareHits(),this.processFirstCoord(r),this.initialHit||!this.requireInitial?(i.setIgnoreMove(!1),this.emitter.trigger("pointerdown",r)):i.setIgnoreMove(!0)},this.handleDragStart=r=>{this.emitter.trigger("dragstart",r),this.handleMove(r,!0)},this.handleDragMove=r=>{this.emitter.trigger("dragmove",r),this.handleMove(r)},this.handlePointerUp=r=>{this.releaseHits(),this.emitter.trigger("pointerup",r)},this.handleDragEnd=r=>{this.movingHit&&this.emitter.trigger("hitupdate",null,!0,r),this.finalHit=this.movingHit,this.movingHit=null,this.emitter.trigger("dragend",r)},this.droppableStore=n,e.emitter.on("pointerdown",this.handlePointerDown),e.emitter.on("dragstart",this.handleDragStart),e.emitter.on("dragmove",this.handleDragMove),e.emitter.on("pointerup",this.handlePointerUp),e.emitter.on("dragend",this.handleDragEnd),this.dragging=e,this.emitter=new Gg}processFirstCoord(e){let n={left:e.pageX,top:e.pageY},r=n,i=e.subjectEl,s;i instanceof HTMLElement&&(s=ov(i),r=JX(r,s));let a=this.initialHit=this.queryHitForOffset(r.left,r.top);if(a){if(this.useSubjectCenter&&s){let o=hD(s,a.rect);o&&(r=QX(o))}this.coordAdjust=eK(r,n)}else this.coordAdjust={left:0,top:0}}handleMove(e,n){let r=this.queryHitForOffset(e.pageX+this.coordAdjust.left,e.pageY+this.coordAdjust.top);(n||!sy(this.movingHit,r))&&(this.movingHit=r,this.emitter.trigger("hitupdate",r,!1,e))}prepareHits(){this.offsetTrackers=ha(this.droppableStore,e=>(e.component.prepareHits(),new jee(e.el)))}releaseHits(){let{offsetTrackers:e}=this;for(let n in e)e[n].destroy();this.offsetTrackers={}}queryHitForOffset(e,n){let{droppableStore:r,offsetTrackers:i}=this,s=null;for(let a in r){let o=r[a].component,p=i[a];if(p&&p.isWithinClipping(e,n)){let g=p.computeLeft(),y=p.computeTop(),v=e-g,E=n-y,{origRect:T}=p,D=T.right-T.left,N=T.bottom-T.top;if(v>=0&&v<D&&E>=0&&E<N){let B=o.queryHit(v,E,D,N);B&&jg(B.dateProfile.activeRange,B.dateSpan.range)&&(this.disablePointCheck||p.el.contains(p.el.getRootNode().elementFromPoint(v+g-window.scrollX,E+y-window.scrollY)))&&(!s||B.layer>s.layer)&&(B.componentId=a,B.context=o.context,B.rect.left+=g,B.rect.right+=g,B.rect.top+=y,B.rect.bottom+=y,s=B)}}}return s}}function sy(t,e){return!t&&!e?!0:!!t!=!!e?!1:$X(t.dateSpan,e.dateSpan)}function xI(t,e){let n={};for(let r of e.pluginHooks.datePointTransforms)Object.assign(n,r(t,e));return Object.assign(n,Uee(t,e.dateEnv)),n}function Uee(t,e){return{date:e.toDate(t.range.start),dateStr:e.formatIso(t.range.start,{omitTime:t.allDay}),allDay:t.allDay}}class Wee extends nd{constructor(e){super(e),this.handlePointerDown=r=>{let{dragging:i}=this,s=r.origEvent.target;i.setIgnoreMove(!this.component.isValidDateDownEl(s))},this.handleDragEnd=r=>{let{component:i}=this,{pointer:s}=this.dragging;if(!s.wasTouchScroll){let{initialHit:a,finalHit:o}=this.hitDragging;if(a&&o&&sy(a,o)){let{context:p}=i,g=Object.assign(Object.assign({},xI(a.dateSpan,p)),{dayEl:a.dayEl,jsEvent:r.origEvent,view:p.viewApi||p.calendarApi.view});p.emitter.trigger("dateClick",g)}}},this.dragging=new bf(e.el),this.dragging.autoScroller.isEnabled=!1;let n=this.hitDragging=new iy(this.dragging,ev(e));n.emitter.on("pointerdown",this.handlePointerDown),n.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}}class qee extends nd{constructor(e){super(e),this.dragSelection=null,this.handlePointerDown=a=>{let{component:o,dragging:p}=this,{options:g}=o.context,y=g.selectable&&o.isValidDateDownEl(a.origEvent.target);p.setIgnoreMove(!y),p.delay=a.isTouch?Gee(o):null},this.handleDragStart=a=>{this.component.context.calendarApi.unselect(a)},this.handleHitUpdate=(a,o)=>{let{context:p}=this.component,g=null,y=!1;if(a){let v=this.hitDragging.initialHit;a.componentId===v.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(v,a)||(g=Yee(v,a,p.pluginHooks.dateSelectionTransformers)),(!g||!wK(g,a.dateProfile,p))&&(y=!0,g=null)}g?p.dispatch({type:"SELECT_DATES",selection:g}):o||p.dispatch({type:"UNSELECT_DATES"}),y?Sx():Cx(),o||(this.dragSelection=g)},this.handlePointerUp=a=>{this.dragSelection&&(nD(this.dragSelection,a,this.component.context),this.dragSelection=null)};let{component:n}=e,{options:r}=n.context,i=this.dragging=new bf(e.el);i.touchScrollAllowed=!1,i.minDistance=r.selectMinDistance||0,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new iy(this.dragging,ev(e));s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp)}destroy(){this.dragging.destroy()}}function Gee(t){let{options:e}=t.context,n=e.selectLongPressDelay;return n==null&&(n=e.longPressDelay),n}function Yee(t,e,n){let r=t.dateSpan,i=e.dateSpan,s=[r.range.start,r.range.end,i.range.start,i.range.end];s.sort(XY);let a={};for(let o of n){let p=o(t,e);if(p===!1)return null;p&&Object.assign(a,p)}return a.range={start:s[0],end:s[3]},a.allDay=r.allDay,a}class _f extends nd{constructor(e){super(e),this.subjectEl=null,this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=a=>{let o=a.origEvent.target,{component:p,dragging:g}=this,{mirror:y}=g,{options:v}=p.context,E=p.context;this.subjectEl=a.subjectEl;let T=this.subjectSeg=td(a.subjectEl),N=(this.eventRange=T.eventRange).instance.instanceId;this.relevantEvents=qx(E.getCurrentData().eventStore,N),g.minDistance=a.isTouch?0:v.eventDragMinDistance,g.delay=a.isTouch&&N!==p.props.eventSelection?Xee(p):null,v.fixedMirrorParent?y.parentNode=v.fixedMirrorParent:y.parentNode=_i(o,".fc"),y.revertDuration=v.dragRevertDuration;let B=p.isValidSegDownEl(o)&&!_i(o,".fc-event-resizer");g.setIgnoreMove(!B),this.isDragging=B&&a.subjectEl.classList.contains("fc-event-draggable")},this.handleDragStart=a=>{let o=this.component.context,p=this.eventRange,g=p.instance.instanceId;a.isTouch?g!==this.component.props.eventSelection&&o.dispatch({type:"SELECT_EVENT",eventInstanceId:g}):o.dispatch({type:"UNSELECT_EVENT"}),this.isDragging&&(o.calendarApi.unselect(a),o.emitter.trigger("eventDragStart",{el:this.subjectEl,event:new ur(o,p.def,p.instance),jsEvent:a.origEvent,view:o.viewApi}))},this.handleHitUpdate=(a,o)=>{if(!this.isDragging)return;let p=this.relevantEvents,g=this.hitDragging.initialHit,y=this.component.context,v=null,E=null,T=null,D=!1,N={affectedEvents:p,mutatedEvents:_s(),isEvent:!0};if(a){v=a.context;let B=v.options;y===v||B.editable&&B.droppable?(E=Zee(g,a,this.eventRange.instance.range.start,v.getCurrentData().pluginHooks.eventDragMutationMassagers),E&&(T=Zx(p,v.getCurrentData().eventUiBases,E,v),N.mutatedEvents=T,kD(N,a.dateProfile,v)||(D=!0,E=null,T=null,N.mutatedEvents=_s()))):v=null}this.displayDrag(v,N),D?Sx():Cx(),o||(y===v&&sy(g,a)&&(E=null),this.dragging.setMirrorNeedsRevert(!E),this.dragging.setMirrorIsVisible(!a||!this.subjectEl.getRootNode().querySelector(".fc-event-mirror")),this.receivingContext=v,this.validMutation=E,this.mutatedRelevantEvents=T)},this.handlePointerUp=()=>{this.isDragging||this.cleanup()},this.handleDragEnd=a=>{if(this.isDragging){let o=this.component.context,p=o.viewApi,{receivingContext:g,validMutation:y}=this,v=this.eventRange.def,E=this.eventRange.instance,T=new ur(o,v,E),D=this.relevantEvents,N=this.mutatedRelevantEvents,{finalHit:B}=this.hitDragging;if(this.clearDrag(),o.emitter.trigger("eventDragStop",{el:this.subjectEl,event:T,jsEvent:a.origEvent,view:p}),y){if(g===o){let V=new ur(o,N.defs[v.defId],E?N.instances[E.instanceId]:null);o.dispatch({type:"MERGE_EVENTS",eventStore:N});let U={oldEvent:T,event:V,relatedEvents:Ac(N,o,E),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:D})}},K={};for(let Y of o.getCurrentData().pluginHooks.eventDropTransformers)Object.assign(K,Y(y,o));o.emitter.trigger("eventDrop",Object.assign(Object.assign(Object.assign({},U),K),{el:a.subjectEl,delta:y.datesDelta,jsEvent:a.origEvent,view:p})),o.emitter.trigger("eventChange",U)}else if(g){let V={event:T,relatedEvents:Ac(D,o,E),revert(){o.dispatch({type:"MERGE_EVENTS",eventStore:D})}};o.emitter.trigger("eventLeave",Object.assign(Object.assign({},V),{draggedEl:a.subjectEl,view:p})),o.dispatch({type:"REMOVE_EVENTS",eventStore:D}),o.emitter.trigger("eventRemove",V);let U=N.defs[v.defId],K=N.instances[E.instanceId],Y=new ur(g,U,K);g.dispatch({type:"MERGE_EVENTS",eventStore:N});let we={event:Y,relatedEvents:Ac(N,g,K),revert(){g.dispatch({type:"REMOVE_EVENTS",eventStore:N})}};g.emitter.trigger("eventAdd",we),a.isTouch&&g.dispatch({type:"SELECT_EVENT",eventInstanceId:E.instanceId}),g.emitter.trigger("drop",Object.assign(Object.assign({},xI(B.dateSpan,g)),{draggedEl:a.subjectEl,jsEvent:a.origEvent,view:B.context.viewApi})),g.emitter.trigger("eventReceive",Object.assign(Object.assign({},we),{draggedEl:a.subjectEl,view:B.context.viewApi}))}}else o.emitter.trigger("_noEventDrop")}this.cleanup()};let{component:n}=this,{options:r}=n.context,i=this.dragging=new bf(e.el);i.pointer.selector=_f.SELECTOR,i.touchScrollAllowed=!1,i.autoScroller.isEnabled=r.dragScroll;let s=this.hitDragging=new iy(this.dragging,tv);s.useSubjectCenter=e.useEventCenter,s.emitter.on("pointerdown",this.handlePointerDown),s.emitter.on("dragstart",this.handleDragStart),s.emitter.on("hitupdate",this.handleHitUpdate),s.emitter.on("pointerup",this.handlePointerUp),s.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}displayDrag(e,n){let r=this.component.context,i=this.receivingContext;i&&i!==e&&(i===r?i.dispatch({type:"SET_EVENT_DRAG",state:{affectedEvents:n.affectedEvents,mutatedEvents:_s(),isEvent:!0}}):i.dispatch({type:"UNSET_EVENT_DRAG"})),e&&e.dispatch({type:"SET_EVENT_DRAG",state:n})}clearDrag(){let e=this.component.context,{receivingContext:n}=this;n&&n.dispatch({type:"UNSET_EVENT_DRAG"}),e!==n&&e.dispatch({type:"UNSET_EVENT_DRAG"})}cleanup(){this.subjectSeg=null,this.isDragging=!1,this.eventRange=null,this.relevantEvents=null,this.receivingContext=null,this.validMutation=null,this.mutatedRelevantEvents=null}}_f.SELECTOR=".fc-event-draggable, .fc-event-resizable";function Zee(t,e,n,r){let i=t.dateSpan,s=e.dateSpan,a=i.range.start,o=s.range.start,p={};i.allDay!==s.allDay&&(p.allDay=s.allDay,p.hasEnd=e.context.options.allDayMaintainDuration,s.allDay?a=nr(n):a=n);let g=Qu(a,o,t.context.dateEnv,t.componentId===e.componentId?t.largeUnit:null);g.milliseconds&&(p.allDay=!1);let y={datesDelta:g,standardProps:p};for(let v of r)v(y,t,e);return y}function Xee(t){let{options:e}=t.context,n=e.eventLongPressDelay;return n==null&&(n=e.longPressDelay),n}class Kee extends nd{constructor(e){super(e),this.draggingSegEl=null,this.draggingSeg=null,this.eventRange=null,this.relevantEvents=null,this.validMutation=null,this.mutatedRelevantEvents=null,this.handlePointerDown=s=>{let{component:a}=this,o=this.querySegEl(s),p=td(o),g=this.eventRange=p.eventRange;this.dragging.minDistance=a.context.options.eventDragMinDistance,this.dragging.setIgnoreMove(!this.component.isValidSegDownEl(s.origEvent.target)||s.isTouch&&this.component.props.eventSelection!==g.instance.instanceId)},this.handleDragStart=s=>{let{context:a}=this.component,o=this.eventRange;this.relevantEvents=qx(a.getCurrentData().eventStore,this.eventRange.instance.instanceId);let p=this.querySegEl(s);this.draggingSegEl=p,this.draggingSeg=td(p),a.calendarApi.unselect(),a.emitter.trigger("eventResizeStart",{el:p,event:new ur(a,o.def,o.instance),jsEvent:s.origEvent,view:a.viewApi})},this.handleHitUpdate=(s,a,o)=>{let{context:p}=this.component,g=this.relevantEvents,y=this.hitDragging.initialHit,v=this.eventRange.instance,E=null,T=null,D=!1,N={affectedEvents:g,mutatedEvents:_s(),isEvent:!0};s&&(s.componentId===y.componentId&&this.isHitComboAllowed&&!this.isHitComboAllowed(y,s)||(E=Jee(y,s,o.subjectEl.classList.contains("fc-event-resizer-start"),v.range))),E&&(T=Zx(g,p.getCurrentData().eventUiBases,E,p),N.mutatedEvents=T,kD(N,s.dateProfile,p)||(D=!0,E=null,T=null,N.mutatedEvents=null)),T?p.dispatch({type:"SET_EVENT_RESIZE",state:N}):p.dispatch({type:"UNSET_EVENT_RESIZE"}),D?Sx():Cx(),a||(E&&sy(y,s)&&(E=null),this.validMutation=E,this.mutatedRelevantEvents=T)},this.handleDragEnd=s=>{let{context:a}=this.component,o=this.eventRange.def,p=this.eventRange.instance,g=new ur(a,o,p),y=this.relevantEvents,v=this.mutatedRelevantEvents;if(a.emitter.trigger("eventResizeStop",{el:this.draggingSegEl,event:g,jsEvent:s.origEvent,view:a.viewApi}),this.validMutation){let E=new ur(a,v.defs[o.defId],p?v.instances[p.instanceId]:null);a.dispatch({type:"MERGE_EVENTS",eventStore:v});let T={oldEvent:g,event:E,relatedEvents:Ac(v,a,p),revert(){a.dispatch({type:"MERGE_EVENTS",eventStore:y})}};a.emitter.trigger("eventResize",Object.assign(Object.assign({},T),{el:this.draggingSegEl,startDelta:this.validMutation.startDelta||Sn(0),endDelta:this.validMutation.endDelta||Sn(0),jsEvent:s.origEvent,view:a.viewApi})),a.emitter.trigger("eventChange",T)}else a.emitter.trigger("_noEventResize");this.draggingSeg=null,this.relevantEvents=null,this.validMutation=null};let{component:n}=e,r=this.dragging=new bf(e.el);r.pointer.selector=".fc-event-resizer",r.touchScrollAllowed=!1,r.autoScroller.isEnabled=n.context.options.dragScroll;let i=this.hitDragging=new iy(this.dragging,ev(e));i.emitter.on("pointerdown",this.handlePointerDown),i.emitter.on("dragstart",this.handleDragStart),i.emitter.on("hitupdate",this.handleHitUpdate),i.emitter.on("dragend",this.handleDragEnd)}destroy(){this.dragging.destroy()}querySegEl(e){return _i(e.subjectEl,".fc-event")}}function Jee(t,e,n,r){let i=t.context.dateEnv,s=t.dateSpan.range.start,a=e.dateSpan.range.start,o=Qu(s,a,i,t.largeUnit);if(n){if(i.add(r.start,o)<r.end)return{startDelta:o}}else if(i.add(r.end,o)>r.start)return{endDelta:o};return null}class Qee{constructor(e){this.context=e,this.isRecentPointerDateSelect=!1,this.matchesCancel=!1,this.matchesEvent=!1,this.onSelect=r=>{r.jsEvent&&(this.isRecentPointerDateSelect=!0)},this.onDocumentPointerDown=r=>{let i=this.context.options.unselectCancel,s=gM(r.origEvent);this.matchesCancel=!!_i(s,i),this.matchesEvent=!!_i(s,_f.SELECTOR)},this.onDocumentPointerUp=r=>{let{context:i}=this,{documentPointer:s}=this,a=i.getCurrentData();if(!s.wasTouchScroll){if(a.dateSelection&&!this.isRecentPointerDateSelect){let o=i.options.unselectAuto;o&&(!o||!this.matchesCancel)&&i.calendarApi.unselect(r)}a.eventSelection&&!this.matchesEvent&&i.dispatch({type:"UNSELECT_EVENT"})}this.isRecentPointerDateSelect=!1};let n=this.documentPointer=new mI(document);n.shouldIgnoreMove=!0,n.shouldWatchScroll=!1,n.emitter.on("pointerdown",this.onDocumentPointerDown),n.emitter.on("pointerup",this.onDocumentPointerUp),e.emitter.on("select",this.onSelect)}destroy(){this.context.emitter.off("select",this.onSelect),this.documentPointer.destroy()}}const ete={fixedMirrorParent:Ie},tte={dateClick:Ie,eventDragStart:Ie,eventDragStop:Ie,eventDrop:Ie,eventResizeStart:Ie,eventResizeStop:Ie,eventResize:Ie,drop:Ie,eventReceive:Ie,eventLeave:Ie};hv.dataAttrPrefix="";var nte=Oo({name:"@fullcalendar/interaction",componentInteractions:[Wee,qee,_f,Kee],calendarInteractions:[Qee],elementDraggingImpl:bf,optionRefiners:ete,listenerRefiners:tte});const rte={},ite={class:"bg-gray-100"},ste={class:"p-[0px] border-b"};function ote(t,e){const n=d.resolveComponent("VsCalendar");return d.openBlock(),d.createElementBlock("div",ite,[d.createElementVNode("div",ste,[d.createVNode(n,{class:"scale-[0.9]"})])])}const ate=Fe(rte,[["render",ote]]);var lte={code:"uk",week:{dow:1,doy:7},buttonText:{prev:"Попередній",next:"далі",today:"Сьогодні",year:"рік",month:"Місяць",week:"Тиждень",day:"День",list:"Порядок денний"},weekText:"Тиж",allDayText:"Увесь день",moreLinkText(t){return"+ще "+t+"..."},noEventsText:"Немає подій для відображення"};const cte={},ute={class:"size-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function dte(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ute,e[0]||(e[0]=[d.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),d.createElementVNode("path",{d:"M15 3v18"},null,-1),d.createElementVNode("path",{d:"m8 9 3 3-3 3"},null,-1)]))}const vI=Fe(cte,[["render",dte]]),hte={components:{FullCalendar:oQ,VsWidgetCalendarBar:ate,IconOpenCard:vI},data(){return{isVisible:!0,isVisibleBar:!0,calendarOptions:{plugins:[BQ,xee,Ree,nte],initialView:"dayGridMonth",dateClick:this.handleDateClick,locale:lte,events:[{title:"event 1",date:"2025-01-23"},{title:"event 2",date:"2019-04-02"}]},currentView:"dayGridMonth",views:[{id:"timeGridDay",title:"День"},{id:"timeGridWeek",title:"Тиждень"},{id:"dayGridMonth",title:"Місяць"},{id:"listYear",title:"Рік"}]}},methods:{handleDateClick(t){alert("date click! "+t.dateStr)},changeView(t){this.isVisible=!1,this.currentView=t,this.calendarOptions={...this.calendarOptions,initialView:t},queueMicrotask(()=>this.isVisible=!0)}}},fte={class:"flex p-[10px] bg-gray-100"},pte={class:"flex-grow bg-white"},mte={class:"p-[10px] flex justify-between"},gte={class:"inline-flex justify-center space-x-1 bg-white border border-gray-200 rounded-md shadow-sm p- gap-x-1 dark:bg-neutral-800 dark:border-neutral-700"},yte={class:"relative flex first:before:hidden before:absolute before:top-1/2 before:-start-1 before:w-px before:h-3 before:bg-gray-200 before:-translate-y-1/2 dark:before:bg-neutral-700"},bte=["onClick"];function _te(t,e,n,r,i,s){const a=d.resolveComponent("VsWidgetCalendarBar"),o=d.resolveComponent("IconOpenCard"),p=d.resolveComponent("FullCalendar");return d.openBlock(),d.createElementBlock("div",fte,[d.createVNode(d.Transition,{name:"slide-fade"},{default:d.withCtx(()=>[d.withDirectives(d.createVNode(a,null,null,512),[[d.vShow,i.isVisibleBar]])]),_:1}),d.createElementVNode("div",pte,[d.createElementVNode("div",mte,[d.createElementVNode("button",{onClick:e[0]||(e[0]=g=>i.isVisibleBar=!i.isVisibleBar)},[d.createVNode(o)]),d.createElementVNode("div",gte,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.views,g=>(d.openBlock(),d.createElementBlock("div",yte,[d.createElementVNode("button",{class:d.normalizeClass(["inline-flex items-center px-2 py-1 text-xs text-gray-800 rounded gap-x-1 hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-500 dark:border-neutral-700 dark:text-neutral-300 dark:hover:text-neutral-400 dark:focus:text-neutral-400",[i.currentView===(g==null?void 0:g.id)?" bg-gray-100":""]]),onClick:y=>s.changeView(g==null?void 0:g.id)},d.toDisplayString(g==null?void 0:g.title),11,bte)]))),256))]),e[1]||(e[1]=d.createElementVNode("div",null,null,-1))]),i.isVisible?(d.openBlock(),d.createBlock(p,{key:0,options:i.calendarOptions,style:{height:"calc(100vh - 90px)"},class:"px-[10px] py-[4px]"},null,8,["options"])):d.createCommentVNode("",!0)])])}const wI=Fe(hte,[["render",_te]]),xte={"vs-widget-map":pb,"vs-widget-gallery":RF,"vs-widget-comments":wA,"vs-widget-file":D2,"vs-widget-history":Sq,"vs-widget-table":xG,"vs-widget-calendar":wI,"admin-notifications":TA,"vs-widget-print":Nq},vte={"table-format-text":qp,"table-format-select":Sk,"table-format-badge":kk,"table-format-switch":Zl,"table-format-check":Zl,"table-format-switch":Zl,"table-format-yes/no":Zl,"table-format-html":qp,"table-format-tags":Ck,"table-format-date":hb,"table-format-number":EE,"table-format-slot":SE},wte={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},kte={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Ete={class:"mb-4 xl:mb-8"},Ste={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},Cte={__name:"vs-dashboard",setup(t){return(e,n)=>{var r,i,s;return d.openBlock(),d.createElementBlock("div",wte,[d.createElementVNode("div",kte,[d.createElementVNode("div",Ete,[d.createElementVNode("h1",Ste," Members "+d.toDisplayString((r=e.$user)==null?void 0:r.user_name)+', "'+d.toDisplayString((s=(i=e.$settings)==null?void 0:i.admin)==null?void 0:s.title)+'" ',1),n[0]||(n[0]=d.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ",-1))]),n[1]||(n[1]=d.createElementVNode("div",{class:"space-y-5"},[d.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[d.createElementVNode("div",{class:"relative w-full"},[d.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[d.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),d.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),d.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),d.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[d.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[d.createElementVNode("span",{class:"sr-only"},"Close"),d.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),d.createElementVNode("path",{d:"m15 9-6 6"}),d.createElementVNode("path",{d:"m9 9 6 6"})])])])]),d.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[d.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[d.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[d.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),d.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),d.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),d.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),d.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[d.createElementVNode("span",{class:"hidden sm:block"},"Send"),d.createTextVNode("Invite ")])])]),d.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),d.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),d.createElementVNode("div",{class:"hs-tooltip inline-block"},[d.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[d.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),d.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),d.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),d.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),d.createElementVNode("div",{class:"hs-tooltip inline-block"},[d.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[d.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),d.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),d.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),d.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[d.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[d.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),d.createElementVNode("div",{class:"flex items-center -space-x-2"})]),d.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),d.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[d.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[d.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[d.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),d.createElementVNode("th",{scope:"col",class:"min-w-48"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),d.createElementVNode("th",{scope:"col"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),d.createElementVNode("th",{scope:"col",class:"min-w-36"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),d.createElementVNode("th",{scope:"col"},[d.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),d.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),d.createTextVNode(" Active ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),d.createTextVNode(" Active ")])])]),d.createElementVNode("tr",null,[d.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[d.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[d.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),d.createElementVNode("div",{class:"grow"},[d.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),d.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[d.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[d.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),d.createTextVNode(" Inactive ")])])])])])])])],-1))])])}}},Tte={methods:{notify(){this.$notify({type:"error",title:"Тестова нотифікація",text:"Нотифікація для показу функціонала"})}}};function Ate(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",{onClick:e[0]||(e[0]=(...a)=>s.notify&&s.notify(...a)),class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50"}," Custom component ")}const Mte=Fe(Tte,[["render",Ate]]),Dte={props:{item:{type:Object},actions:{type:Array}},data(){return{toggletMap:{}}},methods:{toggleHandler(t){this.toggletMap[t]=!this.toggletMap[t],this.$emit("on:toggled",{optionID:t,toggled:this.toggletMap[t]})}}},Ite={class:"md:col-span-2"},Pte={class:"font-semibold text-gray-800 dark:text-neutral-200"},Nte={class:"md:block md:col-span-1 md:text-center"},Rte=["onClick"];function Ote(t,e,n,r,i,s){var a,o;return d.openBlock(),d.createElementBlock("ul",{class:d.normalizeClass(["grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700",`grid-cols-${((a=n.actions)==null?void 0:a.length)+2}`])},[d.createElementVNode("li",Ite,[d.createElementVNode("h3",Pte,d.toDisplayString(n.item.ua),1)]),(o=n.item.menu)!=null&&o.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(n.actions,p=>(d.openBlock(),d.createElementBlock("li",Nte,[d.createElementVNode("button",{onClick:g=>s.toggleHandler(p),type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline focus:outline-none focus:underline dark:text-blue-400 dark:hover:text-blue-500"}," Toggle all ",8,Rte)]))),256)):d.createCommentVNode("",!0)],2)}const Bte=Fe(Dte,[["render",Ote]]),Vte={props:{subitem:{type:Object,required:!0},toggled:{type:Boolean,default:!1},optionID:{type:Number},actions:{type:Array,default:()=>[]},routes:{type:Array,required:!0}},data(){return{checkedActions:[]}},watch:{routes:{handler(){this.initializeCheckedActions()},deep:!0,immediate:!0}},methods:{initializeCheckedActions(){const t=this.routes.find(e=>e.path===this.subitem.path);this.checkedActions=t?[...t.actions]:[]},inputHandler(t){var e;this.$emit("on:checked",{subitemPath:(e=this.subitem)==null?void 0:e.path,checkedActions:this.checkedActions})}},mounted(){this.initializeCheckedActions()}},zte={class:"md:col-span-2"},Lte={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Fte={class:"text-sm text-gray-500 dark:text-neutral-500"},$te={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},jte=["value","onChange"];function Hte(t,e,n,r,i,s){var a,o;return d.openBlock(),d.createElementBlock("ul",{class:d.normalizeClass(["grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3",`grid-cols-${n.actions.length+2}`])},[d.createElementVNode("li",zte,[d.createElementVNode("p",Lte,d.toDisplayString(((a=n.subitem)==null?void 0:a.ua)||""),1),d.createElementVNode("p",Fte,d.toDisplayString(((o=n.subitem)==null?void 0:o.path)||""),1)]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.actions,(p,g)=>(d.openBlock(),d.createElementBlock("li",{class:"col-span-1",key:p},[d.createElementVNode("div",$te,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:p,onChange:y=>s.inputHandler(p),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500 dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500","onUpdate:modelValue":e[0]||(e[0]=y=>i.checkedActions=y)},null,40,jte),[[d.vModelCheckbox,i.checkedActions]])])]))),128))],2)}const Ute=Fe(Vte,[["render",Hte]]),xs=d.ref(null),Tv=t=>{const e=[];return t.forEach(n=>{n.menu?e.push(...Tv(n.menu)):e.push(n)}),e},Wte={props:{options:{type:String},token:{type:String},routes:{type:Array,default:[]}},components:{VsGrouptFirstLevel:Bte,VsGroupSecondLevel:Ute,AdminNodata:px},data(){return{list:xs.value,history:this.routes,toggledInputs:!1,searchValue:""}},computed:{getList(){var e,n;const t={ua:"Без категорії",menu:(e=this.list)==null?void 0:e.filter(r=>!(r!=null&&r.menu))};return this.filterMenu([t,...(n=this.list)==null?void 0:n.filter(r=>r==null?void 0:r.menu)],this.searchValue).filter(r=>{var i;return(i=r==null?void 0:r.menu)==null?void 0:i.length})}},methods:{async Save(){var t,e;try{const n=location.href.split("/").pop();await je.post(`/api/access-group/${n}`,{routes:(t=this.history)==null?void 0:t.filter(r=>{var i;return(i=r==null?void 0:r.actions)==null?void 0:i.length}).map(({path:r,actions:i})=>({path:r,actions:[...new Set(i)]}))}),await this.$notify({type:"success",title:"Успішно!",message:"Данні успішно оновлені"}),await $p()}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message),this.$notify({type:"error",title:"Помилка!",message:"При спробі оновити данні виникла помилка"})}},resetAll(){debugger;this.history=this.history.map(t=>({...t,actions:[]}))},async getData(){var t,e;try{const n=location.href.split("/").pop(),i=(await je.get(`/api/access-group/${n}`)).data;this.history=this.getUniqueByPath([...i.routes,...(t=Tv(this.list))==null?void 0:t.map(s=>({path:s==null?void 0:s.path,actions:[]}))])}catch(n){console.error(((e=n.response)==null?void 0:e.data)||n.message)}},toggleCheck(t){var n,r;if(!((n=this.history)!=null&&n.length))return;const e=(r=this.history)==null?void 0:r.findIndex(i=>(i==null?void 0:i.path)===(t==null?void 0:t.subitemPath));this.history[e].actions=t==null?void 0:t.checkedActions},toggleAll(t,e){var r,i,s,a,o,p,g;const n=(s=(i=(r=this.getList)==null?void 0:r[e])==null?void 0:i.menu)==null?void 0:s.map(y=>y==null?void 0:y.path);t!=null&&t.toggled?(o=(a=this.history)==null?void 0:a.filter(y=>n==null?void 0:n.includes(y==null?void 0:y.path)))==null||o.forEach(y=>{var v;(v=y==null?void 0:y.actions)==null||v.push(t==null?void 0:t.optionID)}):(g=(p=this.history)==null?void 0:p.filter(y=>n==null?void 0:n.includes(y==null?void 0:y.path)))==null||g.forEach(y=>{var v;y.actions=(v=y==null?void 0:y.actions)==null?void 0:v.filter(E=>E!==(t==null?void 0:t.optionID))})},getUniqueByPath(t){return t.reduce((e,n)=>(e.some(i=>i.path===n.path)||e.push(n),e),[])},filterMenu(t,e){return t.map(n=>{var r,i;if(n.menu){const s=this.filterMenu(n.menu,e);if(s.length>0)return{...n,menu:s}}return(i=(r=n.ua)==null?void 0:r.toLowerCase())!=null&&i.includes(e==null?void 0:e.toLowerCase())?n:null}).filter(Boolean)}},async mounted(){await this.getData()}},qte={class:"flex gap-[6px]"},Gte={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Yte={key:0,class:"space-y-8"},Zte={class:"space-y-5"};function Xte(t,e,n,r,i,s){var y;const a=d.resolveComponent("VsText"),o=d.resolveComponent("VsGrouptFirstLevel"),p=d.resolveComponent("VsGroupSecondLevel"),g=d.resolveComponent("AdminNodata");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",qte,[d.createVNode(a,{placeholder:"Пошук",class:"flex-grow",modelValue:i.searchValue,"onUpdate:modelValue":e[0]||(e[0]=v=>i.searchValue=v)},null,8,["modelValue"]),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100",onClick:e[1]||(e[1]=(...v)=>s.resetAll&&s.resetAll(...v))}," Скинути всі "),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:e[2]||(e[2]=(...v)=>s.Save&&s.Save(...v))}," Зберегти ")]),d.createElementVNode("div",{class:d.normalizeClass(["grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5",`grid-cols-${n.options.length+2}`])},[e[3]||(e[3]=d.createElementVNode("div",{class:"self-center col-span-2"},[d.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.options,(v,E)=>(d.openBlock(),d.createElementBlock("div",{class:"col-span-1 text-center",key:E},[d.createElementVNode("h3",Gte,d.toDisplayString(v),1)]))),128))],2),(y=s.getList)!=null&&y.length?(d.openBlock(),d.createElementBlock("div",Yte,[d.createElementVNode("div",Zte,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.getList,(v,E)=>(d.openBlock(),d.createElementBlock("div",{key:E},[d.createVNode(o,{item:v,"onOn:toggled":T=>s.toggleAll(T,E),actions:n.options},null,8,["item","onOn:toggled","actions"]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(v.menu,T=>(d.openBlock(),d.createBlock(p,{toggled:(v==null?void 0:v.toggled)||!1,optionID:v==null?void 0:v.optionID,key:T==null?void 0:T.path,subitem:T,actions:n.options,"onOn:checked":D=>s.toggleCheck(D,E),routes:i.history},null,8,["toggled","optionID","subitem","actions","onOn:checked","routes"]))),128))]))),128))])])):(d.openBlock(),d.createBlock(g,{key:1}))])}const Kte=Fe(Wte,[["render",Xte]]),Jte={__name:"vs-group-interface-page",setup(t){const e=["view","add","edit","del"];return(n,r)=>(d.openBlock(),d.createBlock(d.unref(Kte),{options:e,routes:n.routes},null,8,["routes"]))}},Qte={},ene={class:"shrink-0 size-4 text-gray-400 dark:text-white/60",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function tne(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ene,e[0]||(e[0]=[d.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),d.createElementVNode("path",{d:"m21 21-4.3-4.3"},null,-1)]))}const Av=Fe(Qte,[["render",tne]]),nne={components:{IconSearch:Av,IconPlus:Zu},data(){return{link:null,color:void 0,data:null,searchValue:"",isFormAdd:!1,formValues:{},scheme:{name:{type:"text",ua:"Назва",placeholder:"Назва",validators:["required"]}}}},mounted(){this.link="/admin.user-cls",this.getData()},computed:{rows(){var t,e;return((e=(t=this.data)==null?void 0:t.rows)==null?void 0:e.filter(n=>{var r;return(r=n==null?void 0:n.name)==null?void 0:r.includes(this.searchValue)}))||null}},methods:{async getData(){try{const{data:t}=await je.get("/api/user-cls?type=json");this.data=t}catch{}},async createNewCls(){var t;try{await((t=this.$refs.form)==null?void 0:t.doValidation()),await je.post("/api/user-cls",{...this.formValues}),this.isFormAdd=!1,this.formValues={},await this.getData(),this.$notify({type:"success",title:"Успішно!",message:"Новий об'єкт успішно створений"})}catch{this.$notify({type:"error",title:"Помилка",message:"При спробі створити новий об'єкт виникла помилка"})}}}},rne={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},ine={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},sne={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},one={class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},ane=["data-index"],lne={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},cne={class:"ml-auto flex items-center gap-[12px]"},une={class:"text-xs opacity-60"},dne={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function hne(t,e,n,r,i,s){const a=d.resolveComponent("IconPlus"),o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link"),g=d.resolveComponent("VsForm"),y=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",rne,[d.createElementVNode("div",ine,[e[7]||(e[7]=d.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Довідники ",-1)),d.createElementVNode("button",{onClick:e[0]||(e[0]=v=>i.isFormAdd=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[d.createVNode(a,{height:"16",width:"16"})])]),d.createElementVNode("div",sne,[d.createVNode(o,{type:"text",modelValue:i.searchValue,"onUpdate:modelValue":e[1]||(e[1]=v=>i.searchValue=v),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),d.createElementVNode("ul",one,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.rows,v=>{var E,T;return d.openBlock(),d.createElementBlock("li",{key:v==null?void 0:v.id,"data-index":t.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((T=(E=t.$route)==null?void 0:E.query)==null?void 0:T.name)===(v==null?void 0:v.name)}]),to:i.link+"?name="+((v==null?void 0:v.name)||(v==null?void 0:v.id))},{default:d.withCtx(()=>[d.createElementVNode("span",lne,d.toDisplayString((v==null?void 0:v.name)||(v==null?void 0:v.id)||"Не вказано"),1),d.createElementVNode("div",cne,[d.createElementVNode("div",une,d.toDisplayString((v==null?void 0:v.children)||"0"),1)])]),_:2},1032,["to","class"])],8,ane)}),128))])]),d.createVNode(y,{visible:i.isFormAdd,"onUpdate:visible":e[5]||(e[5]=v=>i.isFormAdd=v),title:"Створити давідник",onOnClose:e[6]||(e[6]=v=>i.formValues={})},{footer:d.withCtx(()=>[d.createElementVNode("div",dne,[d.createElementVNode("button",{style:{border:"1px solid #000"},onClick:e[3]||(e[3]=v=>{i.isFormAdd=!1,i.formValues={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:e[4]||(e[4]=(...v)=>s.createNewCls&&s.createNewCls(...v)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(g,{scheme:i.scheme,ref:"form",modelValue:i.formValues,"onUpdate:modelValue":e[2]||(e[2]=v=>i.formValues=v),class:"p-[10px]"},null,8,["scheme","modelValue"])]),_:1},8,["visible"])],64)}const fne=Fe(nne,[["render",hne]]),pne={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},mne={class:"w-full"},gne={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},yne={class:"max-w-sm mx-auto mt-6"},bne={class:"font-medium text-gray-800 dark:text-neutral-200"},_ne={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function xne(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("div",mne,[d.createElementVNode("div",gne,[e[0]||(e[0]=d.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),d.createElementVNode("div",yne,[d.createElementVNode("p",bne,d.toDisplayString(n.title),1),d.createElementVNode("p",_ne,d.toDisplayString(n.text),1)])])])}const ad=Fe(pne,[["render",xne]]),vne={props:{modelValue:{type:String,default:()=>"#172B4D"},colors:{type:Array,default:()=>["#172B4D","#0055CC","#206A83","#216E4E","#E56910","#AE2E24","#5E4DB2","#758195","#FF0000","#008000","#28A9AB","#AB7222"]}},methods:{updateColor(t){this.$emit("update:modelValue",t),this.$refs.popover.togglePopover()}}},wne={class:"flex w-[160px] flex-wrap gap-[4px]"},kne=["onClick"];function Ene(t,e,n,r,i,s){const a=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(a,{ref:"popover",placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",{class:"h-[37px] w-[37px] rounded-lg flex items-center justify-center",style:d.normalizeStyle({backgroundColor:n.modelValue})},null,4)]),default:d.withCtx(()=>[d.createElementVNode("div",null,[d.createElementVNode("ul",wne,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.colors,o=>(d.openBlock(),d.createElementBlock("li",{class:"h-[37px] w-[37px] rounded",style:d.normalizeStyle({backgroundColor:o}),onClick:p=>s.updateColor(o),key:o},null,12,kne))),128))])])]),_:1},512)}const kI=Fe(vne,[["render",Ene]]),Sne={components:{VsChoceColor:kI},props:{item:Object},data(){var t,e,n;return{color:((t=this.item)==null?void 0:t.color)||"#D1D5DB",text:((e=this.item)==null?void 0:e.text)||"",id:(n=this.item)==null?void 0:n.id}},watch:{color(t){this.$emit("update-item",{...this.item,color:t})},text(t){this.$emit("update-item",{...this.item,text:t})},id(t){this.$emit("update-item",{...this.item},t)}}},Cne={class:"relative flex items-center p-3 bg-white border border-gray-200 group gap-x-3 rounded-xl"},Tne={class:"flex flex-col"},Ane={class:"flex gap-[30px]"},Mne={class:"block text-sm font-semibold text-gray-800 text-start z-[10] cursor-pointer"},Dne={class:"block text-sm font-semibold text-gray-400 text-start z-[10] cursor-pointer"},Ine={class:"block text-xs text-gray-500 truncate dark:text-neutral-500"};function Pne(t,e,n,r,i,s){var p;const a=d.resolveComponent("VsChoceColor"),o=d.resolveComponent("VsInlineEdit");return d.openBlock(),d.createElementBlock("div",Cne,[d.createVNode(a,{modelValue:i.color,"onUpdate:modelValue":e[0]||(e[0]=g=>i.color=g)},null,8,["modelValue"]),d.createElementVNode("div",Tne,[d.createElementVNode("div",Ane,[d.createVNode(o,{modelValue:i.text,"onUpdate:modelValue":e[1]||(e[1]=g=>i.text=g),onUpdateValue:e[2]||(e[2]=g=>i.text=g)},{default:d.withCtx(()=>[d.createElementVNode("p",Mne,d.toDisplayString(i.text),1)]),_:1},8,["modelValue"]),d.createVNode(o,{modelValue:i.id,"onUpdate:modelValue":e[3]||(e[3]=g=>i.id=g),onUpdateValue:e[4]||(e[4]=g=>i.id=g)},{default:d.withCtx(()=>[d.createElementVNode("p",Dne,d.toDisplayString(i.id),1)]),_:1},8,["modelValue"])]),d.createElementVNode("p",Ine,d.toDisplayString((p=n.item)==null?void 0:p.parent),1)])])}const Nne={components:{VsReesterUsersItem:Fe(Sne,[["render",Pne]])},props:{list:Array},data(){return{draggedItemIndex:null}},methods:{dragStart(t,e){this.draggedItemIndex=e,t.dataTransfer.effectAllowed="move"},dragOver(t){t.preventDefault()},drop(t,e){t.preventDefault();const n=this.draggedItemIndex;if(n!==e){const r=[...this.list],i=r[n];r.splice(n,1),r.splice(e,0,i),this.$emit("update-list",r)}this.draggedItemIndex=null},dragEnd(){this.draggedItemIndex=null},updateItem(t,e){var r;const n=(r=this.list)==null?void 0:r.findIndex(i=>(i==null?void 0:i.id)===(t==null?void 0:t.id));this.list[n]=t,e&&(this.list[n].id=e),this.$emit("update-list",this.list)}}},Rne={class:"flex flex w-full flex-col gap-[10px] p-[10px] pt-[40px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{"max-height":"calc(100vh - 430px)"}},One=["onDragstart","onDrop"];function Bne(t,e,n,r,i,s){const a=d.resolveComponent("VsReesterUsersItem");return d.openBlock(),d.createElementBlock("ul",Rne,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.list,(o,p)=>(d.openBlock(),d.createElementBlock("li",{key:o==null?void 0:o.id,draggable:!0,onDragstart:g=>s.dragStart(g,p),onDragover:e[0]||(e[0]=g=>s.dragOver(g)),onDrop:g=>s.drop(g,p),onDragend:e[1]||(e[1]=(...g)=>s.dragEnd&&s.dragEnd(...g))},[d.createVNode(a,{item:o,onUpdateItem:s.updateItem},null,8,["item","onUpdateItem"])],40,One))),128))])}const Vne={components:{VsNoData:ad,VsChoceColor:kI,IconCheck:Ek,VsReesterUsersList:Fe(Nne,[["render",Bne],["__scopeId","data-v-17ce7688"]])},data(){return{scheme:{text:{type:"Text",ua:"Ім'я",placeholder:"Ім'я нового класифікатора",validators:["required"]}},formVisible:!0,formValues:{},color:"#172B4D",data:null}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()}}},mounted(){this.getData()},methods:{async getData(){var t;this.data=null;try{const{data:e}=await je.get(`/api/user-cls/${(t=this.$route.query)==null?void 0:t.name}`);this.data=e}catch{}},async addOneChild(){var t,e,n,r;try{const{form:i}=this.$refs;await i.doValidation(),await je.post("/api/user-cls",{name:(t=this.$route.query)==null?void 0:t.name,children:[...((e=this.data)==null?void 0:e.children)||[],{...this.formValues,color:this.color,id:(((r=(n=this.data)==null?void 0:n.children)==null?void 0:r.length)||0)+1}]}),this.formVisible=!1,this.formValues={},setTimeout(()=>this.formVisible=!0),await this.getData()}catch(i){console.log(i)}},async updateChildren(t){var e,n;this.data.children=t;try{await je.post("/api/user-cls",{name:(e=this.$route.query)==null?void 0:e.name,children:[...((n=this.data)==null?void 0:n.children)||[]]}),await this.getData()}catch(r){console.log(r)}}}},zne={class:"flex justify-center bg-gray-50",style:{height:"calc(100vh - 60px)",width:"calc(100vw - 560px)"}},Lne={key:0,class:"mt-[100px] p-[10px] w-full max-w-[1000px]",style:{"max-height":"calc(100vh - 300px)"}},Fne={class:"font-bold mb-[10px]"},$ne={class:"flex items-end max-w-[1000px] gap-[4px]"};function jne(t,e,n,r,i,s){var v,E,T,D,N,B,V;const a=d.resolveComponent("VsForm"),o=d.resolveComponent("VsChoceColor"),p=d.resolveComponent("IconCheck"),g=d.resolveComponent("VsReesterUsersList"),y=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",zne,[(E=(v=t.$route)==null?void 0:v.query)!=null&&E.name?(d.openBlock(),d.createElementBlock("div",Lne,[d.createElementVNode("h2",Fne,d.toDisplayString((D=(T=t.$route)==null?void 0:T.query)==null?void 0:D.name),1),d.createElementVNode("div",$ne,[i.formVisible?(d.openBlock(),d.createBlock(a,{key:0,ref:"form",scheme:i.scheme,modelValue:i.formValues,"onUpdate:modelValue":e[0]||(e[0]=U=>i.formValues=U),class:"p-0 m-0 h-[65px] w-full"},null,8,["scheme","modelValue"])):d.createCommentVNode("",!0),d.createVNode(o,{modelValue:i.color,"onUpdate:modelValue":e[1]||(e[1]=U=>i.color=U)},null,8,["modelValue"]),d.createElementVNode("button",{onClick:e[2]||(e[2]=(...U)=>s.addOneChild&&s.addOneChild(...U)),class:"h-[37px] w-[37px] rounded-lg bg-blue-600 ml-[6px] flex items-center justify-center text-white hover:bg-blue-700 duration-300"},[d.createVNode(p,{height:"20",width:"20"})])]),(B=(N=i.data)==null?void 0:N.children)!=null&&B.length?(d.openBlock(),d.createBlock(g,{key:0,class:"w-full max-w-[1000px]",list:(V=i.data)==null?void 0:V.children,onUpdateList:s.updateChildren},null,8,["list","onUpdateList"])):d.createCommentVNode("",!0)])):(d.openBlock(),d.createBlock(y,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const Hne={components:{VsReesterNavList:fne,VsReesterContent:Fe(Vne,[["render",jne]])}},Une={class:"flex items-start gap-0"};function Wne(t,e,n,r,i,s){const a=d.resolveComponent("VsReesterNavList"),o=d.resolveComponent("VsReesterContent");return d.openBlock(),d.createElementBlock("div",Une,[d.createVNode(a),d.createVNode(o)])}const qne=Fe(Hne,[["render",Wne]]),Gne={class:"h-[76px] bg-white border rounded-xl flex items-center justify-start px-[20px] mb-[16px]"},Yne={class:"mr-[10px]"},Zne={class:"text-[20px] font-semibold"},Xne={key:0,class:"text-[14px] font-medium text-[#676A6C]"},Kne={class:""},Jne={__name:"admin-card-header",props:{title:{type:String},tableName:{type:String},getRoute:{type:String,required:!0},slots:{type:Object},isHeaderEditButton:{type:Boolean,default:()=>!0}},setup(t){var v,E,T,D,N;const{asyncTemplateSlot:e}=(N=(D=(T=(E=(v=d.getCurrentInstance())==null?void 0:v.appContext)==null?void 0:E.app)==null?void 0:T.config)==null?void 0:D.globalProperties)==null?void 0:N.utils,n=t,r=wB(),i=uh(),s=d.ref(""),a=d.ref(""),o=()=>{r.back()},p=d.computed(()=>{var B;return`/edit?table=${n.getRoute}&id=${(B=i==null?void 0:i.params)==null?void 0:B.id}`}),g=()=>{var B,V,U,K;if(!((B=n.slots)!=null&&B.panelLeft))return"div";if((V=n.slots)!=null&&V.panelLeft.includes("<")){const Y=e("PanelLeft",(U=n.slots)==null?void 0:U.panelLeft,["name"]);a.value=Y}else a.value=(K=n.slots)==null?void 0:K.panelLeft},y=()=>{var B,V,U,K;if(!((B=n.slots)!=null&&B.panelRight))return"div";if((V=n.slots)!=null&&V.panelRight.includes("<")){const Y=e("PanelRight",(U=n.slots)==null?void 0:U.panelRight,["name"]);s.value=Y}else s.value=(K=n.slots)==null?void 0:K.panelRight};return g(),y(),(B,V)=>{const U=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",Gne,[d.createElementVNode("div",Yne,[d.createElementVNode("h2",Zne,d.toDisplayString(t.title),1),t.tableName?(d.openBlock(),d.createElementBlock("div",Xne,d.toDisplayString(t.tableName),1)):d.createCommentVNode("",!0)]),(d.openBlock(),d.createBlock(d.resolveDynamicComponent(a.value))),d.createElementVNode("div",{class:d.normalizeClass([{"gap-[6px]":t.isHeaderEditButton},"flex items-center ml-auto"])},[d.createElementVNode("button",{onClick:o,class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},V[0]||(V[0]=[d.createElementVNode("svg",{class:"transition duration-200 ease-in-out group-hover:stroke-white",width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d.createElementVNode("path",{d:"M7.00008 11.5833L2.91675 7.49999L7.00008 3.41666",stroke:"#1f2937","stroke-linecap":"round","stroke-linejoin":"round"}),d.createElementVNode("path",{d:"M11.0834 7.5H2.91675",stroke:"#2563EB","stroke-linecap":"round","stroke-linejoin":"round"})],-1),d.createElementVNode("span",{class:"hidden sm:block ml-[8px]"},"Повернутися до реєстру",-1)])),d.createElementVNode("div",Kne,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(s.value)))]),t.isHeaderEditButton?(d.openBlock(),d.createBlock(U,{key:0,to:p.value,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"},{default:d.withCtx(()=>V[1]||(V[1]=[d.createTextVNode(" Редагувати ")])),_:1},8,["to"])):d.createCommentVNode("",!0)],2)])}}},Qne={__name:"admin-card-async-component",props:{slot:String,data:Object,objectData:Object},setup(t){var s,a,o,p,g;const{asyncTemplateSlot:e}=(g=(p=(o=(a=(s=d.getCurrentInstance())==null?void 0:s.appContext)==null?void 0:a.app)==null?void 0:o.config)==null?void 0:p.globalProperties)==null?void 0:g.utils,n=d.ref(""),r=t;return(()=>{const y=e("CustomComponent",r.slot,["data"]);n.value=y})(),(y,v)=>(d.openBlock(),d.createBlock(d.resolveDynamicComponent(n.value),{data:t.objectData},null,8,["data"]))}},ere={},tre={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function nre(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",tre,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Mv=Fe(ere,[["render",nre]]),rre={},ire={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"};function sre(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",ire,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const Dv=Fe(rre,[["render",sre]]),ore={class:"px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none"},are={class:"flex flex-col gap-[4px]"},lre=["onClick"],cre={props:["table","id"],components:{AdminCardHeader:Jne,AdminCardAsyncComponent:Qne,IconChevron:Mv,AdminCardTabsDropdown:{__name:"admin-card-tabs-dropdown",props:d.mergeModels({options:{type:Array}},{activeTab:{},activeTabModifiers:{}}),emits:["update:activeTab"],setup(t){const e=t,n=d.useModel(t,"activeTab"),r=d.ref(),i=d.computed(()=>{var o;const a=(o=e.options)==null?void 0:o.find(p=>(p==null?void 0:p.name)===n.value||(p==null?void 0:p.component)===n.value);return(a==null?void 0:a.title)||"Показати більше"}),s=a=>{var o;n.value=a,(o=r.value)==null||o.togglePopover()};return(a,o)=>{const p=d.resolveComponent("VsPopover");return d.openBlock(),d.createBlock(p,{ref_key:"popover",ref:r,placement:"bottom"},{reference:d.withCtx(()=>[d.createElementVNode("button",ore,[d.createTextVNode(d.toDisplayString(i.value)+" ",1),d.createVNode(Dv,{height:"12",width:"12"})])]),default:d.withCtx(()=>[d.createElementVNode("div",are,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(t.options,g=>(d.openBlock(),d.createElementBlock("button",{class:d.normalizeClass(["cursor-pointer py-1.5 px-2 text-[13px] text-start text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100",{"bg-gray-100":n.value===(g==null?void 0:g.component)||n.value===(g==null?void 0:g.name)}]),onClick:y=>s((g==null?void 0:g.component)||(g==null?void 0:g.name))},d.toDisplayString(g==null?void 0:g.title),11,lre))),256))])]),_:1},512)}}}},data(){return{objectData:null,showTabs:!1,component:""}},computed:{getRoute(){const t=this.flattenMenu(xs.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,i;return(n==null?void 0:n.table)==((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)});return e||this.$router.replace("/404"),e==null?void 0:e.path},getTable(){const t=this.flattenMenu(xs.value);t!=null&&t.length||this.$router.replace("/404");const e=t==null?void 0:t.find(n=>{var r,i;return(n==null?void 0:n.table)==((i=(r=this.$route)==null?void 0:r.params)==null?void 0:i.table)});return e||this.$router.replace("/404"),e==null?void 0:e.ua},getTitle(){var t,e,n,r,i,s,a,o,p,g,y,v;return((i=(e=(t=this.objectData)==null?void 0:t.rows)==null?void 0:e[0])==null?void 0:i[(r=(n=this.objectData)==null?void 0:n.meta)==null?void 0:r.title])||((y=(a=(s=this.objectData)==null?void 0:s.rows)==null?void 0:a[0])==null?void 0:y[(g=(p=(o=this.objectData)==null?void 0:o.columns)==null?void 0:p.find(E=>(E==null?void 0:E.meta)==="title"))==null?void 0:g.name])||((v=this.objectData)==null?void 0:v.title)||this.getTable}},async mounted(){await this.getObjectData(),await this.checkActiveComponent(),addEventListener("reloadCardPage",this.getObjectData)},unmounted(){removeEventListener("reloadCardPage",this.getObjectData)},watch:{component(t){var e;this.showTabs=!1,this.$router.replace({...this.$route,query:{...(e=this.$route)==null?void 0:e.query,tab:t}})},$route:{async handler(t,e){var n,r,i,s;(((n=t==null?void 0:t.params)==null?void 0:n.table)!==((r=e==null?void 0:e.params)==null?void 0:r.table)||((i=t==null?void 0:t.params)==null?void 0:i.id)!==((s=e==null?void 0:e.params)==null?void 0:s.id))&&await this.getObjectData(),await this.checkActiveComponent()}}},methods:{async getObjectData(){var n,r;const t=this.table||((n=this.$route)==null?void 0:n.params.table),e=this.id||((r=this.$route)==null?void 0:r.params.id);(!t||!e)&&this.$router.replace("/404");try{const{data:i}=await je.get(`/api/table-data/${t}/${e}`);this.objectData=i}catch(i){console.error(i)}},getColClass(t){return`lg:col-span-${t||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var t,e,n,r,i,s,a,o,p;if((e=(t=this.$route)==null?void 0:t.query)!=null&&e.tab)this.component=(r=(n=this.$route)==null?void 0:n.query)==null?void 0:r.tab;else{const g=(s=(i=this.objectData)==null?void 0:i.panels)==null?void 0:s.find(y=>(y==null?void 0:y.type)==="tabs"||(y==null?void 0:y.type)==="vertical-tabs");(a=g==null?void 0:g.items)!=null&&a.length&&(this.component=((o=g.items[0])==null?void 0:o.component)||((p=g.items[0])==null?void 0:p.name))}},getProps(t){var n,r,i;const e={};for(const s in t)["name","component","title","token"].includes(s)||(e[s]=((i=(r=(n=this.objectData)==null?void 0:n.rows)==null?void 0:r[0])==null?void 0:i[t[s]])||t[s]);return e},columnClass(t=12){return{1:"md:w-1/12 sm:w-full",2:"md:w-1/6 sm:w-full",3:"md:w-1/4 sm:w-full",4:"md:w-1/3 sm:w-full",6:"md:w-1/2 sm:w-full",8:"md:w-2/3 sm:w-full",10:"md:w-5/6 sm:w-full",12:"w-full"}[t]||"w-full"},flattenMenu(t){const e=[];return t==null||t.forEach(n=>{n.menu?e.push(...this.flattenMenu(n.menu)):e.push(n)}),e}}},ure={style:{height:"calc(100vh - 60px)"},class:"p-4 overflow-y-auto bg-gray-50 lg:w-[calc(100vw-260px)] w-[100vw] text-[13px]"},dre={class:"flex gap-[20px]"},hre={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},fre=["innerHTML"],pre={key:0,class:"bg-white border rounded-xl"},mre={class:"p-[10px] pl-[20px] text-md font-[500]"},gre=["innerHTML"],yre={key:1},bre={key:0,class:"p-[10px] pl-[20px] text-md font-[500]"},_re={key:2,class:"p-[20px] border-t"},xre=["innerHTML"],vre={class:"flex space-x-1 w-full bg-white border border-b-0 rounded-tr-xl rounded-tl-xl h-[60px] items-center pl-[20px]"},wre=["onClick"],kre={key:0},Ere={key:0,class:"bg-white border border-t-0 rounded-bl-xl rounded-br-xl"},Sre={key:0,class:"p-[20px] border-t"},Cre={key:1,class:"p-[20px] border-t"},Tre=["innerHTML"],Are={key:3,class:"flex"},Mre=["onClick"],Dre={class:"flex-grow w-[80%]"},Ire={key:0,class:"w-full h-full overflow-auto bg-white border rounded-xl [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Pre={key:0,class:"p-[20px]"},Nre={key:1,class:"p-[20px]"},Rre=["innerHTML"];function Ore(t,e,n,r,i,s){var y,v,E,T,D,N,B;const a=d.resolveComponent("AdminCardHeader"),o=d.resolveComponent("AdminCardAsyncComponent"),p=d.resolveComponent("AdminCardTabsDropdown"),g=d.resolveComponent("IconChevron");return d.openBlock(),d.createElementBlock("div",ure,[i.objectData&&((y=i.objectData)==null?void 0:y.isHeader)!==!1?(d.openBlock(),d.createBlock(a,{key:0,title:s.getTitle,tableName:s.getTable,"get-route":s.getRoute,slots:(v=i.objectData)==null?void 0:v.slots,isHeaderEditButton:(E=i.objectData)==null?void 0:E.isHeaderEditButton},null,8,["title","tableName","get-route","slots","isHeaderEditButton"])):d.createCommentVNode("",!0),d.createElementVNode("div",dre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((D=(T=i.objectData)==null?void 0:T.panels)==null?void 0:D.filter(V=>(V==null?void 0:V.type)==="pin"),(V,U)=>(d.openBlock(),d.createElementBlock("div",{key:U,class:d.normalizeClass(["col-span-12 shrink-0",s.columnClass(V.col)])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(K,Y)=>{var we,ye,Te,Re,Ne,Ye,qe,he,it,Ct,Ft,Bt,It,Ut;return d.openBlock(),d.createElementBlock("div",{key:Y,class:d.normalizeClass([{"mb-[20px]":V.items.length>1},"bg-white border rounded-xl"])},[K!=null&&K.title?(d.openBlock(),d.createElementBlock("h2",hre,d.toDisplayString((K==null?void 0:K.title)||"Панель"),1)):d.createCommentVNode("",!0),K!=null&&K.component?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["p-[20px]",{"border-t":K==null?void 0:K.title}])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(K.component),d.mergeProps({geometry:(ye=(we=i.objectData)==null?void 0:we.rows[0])==null?void 0:ye.geom,columns:K==null?void 0:K.columns,token:(Re=(Te=i.objectData)==null?void 0:Te.tokens)==null?void 0:Re[K==null?void 0:K.token],zoom:16,ref_for:!0},s.getProps(K),{data:i.objectData,id:(Ye=(Ne=t.$route)==null?void 0:Ne.params)==null?void 0:Ye.id}),null,16,["geometry","columns","token","data","id"]))],2)):d.createCommentVNode("",!0),K!=null&&K.name?(d.openBlock(),d.createElementBlock("div",{key:2,class:d.normalizeClass(["p-[20px]",{"border-t":K==null?void 0:K.title}])},[(he=(qe=i.objectData)==null?void 0:qe.html)!=null&&he[K==null?void 0:K.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(Ct=(it=i.objectData)==null?void 0:it.html)==null?void 0:Ct[K==null?void 0:K.name]},null,8,fre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(Bt=(Ft=i.objectData)==null?void 0:Ft.vue)==null?void 0:Bt[K==null?void 0:K.name],data:(Ut=(It=i.objectData)==null?void 0:It.rows)==null?void 0:Ut[0],objectData:i.objectData},null,8,["slot","data","objectData"]))],2)):d.createCommentVNode("",!0)],2)}),128))],2))),128)),d.createElementVNode("div",{class:d.normalizeClass(["grid gap-[20px] flex-grow h-fit",s.getGridClass()])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((B=(N=i.objectData)==null?void 0:N.panels)==null?void 0:B.filter(V=>(V==null?void 0:V.type)!=="pin"),(V,U)=>{var K,Y,we,ye,Te,Re,Ne,Ye,qe;return d.openBlock(),d.createElementBlock("div",{key:U,class:d.normalizeClass(["col-span-12",s.getColClass(V.col)])},[V!=null&&V.name?(d.openBlock(),d.createElementBlock("div",pre,[d.createElementVNode("h2",mre,d.toDisplayString((V==null?void 0:V.title)||"Панель"),1),(K=i.objectData)!=null&&K.html[V==null?void 0:V.name]?(d.openBlock(),d.createElementBlock("div",{key:0,class:"p-[20px] border-t",innerHTML:(Y=i.objectData)==null?void 0:Y.html[V==null?void 0:V.name]},null,8,gre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(we=i.objectData)==null?void 0:we.vue[V==null?void 0:V.name],data:(Te=(ye=i.objectData)==null?void 0:ye.rows)==null?void 0:Te[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):V.type==="container"?(d.openBlock(),d.createElementBlock("div",yre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn,zn,Me;return d.openBlock(),d.createElementBlock("div",{key:it,class:d.normalizeClass([{"mb-[20px]":V.items.length>1},"bg-white border rounded-xl"])},[he!=null&&he.title?(d.openBlock(),d.createElementBlock("h2",bre,d.toDisplayString((he==null?void 0:he.title)||"Панель"),1)):d.createCommentVNode("",!0),he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",{key:1,class:d.normalizeClass(["p-[20px]",{"border-t":he==null?void 0:he.title}])},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({geometry:(Ft=(Ct=i.objectData)==null?void 0:Ct.rows[0])==null?void 0:Ft.geom,columns:he==null?void 0:he.columns,token:(It=(Bt=i.objectData)==null?void 0:Bt.tokens)==null?void 0:It[he==null?void 0:he.token],zoom:16,ref_for:!0},s.getProps(he),{data:i.objectData,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["geometry","columns","token","data","id"]))],2)):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",_re,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(wn=(rn=i.objectData)==null?void 0:rn.html)==null?void 0:wn[he==null?void 0:he.name]},null,8,xre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(mn=(bn=i.objectData)==null?void 0:bn.vue)==null?void 0:mn[he==null?void 0:he.name],data:(Me=(zn=i.objectData)==null?void 0:zn.rows)==null?void 0:Me[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)],2)}),128))])):d.createCommentVNode("",!0),(V==null?void 0:V.type)==="tabs"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createElementVNode("nav",vre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Re=V==null?void 0:V.items)==null?void 0:Re.slice(0,V==null?void 0:V.limit),he=>(d.openBlock(),d.createElementBlock("button",{key:(he==null?void 0:he.name)||(he==null?void 0:he.component),onClick:it=>i.component=(he==null?void 0:he.component)||(he==null?void 0:he.name),class:d.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 text-gray-500 hover:bg-gray-100 focus:bg-gray-100 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg focus:outline-none",{" font-semibold after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-[1] after:h-0.5 after:bg-gray-800":i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name),"":i.component!==(he==null?void 0:he.component)&&i.component!==(he==null?void 0:he.name)}])},d.toDisplayString(he==null?void 0:he.title),11,wre))),128)),V!=null&&V.limit&&((Ye=(Ne=V==null?void 0:V.items)==null?void 0:Ne.slice(V==null?void 0:V.limit))!=null&&Ye.length)?(d.openBlock(),d.createElementBlock("div",kre,[d.createVNode(p,{options:(qe=V==null?void 0:V.items)==null?void 0:qe.slice(V==null?void 0:V.limit),"active-tab":i.component,"onUpdate:activeTab":e[0]||(e[0]=he=>i.component=he)},null,8,["options","active-tab"])])):d.createCommentVNode("",!0)]),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn;return d.openBlock(),d.createElementBlock(d.Fragment,{key:it},[i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name)?(d.openBlock(),d.createElementBlock("div",Ere,[he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",Sre,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({data:i.objectData,token:(Ft=(Ct=i.objectData)==null?void 0:Ct.tokens)==null?void 0:Ft[he==null?void 0:he.token],columns:he==null?void 0:he.columns,geometry:(It=(Bt=i.objectData)==null?void 0:Bt.rows[0])==null?void 0:It.geom,ref_for:!0},s.getProps(he),{zoom:16,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["data","token","columns","geometry","id"]))])):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",Cre,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(rn=i.objectData)==null?void 0:rn.html[he==null?void 0:he.name]},null,8,Tre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(wn=i.objectData)==null?void 0:wn.vue[he==null?void 0:he.name],data:(mn=(bn=i.objectData)==null?void 0:bn.rows)==null?void 0:mn[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0)],64)}),128))],64)):d.createCommentVNode("",!0),(V==null?void 0:V.type)==="vertical-tabs"?(d.openBlock(),d.createElementBlock("div",Are,[d.createElementVNode("div",{class:d.normalizeClass(["p-[5px] bg-white absolute left-0 rounded-lg border rounded-tl-[0] rounded-bl-[0]",[{"left-[260px]":i.showTabs}]]),onClick:e[1]||(e[1]=he=>i.showTabs=!i.showTabs)},[d.createVNode(g,{height:"16",width:"16",class:"-rotate-90"})],2),d.createElementVNode("nav",{class:d.normalizeClass(["lg:relative lg:left-0 flex flex-col space-y-2 max-w-[260px] w-full border rounded-xl mr-4 items-start pl-[10px] z-[2] lg:z-0 bg-white py-[20px] absolute left-[-100%]",[{"left-0 rounded-tr-[0]":i.showTabs}]])},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V==null?void 0:V.items,he=>(d.openBlock(),d.createElementBlock("button",{key:(he==null?void 0:he.name)||(he==null?void 0:he.component),onClick:it=>i.component=(he==null?void 0:he.component)||(he==null?void 0:he.name),class:d.normalizeClass(["relative inline-flex items-center w-full py-1 text-sm text-left whitespace-pre-wrap border-transparent pe-4 gap-x-2 border-e-2 hover:text-blue-600 focus:outline-none focus:text-blue-600",{"font-semibold after:absolute after:top-[0] after:right-[-1px] after:h-full text-blue-600 after:w-[2px] after:bg-blue-600 ":i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name),"text-gray-500":i.component!==(he==null?void 0:he.component)&&i.component!==(he==null?void 0:he.name)}])},d.toDisplayString(he==null?void 0:he.title),11,Mre))),128))],2),d.createElementVNode("div",Dre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(V.items,(he,it)=>{var Ct,Ft,Bt,It,Ut,Kt,an,Xt,rn,wn,bn,mn;return d.openBlock(),d.createElementBlock(d.Fragment,{key:it},[i.component===(he==null?void 0:he.component)||i.component===(he==null?void 0:he.name)?(d.openBlock(),d.createElementBlock("div",Ire,[he!=null&&he.component?(d.openBlock(),d.createElementBlock("div",Pre,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(he.component),d.mergeProps({token:(Ft=(Ct=i.objectData)==null?void 0:Ct.tokens)==null?void 0:Ft[he==null?void 0:he.token],data:i.objectData,columns:he==null?void 0:he.columns,geometry:(It=(Bt=i.objectData)==null?void 0:Bt.rows[0])==null?void 0:It.geom,ref_for:!0},s.getProps(he),{zoom:16,id:(Kt=(Ut=t.$route)==null?void 0:Ut.params)==null?void 0:Kt.id}),null,16,["token","data","columns","geometry","id"]))])):d.createCommentVNode("",!0),he!=null&&he.name?(d.openBlock(),d.createElementBlock("div",Nre,[(Xt=(an=i.objectData)==null?void 0:an.html)!=null&&Xt[he==null?void 0:he.name]?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:(rn=i.objectData)==null?void 0:rn.html[he==null?void 0:he.name]},null,8,Rre)):(d.openBlock(),d.createBlock(o,{key:1,slot:(wn=i.objectData)==null?void 0:wn.vue[he==null?void 0:he.name],data:(mn=(bn=i.objectData)==null?void 0:bn.rows)==null?void 0:mn[0],objectData:i.objectData},null,8,["slot","data","objectData"]))])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0)],64)}),128))])])):d.createCommentVNode("",!0)],2)}),128))],2)])])}const Iv=Fe(cre,[["render",Ore],["__scopeId","data-v-33219290"]]),Bre=Object.freeze(Object.defineProperty({__proto__:null,default:Iv},Symbol.toStringTag,{value:"Module"})),Vre={__name:"vs-calendar-page",setup(t){return(e,n)=>(d.openBlock(),d.createElementBlock("div",null,[d.createVNode(wI)]))}},zre={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},Lre={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},Fre={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},$re=["data-index"],jre={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},Hre="/admin.interfaces",Ure={__name:"vs-table-settings-nav-list",setup(t){const e=d.ref(""),n=d.ref(null),r=d.computed(()=>{var s;return(s=n.value)==null?void 0:s.filter(a=>{var o,p,g;return(g=(o=a==null?void 0:a.title)==null?void 0:o.toLowerCase())==null?void 0:g.includes((p=e.value)==null?void 0:p.toLowerCase())})});return(async()=>{try{const{data:s}=await je.get("/api/interfaces");n.value=s}catch{}})(),(s,a)=>{var g;const o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",zre,[d.createElementVNode("div",Lre,[d.createVNode(o,{type:"text",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=y=>e.value=y),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(g=r.value)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",Fre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,y=>{var v,E;return d.openBlock(),d.createElementBlock("li",{key:y==null?void 0:y.name,"data-index":s.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((E=(v=s.$route)==null?void 0:v.query)==null?void 0:E.name)===(y==null?void 0:y.alias)}]),to:Hre+"?name="+(y==null?void 0:y.alias)},{default:d.withCtx(()=>[d.createElementVNode("span",jre,d.toDisplayString((y==null?void 0:y.title)||(y==null?void 0:y.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,$re)}),128))])):d.createCommentVNode("",!0)])}}},Wre={class:"bg-white"},qre={class:"flex flex-col gap-[5px]"},Gre={class:"flex items-center gap-2 cursor-pointer"},Yre=["checked","onChange"],Zre={class:"text-gray-800 underline decoration-dashed decoration-[1px] decoration-blue-600"},EI={__name:"vs-table-settings-tab-list",props:{columns:{type:Array,required:!0,default:()=>[]},table:{type:String,default:""}},emits:["update"],setup(t,{emit:e}){const n=d.getCurrentInstance().proxy.$notify,r=t,i=e,s=d.ref(r.columns.map(g=>({...g,editableValue:g.ua!==void 0?g.ua:g.title})));d.watch(()=>r.columns,g=>{s.value=g.map(y=>({...y,editableValue:y.ua!==void 0?y.ua:y.title}))},{deep:!0});const a=g=>{g.hidden=!g.hidden},o=async()=>{try{await je.post(`/api/settings-table/${r.table}`,{columns:s.value}),await n({type:"success",title:"Успішно!",message:"Дані було успішно оновлено"}),i("update")}catch(g){console.error("Помилка збереження:",g),await n({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},p=(g,y)=>{g.editableValue=y,g.ua!==void 0?g.ua=y:g.title=y};return(g,y)=>{const v=d.resolveComponent("VsInlineEdit");return d.openBlock(),d.createElementBlock("div",Wre,[d.createElementVNode("div",{class:"flex justify-end p-3"},[d.createElementVNode("button",{onClick:o,class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),d.createElementVNode("div",qre,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.value,E=>(d.openBlock(),d.createElementBlock("div",{key:E.name,class:"flex items-center justify-between p-3 border rounded-lg shadow-sm"},[d.createElementVNode("div",Gre,[d.createElementVNode("input",{type:"checkbox",checked:!E.hidden,onChange:()=>a(E),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Yre),d.createVNode(v,{modelValue:E.editableValue,"onUpdate:modelValue":T=>E.editableValue=T,component:"vs-text",onUpdateValue:T=>p(E,T)},{default:d.withCtx(()=>[d.createElementVNode("span",Zre,d.toDisplayString(E.editableValue),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onUpdateValue"])])]))),128))])])}}},Xre={created(){this.isVisible=!1},mounted(){this.type==="customColumns"&&(this.colModel=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",slots:{label:'<div class="flex w-[450px] items-center gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"file",text:"Файл",description:"Різноманітні файли"},{id:"select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}]),setTimeout(()=>this.isVisible=!0,100)},props:{data:Array,table:String,type:String},data(){return{localData:this.data?[...this.data]:[],isVisible:!1,colModel:[{key:"name",name:"name",type:"Text",ua:"Назва"},{key:"description",name:"description",type:"Text",ua:"Опис"},{key:"query",name:"query",type:"Text",ua:"Query"}]}},methods:{async handleSave(){try{await je.post(`/api/settings-table/${this.table}`,{[this.type]:this.localData}),this.$emit("update")}catch(t){console.error("Помилка збереження:",t)}}},watch:{data:{deep:!0,handler(t){t?this.localData=[...t]:this.localData=[]}}}},Kre={class:"flex justify-end p-3"};function Jre(t,e,n,r,i,s){const a=d.resolveComponent("VsDataTable");return d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",Kre,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...o)=>s.handleSave&&s.handleSave(...o)),class:"px-4 py-2 text-white bg-blue-600 rounded-lg shadow-sm hover:bg-blue-700 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")]),i.isVisible?(d.openBlock(),d.createBlock(a,{class:"w-full",modelValue:i.localData,"onUpdate:modelValue":e[1]||(e[1]=o=>i.localData=o),colModel:i.colModel,key:i.localData,addition:!1,import:!1,additionBottom:!0},null,8,["modelValue","colModel"])):d.createCommentVNode("",!0)])}const SI=Fe(Xre,[["render",Jre]]),Qre={"vs-table-settings-tab-list":EI,"vs-table-settings-tab-datetable":SI},eie={components:{VsNoData:ad,IconMore:wg,IconEdit:fx,IconDelete:hx,TableSettingsTabList:EI,TableSettingsDataTable:SI},data(){return{tableSettingsTabs:Qre,tabs:{customColumns:{id:"vs-table-settings-tab-datetable",title:"Користувацькі колонки"},customFilters:{id:"vs-table-settings-tab-datetable",title:"Користувацькі фільтри"},columns:{id:"vs-table-settings-tab-list",title:"Колонки"}},currentTab:"customColumns",tableData:null}},computed:{table(){var t,e;return(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name}},watch:{$route:{handler(t,e){var n,r;((n=t==null?void 0:t.query)==null?void 0:n.name)!==((r=e==null?void 0:e.query)==null?void 0:r.name)&&this.getData()},immediate:!0}},methods:{async getData(){var t,e;try{const n=(e=(t=this.$route)==null?void 0:t.query)==null?void 0:e.name,r=await je.get(`/api/settings-table/${n}`);this.tableData=r.data}catch(n){console.error("Помилка завантаження даних таблиці:",n),this.tableData=null}},changeTab(t){this.currentTab=t}}},tie={class:"flex bg-gray-50",style:{height:"calc(-80px + 100vh)",width:"calc(-560px + 100vw)"}},nie={key:0,class:"flex flex-col flex-1 w-full p-2 space-y-3 sm:p-5 sm:py-0 md:pt-5"},rie={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},iie=["onClick"],sie={class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700 flex-1 overflow-auto [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},oie={key:0},aie={key:1,class:"text-gray-500"};function lie(t,e,n,r,i,s){const a=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",tie,[s.table?(d.openBlock(),d.createElementBlock("div",nie,[d.createElementVNode("div",rie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.tabs,(o,p)=>(d.openBlock(),d.createElementBlock("button",{key:p,onClick:g=>s.changeTab(p),class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[i.currentTab===p?"bg-white shadow-sm !border-gray-200":""]])},d.toDisplayString(o.title),11,iie))),128))]),d.createElementVNode("div",sie,[i.tableData?(d.openBlock(),d.createElementBlock("div",oie,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(i.tableSettingsTabs[i.tabs[i.currentTab].id]),d.mergeProps({key:i.currentTab},i.tableData,{data:i.tableData[i.currentTab],type:i.currentTab,table:s.table,onUpdate:s.getData}),null,16,["data","type","table","onUpdate"]))])):(d.openBlock(),d.createElementBlock("div",aie," Дані завантажуються або відсутні... "))])])):(d.openBlock(),d.createBlock(a,{key:1,class:"mt-[100px]",text:"Оберіть один з пунктів меню для відображення"}))])}const cie={components:{TableSettingsNavList:Ure,TableSettingsContent:Fe(eie,[["render",lie]])}},uie={class:"flex items-start gap-0"};function die(t,e,n,r,i,s){const a=d.resolveComponent("TableSettingsNavList"),o=d.resolveComponent("TableSettingsContent");return d.openBlock(),d.createElementBlock("div",uie,[d.createVNode(a),d.createVNode(o)])}const hie=Fe(cie,[["render",die]]),Pv=d.ref({}),fie={components:{VsNoData:ad},data(){return{forms:[],formValues:[]}},created(){this.getSettingsAfterEditing()},computed:{activeForm(){return this.forms.find(t=>{var e,n;return t.name===((n=(e=this.$route)==null?void 0:e.query)==null?void 0:n.name)})},properties(){return Pv.value}},watch:{properties:{handler(t){t&&(this.forms=t.forms||[],this.formValues=t.settings||{},!this.$route.query.name&&this.forms.length>0&&this.changeTab(this.forms[0]))},deep:!0,immediate:!0}},methods:{changeTab(t){this.$router.push({path:this.link,query:{name:t.name}})},async saveForm(){try{const t=Object.keys(this.activeForm.body).reduce((e,n)=>{var a;const[r,i]=n.split("."),s=this.formValues[n]||((a=this.formValues[r])==null?void 0:a[i]);return{...e,[n]:s}},{});await je.post("/api/settings-app",t),await this.getSettingsAfterEditing(),this.$notify({title:"Успішно!",message:"Дані успішно оновлені",type:"success"})}catch(t){console.error("Помилка збереження даних:",t)}},async getSettingsAfterEditing(){try{const{data:t}=await je.get("/api/settings-app");Pv.value=t}catch(t){console.error("Помилка збереження даних:",t)}}}},pie={style:{height:"calc(-60px + 100vh)"},class:"p-2 space-y-3 bg-gray-50 sm:p-5 sm:py-0 md:pt-5"},mie={class:"flex flex-col flex-1 space-y-3"},gie={class:"w-full flex flex-row whitespace-nowrap overflow-x-auto overflow-y-hidden pb-1 [&::-webkit-scrollbar]:h-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},yie=["onClick"],bie={class:"flex justify-end w-full"},_ie={key:0,class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"};function xie(t,e,n,r,i,s){const a=d.resolveComponent("VsForm"),o=d.resolveComponent("VsNoData");return d.openBlock(),d.createElementBlock("div",pie,[d.createElementVNode("div",mie,[d.createElementVNode("div",gie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.forms,p=>{var g,y;return d.openBlock(),d.createElementBlock("button",{key:p.name,onClick:v=>s.changeTab(p),class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:text-gray-800",[((y=(g=t.$route)==null?void 0:g.query)==null?void 0:y.name)===p.name?"bg-white shadow-sm !border-gray-200":""]])},d.toDisplayString(p.body.ua||p.body.title||p.name||"Не вказано"),11,yie)}),128)),d.createElementVNode("div",bie,[d.createElementVNode("button",{onClick:e[0]||(e[0]=(...p)=>s.saveForm&&s.saveForm(...p)),class:"mи-4 px-4 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 focus:outline-none focus:ring focus:ring-blue-300"}," Зберегти ")])])]),s.activeForm?(d.openBlock(),d.createElementBlock("div",_ie,[s.activeForm.body?(d.openBlock(),d.createBlock(a,{key:s.activeForm,scheme:s.activeForm.body,style:d.normalizeStyle(t.style),modelValue:i.formValues,"onUpdate:modelValue":e[1]||(e[1]=p=>i.formValues=p)},null,8,["scheme","style","modelValue"])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),i.forms.length?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(o,{key:1,class:"mt-[100px]",text:""}))])}const vie=Fe(fie,[["render",xie]]),wie={},kie={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Eie(t,e){return d.openBlock(),d.createElementBlock("svg",kie,e[0]||(e[0]=[d.createElementVNode("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"},null,-1),d.createElementVNode("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"},null,-1)]))}const Sie=Fe(wie,[["render",Eie]]),Cie={class:"h-full w-full flex overflow-auto relative [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Tie={class:"flex-grow"},Aie={class:"px-[10px] shrink-0 w-[400px]"},Mie={class:"max-h-[calc(100%-50px)] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Die={class:"text-sm text-gray-500 dark:text-neutral-500"},Iie={class:"inline-flex items-center justify-end text-sm font-medium text-gray-800 gap-x-2 text-end dark:text-neutral-200"},Pie=["onClick"],Nie={__name:"print-tab-editor",props:{templateData:{type:Object,default:()=>{}}},emits:["update-template"],setup(t,{emit:e}){var y;const n=d.getCurrentInstance().proxy.$notify,r=uh(),i=d.computed(()=>{var v;return(v=r==null?void 0:r.query)==null?void 0:v.name}),s=t,a=e,o=d.ref(((y=s.templateData)==null?void 0:y.html)||""),p=async()=>{try{await je.put(`/api/print-template/${i.value}`,{...s.templateData,html:o.value}),a("update-template"),n({type:"success",title:"Успішно!",message:"Шаблон успішно оновлено"})}catch{n({type:"success",title:"Помилка!",message:"При спробі оновити шаблон виникла помилка"})}},g=v=>{const E=`{{ ${v} }}`;try{const T=document.createElement("textarea");T.value=E,document.body.appendChild(T),T.select(),T.setSelectionRange(0,E.length);const D=document.execCommand("copy");document.body.removeChild(T),n(D?{type:"success",title:"Успішно!",message:"Ключ успішно скопійовано"}:{type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"})}catch(T){n({type:"error",title:"Помилка!",message:"Не вдалося скопіювати ключ"}),console.error("Copy failed",T)}};return(v,E)=>{var N;const T=d.resolveComponent("VsTiptapEditor"),D=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("div",Cie,[d.createElementVNode("div",Tie,[d.createElementVNode("div",{class:"sticky top-0 flex justify-end gap-1 pb-[10px] bg-white z-[1] px-[10px]"},[d.createElementVNode("button",{onClick:p,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")]),d.createVNode(T,{modelValue:o.value,"onUpdate:modelValue":E[0]||(E[0]=B=>o.value=B),class:"text-[13px] h-[calc(100%-50px)]"},null,8,["modelValue"])]),d.createElementVNode("div",Aie,[E[2]||(E[2]=d.createElementVNode("h2",{class:"block font-semibold mb-[20px] text-gray-800 truncate dark:text-neutral-200"}," Список колонок ",-1)),d.createElementVNode("dl",Mie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((N=t.templateData)==null?void 0:N.columns,B=>(d.openBlock(),d.createElementBlock("div",{key:B==null?void 0:B.name,class:"flex items-center justify-between w-full"},[d.createElementVNode("dt",Die,d.toDisplayString(B==null?void 0:B.title)+": ",1),d.createElementVNode("dd",Iie,[d.createTextVNode(d.toDisplayString(B==null?void 0:B.name)+" ",1),d.createVNode(D,{trigger:"hover",placement:"left"},{reference:d.withCtx(()=>[d.createElementVNode("button",{onClick:V=>g(B==null?void 0:B.name),class:"h-[24px] w-[24px] flex items-center justify-center hover:bg-gray-100 rounded-lg duration-300"},[d.createVNode(Sie)],8,Pie)]),default:d.withCtx(()=>[E[1]||(E[1]=d.createTextVNode(" Скопіювати ключ "))]),_:2},1024)])]))),128))])])])}}},Nv=(t,e=300)=>{let n;return function(...r){clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}},Rie={class:"h-full"},Oie={class:"flex justify-between mb-[10px]"},Bie={class:"flex items-center gap-2"},Vie=["disabled"],zie={class:"flex h-full"},Lie={class:"w-[50%]"},Fie={class:"flex flex-wrap items-center lg:justify-between lg:grow"},$ie={class:"relative min-h-[30px] gap-[20px] inline-flex items-center"},jie={class:"text-xs text-gray-800 me-1 sm:text-sm dark:text-neutral-200"},Hie={class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"},Uie={class:"w-[300px] relative p-1 max-h-[500px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Wie={class:""},qie={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},Gie=["value"],Yie={class:"pr-2"},Zie={class:"flex items-center gap-2 font-normal text-[14px] cursor-pointer"},Xie=["value"],Kie=["src"],Jie={__name:"print-tab-list",props:{templateData:Object},setup(t){const e=uh(),n=d.computed(()=>{var U;return(U=e==null?void 0:e.query)==null?void 0:U.name}),r=t,i=d.ref(null),s=d.ref(null),a=d.ref(""),o=d.ref([]),p=d.ref(null),g=d.ref([]),y=async(U=null)=>{i.value=null;try{const{data:K}=await je.get(`/api/table-data/${r.templateData.alias}`,{params:{filter:p.value,search:U}});i.value=K}catch{}},v=async()=>{try{const{data:{list:U}}=await je.get(`/api/table-filter/${r.templateData.alias}`);s.value=U==null?void 0:U.map(K=>({...K,label:(K==null?void 0:K.label)||(K==null?void 0:K.ua)}))}catch{}},E=({url:U})=>{U==="no-url"?p.value=null:p.value=U},T=({target:U})=>{var K,Y;if(U.checked){const we=(K=i.value.rows)==null?void 0:K.find(ye=>(ye==null?void 0:ye.id)==U.value);o.value=[...o.value,we]}else o.value=(Y=o.value)==null?void 0:Y.filter(we=>(we==null?void 0:we.id)!=(U==null?void 0:U.value))},D=()=>{var U;(U=i.value.rows)==null||U.forEach(K=>{var Y;(Y=g.value)!=null&&Y.includes(K==null?void 0:K.id)||(g.value=[...g.value,K==null?void 0:K.id],o.value=[...o.value,K])})},N=()=>{var K,Y;const U=(K=o.value)==null?void 0:K.map(we=>we==null?void 0:we.id);g.value=(Y=g.value)==null?void 0:Y.filter(we=>!(U!=null&&U.includes(we))),o.value=[]},B=async()=>{if(g.value.length===0)return;const U=g.value.join(",");a.value=`/api/print-template/${n.value}/${U}`},V=Nv(y,300);return d.watch(p,()=>y()),d.onMounted(async()=>{await y(),await v()}),(U,K)=>{var ye,Te,Re;const Y=d.resolveComponent("VsFilterList"),we=d.resolveComponent("VsPopover");return d.openBlock(),d.createElementBlock("div",Rie,[d.createElementVNode("div",Oie,[d.createElementVNode("div",Bie,[d.createElementVNode("input",{type:"text",class:"w-[200px] h-[38px] px-[10px] placeholder:text-[14px] placeholder:text-gray-600 rounded-lg bg-gray-100 focus:outline-blue-500",placeholder:"Пошук...",onInput:K[0]||(K[0]=({target:Ne})=>d.unref(V)(Ne.value))},null,32),s.value?(d.openBlock(),d.createBlock(Y,{key:0,view:"plain",scheme:s.value,isDialog:!1,"apply-vue-router":"",history:"",name:"filter",onFilterChange:E},null,8,["scheme"])):d.createCommentVNode("",!0)]),i.value?(d.openBlock(),d.createElementBlock("button",{key:0,onClick:B,disabled:!g.value.length,class:"py-2 px-3 inline-flex disabled:text-gray-200 disabled:cursor-not-allowed items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Згенерувати документ ",8,Vie)):d.createCommentVNode("",!0)]),d.createElementVNode("div",zie,[d.createElementVNode("div",Lie,[d.createElementVNode("div",Fie,[d.createElementVNode("div",$ie,[d.createElementVNode("span",jie," Знайдено "+d.toDisplayString((ye=i.value)==null?void 0:ye.filtered),1),d.createElementVNode("button",{onClick:D,class:"relative py-1 ps-1.5 pe-7 inline-flex shrink-0 justify-center items-center gap-x-1.5 border border-transparent text-sm text-gray-500 rounded-lg underline-offset-4 hover:underline hover:text-gray-600 focus:outline-none focus:underline focus:text-gray-600"}," Обрати всі ")]),(Te=o.value)!=null&&Te.length?(d.openBlock(),d.createBlock(we,{key:0,placement:"bottom"},{reference:d.withCtx(()=>{var Ne;return[d.createElementVNode("button",Hie,[d.createTextVNode(" Обранo: "+d.toDisplayString((Ne=o.value)==null?void 0:Ne.length)+" ",1),d.createVNode(Dv,{height:"14",width:"14"})])]}),default:d.withCtx(()=>[d.createElementVNode("div",Uie,[d.createElementVNode("ul",Wie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,Ne=>{var Ye,qe;return d.openBlock(),d.createElementBlock("li",{key:Ne==null?void 0:Ne.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[d.createElementVNode("label",qie,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:T,"onUpdate:modelValue":K[1]||(K[1]=he=>g.value=he),value:Ne==null?void 0:Ne.id},null,40,Gie),[[d.vModelCheckbox,g.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",g.value.includes(Ne==null?void 0:Ne.id)?"bg-blue-600 border-0":"bg-white"])},[d.createVNode(dh,{height:"12",width:"12"})],2),d.createTextVNode(" "+d.toDisplayString(Ne[(qe=(Ye=i.value)==null?void 0:Ye.meta)==null?void 0:qe.title]),1)])])}),128))]),d.createElementVNode("button",{onClick:N,class:"w-full bg-white sticky bottom-0 h-[34px] border rounded-lg text-[16px] hover:bg-gray-100 duration-300 disabled:cursor-not-allowed disabled:hover:bg-white disabled:text-gray-200"}," Очистити ")])]),_:1})):d.createCommentVNode("",!0)]),d.createElementVNode("ul",Yie,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((Re=i.value)==null?void 0:Re.rows,Ne=>{var Ye,qe;return d.openBlock(),d.createElementBlock("li",{key:Ne==null?void 0:Ne.id,class:"p-2 hover:bg-gray-100 rounded-[8px] cursor-pointer"},[d.createElementVNode("label",Zie,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",class:"hidden",onChange:T,"onUpdate:modelValue":K[2]||(K[2]=he=>g.value=he),value:Ne==null?void 0:Ne.id},null,40,Xie),[[d.vModelCheckbox,g.value]]),d.createElementVNode("span",{class:d.normalizeClass(["flex items-center justify-center text-white border border-gray-300 rounded size-4 shrink-0 focus:ring-blue-500",g.value.includes(Ne==null?void 0:Ne.id)?"bg-blue-600 border-0":"bg-white"])},[d.createVNode(dh,{height:"12",width:"12"})],2),d.createTextVNode(" "+d.toDisplayString(Ne[(qe=(Ye=i.value)==null?void 0:Ye.meta)==null?void 0:qe.title]),1)])])}),128))])]),d.createElementVNode("iframe",{class:"h-[calc(100%-60px)] w-[50%] bg-gray-100",src:a.value},null,8,Kie)])])}}},Qie={class:"p-[20px]"},ese={class:"flex gap-[10px]"},tse=["onClick"],nse={class:"rounded-xl flex justify-between overflow-hidden bg-white border max-w-[1400px] h-[calc(100vh-160px)] mt-[20px]"},rse={key:0,class:"p-[10px] w-full"},ise={key:1,class:"p-[10px]"},sse={__name:"print-content",setup(t){const e={"print-tab-editor":{text:"Шаблон",component:Nie},"print-tab-list":{text:"Друк",component:Jie}},n=uh(),r=d.computed(()=>{var p;return(p=n==null?void 0:n.query)==null?void 0:p.name}),i=d.ref("print-tab-editor"),s=d.ref(null),a=d.ref(!1),o=async()=>{a.value=!1;try{const{data:p}=await je.get(`/api/print-template/${r.value}`);s.value=p,a.value=!0}catch(p){console.log(p)}};return d.onMounted(o),d.watch(r,()=>o()),(p,g)=>(d.openBlock(),d.createElementBlock("div",Qie,[d.createElementVNode("div",ese,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(e,(y,v)=>d.createElementVNode("button",{key:v,onClick:E=>i.value=v,class:d.normalizeClass(["inline-flex items-center px-3 py-2 text-sm text-gray-800 border border-transparent rounded-lg gap-x-2 whitespace-nowrap hover:text-gray-500",[i.value===v?" shadow bg-white":""]])},d.toDisplayString(y.text),11,tse)),64))]),d.createElementVNode("div",nse,[a.value?(d.openBlock(),d.createElementBlock("div",rse,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e[i.value].component),{templateData:s.value,onUpdateTemplate:o},null,40,["templateData"]))])):(d.openBlock(),d.createElementBlock("div",ise,[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(e[i.value].component),{templateData:s.value},null,8,["templateData"]))]))])]))}},ose={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},ase={class:"flex items-center justify-between p-2 ps-5 gap-x-2"},lse={class:"relative px-[10px] py-[4px] flex gap-[8px] items-center"},cse={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 170px)"}},use=["data-index"],dse={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},hse={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},fse="/admin.templates",pse={__name:"print-navbar",setup(t){const e={name:{type:"Text",ua:"Назва",validators:["required"]},title:{type:"Text",ua:"Заголовок",validators:["required"]},route:{type:"Text",ua:"Route"},html:{type:"TextEditor",ua:"Розмітка"}},n=d.ref(""),r=d.ref(null),i=d.ref({}),s=d.ref(!1),a=d.ref(),o=d.computed(()=>{var y;return(y=r.value)==null?void 0:y.filter(v=>{var E,T,D;return(D=(E=v==null?void 0:v.title)==null?void 0:E.toLowerCase())==null?void 0:D.includes((T=n.value)==null?void 0:T.toLowerCase())})}),p=async()=>{try{const{data:y}=await je.get("/api/print-template");r.value=y==null?void 0:y.rows}catch{}},g=async()=>{try{await a.value.doValidation(),await je.post("/api/print-template",i.value)}catch{}};return p(),(y,v)=>{var B;const E=d.resolveComponent("VsText"),T=d.resolveComponent("router-link"),D=d.resolveComponent("VsForm"),N=d.resolveComponent("VsDialog");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",ose,[d.createElementVNode("div",ase,[v[5]||(v[5]=d.createElementVNode("span",{id:"hs-pro-chat-sidebar-label",class:"block font-semibold text-gray-800 truncate dark:text-neutral-200"}," Друк ",-1)),d.createElementVNode("button",{onClick:v[0]||(v[0]=V=>s.value=!0),class:"bg-[#DBEAFE] h-[30px] w-[30px] text-blue-700 shrink-0 flex items-center justify-center rounded-lg hover:bg-blue-200"},[d.createVNode(Zu,{height:"16",width:"16"})])]),d.createElementVNode("div",lse,[d.createVNode(E,{type:"text",modelValue:n.value,"onUpdate:modelValue":v[1]||(v[1]=V=>n.value=V),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(B=o.value)!=null&&B.length?(d.openBlock(),d.createElementBlock("ul",cse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,V=>{var U,K;return d.openBlock(),d.createElementBlock("li",{key:V==null?void 0:V.name,"data-index":y.index,class:"w-full"},[d.createVNode(T,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((K=(U=y.$route)==null?void 0:U.query)==null?void 0:K.name)===(V==null?void 0:V.name)}]),to:fse+"?name="+(V==null?void 0:V.name)},{default:d.withCtx(()=>[d.createElementVNode("span",dse,d.toDisplayString((V==null?void 0:V.title)||(V==null?void 0:V.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,use)}),128))])):d.createCommentVNode("",!0)]),d.createVNode(N,{visible:s.value,"onUpdate:visible":v[4]||(v[4]=V=>s.value=V),title:"Створти шаблон"},{footer:d.withCtx(()=>[d.createElementVNode("div",hse,[d.createElementVNode("button",{style:{border:"1px solid #000"},onClick:v[3]||(v[3]=V=>{s.value=!1,i.value={}}),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати "),d.createElementVNode("button",{onClick:g,class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700"}," Зберегти ")])]),default:d.withCtx(()=>[d.createVNode(D,{ref_key:"form",ref:a,scheme:e,modelValue:i.value,"onUpdate:modelValue":v[2]||(v[2]=V=>i.value=V)},null,8,["modelValue"])]),_:1},8,["visible"])],64)}}},mse={class:"flex"},gse={class:"w-[calc(100vw-560px)] bg-gray-50"},yse={__name:"template-print-page",setup(t){return(e,n)=>{var r,i;return d.openBlock(),d.createElementBlock("div",mse,[d.createVNode(pse),d.createElementVNode("div",gse,[(i=(r=e.$route)==null?void 0:r.query)!=null&&i.name?(d.openBlock(),d.createBlock(sse,{key:0})):(d.openBlock(),d.createBlock(ad,{key:1}))])])}}},bse={class:"w-[300px] border-r",style:{height:"calc(100vh - 60px)"}},_se={class:"relative px-[10px] py-[10px] flex gap-[8px] items-center"},xse={key:0,class:"flex flex-col w-[300px] gap-[2px] overflow-y-auto overflow-x-hidden p-[10px] py-1 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300",style:{height:"calc(100vh - 150px)"}},vse=["data-index"],wse={class:"w-[calc(100%-30px)] overflow-hidden overflow-ellipsis"},kse="/admin.reports",Ese={__name:"reports-navbar",setup(t){const e=d.ref(""),n=d.ref(null),r=d.computed(()=>{var s;return(s=n.value)==null?void 0:s.filter(a=>{var o,p,g;return(g=(o=a==null?void 0:a.title)==null?void 0:o.toLowerCase())==null?void 0:g.includes((p=e.value)==null?void 0:p.toLowerCase())})});return(async()=>{try{const{data:s}=await je.get("/api/reports");n.value=s==null?void 0:s.rows}catch{}})(),(s,a)=>{var g;const o=d.resolveComponent("VsText"),p=d.resolveComponent("router-link");return d.openBlock(),d.createElementBlock("div",bse,[d.createElementVNode("div",_se,[d.createVNode(o,{type:"text",modelValue:e.value,"onUpdate:modelValue":a[0]||(a[0]=y=>e.value=y),clearable:!0,placeholder:"Пошук по меню",class:"flex-grow [&>input]:h-[38px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 [&>input]:border-0 admin-input-text"},null,8,["modelValue"])]),(g=r.value)!=null&&g.length?(d.openBlock(),d.createElementBlock("ul",xse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,y=>{var v,E;return d.openBlock(),d.createElementBlock("li",{key:y==null?void 0:y.name,"data-index":s.index,class:"w-full"},[d.createVNode(p,{class:d.normalizeClass(["flex items-center gap-x-2.5 py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none",{"bg-gray-100":((E=(v=s.$route)==null?void 0:v.query)==null?void 0:E.name)===(y==null?void 0:y.name)}]),to:kse+"?name="+(y==null?void 0:y.name)},{default:d.withCtx(()=>[d.createElementVNode("span",wse,d.toDisplayString((y==null?void 0:y.title)||(y==null?void 0:y.name)||"Не вказано"),1)]),_:2},1032,["to","class"])],8,vse)}),128))])):d.createCommentVNode("",!0)])}}},Sse={class:"p-5 bg-white border border-gray-200 shadow-sm md:p-8 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Cse={class:"space-y-5"},Tse={class:"flex items-center gap-[4px]"},Ase={class:"flex items-center gap-2"},Mse={class:"flex flex-col flex-grow w-full p-4 border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Dse={class:"py-4 sm:py-0 ps-1 sm:pe-4"},Ise={class:"text-sm text-gray-800 dark:text-neutral-200"},Pse={class:"flex flex-wrap items-center gap-2 mt-3"},Nse={class:"block text-2xl font-medium text-gray-800 dark:text-neutral-200"},Rse={class:"overflow-x-auto h-[calc(100vh-430px)] [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},Ose={class:"inline-block min-w-full align-middle"},Bse={class:"relative min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},Vse={class:"sticky top-[0px] z-[2] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},zse={class:"flex items-center py-3 text-sm font-medium text-gray-800 pe-4 text-start gap-x-1 dark:text-neutral-200"},Lse={class:"divide-y divide-gray-200 dark:divide-neutral-700"},Fse={class:"px-4 py-3 size-px whitespace-nowrap"},$se={class:"text-sm text-gray-600 dark:text-neutral-400"},jse={__name:"reports-table",setup(t){const e=[{id:"period",type:"date",inline:!0,placeholder:"Оберіть період"}],n=[{id:"spent",type:"check",label:"Spent",inline:!0,options:[{id:"1",text:"text 1"},{id:"2",text:"text 2"},{id:"3",text:"text 3"}]}],r=uh(),i=d.ref(null),s=d.ref(null),a=d.ref(null),o=d.ref(!0),p=d.computed(()=>{var T;return(T=r==null?void 0:r.query)==null?void 0:T.name}),g=async(T=null)=>{try{const{data:D}=await je.get(`/api/reports/${p.value}`,{params:{filter:s.value,period:a.value,search:T||null}});i.value=D}catch{}},y=Nv(g,300),v=({url:T})=>{T==="no-url"?s.value=null:s.value=T,g()},E=T=>{var D;(D=Object.keys(T))!=null&&D.length&&(a.value=T==null?void 0:T.period,g())};return d.watch(p,()=>{o.value=!1,setTimeout(()=>o.value=!0),s.value=null,a.value=null}),(T,D)=>{var V,U,K;const N=d.resolveComponent("VsText"),B=d.resolveComponent("VsFilterList");return d.openBlock(),d.createElementBlock("div",Sse,[D[0]||(D[0]=d.createElementVNode("div",{class:"mb-4 xl:mb-8"},[d.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),d.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")],-1)),d.createElementVNode("div",Cse,[d.createElementVNode("div",Tse,[d.createVNode(N,{type:"text",placeholder:"Пошук...","onUpdate:modelValue":d.unref(y),class:"flex-grow [&>input]:h-[38px] max-w-[300px] [&>input]:placeholder-gray-600 [&>input]:bg-gray-100 admin-input-text [&>input]:border-0"},null,8,["onUpdate:modelValue"]),o.value?(d.openBlock(),d.createBlock(B,{key:0,scheme:e,isDialog:!1,view:"plain",clearable:!1,"onUpdate:modelValue":E})):d.createCommentVNode("",!0),o.value?(d.openBlock(),d.createBlock(B,{key:1,scheme:n,isDialog:!1,view:"plain",clearable:!1,onFilterChange:v})):d.createCommentVNode("",!0)]),d.createElementVNode("div",Ase,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((V=i.value)==null?void 0:V.kpi,Y=>(d.openBlock(),d.createElementBlock("div",Mse,[d.createElementVNode("div",Dse,[d.createElementVNode("p",Ise,d.toDisplayString(Y==null?void 0:Y.title),1),d.createElementVNode("div",Pse,[d.createElementVNode("span",Nse,d.toDisplayString(Y==null?void 0:Y.count),1)])])]))),256))]),d.createElementVNode("div",Rse,[d.createElementVNode("div",Ose,[d.createElementVNode("table",Bse,[d.createElementVNode("thead",Vse,[d.createElementVNode("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((U=i.value)==null?void 0:U.columns,Y=>(d.openBlock(),d.createElementBlock("th",{scope:"col",class:"min-w-[250px]",key:Y==null?void 0:Y.name},[d.createElementVNode("div",zse,d.toDisplayString(Y==null?void 0:Y.title),1)]))),128))])]),d.createElementVNode("tbody",Lse,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((K=i.value)==null?void 0:K.rows,Y=>{var we;return d.openBlock(),d.createElementBlock("tr",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList((we=i.value)==null?void 0:we.columns,ye=>(d.openBlock(),d.createElementBlock("td",Fse,[d.createElementVNode("span",$se,d.toDisplayString((Y==null?void 0:Y[ye==null?void 0:ye.name])||"-"),1)]))),256))])}),256))])])])])])])}}},Hse={class:"flex"},Use={class:"w-[calc(100vw-560px)] p-[20px] bg-gray-50"},Wse={"card-page":Iv,"user-cls-page":qne,"calendar-page":Vre,"table-settings-page":hie,"admin-properties-page":vie,"template-print-page":yse,"reports-page":{__name:"reports-page",setup(t){return(e,n)=>{var r,i;return d.openBlock(),d.createElementBlock("div",Hse,[d.createVNode(Ese),d.createElementVNode("div",Use,[(i=(r=e.$route)==null?void 0:r.query)!=null&&i.name?(d.openBlock(),d.createBlock(jse,{key:0})):(d.openBlock(),d.createBlock(ad,{key:1}))])])}}}},qse={},Gse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-info-circle"};function Yse(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Gse,e[0]||(e[0]=[d.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),d.createElementVNode("path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"},null,-1),d.createElementVNode("path",{d:"M12 9h.01"},null,-1),d.createElementVNode("path",{d:"M11 12h1v4h1"},null,-1)]))}const Zse=Fe(qse,[["render",Yse]]),Xse={},Kse={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-loader"};function Jse(t,e,n,r,i,s){return d.openBlock(),d.createElementBlock("svg",Kse,e[0]||(e[0]=[d.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M12 6l0 -3"></path><path d="M16.25 7.75l2.15 -2.15"></path><path d="M18 12l3 0"></path><path d="M16.25 16.25l2.15 2.15"></path><path d="M12 18l0 3"></path><path d="M7.75 16.25l-2.15 2.15"></path><path d="M6 12l-3 0"></path><path d="M7.75 7.75l-2.15 -2.15"></path>',9)]))}const Qse=Fe(Xse,[["render",Jse]]),eoe=async(t,e,n,r=10)=>{var N,B,V,U;if(!e||!n)return;await d.nextTick();const i=await(n==null?void 0:n.getBoundingClientRect()),s=await(e==null?void 0:e.getBoundingClientRect());if(!s||!i)return;const a=await parseInt((N=e==null?void 0:e.getBoundingClientRect())==null?void 0:N.height),o=await parseInt((B=e==null?void 0:e.getBoundingClientRect())==null?void 0:B.width),p=await parseInt((V=n==null?void 0:n.getBoundingClientRect())==null?void 0:V.height),g=await parseInt((U=n==null?void 0:n.getBoundingClientRect())==null?void 0:U.width),y=await window.innerHeight,v=await window.innerWidth;let E=0,T=0;const D=s.bottom+r+p;switch(t){case"top":s.top-i.height-r<0?E=s.top-i.height+r+p+a:E=s.top-i.height-r,v>g+s.right+30?T=s.left-i.width/2+s.width/2:T=v-30-g;break;case"bottom":y>D?E=s.bottom+r:E=s.bottom-r-p-a,T=s.left-i.width/2+s.width/2;break;case"left":E=s.top-i.height/2+s.height/2,s.left-i.width-r>0?T=s.left-i.width-r:T=10;break;case"right":E=s.top-i.height/2+s.height/2,v-o>g?T=s.right+r:T=v-30-g;break;case"top-right":s.top-i.height-r<0?E=s.top-i.height+(void 0).gap+p+a:E=s.top-i.height-r,v-o>g?T=s.right+r:T=v-30-g;break;case"top-left":s.top-i.height-r<0?E=s.top-i.height+r+p+a:E=s.top-i.height-r,s.left-i.width-r>0?T=s.left-i.width-r:T=10;break;case"bottom-right":y>D?E=s.bottom+r:E=s.bottom-r-p-a,v-o>g?T=s.left:T=v-30-g;break;case"bottom-left":y>D?E=s.bottom+r:E=s.bottom-r-p-a,s.left>0?T=s.right-g:T=10;break;case"bottom-start":y>D?E=s.bottom+r:E=s.bottom-(void 0).gap-p-a,s.left>0?T=s.left:T=10;break}E+p>y?E=y-p-r:E<0&&(E=r),T+g>v?T=v-g-r:T<0&&(T=r),n instanceof HTMLElement&&(n.style.top=`${E}px`,n.style.left=`${T}px`,n.style.position="fixed")},toe={class:"flex items-center justify-between py-1 gap-x-4"},noe={class:"col-span-1"},roe={class:"inline-flex items-center gap-x-2 text-[13px] text-gray-500 dark:text-neutral-500"},ioe={class:"col-span-2"},soe={class:"font-medium text-[13px] text-gray-800 dark:text-neutral-200"},ooe={key:1,class:"w-[300px] h-[300px] flex items-center justify-center"},CI={__name:"admin-info-popover",props:{table:{type:String,default:()=>""},id:{type:String,default:()=>""}},setup(t){var v,E;const e=(E=(v=d.getCurrentInstance())==null?void 0:v.appContext)==null?void 0:E.app;window.v3core.install(e),Object.entries(CE).forEach(([T,D])=>{e==null||e.component(T,D)});const n=t,r=d.ref(null),i=d.ref(!1),s=d.ref(null),a=d.ref(null);let o=null;const p=async()=>{try{const{data:T}=await je.get(`/api/table-info/${n.table}/${n.id}`);r.value=T}catch{}},g=async()=>{clearTimeout(o),i.value=!0,r.value||await p(),await eoe("right",s.value,a.value,40)},y=()=>{o=setTimeout(()=>{i.value=!1},300)};return d.onBeforeUnmount(()=>{clearTimeout(o)}),(T,D)=>(d.openBlock(),d.createElementBlock("div",{class:"relative inline-flex h-[30px] w-[30px] flex items-center justify-center",onMouseenter:g,onMouseleave:y,ref_key:"infoPopover",ref:s},[d.createVNode(Zse,{height:"20",width:"20",class:"text-gray-700 cursor-pointer"}),(d.openBlock(),d.createBlock(d.Teleport,{to:"#modal"},[d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>{var N;return[d.withDirectives(d.createElementVNode("div",{onMouseenter:g,onMouseleave:y,ref_key:"infoPopoverContent",ref:a,class:"fixed p-[20px] border z-[10002] rounded-xl bg-white max-h-[400px] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-[6px] [&::-webkit-scrollbar-thumb]:rounded-[100px] [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[r.value?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList((N=r.value)==null?void 0:N.columns,B=>{var V,U;return d.openBlock(),d.createElementBlock("dl",toe,[d.createElementVNode("dt",noe,[d.createElementVNode("p",roe,d.toDisplayString((B==null?void 0:B.ua)||(B==null?void 0:B.title))+": ",1)]),d.createElementVNode("dd",ioe,[d.createElementVNode("p",soe,[d.createVNode(sf,{row:(U=(V=r.value)==null?void 0:V.rows)==null?void 0:U[0],column:{...B,edit:!1}},null,8,["row","column"])])])])}),256)):(d.openBlock(),d.createElementBlock("div",ooe,[d.createVNode(Qse,{height:"40",width:"40",class:"animate-spin"})]))],544),[[d.vShow,i.value]])]}),_:1})]))],544))}},Rv={...xte,...vte,"vs-dashboard":Cte,"vs-custom-button":Mte,"vs-group-interface":Jte,"vs-test-widget":{__name:"vs-test-widget",props:{data:Object,dataName:String,table:String,geom:null},setup(t){var s;const{$v3plugin:e,$confirm:n}=(s=d.getCurrentInstance())==null?void 0:s.appContext.app.config.globalProperties,r=d.ref(!1),i=()=>{n({title:"Are you sure?",message:"Are you sure you want to delete this message?"})};return(a,o)=>{var g,y,v,E;const p=d.resolveComponent("VsConfirm");return d.openBlock(),d.createElementBlock(d.Fragment,null,[d.createElementVNode("div",null,[d.createVNode(CI,{table:(y=(g=a.$route)==null?void 0:g.params)==null?void 0:y.table,id:(E=(v=a.$route)==null?void 0:v.params)==null?void 0:E.id},null,8,["table","id"]),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:o[0]||(o[0]=T=>r.value=!0)}," Редагувати Tokens "),d.createElementVNode("button",{class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white",onClick:i}," Редагувати Tokens 1212 ")]),d.createVNode(p,{visible:r.value,"onUpdate:visible":o[1]||(o[1]=T=>r.value=T),title:"Are you sure?"},{footer:d.withCtx(()=>o[2]||(o[2]=[d.createElementVNode("div",{class:"flex gap-[4px] p-[16px]"},[d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium duration-300 border rounded-lg shadow-sm gap-x-2 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50","data-hs-overlay":"#hs-pro-chhdl"}," Скасувати "),d.createElementVNode("button",{type:"button",class:"inline-flex items-center px-3 py-2 text-xs font-medium text-white duration-300 bg-red-500 rounded-lg gap-x-2 disabled:opacity-50 disabled:pointer-events-none"}," Видалити ")],-1)])),default:d.withCtx(()=>[o[3]||(o[3]=d.createElementVNode("p",{class:"mt-1 text-sm text-gray-600 dark:text-neutral-400"}," Are you sure you want to delete this message? ",-1)),o[4]||(o[4]=d.createElementVNode("div",{class:"flex items-center mt-5"},[d.createElementVNode("input",{type:"checkbox",class:"shrink-0 size-3.5 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-600 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:"hs-pro-chhdlcch"}),d.createElementVNode("label",{for:"hs-pro-chhdlcch",class:"text-sm text-gray-600 ms-2 dark:text-neutral-400"}," Don't show me this again ")],-1))]),_:1},8,["visible"])],64)}}},"vs-card-list":Iv,...Wse},aoe=t=>new Promise(e=>{const n=new CustomEvent("openFormPlugin");n.options=t,window.dispatchEvent(n);const r=({message:i})=>{window.removeEventListener("closeFormPlugin",r),e(i)};window.addEventListener("closeFormPlugin",r)});function loe(t){const e=typeof t;return e==="object"?t:{title:"Підтвердити операцію",text:e==="string"?t:"Ви впевнені що хочете виконати операцію?",cancel:"Скасувати",confirm:"Виконати"}}const coe=({api:t,confirm:e,method:n,isId:r,id:i})=>new Promise(s=>{var v,E,T,D;const{VsDialog:a}=(E=(v=window.app)==null?void 0:v._context)==null?void 0:E.components,{$notify:o}=(D=(T=window.app)==null?void 0:T.config)==null?void 0:D.globalProperties,p=document.querySelector("#modal");if(!p){console.error('Modal root element with id "#modal" not found!');return}const g=document.createElement("div");p.appendChild(g);const y=d.createApp({components:{VsDialog:a},data(){return{visible:!1,getConfirm:loe(e)}},methods:{close(N){this.visible=!1,this.$el.remove(),y.unmount(),s(N||"Success")},async doRequest(){var N;try{const{data:B}=await je({url:t+(r?`/${i}`:""),method:n||"POST"});this.close(B),await o({title:"Успішно!",type:"success",message:"Операція виконана успішно"}),await $p()}catch(B){o({title:"Помилка!",type:"error",message:((N=B==null?void 0:B.response)==null?void 0:N.data)||"Сталася помилка"})}}},mounted(){e?this.visible=!0:this.doRequest()},template:`
|
738
738
|
<div style="position: relative; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000;">
|
739
739
|
<VsDialog v-model:visible="visible" size="small" :title="getConfirm?.title">
|
740
740
|
<div class="p-4">
|