diff --git a/js/vendor.LICENSE.txt b/js/vendor.LICENSE.txt new file mode 100644 index 000000000..04af9eb12 --- /dev/null +++ b/js/vendor.LICENSE.txt @@ -0,0 +1,349 @@ +Included dependencies: + +@babel/runtime +version: 7.25.6 +license: MIT + +@emotion/is-prop-valid +version: 1.3.0 +license: MIT + +@emotion/memoize +version: 0.9.0 +license: MIT + +@emotion/stylis +version: 0.8.5 +license: MIT + +@emotion/unitless +version: 0.7.5 +license: MIT + +@floating-ui/core +version: 1.6.7 +license: MIT + +@floating-ui/dom +version: 1.6.10 +license: MIT + +@floating-ui/utils +version: 0.2.7 +license: MIT + +@linusborg/vue-simple-portal +version: 0.1.5 +license: Apache-2.0 + +@mdi/svg +version: 7.4.47 +license: Apache-2.0 + +@nextcloud/auth +version: 2.4.0 +license: GPL-3.0-or-later + +@nextcloud/axios +version: 2.5.0 +license: GPL-3.0 + +@nextcloud/browser-storage +version: 0.4.0 +license: GPL-3.0-or-later + +@nextcloud/capabilities +version: 1.2.0 +license: GPL-3.0-or-later + +@nextcloud/dialogs +version: 5.3.7 +license: AGPL-3.0-or-later + +@nextcloud/event-bus +version: 3.3.1 +license: GPL-3.0-or-later + +@nextcloud/files +version: 3.9.0 +license: AGPL-3.0-or-later + +@nextcloud/initial-state +version: 2.2.0 +license: GPL-3.0-or-later + +@nextcloud/l10n +version: 3.1.0 +license: GPL-3.0-or-later + +@nextcloud/logger +version: 3.0.2 +license: GPL-3.0-or-later + +@nextcloud/paths +version: 2.2.1 +license: GPL-3.0-or-later + +@nextcloud/router +version: 3.0.1 +license: GPL-3.0-or-later + +@nextcloud/sharing +version: 0.2.3 +license: GPL-3.0-or-later + +@nextcloud/timezones +version: 0.1.1 +license: AGPL-3.0-or-later + +@nextcloud/vue +version: 8.17.1 +license: AGPL-3.0-or-later + +@nextcloud/vue-select +version: 3.25.1 +license: MIT + +@popperjs/core +version: 2.11.8 +license: MIT + +@scaleflex/icons +version: 2.6.3 +license: MIT + +@scaleflex/ui +version: 2.7.0 +license: MIT + +@skjnldsv/vue-plyr +version: 7.5.0 +license: MIT + +@vueuse/components +version: 11.0.3 +license: MIT + +@vueuse/core +version: 11.0.3 +license: MIT + +@vueuse/shared +version: 11.0.3 +license: MIT + +ansi-regex +version: 6.0.1 +license: MIT + +axios +version: 1.7.7 +license: MIT + +camelcase +version: 8.0.0 +license: MIT + +cancelable-promise +version: 4.3.1 +license: MIT + +char-regex +version: 2.0.1 +license: MIT + +charenc +version: 0.0.2 +license: BSD-3-Clause + +crypt +version: 0.0.2 +license: BSD-3-Clause + +date-format-parse +version: 0.2.7 +license: MIT + +debounce +version: 2.1.1 +license: MIT + +dompurify +version: 3.1.6 +license: (MPL-2.0 OR Apache-2.0) + +emoji-mart-vue-fast +version: 15.0.2 +license: BSD-3-Clause + +escape-html +version: 1.0.3 +license: MIT + +filerobot-image-editor +version: 4.8.1 +license: MIT + +floating-vue +version: 1.0.0-beta.19 +license: MIT + +focus-trap +version: 7.5.4 +license: MIT + +hoist-non-react-statics +version: 3.3.2 +license: BSD-3-Clause + +ical.js +version: 2.0.1 +license: MPL-2.0 + +is-buffer +version: 1.1.6 +license: MIT + +its-fine +version: 1.2.5 +license: MIT + +konva +version: 9.3.14 +license: MIT + +linkify-string +version: 4.1.3 +license: MIT + +linkifyjs +version: 4.1.3 +license: MIT + +lodash.get +version: 4.4.2 +license: MIT + +lodash.merge +version: 4.6.2 +license: MIT + +md5 +version: 2.3.0 +license: BSD-3-Clause + +nanoid +version: 3.3.7 +license: MIT + +node-gettext +version: 3.0.0 +license: (MIT) + +path-browserify +version: 1.0.1 +license: MIT + +path-parse +version: 1.0.7 +license: MIT + +prop-types +version: 15.7.2 +license: MIT + +react +version: 18.3.1 +license: MIT + +react-dom +version: 18.3.1 +license: MIT + +react-filerobot-image-editor +version: 4.8.1 +license: MIT + +react-is +version: 18.3.1 +license: MIT + +react-konva +version: 18.2.10 +license: MIT + +react-reconciler +version: 0.29.2 +license: MIT + +scheduler +version: 0.23.2 +license: MIT + +semver +version: 7.6.3 +license: ISC + +string-length +version: 5.0.1 +license: MIT + +strip-ansi +version: 7.1.0 +license: MIT + +striptags +version: 3.2.0 +license: MIT + +styled-components +version: 5.3.11 +license: MIT + +tabbable +version: 6.2.0 +license: MIT + +toastify-js +version: 1.12.0 +license: MIT + +tributejs +version: 5.1.3 +license: MIT + +vite-plugin-node-polyfills +version: 0.22.0 +license: MIT + +vue +version: 2.7.16 +license: MIT + +vue-async-computed +version: 3.9.0 +license: MIT + +vue-color +version: 2.8.1 +license: MIT + +vue-demi +version: 0.14.10 +license: MIT + +vue-material-design-icons +version: 5.3.0 +license: MIT + +vue-router +version: 3.6.5 +license: MIT + +vue2-datepicker +version: 3.11.1 +license: MIT + +webdav +version: 5.7.1 +license: MIT \ No newline at end of file diff --git a/js/viewer-init.mjs b/js/viewer-init.mjs new file mode 100644 index 000000000..8a4130016 --- /dev/null +++ b/js/viewer-init.mjs @@ -0,0 +1,4790 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('viewer', '', 'js/index-9CY9Vnrl.chunk.mjs'),window.OC.filePath('viewer', '', 'js/logger-wTanTwQL.chunk.mjs'),window.OC.filePath('viewer', '', 'css/logger-B0wUvUiR.chunk.css')])))=>i.map(i=>d[i]); +/*! third party licenses: js/vendor.LICENSE.txt */ +import{A as te,B as Ol,V as ka,C as Zs,N as wa,D as Is,E as at,F as Hs,G as Ca,H as st,o as Wt,I as Nl,J as xl,z as M,K as Ml,P as jl,n as ii,L as oe,M as Na,O as Yl,Q as ql,R as x,c as ma,S as Pa,T as Ll,j as Rn,_ as Ps,U as mo,W as Zl,X as po,Y as Ti,Z as nn,$ as Cn,a0 as Il,a1 as Yt,a2 as Hl,a3 as Pl,a4 as Gs,a5 as Bn,a6 as Gl,a7 as On,a8 as Us,a9 as on,s as j0,u as Y0,aa as Nn,ab as Ul,ac as zl,ad as Wl,ae as zs,af as Vl,ag as xn,ah as $l,ai as Ql,aj as Kl,ak as Jl,al as Xl,am as e1,an as a1,ao as t1,ap as Ws,aq as i1,ar as Vs,as as n1,at as o1,au as s1,av as r1,aw as l1,az as _1,aA as $s,aB as d1,aC as f1,aE as g1,aF as h1,aG as F1,aH as u1,aI as c1,aJ as m1,aK as p1,aL as b1,aM as Qs,aN as Ks,aO as T1,aP as D1,aQ as y1,aR as E1,aS as k1,aT as A1,aU as Z2,aV as Js,aW as w1,aX as v1,aY as S1,aZ as Xs,a_ as R1,a$ as C1,b0 as B1,b1 as O1,x as Di,b2 as N1,b3 as x1,b4 as M1,b5 as I2,b6 as j1,b7 as Y1,b8 as q1,b9 as Ot,r as Mn,q as qa,ba as L1,bb as Z1,bc as I1,v as H1,g as P1,bd as G1,k as U1}from"./logger-wTanTwQL.chunk.mjs";import{C as jn,N as z1}from"./NcActionButton-nkutStw-.chunk.mjs";import W1 from"./NcActionLink-DgFezF1w.chunk.mjs";import{A as er,a as V1}from"./actionText-fFcUPi2g-1UIVDoW6.chunk.mjs";const Cl="viewer",Bl="4.0.0",$1={name:"NcIconSvgWrapper",props:{inline:{type:Boolean,default:!1},svg:{type:String,default:""},name:{type:String,default:""},path:{type:String,default:""},size:{type:[Number,String],default:20,validator:e=>typeof e=="number"||e==="auto"}},computed:{iconSize(){return typeof this.size=="number"?"".concat(this.size,"px"):this.size},cleanSvg(){if(!this.svg||this.path)return;const e=Ol.sanitize(this.svg),a=new DOMParser().parseFromString(e,"image/svg+xml");return a.querySelector("parsererror")?(ka.util.warn("SVG is not valid"),""):(a.documentElement.id&&a.documentElement.removeAttribute("id"),a.documentElement.outerHTML)},attributes(){return{class:["icon-vue",{"icon-vue--inline":this.inline}],style:{"--icon-size":this.iconSize},role:"img","aria-hidden":this.name?void 0:!0,"aria-label":this.name||void 0}}}};var Q1=function(){var e=this,a=e._self._c;return e.cleanSvg?a("span",e._b({domProps:{innerHTML:e._s(e.cleanSvg)}},"span",e.attributes,!1)):a("span",e._b({},"span",e.attributes,!1),[a("svg",{attrs:{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[a("path",{attrs:{d:e.path}})])])},K1=[],J1=te($1,Q1,K1,!1,null,"2d0a4d76");const y0=J1.exports,X1=Zs({name:"NcDialogButton",components:{NcButton:wa,NcIconSvgWrapper:y0},props:{callback:{type:Function,required:!1,default:()=>{}},label:{type:String,required:!0},icon:{type:String,required:!1,default:void 0},type:{type:String,required:!1,default:"secondary",validator:e=>typeof e=="string"&&["primary","secondary","tertiary","error","warning","success"].includes(e)},nativeType:{type:String,required:!1,default:"button",validator(e){return["submit","reset","button"].includes(e)}},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:a}){return{handleClick:i=>{var n;(n=e.callback)==null||n.call(e),a("click",i)}}}});var e_=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("NcButton",{attrs:{"aria-label":e.label,disabled:e.disabled,"native-type":e.nativeType,type:e.type},on:{click:e.handleClick},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon",function(){return[e.icon!==void 0?a("NcIconSvgWrapper",{attrs:{svg:e.icon}}):e._e()]})]},proxy:!0}],null,!0)},[e._v(" "+e._s(e.label)+" ")])},a_=[],t_=te(X1,e_,a_,!1,null,null);const i_=t_.exports,n_=Zs({name:"NcDialog",components:{NcDialogButton:i_,NcModal:Is},props:{name:{type:String,required:!0},message:{type:String,default:""},additionalTrapElements:{type:Array,validator:e=>Array.isArray(e)&&e.every(a=>typeof a=="string"||a instanceof HTMLElement),default:()=>[]},container:{type:String,required:!1,default:"body"},open:{type:Boolean,default:!0},size:{type:String,required:!1,default:"small",validator:e=>typeof e=="string"&&["small","normal","large","full"].includes(e)},buttons:{type:Array,required:!1,default:()=>[],validator:e=>Array.isArray(e)&&e.every(a=>typeof a=="object")},canClose:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!1},isForm:{type:Boolean,default:!1},outTransition:{type:Boolean,default:!1},navigationClasses:{type:[String,Array,Object],required:!1,default:""},navigationAriaLabel:{type:String,required:!1,default:""},navigationAriaLabelledby:{type:String,required:!1,default:""},contentClasses:{type:[String,Array,Object],required:!1,default:""},dialogClasses:{type:[String,Array,Object],required:!1,default:""}},emits:["closing","update:open","submit"],setup(e,{emit:a,slots:i}){const n=at(),{width:o}=Hs(n,{width:900}),s=Ca(()=>o.value<876),r=Ca(()=>i?.navigation!==void 0),_=st(),l=Ca(()=>e.navigationAriaLabel||void 0),g=Ca(()=>{if(!e.navigationAriaLabel)return e.navigationAriaLabelledby||_}),d=at(),f=Ca(()=>e.isForm&&!r.value?"form":"div"),h=Ca(()=>f.value==="form"?{submit(w){w.preventDefault(),a("submit",w)}}:{}),u=at(!0),m=()=>{f.value==="form"&&!d.value.reportValidity()||(b(),window.setTimeout(()=>y(),300))},b=()=>{u.value=!1,a("closing")},y=()=>{u.value=!0,a("update:open",!1)},k=Ca(()=>({canClose:e.canClose,container:e.container===void 0?"body":e.container,labelId:_,size:e.size,show:e.open&&u.value,outTransition:e.outTransition,closeOnClickOutside:e.closeOnClickOutside,additionalTrapElements:e.additionalTrapElements}));return{dialogElement:d,dialogListeners:h,dialogTagName:f,handleButtonClose:m,handleClosing:b,handleClosed:y,hasNavigation:r,navigationId:_,navigationAriaLabelAttr:l,navigationAriaLabelledbyAttr:g,isNavigationCollapsed:s,modalProps:k,wrapper:n}}});var o_=function(){var e=this,a=e._self._c;return e._self._setupProxy,e.open?a("NcModal",e._b({staticClass:"dialog__modal",attrs:{"enable-slideshow":!1,"enable-swipe":!1},on:{close:e.handleClosed,"update:show":e.handleClosing}},"NcModal",e.modalProps,!1),[a("h2",{staticClass:"dialog__name",attrs:{id:e.navigationId},domProps:{textContent:e._s(e.name)}}),a(e.dialogTagName,e._g({ref:"dialogElement",tag:"component",staticClass:"dialog",class:e.dialogClasses},e.dialogListeners),[a("div",{ref:"wrapper",class:["dialog__wrapper",{"dialog__wrapper--collapsed":e.isNavigationCollapsed}]},[e.hasNavigation?a("nav",{staticClass:"dialog__navigation",class:e.navigationClasses,attrs:{"aria-label":e.navigationAriaLabelAttr,"aria-labelledby":e.navigationAriaLabelledbyAttr}},[e._t("navigation",null,{isCollapsed:e.isNavigationCollapsed})],2):e._e(),a("div",{staticClass:"dialog__content",class:e.contentClasses},[e._t("default",function(){return[a("p",{staticClass:"dialog__text"},[e._v(" "+e._s(e.message)+" ")])]})],2)]),a("div",{staticClass:"dialog__actions"},[e._t("actions",function(){return e._l(e.buttons,function(i,n){return a("NcDialogButton",e._b({key:n,on:{click:e.handleButtonClose}},"NcDialogButton",i,!1))})})],2)])],1):e._e()},s_=[],r_=te(n_,o_,s_,!1,null,"de9f48dc");const U2=r_.exports;function ar(){try{return Wt("core","capabilities")}catch{return console.debug("Could not find capabilities initial state fall back to _oc_capabilities"),"_oc_capabilities"in window?window._oc_capabilities:{}}}const l_='';function q0(e,a,i){window.OCP.Files.Router.goToRoute(null,{view:a.id,fileid:String(e.fileid)},{dir:i,openfile:"true"},!0)}async function __(e,a,i){const n=()=>{const o={...window.OCP.Files.Router.query};delete o.openfile,window.OCP.Files.Router.goToRoute(null,window.OCP.Files.Router.params,o)};return q0(e,a,i),window.OCA.Viewer.open({path:e.path,onPrev:q0,onNext:q0,onClose:n}),null}function d_(){Nl(new xl({id:"view",displayName:()=>M("viewer","View"),iconSvgInline:()=>l_,default:Ml.DEFAULT,enabled:e=>e.some(a=>!(a.isDavRessource&&a.root?.startsWith("/files")))?!1:e.every(a=>!!(a.permissions&jl.READ)&&window.OCA.Viewer.mimetypes.includes(a.mime)),exec:__}))}function si(e,a,i){e.$set(e.$data._asyncComputed[a],"state",i),e.$set(e.$data._asyncComputed[a],"updating",i==="updating"),e.$set(e.$data._asyncComputed[a],"error",i==="error"),e.$set(e.$data._asyncComputed[a],"success",i==="success")}function f_(e){return typeof e=="function"?e:e.get}function sn(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function Yn(e){return sn(e,"lazy")&&e.lazy}function g_(e,a){return e[qn+a]}var qn="async_computed$lazy_active$",Vt="async_computed$lazy_data$";function h_(e,a,i){e[qn+a]=!1,e[Vt+a]=i}function F_(e){return{get:function(){return this[qn+e]=!0,this[Vt+e]},set:function(a){this[Vt+e]=a}}}function u_(e,a,i){e[Vt+a]=i}function c_(e,a){return e[Vt+a]}var m_=function(e){return function(){var a=this;return e.watch.forEach(function(i){var n=i.split(".");if(n.length===1)a[i];else try{var o=a;n.forEach(function(s){o=o[s]})}catch(s){throw console.error("AsyncComputed: bad path: ",i),s}}),e.get.call(this)}},p_=function(e){return function(){return e.watch.call(this),e.get.call(this)}};function b_(e){if(typeof e.watch=="function")return p_(e);if(Array.isArray(e.watch))return e.watch.forEach(function(a){if(typeof a!="string")throw new Error("AsyncComputed: watch elemnts must be strings")}),m_(e);throw Error("AsyncComputed: watch should be function or an array")}var tr=typeof Symbol=="function"?Symbol("did-not-update"):{},T_=function(e,a){return function(){return e.shouldUpdate.call(this)?a.call(this):tr}},D_=function(e){return tr===e},ir="_async_computed$",nr={install:function(e,a){a=a||{},e.config.optionMergeStrategies.asyncComputed=e.config.optionMergeStrategies.computed,e.mixin({data:function(){return{_asyncComputed:{}}},computed:{$asyncComputed:function(){return this.$data._asyncComputed}},beforeCreate:function(){var i=this.$options.asyncComputed||{};if(Object.keys(i).length){for(var n in i){var o=k_(n,i[n]);this.$options.computed[ir+n]=o}this.$options.data=E_(this.$options,a)}},created:function(){for(var i in this.$options.asyncComputed||{}){var n=this.$options.asyncComputed[i],o=or.call(this,n,a);Yn(n)?u_(this,i,o):this[i]=o}for(var s in this.$options.asyncComputed||{})y_(this,s,a,e)}})}};function y_(e,a,i,n){var o=0,s=function(r){var _=++o;D_(r)||((!r||!r.then)&&(r=Promise.resolve(r)),si(e,a,"updating"),r.then(function(l){_===o&&(si(e,a,"success"),e[a]=l)}).catch(function(l){if(_===o&&(si(e,a,"error"),n.set(e.$data._asyncComputed[a],"exception",l),i.errorHandler!==!1)){var g=i.errorHandler===void 0?console.error.bind(console,"Error evaluating async computed property:"):i.errorHandler;i.useRawError?g(l,e,l.stack):g(l.stack)}}))};n.set(e.$data._asyncComputed,a,{exception:null,update:function(){e._isDestroyed||s(f_(e.$options.asyncComputed[a]).apply(e))}}),si(e,a,"updating"),e.$watch(ir+a,s,{immediate:!0})}function E_(e,a){var i=e.data,n=e.asyncComputed||{};return function(o){var s=(typeof i=="function"?i.call(this,o):i)||{};for(var r in n){var _=this.$options.asyncComputed[r],l=or.call(this,_,a);Yn(_)?(h_(s,r,l),this.$options.computed[r]=F_(r)):s[r]=l}return s}}function k_(e,a){if(typeof a=="function")return a;var i=a.get;if(sn(a,"watch")&&(i=b_(a)),sn(a,"shouldUpdate")&&(i=T_(a,i)),Yn(a)){var n=i;i=function(){return g_(this,e)?n.call(this):c_(this,e)}}return i}function or(e,a){var i=null;return"default"in e?i=e.default:"default"in a&&(i=a.default),typeof i=="function"?i.call(this):i}typeof window<"u"&&window.Vue&&window.Vue.use(nr);const A_={name:"PlayCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var w_=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon play-circle-outline-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M10,16.5L16,12L10,7.5V16.5Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},v_=[],S_=ii(A_,w_,v_,!1,null,null);const R_=S_.exports;oe();let sr=class rr{static fromString(a){return new rr(a)}constructor(a){this.value=a}icaltype="binary";decodeValue(){return this._b64_decode(this.value)}setEncodedValue(a){this.value=this._b64_encode(a)}_b64_encode(a){let i,n,o,s,r,_,l,g,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",f=0,h=0,u="",m=[];if(!a)return a;do i=a.charCodeAt(f++),n=a.charCodeAt(f++),o=a.charCodeAt(f++),g=i<<16|n<<8|o,s=g>>18&63,r=g>>12&63,_=g>>6&63,l=63&g,m[h++]=d.charAt(s)+d.charAt(r)+d.charAt(_)+d.charAt(l);while(f>16&255,n=g>>8&255,o=255&g,m[h++]=_==64?String.fromCharCode(i):l==64?String.fromCharCode(i,n):String.fromCharCode(i,n,o);while(fn)-(i12||(n=[0,31,28,31,30,31,30,31,31,30,31,30,31][a],a==2&&(n+=N.isLeapYear(i))),n}static isLeapYear(a){return a<=1752?a%4==0:a%4==0&&a%100!=0||a%400==0}static fromDayOfYear(a,i){let n=i,o=a,s=new N;s.auto_normalize=!1;let r=N.isLeapYear(n)?1:0;if(o<1)return n--,r=N.isLeapYear(n)?1:0,o+=N.daysInYearPassedMonth[r][12],N.fromDayOfYear(o,n);if(o>N.daysInYearPassedMonth[r][12])return r=N.isLeapYear(n)?1:0,o-=N.daysInYearPassedMonth[r][12],n++,N.fromDayOfYear(o,n);s.year=n,s.isDate=!0;for(let _=11;_>=0;_--)if(o>N.daysInYearPassedMonth[r][_]){s.month=_+1,s.day=o-N.daysInYearPassedMonth[r][_];break}return s.auto_normalize=!0,s}static fromStringv2(a){return new N({year:parseInt(a.slice(0,4),10),month:parseInt(a.slice(5,7),10),day:parseInt(a.slice(8,10),10),isDate:!0})}static fromDateString(a){return new N({year:Le(a.slice(0,4)),month:Le(a.slice(5,7)),day:Le(a.slice(8,10)),isDate:!0})}static fromDateTimeString(a,i){if(a.length<19)throw new Error('invalid date-time value: "'+a+'"');let n,o;a[19]&&a[19]==="Z"?n=X.utcTimezone:i&&(o=i.getParameter("tzid"),i.parent&&(i.parent.name==="standard"||i.parent.name==="daylight"?n=X.localTimezone:o&&(n=i.parent.getTimeZoneByID(o))));const s={year:Le(a.slice(0,4)),month:Le(a.slice(5,7)),day:Le(a.slice(8,10)),hour:Le(a.slice(11,13)),minute:Le(a.slice(14,16)),second:Le(a.slice(17,19))};return o&&!n&&(s.timezone=o),new N(s,n)}static fromString(a,i){return a.length>10?N.fromDateTimeString(a,i):N.fromDateString(a)}static fromJSDate(a,i){return new N().fromJSDate(a,i)}static fromData=function(a,i){return new N().fromData(a,i)};static now(){return N.fromJSDate(new Date,!1)}static weekOneStarts(a,i){let n=N.fromData({year:a,month:1,day:1,isDate:!0}),o=n.dayOfWeek(),s=i||N.DEFAULT_WEEK_START;return o>N.THURSDAY&&(n.day+=7),s>N.THURSDAY&&(n.day-=7),n.day-=o-s,n}static getDominicalLetter(a){let i="GFEDCBA",n=(a+(a/4|0)+(a/400|0)-(a/100|0)-1)%7;return N.isLeapYear(a)?i[(n+6)%7]+i[n]:i[n]}static#e=null;static get epochTime(){return this.#e||(this.#e=N.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:"Z"})),this.#e}static _cmp_attr(a,i,n){return a[n]>i[n]?1:a[n]=0){_.day=1,s!=0&&s--,r=_.day;let l=a-_.dayOfWeek();l<0&&(l+=7),r+=l,r-=a,n=a}else _.day=o,s++,n=_.dayOfWeek()-a,n<0&&(n+=7),n=o-n;return n+=7*s,r+n}isNthWeekDay(a,i){let n=this.dayOfWeek();return i===0&&n===a||this.nthWeekDay(a,i)===this.day}weekNumber(a){let i,n=(this.year<<12)+(this.month<<8)+(this.day<<3)+a;if(n in N._wnCache)return N._wnCache[n];let o=this.clone();o.isDate=!0;let s=this.year;o.month==12&&o.day>25?(i=N.weekOneStarts(s+1,a),o.compare(i)<0?i=N.weekOneStarts(s,a):s++):(i=N.weekOneStarts(s,a),o.compare(i)<0&&(i=N.weekOneStarts(--s,a)));let r=Oe(o.subtractDate(i).toSeconds()/86400/7)+1;return N._wnCache[n]=r,r}addDuration(a){let i=a.isNegative?-1:1,n=this.second,o=this.minute,s=this.hour,r=this.day;n+=i*a.seconds,o+=i*a.minutes,s+=i*a.hours,r+=i*a.days,r+=7*i*a.weeks,this.second=n,this.minute=o,this.hour=s,this.day=r,this._cachedUnixTime=null}subtractDate(a){let i=this.toUnixTime()+this.utcOffset(),n=a.toUnixTime()+a.utcOffset();return Ie.fromSeconds(i-n)}subtractDateTz(a){let i=this.toUnixTime(),n=a.toUnixTime();return Ie.fromSeconds(i-n)}compare(a){let i=this.toUnixTime(),n=a.toUnixTime();return i>n?1:n>i?-1:0}compareDateOnlyTz(a,i){let n=this.convertToZone(i),o=a.convertToZone(i),s=0;return(s=N._cmp_attr(n,o,"year"))!=0||(s=N._cmp_attr(n,o,"month"))!=0||(s=N._cmp_attr(n,o,"day")),s}convertToZone(a){let i=this.clone(),n=this.zone.tzid==a.tzid;return this.isDate||n||X.convert_time(i,this.zone,a),i.zone=a,i}utcOffset(){return this.zone==X.localTimezone||this.zone==X.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let a=this.toString();return a.length>10?xe.icalendar.value["date-time"].toICAL(a):xe.icalendar.value.date.toICAL(a)}toString(){let a=this.year+"-"+Ve(this.month)+"-"+Ve(this.day);return this.isDate||(a+="T"+Ve(this.hour)+":"+Ve(this.minute)+":"+Ve(this.second),this.zone===X.utcTimezone&&(a+="Z")),a}toJSDate(){return this.zone==X.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(a,i,n,o,s){let r,_,l,g,d,f,h,u=0,m=0,b=s||this._time;if(b.isDate||(l=b.second+o,b.second=l%60,r=Oe(l/60),b.second<0&&(b.second+=60,r--),g=b.minute+n+r,b.minute=g%60,_=Oe(g/60),b.minute<0&&(b.minute+=60,_--),d=b.hour+i+_,b.hour=d%24,u=Oe(d/24),b.hour<0&&(b.hour+=24,u--)),b.month>12?m=Oe((b.month-1)/12):b.month<1&&(m=Oe(b.month/12)-1),b.year+=m,b.month-=12*m,f=b.day+a+u,f>0)for(;h=N.daysInMonth(b.month,b.year),!(f<=h);)b.month++,b.month>12&&(b.year++,b.month=1),f-=h;else for(;f<=0;)b.month==1?(b.year--,b.month=12):b.month--,f+=N.daysInMonth(b.month,b.year);return b.day=f,this._cachedUnixTime=null,this}fromUnixTime(a){this.zone=X.utcTimezone;let i=new Date(1e3*a);this.year=i.getUTCFullYear(),this.month=i.getUTCMonth()+1,this.day=i.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=i.getUTCHours(),this.minute=i.getUTCMinutes(),this.second=i.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(this._cachedUnixTime!==null)return this._cachedUnixTime;let a=this.utcOffset(),i=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-a);return this._cachedUnixTime=i/1e3,this._cachedUnixTime}toJSON(){let a,i=["year","month","day","hour","minute","second","isDate"],n=Object.create(null),o=0,s=i.length;for(;o1)throw new Ka("invalid ical body. component began but did not end");return a=null,i.length==1?i[0]:i}he.property=function(e,a){let i={component:[[],[]],designSet:a||xe.defaultSet};return he._handleContentLine(e,i),i.component[1][0]},he.component=function(e){return he(e)};class Ka extends Error{constructor(a){super(a),this.name=this.constructor.name;try{throw new Error}catch(i){if(i.stack){let n=i.stack.split(` +`);n.shift(),this.stack=n.join(` +`)}}}}he.ParserError=Ka,he._handleContentLine=function(e,a){let i,n,o,s,r,_,l=e.indexOf(":"),g=e.indexOf(";"),d={};if(g!==-1&&l!==-1&&g>l&&(g=-1),g!==-1){if(o=e.slice(0,Math.max(0,g)).toLowerCase(),r=he._parseParameters(e.slice(Math.max(0,g)),0,a.designSet),r[2]==-1)throw new Ka("Invalid parameters in '"+e+"'");if(d=r[0],i=r[1].length+r[2]+g,(n=e.slice(Math.max(0,i)).indexOf(":"))===-1)throw new Ka("Missing parameter value in '"+e+"'");s=e.slice(Math.max(0,i+n+1))}else{if(l===-1)throw new Ka('invalid line (no token ";" or ":") "'+e+'"');if(o=e.slice(0,Math.max(0,l)).toLowerCase(),s=e.slice(Math.max(0,l+1)),o==="begin"){let k=[s.toLowerCase(),[],[]];return a.stack.length===1?a.component.push(k):a.component[2].push(k),a.stack.push(a.component),a.component=k,void(a.designSet||(a.designSet=xe.getDesignSet(a.component[0])))}if(o==="end")return void(a.component=a.stack.pop())}let f,h,u,m,b=!1,y=!1;a.designSet.propertyGroups&&o.indexOf(".")!==-1?(h=o.split("."),d.group=h[0],u=h[1]):u=o,u in a.designSet.property&&(f=a.designSet.property[u],"multiValue"in f&&(b=f.multiValue),"structuredValue"in f&&(y=f.structuredValue),s&&"detectType"in f&&(_=f.detectType(s))),_||(_="value"in d?d.value.toLowerCase():f?f.defaultType:"unknown"),delete d.value,b&&y?(s=he._parseMultiValue(s,y,_,[],b,a.designSet,y),m=[u,d,_,s]):b?(m=[u,d,_],he._parseMultiValue(s,b,_,m,null,a.designSet,!1)):y?(s=he._parseMultiValue(s,y,_,[],null,a.designSet,y),m=[u,d,_,s]):(s=he._parseValue(s,_,a.designSet,!1),m=[u,d,_,s]),a.component[0]!=="vcard"||a.component[1].length!==0||o==="version"&&s==="4.0"||(a.designSet=xe.getDesignSet("vcard3")),a.component[1].push(m)},he._parseValue=function(e,a,i,n){return a in i.value&&"fromICAL"in i.value[a]?i.value[a].fromICAL(e,n):e},he._parseParameters=function(e,a,i){let n,o,s,r,_,l,g=a,d=0,f={},h=-1;for(;d!==!1&&(d=oa(e,"=",d+1))!==-1;){if(n=e.slice(g+1,d),n.length==0)throw new Ka("Empty parameter name in '"+e+"'");if(o=n.toLowerCase(),l=!1,_=!1,r=o in i.param&&i.param[o].valueType?i.param[o].valueType:"text",o in i.param&&(_=i.param[o].multiValue,i.param[o].multiValueSeparateDQuote&&(l=he._rfc6868Escape('"'+_+'"'))),e[d+1]==='"'){if(h=d+2,d=oa(e,'"',h),_&&d!=-1){let u=!0;for(;u;)e[d+1]==_&&e[d+2]=='"'?d=oa(e,'"',d+3):u=!1}if(d===-1)throw new Ka('invalid line (no matching double quote) "'+e+'"');s=e.slice(h,d),g=oa(e,";",d),g===-1&&(d=!1)}else{h=d+1;let u=oa(e,";",h),m=oa(e,":",h);m!==-1&&u>m?(u=m,d=!1):u===-1?(u=m===-1?e.length:m,d=!1):(g=u,d=u),s=e.slice(h,u)}if(s=he._rfc6868Escape(s),_){let u=l||_;s=he._parseMultiValue(s,u,r,[],null,i)}else s=he._parseValue(s,r,i);_&&o in f?Array.isArray(f[o])?f[o].push(s):f[o]=[f[o],s]:f[o]=s}return[f,s,h]},he._rfc6868Escape=function(e){return e.replace(/\^['n^]/g,function(a){return x_[a]})},he._parseMultiValue=function(e,a,i,n,o,s,r){let _,l=0,g=0;if(a.length===0)return e;for(;(l=oa(e,a,g))!==-1;)_=e.slice(g,l),_=o?he._parseMultiValue(_,o,i,[],null,s,r):he._parseValue(_,i,s,r),n.push(_),g=l+a.length;return _=e.slice(g),_=o?he._parseMultiValue(_,o,i,[],null,s,r):he._parseValue(_,i,s,r),n.push(_),n.length==1?n[0]:n},he._eachLine=function(e,a){let i,n,o,s=e.length,r=e.search(N_),_=r;do _=e.indexOf(` +`,r)+1,o=_>1&&e[_-2]==="\r"?2:1,_===0&&(_=s,o=0),n=e[r],n===" "||n===" "?i+=e.slice(r+1,_-o):(i&&a(null,i),i=e.slice(r,_-o)),r=_;while(_!==s);i=i.trim(),i.length&&a(null,i)};const M_=["tzid","location","tznames","latitude","longitude"];class X{static _compare_change_fn(a,i){return a.yeari.year?1:a.monthi.month?1:a.dayi.day?1:a.houri.hour?1:a.minutei.minute?1:a.secondi.second?1:0}static convert_time(a,i,n){if(a.isDate||i.tzid==n.tzid||i==X.localTimezone||n==X.localTimezone)return a.zone=n,a;let o=i.utcOffset(a);return a.adjust(0,0,0,-o),o=n.utcOffset(a),a.adjust(0,0,0,o),null}static fromData(a){return new X().fromData(a)}static#e=null;static get utcTimezone(){return this.#e||(this.#e=X.fromData({tzid:"UTC"})),this.#e}static#a=null;static get localTimezone(){return this.#a||(this.#a=X.fromData({tzid:"floating"})),this.#a}static adjust_change(a,i,n,o,s){return N.prototype.adjust.call(a,i,n,o,s,a)}static _minimumExpansionYear=-1;static EXTRA_COVERAGE=5;constructor(a){this.wrappedJSObject=this,this.fromData(a)}tzid="";location="";tznames="";latitude=0;longitude=0;component=null;expandedUntilYear=0;icalclass="icaltimezone";fromData(a){if(this.expandedUntilYear=0,this.changes=[],a instanceof $e)this.component=a;else{if(a&&"component"in a)if(typeof a.component=="string"){let i=he(a.component);this.component=new $e(i)}else a.component instanceof $e?this.component=a.component:this.component=null;for(let i of M_)a&&i in a&&(this[i]=a[i])}return this.component instanceof $e&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue("tzid")),this}utcOffset(a){if(this==X.utcTimezone||this==X.localTimezone||(this._ensureCoverage(a.year),!this.changes.length))return 0;let i={year:a.year,month:a.month,day:a.day,hour:a.hour,minute:a.minute,second:a.second},n=this._findNearbyChange(i),o=-1,s=1;for(;;){let _=rt(this.changes[n],!0);if(_.utcOffset<_.prevUtcOffset?X.adjust_change(_,0,0,0,_.utcOffset):X.adjust_change(_,0,0,0,_.prevUtcOffset),X._compare_change_fn(i,_)>=0?o=n:s=-1,s==-1&&o!=-1)break;if(n+=s,n<0)return 0;if(n>=this.changes.length)break}let r=this.changes[o];if(r.utcOffset-r.prevUtcOffset<0&&o>0){let _=rt(r,!0);if(X.adjust_change(_,0,0,0,_.prevUtcOffset),X._compare_change_fn(i,_)<0){let l=this.changes[o-1],g=!1;r.is_daylight!=g&&l.is_daylight==g&&(r=l)}}return r.utcOffset}_findNearbyChange(a){let i=tt(this.changes,a,X._compare_change_fn);return i>=this.changes.length?this.changes.length-1:i}_ensureCoverage(a){if(X._minimumExpansionYear==-1){let n=N.now();X._minimumExpansionYear=n.year}let i=a;if(ii)&&d);)o.year=d.year,o.month=d.month,o.day=d.day,o.hour=d.hour,o.minute=d.minute,o.second=d.second,o.isDate=d.isDate,X.adjust_change(o,0,0,0,-o.prevUtcOffset),n.push(o)}}else o=_(),o.year=s.year,o.month=s.month,o.day=s.day,o.hour=s.hour,o.minute=s.minute,o.second=s.second,X.adjust_change(o,0,0,0,-o.prevUtcOffset),n.push(o);return n}toString(){return this.tznames?this.tznames:this.tzid}}let ze=null;const Ni={get count(){return ze===null?0:Object.keys(ze).length},reset:function(){ze=Object.create(null);let e=X.utcTimezone;ze.Z=e,ze.UTC=e,ze.GMT=e},has:function(e){return ze!==null&&!!ze[e]},get:function(e){return ze===null&&this.reset(),ze[e]},register:function(e,a){if(ze===null&&this.reset(),e instanceof $e&&e.name==="vtimezone"&&(e=(a=new X(e)).tzid),!(a instanceof X))throw new TypeError("timezone must be ICAL.Timezone or ICAL.Component");ze[e]=a},remove:function(e){return ze===null?null:delete ze[e]}};function $t(e){return typeof e=="number"&&isNaN(e)}function Le(e){let a=parseInt(e,10);if($t(a))throw new Error('Could not extract integer from "'+e+'"');return a}function Ta(e,a){if(e!==void 0)return e instanceof a?e:new a(e)}function oa(e,a,i){for(;(i=e.indexOf(a,i))!==-1;){if(!(i>0&&e[i-1]==="\\"))return i;i+=1}return-1}function tt(e,a,i){if(!e.length)return 0;let n,o,s=0,r=e.length-1;for(;s<=r;)if(n=s+Math.floor((r-s)/2),o=i(a,e[n]),o<0)r=n-1;else{if(!(o>0))break;s=n+1}return o<0?n:o>0?n+1:n}function rt(e,a){if(e&&typeof e=="object"){if(e instanceof Date)return new Date(e.getTime());if("clone"in e)return e.clone();if(Array.isArray(e)){let i=[];for(let n=0;n65535?2:1:(a+=Re.newLineChar+" "+i.slice(0,Math.max(0,n)),i=i.slice(Math.max(0,n)),n=o=0)}return a.slice(Re.newLineChar.length+1)}function Ve(e){switch(typeof e!="string"&&(typeof e=="number"&&(e=parseInt(e)),e=String(e)),e.length){case 0:return"00";case 1:return"0"+e;default:return e}}function Oe(e){return e<0?Math.ceil(e):Math.floor(e)}function dt(e,a){for(let i in e){let n=Object.getOwnPropertyDescriptor(e,i);n&&!Object.getOwnPropertyDescriptor(a,i)&&Object.defineProperty(a,i,n)}return a}var j_=Object.freeze({__proto__:null,updateTimezones:function(e){let a,i,n,o,s;if(!e||e.name!=="vcalendar")return e;for(a=e.getAllSubcomponents(),i=[],n={},s=0;sn)-(n>i)}_normalize(){let a=this.toSeconds(),i=this.factor;for(;a<-43200;)a+=97200;for(;a>50400;)a-=97200;this.fromSeconds(a),a==0&&(this.factor=i)}toICALString(){return xe.icalendar.value["utc-offset"].toICAL(this.toString())}toString(){return(this.factor==1?"+":"-")+Ve(this.hours)+":"+Ve(this.minutes)}}class Ya extends N{static fromDateAndOrTimeString(a,i){function n(b,y,k){return b?Le(b.slice(y,y+k)):null}let o=a.split("T"),s=o[0],r=o[1],_=r?xe.vcard.value.time._splitZone(r):[],l=_[0],g=_[1],d=s?s.length:0,f=g?g.length:0,h=s&&s[0]=="-"&&s[1]=="-",u=g&&g[0]=="-",m={year:h?null:n(s,0,4),month:!h||d!=4&&d!=7?d==7||d==10?n(s,5,2):null:n(s,2,2),day:d==5?n(s,3,2):d==7&&h?n(s,5,2):d==10?n(s,8,2):null,hour:u?null:n(g,0,2),minute:u&&f==3?n(g,1,2):f>4?n(g,u?1:3,2):null,second:f==4?n(g,2,2):f==6?n(g,4,2):f==8?n(g,6,2):null};return l=l=="Z"?X.utcTimezone:l&&l[3]==":"?ra.fromString(l):null,new Ya(m,l,i)}constructor(a,i,n){super(a,i),this.icaltype=n||"date-and-or-time"}icalclass="vcardtime";icaltype="date-and-or-time";clone(){return new Ya(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof ra?this.zone.toSeconds():N.prototype.utcOffset.apply(this,arguments)}toICALString(){return xe.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let a,i=this.year,n=this.month,o=this.day,s=this.hour,r=this.minute,_=this.second,l=n!==null,g=o!==null,d=s!==null,f=r!==null,h=_!==null,u=(i!==null?Ve(i)+(l||g?"-":""):l||g?"--":"")+(l?Ve(n):"")+(g?"-"+Ve(o):""),m=(d?Ve(s):"-")+(d&&f?":":"")+(f?Ve(r):"")+(d||f?"":"-")+(f&&h?":":"")+(h?Ve(_):"");switch(this.zone===X.utcTimezone?a="Z":this.zone instanceof ra?a=this.zone.toString():this.zone===X.localTimezone?a="":this.zone instanceof X?a=ra.fromSeconds(this.zone.utcOffset(this)).toString():a="",this.icaltype){case"time":return m+a;case"date-and-or-time":case"date-time":return u+(m=="--"?"":"T"+m+a);case"date":return u}return null}}class Fa{static _indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8};static _expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]};static UNKNOWN=0;static CONTRACT=1;static EXPAND=2;static ILLEGAL=3;constructor(a){this.fromData(a)}completed=!1;rule=null;dtstart=null;last=null;occurrence_number=0;by_indices=null;initialized=!1;by_data=null;days=null;days_index=0;fromData(a){if(this.rule=Ta(a.rule,Ze),!this.rule)throw new Error("iterator requires a (ICAL.Recur) rule");if(this.dtstart=Ta(a.dtstart,N),!this.dtstart)throw new Error("iterator requires a (ICAL.Time) dtstart");a.by_data?this.by_data=a.by_data:this.by_data=rt(this.rule.parts,!0),a.occurrence_number&&(this.occurrence_number=a.occurrence_number),this.days=a.days||[],a.last&&(this.last=Ta(a.last,N)),this.by_indices=a.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=a.initialized||!1,this.initialized||this.init()}init(){this.initialized=!0,this.last=this.dtstart.clone();let a=this.by_data;if("BYDAY"in a&&this.sort_byday_rules(a.BYDAY),"BYYEARDAY"in a&&("BYMONTH"in a||"BYWEEKNO"in a||"BYMONTHDAY"in a||"BYDAY"in a))throw new Error("Invalid BYYEARDAY rule");if("BYWEEKNO"in a&&"BYMONTHDAY"in a)throw new Error("BYWEEKNO does not fit to BYMONTHDAY");if(this.rule.freq=="MONTHLY"&&("BYYEARDAY"in a||"BYWEEKNO"in a))throw new Error("For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear");if(this.rule.freq=="WEEKLY"&&("BYYEARDAY"in a||"BYMONTHDAY"in a))throw new Error("For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear");if(this.rule.freq!="YEARLY"&&"BYYEARDAY"in a)throw new Error("BYYEARDAY may only appear in YEARLY rules");this.last.second=this.setup_defaults("BYSECOND","SECONDLY",this.dtstart.second),this.last.minute=this.setup_defaults("BYMINUTE","MINUTELY",this.dtstart.minute),this.last.hour=this.setup_defaults("BYHOUR","HOURLY",this.dtstart.hour);let i=this.last.day=this.setup_defaults("BYMONTHDAY","DAILY",this.dtstart.day);if(this.last.month=this.setup_defaults("BYMONTH","MONTHLY",this.dtstart.month),this.rule.freq=="WEEKLY")if("BYDAY"in a){let[,n]=this.ruleDayOfWeek(a.BYDAY[0],this.rule.wkst),o=n-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)=0||o<0)&&(this.last.day+=o)}else{let n=Ze.numericDayToIcalDay(this.dtstart.dayOfWeek());a.BYDAY=[n]}if(this.rule.freq=="YEARLY"){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if(this.rule.freq=="MONTHLY"&&this.has_by_data("BYDAY")){let n=null,o=this.last.clone(),s=N.daysInMonth(this.last.month,this.last.year);for(let r of this.by_data.BYDAY){this.last=o.clone();let[_,l]=this.ruleDayOfWeek(r),g=this.last.nthWeekDay(l,_);if(_>=6||_<=-6)throw new Error("Malformed values in BYDAY part");if(g>s||g<=0){if(n&&n.month==o.month)continue;for(;g>s||g<=0;)this.increment_month(),s=N.daysInMonth(this.last.month,this.last.year),g=this.last.nthWeekDay(l,_)}this.last.day=g,(!n||this.last.compare(n)<0)&&(n=this.last.clone())}if(this.last=n.clone(),this.has_by_data("BYMONTHDAY")&&this._byDayAndMonthDay(!0),this.last.day>s||this.last.day==0)throw new Error("Malformed values in BYDAY part")}else if(this.has_by_data("BYMONTHDAY")){this.last.day=1;let n=N.daysInMonth(this.last.month,this.last.year);if(i<0)this.last.day=n+i+1;else if(this.by_data.BYMONTHDAY[0]>n){if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new Error("No possible occurrences")}else this.last.day=i}}next(){let a,i=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(this.occurrence_number==0&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do switch(a=1,this.rule.freq){case"SECONDLY":this.next_second();break;case"MINUTELY":this.next_minute();break;case"HOURLY":this.next_hour();break;case"DAILY":this.next_day();break;case"WEEKLY":this.next_week();break;case"MONTHLY":a=this.next_month();break;case"YEARLY":this.next_year();break;default:return null}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!a);if(this.last.compare(i)==0)throw new Error("Same occurrence found twice, protecting you from death by recursion");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic("BYSECOND","SECONDLY","second","minute")}increment_second(a){return this.increment_generic(a,"second",60,"minute")}next_minute(){return this.next_generic("BYMINUTE","MINUTELY","minute","hour","next_second")}increment_minute(a){return this.increment_generic(a,"minute",60,"hour")}next_hour(){return this.next_generic("BYHOUR","HOURLY","hour","monthday","next_minute")}increment_hour(a){this.increment_generic(a,"hour",24,"monthday")}next_day(){let a=this.rule.freq=="DAILY";return this.next_hour()==0||(a?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let a=0;if(this.next_weekday_by_week()==0)return a;if(this.has_by_data("BYWEEKNO")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,a=1),this.last.month=1,this.last.day=1;let i=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*i,a&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return a}normalizeByMonthDayRules(a,i,n){let o,s=N.daysInMonth(i,a),r=[],_=0,l=n.length;for(;_s)){if(o<0)o=s+(o+1);else if(o===0)continue;r.indexOf(o)===-1&&r.push(o)}return r.sort(function(g,d){return g-d})}_byDayAndMonthDay(a){let i,n,o,s,r=this.by_data.BYDAY,_=0,l=r.length,g=0,d=this,f=this.last.day;function h(){for(s=N.daysInMonth(d.last.month,d.last.year),i=d.normalizeByMonthDayRules(d.last.year,d.last.month,d.by_data.BYMONTHDAY),o=i.length;i[_]<=f&&(!a||i[_]!=f)&&_s){u();continue}let b=i[_++];if(b>=n){f=b;for(let y=0;yn&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data("BYSETPOS")&&!this.check_set_position(1)||(a=1):a=0)}else if(this.has_by_data("BYMONTHDAY")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());let i=N.daysInMonth(this.last.month,this.last.year),n=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];n<0&&(n=i+n+1),n>i?(this.last.day=1,a=this.is_day_in_byday(this.last)):this.last.day=n}else{this.increment_month();let i=N.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>i?a=0:this.last.day=this.by_data.BYMONTHDAY[0]}return a}next_weekday_by_week(){let a=0;if(this.next_hour()==0)return a;if(!this.has_by_data("BYDAY"))return 1;for(;;){let i=new N;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,a=1);let n=this.by_data.BYDAY[this.by_indices.BYDAY],o=this.ruleDayOfWeek(n)[1];o-=this.rule.wkst,o<0&&(o+=7),i.year=this.last.year,i.month=this.last.month,i.day=this.last.day;let s=i.startDoyWeek(this.rule.wkst);if(o+s<1&&!a)continue;let r=N.fromDayOfYear(s+o,this.last.year);return this.last.year=r.year,this.last.month=r.month,this.last.day=r.day,a}}next_year(){if(this.next_hour()==0)return 0;if(++this.days_index==this.days.length){this.days_index=0;do this.increment_year(this.rule.interval),this.expand_year_days(this.last.year);while(this.days.length==0)}return this._nextByYearDay(),1}_nextByYearDay(){let a=this.days[this.days_index],i=this.last.year;a<1&&(a+=1,i+=1);let n=N.fromDayOfYear(a,i);this.last.day=n.day,this.last.month=n.month}ruleDayOfWeek(a,i){let n=a.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);return n?[parseInt(n[1]||0,10),a=Ze.icalDayToNumericDay(n[2],i)]:[0,0]}next_generic(a,i,n,o,s){let r=a in this.by_data,_=this.rule.freq==i,l=0;if(s&&this[s]()==0)return l;if(r){this.by_indices[a]++;let g=this.by_data[a];this.by_indices[a]==g.length&&(this.by_indices[a]=0,l=1),this.last[n]=g[this.by_indices[a]]}else _&&this["increment_"+n](this.rule.interval);return r&&l&&_&&this["increment_"+o](1),l}increment_monthday(a){for(let i=0;in&&(this.last.day-=n,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data("BYMONTH"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{this.rule.freq=="MONTHLY"?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let a=Oe(this.last.month/12);this.last.month%=12,this.last.month++,a!=0&&this.increment_year(a)}}increment_year(a){this.last.year+=a}increment_generic(a,i,n,o){this.last[i]+=a;let s=Oe(this.last[i]/n);this.last[i]%=n,s!=0&&this["increment_"+o](s)}has_by_data(a){return a in this.rule.parts}expand_year_days(a){let i=new N;this.days=[];let n={},o=["BYDAY","BYWEEKNO","BYMONTHDAY","BYMONTH","BYYEARDAY"];for(let r of o)r in this.rule.parts&&(n[r]=this.rule.parts[r]);if("BYMONTH"in n&&"BYWEEKNO"in n){let r=1,_={};i.year=a,i.isDate=!0;for(let l=0;l0?(h=y+7*(m-1),h<=_&&this.days.push(g+h)):(h=k+7*(m+1),h>0&&this.days.push(g+h))}}this.days.sort(function(r,_){return r-_})}else if(s==2&&"BYDAY"in n&&"BYMONTHDAY"in n){let r=this.expand_by_day(a);for(let _ of r){let l=N.fromDayOfYear(_,a);this.by_data.BYMONTHDAY.indexOf(l.day)>=0&&this.days.push(_)}}else if(s==3&&"BYDAY"in n&&"BYMONTHDAY"in n&&"BYMONTH"in n){let r=this.expand_by_day(a);for(let _ of r){let l=N.fromDayOfYear(_,a);this.by_data.BYMONTH.indexOf(l.month)>=0&&this.by_data.BYMONTHDAY.indexOf(l.day)>=0&&this.days.push(_)}}else if(s==2&&"BYDAY"in n&&"BYWEEKNO"in n){let r=this.expand_by_day(a);for(let _ of r){let l=N.fromDayOfYear(_,a).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(l)&&this.days.push(_)}}else s==3&&"BYDAY"in n&&"BYWEEKNO"in n&&"BYMONTHDAY"in n||(this.days=s==1&&"BYYEARDAY"in n?this.days.concat(this.by_data.BYYEARDAY):[]);return 0}expand_by_day(a){let i=[],n=this.last.clone();n.year=a,n.month=1,n.day=1,n.isDate=!0;let o=n.dayOfWeek();n.month=12,n.day=31,n.isDate=!0;let s=n.dayOfWeek(),r=n.dayOfYear();for(let _ of this.by_data.BYDAY){let l=this.ruleDayOfWeek(_),g=l[0],d=l[1];if(g==0)for(let f=(d+7-o)%7+1;f<=r;f+=7)i.push(f);else if(g>0){let f;f=d>=o?d-o+1:d-o+8,i.push(f+7*(g-1))}else{let f;g=-g,f=d<=s?r-s+d:r-s+d-7,i.push(f-7*(g-1))}}return i}is_day_in_byday(a){if(this.by_data.BYDAY)for(let i of this.by_data.BYDAY){let n=this.ruleDayOfWeek(i),o=n[0],s=n[1],r=a.dayOfWeek();if(o==0&&s==r||a.nthWeekDay(s,o)==a.day)return 1}return 0}check_set_position(a){return this.has_by_data("BYSETPOS")?this.by_data.BYSETPOS.indexOf(a)!==-1:!1}sort_byday_rules(a){for(let i=0;ithis.ruleDayOfWeek(a[i],this.rule.wkst)[1]){let o=a[i];a[i]=a[n],a[n]=o}}check_contract_restriction(a,i){let n=Fa._indexMap[a],o=Fa._expandMap[this.rule.freq][n],s=!1;if(a in this.by_data&&o==Fa.CONTRACT){let r=this.by_data[a];for(let _ of r)if(_==i){s=!0;break}}else s=!0;return s}check_contracting_rules(){let a=this.last.dayOfWeek(),i=this.last.weekNumber(this.rule.wkst),n=this.last.dayOfYear();return this.check_contract_restriction("BYSECOND",this.last.second)&&this.check_contract_restriction("BYMINUTE",this.last.minute)&&this.check_contract_restriction("BYHOUR",this.last.hour)&&this.check_contract_restriction("BYDAY",Ze.numericDayToIcalDay(a))&&this.check_contract_restriction("BYWEEKNO",i)&&this.check_contract_restriction("BYMONTHDAY",this.last.day)&&this.check_contract_restriction("BYMONTH",this.last.month)&&this.check_contract_restriction("BYYEARDAY",n)}setup_defaults(a,i,n){let o=Fa._indexMap[a];return Fa._expandMap[this.rule.freq][o]!=Fa.CONTRACT&&(a in this.by_data||(this.by_data[a]=[n]),this.rule.freq!=i)?this.by_data[a][0]:n}toJSON(){let a=Object.create(null);return a.initialized=this.initialized,a.rule=this.rule.toJSON(),a.dtstart=this.dtstart.toJSON(),a.by_data=this.by_data,a.days=this.days,a.last=this.last.toJSON(),a.by_indices=this.by_indices,a.occurrence_number=this.occurrence_number,a}}const Y_=/^(SU|MO|TU|WE|TH|FR|SA)$/,q_=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,_r={SU:N.SUNDAY,MO:N.MONDAY,TU:N.TUESDAY,WE:N.WEDNESDAY,TH:N.THURSDAY,FR:N.FRIDAY,SA:N.SATURDAY},L_=Object.fromEntries(Object.entries(_r).map(e=>e.reverse())),bo=["SECONDLY","MINUTELY","HOURLY","DAILY","WEEKLY","MONTHLY","YEARLY"];class Ze{static fromString(a){let i=this._stringToData(a,!1);return new Ze(i)}static fromData(a){return new Ze(a)}static _stringToData(a,i){let n=Object.create(null),o=a.split(";"),s=o.length;for(let r=0;r7&&(n-=7),L_[n]}constructor(a){this.wrappedJSObject=this,this.parts={},a&&typeof a=="object"&&this.fromData(a)}parts=null;interval=1;wkst=N.MONDAY;until=null;count=null;freq=null;icalclass="icalrecur";icaltype="recur";iterator(a){return new Fa({rule:this,dtstart:a})}clone(){return new Ze(this.toJSON())}isFinite(){return!(!this.count&&!this.until)}isByCount(){return!(!this.count||this.until)}addComponent(a,i){let n=a.toUpperCase();n in this.parts?this.parts[n].push(i):this.parts[n]=[i]}setComponent(a,i){this.parts[a.toUpperCase()]=i.slice()}getComponent(a){let i=a.toUpperCase();return i in this.parts?this.parts[i].slice():[]}getNextOccurrence(a,i){let n,o=this.iterator(a);do n=o.next();while(n&&n.compare(i)<=0);return n&&i.zone&&(n.zone=i.zone),n}fromData(a){for(let i in a){let n=i.toUpperCase();n in Z0?Array.isArray(a[i])?this.parts[n]=a[i]:this.parts[n]=[a[i]]:this[i]=a[i]}this.interval&&typeof this.interval!="number"&&L0.INTERVAL(this.interval,this),this.wkst&&typeof this.wkst!="number"&&(this.wkst=Ze.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof N||(this.until=N.fromString(this.until))}toJSON(){let a=Object.create(null);a.freq=this.freq,this.count&&(a.count=this.count),this.interval>1&&(a.interval=this.interval);for(let[i,n]of Object.entries(this.parts))Array.isArray(n)&&n.length==1?a[i.toLowerCase()]=n[0]:a[i.toLowerCase()]=rt(n);return this.until&&(a.until=this.until.toString()),"wkst"in this&&this.wkst!==N.DEFAULT_WEEK_START&&(a.wkst=Ze.numericDayToIcalDay(this.wkst)),a}toString(){let a="FREQ="+this.freq;this.count&&(a+=";COUNT="+this.count),this.interval>1&&(a+=";INTERVAL="+this.interval);for(let[i,n]of Object.entries(this.parts))a+=";"+i+"="+n;return this.until&&(a+=";UNTIL="+this.until.toICALString()),"wkst"in this&&this.wkst!==N.DEFAULT_WEEK_START&&(a+=";WKST="+Ze.numericDayToIcalDay(this.wkst)),a}}function Sa(e,a,i,n){let o=n;if(n[0]==="+"&&(o=n.slice(1)),o=Le(o),a!==void 0&&n '+a);if(i!==void 0&&n>i)throw new Error(e+': invalid value "'+n+'" must be < '+a);return o}const L0={FREQ:function(e,a,i){if(bo.indexOf(e)===-1)throw new Error('invalid frequency "'+e+'" expected: "'+bo.join(", ")+'"');a.freq=e},COUNT:function(e,a,i){a.count=Le(e)},INTERVAL:function(e,a,i){a.interval=Le(e),a.interval<1&&(a.interval=1)},UNTIL:function(e,a,i){e.length>10?a.until=xe.icalendar.value["date-time"].fromICAL(e):a.until=xe.icalendar.value.date.fromICAL(e),i||(a.until=N.fromString(a.until))},WKST:function(e,a,i){if(!Y_.test(e))throw new Error('invalid WKST value "'+e+'"');a.wkst=Ze.icalDayToNumericDay(e)}},Z0={BYSECOND:Sa.bind(void 0,"BYSECOND",0,60),BYMINUTE:Sa.bind(void 0,"BYMINUTE",0,59),BYHOUR:Sa.bind(void 0,"BYHOUR",0,23),BYDAY:function(e){if(q_.test(e))return e;throw new Error('invalid BYDAY value "'+e+'"')},BYMONTHDAY:Sa.bind(void 0,"BYMONTHDAY",-31,31),BYYEARDAY:Sa.bind(void 0,"BYYEARDAY",-366,366),BYWEEKNO:Sa.bind(void 0,"BYWEEKNO",-53,53),BYMONTH:Sa.bind(void 0,"BYMONTH",1,12),BYSETPOS:Sa.bind(void 0,"BYSETPOS",-366,366)};class xa{static fromString(a,i){let n=a.split("/");if(n.length!==2)throw new Error('Invalid string value: "'+a+'" must contain a "/" char.');let o={start:N.fromDateTimeString(n[0],i)},s=n[1];return Ie.isValueString(s)?o.duration=Ie.fromString(s):o.end=N.fromDateTimeString(s,i),new xa(o)}static fromData(a){return new xa(a)}static fromJSON(a,i,n){function o(s,r){return n?N.fromString(s,r):N.fromDateTimeString(s,r)}return Ie.isValueString(a[1])?xa.fromData({start:o(a[0],i),duration:Ie.fromString(a[1])}):xa.fromData({start:o(a[0],i),end:o(a[1],i)})}constructor(a){if(this.wrappedJSObject=this,a&&"start"in a){if(a.start&&!(a.start instanceof N))throw new TypeError(".start must be an instance of ICAL.Time");this.start=a.start}if(a&&a.end&&a.duration)throw new Error("cannot accept both end and duration");if(a&&"end"in a){if(a.end&&!(a.end instanceof N))throw new TypeError(".end must be an instance of ICAL.Time");this.end=a.end}if(a&&"duration"in a){if(a.duration&&!(a.duration instanceof Ie))throw new TypeError(".duration must be an instance of ICAL.Duration");this.duration=a.duration}}start=null;end=null;duration=null;icalclass="icalperiod";icaltype="period";clone(){return xa.fromData({start:this.start?this.start.clone():null,end:this.end?this.end.clone():null,duration:this.duration?this.duration.clone():null})}getDuration(){return this.duration?this.duration:this.end.subtractDate(this.start)}getEnd(){if(this.end)return this.end;{let a=this.start.clone();return a.addDuration(this.duration),a}}toString(){return this.start+"/"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+"/"+(this.end||this.duration).toICALString()}}const To=/\\\\|\\,|\\[Nn]/g,Do=/\\|,|\n/g;function rn(e,a){return{matches:/.*/,fromICAL:function(i,n){return function(o,s,r){return o.indexOf("\\")===-1?o:(r&&(s=new RegExp(s.source+"|\\\\"+r,s.flags)),o.replace(s,Z_))}(i,e,n)},toICAL:function(i,n){let o=a;return n&&(o=new RegExp(o.source+"|"+n,o.flags)),i.replace(o,function(s){switch(s){case"\\":return"\\\\";case";":return"\\;";case",":return"\\,";case` +`:return"\\n";default:return s}})}}}const de={defaultType:"text"},Qt={defaultType:"text",multiValue:","},xi={defaultType:"text",structuredValue:";"},ri={defaultType:"integer"},li={defaultType:"date-time",allowedTypes:["date-time","date"]},_i={defaultType:"date-time"},We={defaultType:"uri"},yo={defaultType:"utc-offset"},Eo={defaultType:"recur"},ko={defaultType:"date-and-or-time",allowedTypes:["date-time","date","text"]};function Z_(e){switch(e){case"\\\\":return"\\";case"\\;":return";";case"\\,":return",";case"\\n":case"\\N":return` +`;default:return e}}let Ln={categories:Qt,url:We,version:de,uid:de},Zn={boolean:{values:["TRUE","FALSE"],fromICAL:function(e){return e==="TRUE"},toICAL:function(e){return e?"TRUE":"FALSE"}},float:{matches:/^[+-]?\d+\.\d+$/,fromICAL:function(e){let a=parseFloat(e);return $t(a)?0:a},toICAL:function(e){return String(e)}},integer:{fromICAL:function(e){let a=parseInt(e);return $t(a)?0:a},toICAL:function(e){return String(e)}},"utc-offset":{toICAL:function(e){return e.length<7?e.slice(0,3)+e.slice(4,6):e.slice(0,3)+e.slice(4,6)+e.slice(7,9)},fromICAL:function(e){return e.length<6?e.slice(0,3)+":"+e.slice(3,5):e.slice(0,3)+":"+e.slice(3,5)+":"+e.slice(5,7)},decorate:function(e){return ra.fromString(e)},undecorate:function(e){return e.toString()}}};const Ne=dt(Zn,{text:rn(/\\\\|\\;|\\,|\\[Nn]/g,/\\|;|,|\n/g),uri:{},binary:{decorate:function(e){return sr.fromString(e)},undecorate:function(e){return e.toString()}},"cal-address":{},date:{decorate:function(e,a){return Da.strict?N.fromDateString(e,a):N.fromString(e,a)},undecorate:function(e){return e.toString()},fromICAL:function(e){return!Da.strict&&e.length>=15?Ne["date-time"].fromICAL(e):e.slice(0,4)+"-"+e.slice(4,6)+"-"+e.slice(6,8)},toICAL:function(e){let a=e.length;return a==10?e.slice(0,4)+e.slice(5,7)+e.slice(8,10):a>=19?Ne["date-time"].toICAL(e):e}},"date-time":{fromICAL:function(e){{let a=e.slice(0,4)+"-"+e.slice(4,6)+"-"+e.slice(6,8)+"T"+e.slice(9,11)+":"+e.slice(11,13)+":"+e.slice(13,15);return e[15]&&e[15]==="Z"&&(a+="Z"),a}},toICAL:function(e){let a=e.length;if(a!=10||Da.strict){if(a>=19){let i=e.slice(0,4)+e.slice(5,7)+e.slice(8,13)+e.slice(14,16)+e.slice(17,19);return e[19]&&e[19]==="Z"&&(i+="Z"),i}return e}return Ne.date.toICAL(e)},decorate:function(e,a){return Da.strict?N.fromDateTimeString(e,a):N.fromString(e,a)},undecorate:function(e){return e.toString()}},duration:{decorate:function(e){return Ie.fromString(e)},undecorate:function(e){return e.toString()}},period:{fromICAL:function(e){let a=e.split("/");return a[0]=Ne["date-time"].fromICAL(a[0]),Ie.isValueString(a[1])||(a[1]=Ne["date-time"].fromICAL(a[1])),a},toICAL:function(e){return e=e.slice(),e[0]=Ne["date-time"].toICAL(e[0]),Ie.isValueString(e[1])||(e[1]=Ne["date-time"].toICAL(e[1])),e.join("/")},decorate:function(e,a){return xa.fromJSON(e,a,!Da.strict)},undecorate:function(e){return e.toJSON()}},recur:{fromICAL:function(e){return Ze._stringToData(e,!0)},toICAL:function(e){let a="";for(let[i,n]of Object.entries(e))i=="until"?n=n.length>10?Ne["date-time"].toICAL(n):Ne.date.toICAL(n):i=="wkst"?typeof n=="number"&&(n=Ze.numericDayToIcalDay(n)):Array.isArray(n)&&(n=n.join(",")),a+=i.toUpperCase()+"="+n+";";return a.slice(0,Math.max(0,a.length-1))},decorate:function(e){return Ze.fromData(e)},undecorate:function(e){return e.toJSON()}},time:{fromICAL:function(e){if(e.length<6)return e;let a=e.slice(0,2)+":"+e.slice(2,4)+":"+e.slice(4,6);return e[6]==="Z"&&(a+="Z"),a},toICAL:function(e){if(e.length<8)return e;let a=e.slice(0,2)+e.slice(3,5)+e.slice(6,8);return e[8]==="Z"&&(a+="Z"),a}}});let I_=dt(Ln,{action:de,attach:{defaultType:"uri"},attendee:{defaultType:"cal-address"},calscale:de,class:de,comment:de,completed:_i,contact:de,created:_i,description:de,dtend:li,dtstamp:_i,dtstart:li,due:li,duration:{defaultType:"duration"},exdate:{defaultType:"date-time",allowedTypes:["date-time","date"],multiValue:","},exrule:Eo,freebusy:{defaultType:"period",multiValue:","},geo:{defaultType:"float",structuredValue:";"},"last-modified":_i,location:de,method:de,organizer:{defaultType:"cal-address"},"percent-complete":ri,priority:ri,prodid:de,"related-to":de,repeat:ri,rdate:{defaultType:"date-time",allowedTypes:["date-time","date","period"],multiValue:",",detectType:function(e){return e.indexOf("/")!==-1?"period":e.indexOf("T")===-1?"date":"date-time"}},"recurrence-id":li,resources:Qt,"request-status":xi,rrule:Eo,sequence:ri,status:de,summary:de,transp:de,trigger:{defaultType:"duration",allowedTypes:["duration","date-time"]},tzoffsetfrom:yo,tzoffsetto:yo,tzurl:We,tzid:de,tzname:de});const ta=dt(Zn,{text:rn(To,Do),uri:rn(To,Do),date:{decorate:function(e){return Ya.fromDateAndOrTimeString(e,"date")},undecorate:function(e){return e.toString()},fromICAL:function(e){return e.length==8?Ne.date.fromICAL(e):e[0]=="-"&&e.length==6?e.slice(0,4)+"-"+e.slice(4):e},toICAL:function(e){return e.length==10?Ne.date.toICAL(e):e[0]=="-"&&e.length==7?e.slice(0,4)+e.slice(5):e}},time:{decorate:function(e){return Ya.fromDateAndOrTimeString("T"+e,"time")},undecorate:function(e){return e.toString()},fromICAL:function(e){let a=ta.time._splitZone(e,!0),i=a[0],n=a[1];return n.length==6?n=n.slice(0,2)+":"+n.slice(2,4)+":"+n.slice(4,6):n.length==4&&n[0]!="-"?n=n.slice(0,2)+":"+n.slice(2,4):n.length==5&&(n=n.slice(0,3)+":"+n.slice(3,5)),i.length!=5||i[0]!="-"&&i[0]!="+"||(i=i.slice(0,3)+":"+i.slice(3)),n+i},toICAL:function(e){let a=ta.time._splitZone(e),i=a[0],n=a[1];return n.length==8?n=n.slice(0,2)+n.slice(3,5)+n.slice(6,8):n.length==5&&n[0]!="-"?n=n.slice(0,2)+n.slice(3,5):n.length==6&&(n=n.slice(0,3)+n.slice(4,6)),i.length!=6||i[0]!="-"&&i[0]!="+"||(i=i.slice(0,3)+i.slice(4)),n+i},_splitZone:function(e,a){let i,n,o=e.length-1,s=e.length-(a?5:6),r=e[s];return e[o]=="Z"?(i=e[o],n=e.slice(0,Math.max(0,o))):e.length>6&&(r=="-"||r=="+")?(i=e.slice(s),n=e.slice(0,Math.max(0,s))):(i="",n=e),[i,n]}},"date-time":{decorate:function(e){return Ya.fromDateAndOrTimeString(e,"date-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){return ta["date-and-or-time"].fromICAL(e)},toICAL:function(e){return ta["date-and-or-time"].toICAL(e)}},"date-and-or-time":{decorate:function(e){return Ya.fromDateAndOrTimeString(e,"date-and-or-time")},undecorate:function(e){return e.toString()},fromICAL:function(e){let a=e.split("T");return(a[0]?ta.date.fromICAL(a[0]):"")+(a[1]?"T"+ta.time.fromICAL(a[1]):"")},toICAL:function(e){let a=e.split("T");return ta.date.toICAL(a[0])+(a[1]?"T"+ta.time.toICAL(a[1]):"")}},timestamp:Ne["date-time"],"language-tag":{matches:/^[a-zA-Z0-9-]+$/},"phone-number":{fromICAL:function(e){return Array.from(e).filter(function(a){return a==="\\"?void 0:a}).join("")},toICAL:function(e){return Array.from(e).map(function(a){return a===","||a===";"?"\\"+a:a}).join("")}}});let H_=dt(Ln,{adr:{defaultType:"text",structuredValue:";",multiValue:","},anniversary:ko,bday:ko,caladruri:We,caluri:We,clientpidmap:xi,email:de,fburl:We,fn:de,gender:xi,geo:We,impp:We,key:We,kind:de,lang:{defaultType:"language-tag"},logo:We,member:We,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Qt,note:de,org:{defaultType:"text",structuredValue:";"},photo:We,related:We,rev:{defaultType:"timestamp"},role:de,sound:We,source:We,tel:{defaultType:"uri",allowedTypes:["uri","text"]},title:de,tz:{defaultType:"text",allowedTypes:["text","utc-offset","uri"]},xml:de}),P_=dt(Zn,{binary:Ne.binary,date:ta.date,"date-time":ta["date-time"],"phone-number":ta["phone-number"],uri:Ne.uri,text:Ne.text,time:Ne.time,vcard:Ne.text,"utc-offset":{toICAL:function(e){return e.slice(0,7)},fromICAL:function(e){return e.slice(0,7)},decorate:function(e){return ra.fromString(e)},undecorate:function(e){return e.toString()}}}),G_=dt(Ln,{fn:de,n:{defaultType:"text",structuredValue:";",multiValue:","},nickname:Qt,photo:{defaultType:"binary",allowedTypes:["binary","uri"]},bday:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return e.indexOf("T")===-1?"date":"date-time"}},adr:{defaultType:"text",structuredValue:";",multiValue:","},label:de,tel:{defaultType:"phone-number"},email:de,mailer:de,tz:{defaultType:"utc-offset",allowedTypes:["utc-offset","text"]},geo:{defaultType:"float",structuredValue:";"},title:de,role:de,logo:{defaultType:"binary",allowedTypes:["binary","uri"]},agent:{defaultType:"vcard",allowedTypes:["vcard","text","uri"]},org:xi,note:Qt,prodid:de,rev:{defaultType:"date-time",allowedTypes:["date-time","date"],detectType:function(e){return e.indexOf("T")===-1?"date":"date-time"}},"sort-string":de,sound:{defaultType:"binary",allowedTypes:["binary","uri"]},class:de,key:{defaultType:"binary",allowedTypes:["binary","text"]}}),pa={value:Ne,param:{cutype:{values:["INDIVIDUAL","GROUP","RESOURCE","ROOM","UNKNOWN"],allowXName:!0,allowIanaToken:!0},"delegated-from":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},"delegated-to":{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},encoding:{values:["8BIT","BASE64"]},fbtype:{values:["FREE","BUSY","BUSY-UNAVAILABLE","BUSY-TENTATIVE"],allowXName:!0,allowIanaToken:!0},member:{valueType:"cal-address",multiValue:",",multiValueSeparateDQuote:!0},partstat:{values:["NEEDS-ACTION","ACCEPTED","DECLINED","TENTATIVE","DELEGATED","COMPLETED","IN-PROCESS"],allowXName:!0,allowIanaToken:!0},range:{values:["THISANDFUTURE"]},related:{values:["START","END"]},reltype:{values:["PARENT","CHILD","SIBLING"],allowXName:!0,allowIanaToken:!0},role:{values:["REQ-PARTICIPANT","CHAIR","OPT-PARTICIPANT","NON-PARTICIPANT"],allowXName:!0,allowIanaToken:!0},rsvp:{values:["TRUE","FALSE"]},"sent-by":{valueType:"cal-address"},tzid:{matches:/^\//},value:{values:["binary","boolean","cal-address","date","date-time","duration","float","integer","period","recur","text","time","uri","utc-offset"],allowXName:!0,allowIanaToken:!0}},property:I_,propertyGroups:!1},Ao={value:ta,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","time","date-time","date-and-or-time","timestamp","boolean","integer","float","utc-offset","language-tag"],allowXName:!0,allowIanaToken:!0}},property:H_,propertyGroups:!0},wo={value:P_,param:{type:{valueType:"text",multiValue:","},value:{values:["text","uri","date","date-time","phone-number","time","boolean","integer","float","utc-offset","vcard","binary"],allowXName:!0,allowIanaToken:!0}},property:G_,propertyGroups:!0};const Da={strict:!0,defaultSet:pa,defaultType:"unknown",components:{vcard:Ao,vcard3:wo,vevent:pa,vtodo:pa,vjournal:pa,valarm:pa,vtimezone:pa,daylight:pa,standard:pa},icalendar:pa,vcard:Ao,vcard3:wo,getDesignSet:function(e){return e&&e in Da.components?Da.components[e]:Da.defaultSet}};var xe=Da;const yi=`\r +`,vo="unknown",U_={'"':"^'","\n":"^n","^":"^^"};function Ee(e){typeof e[0]=="string"&&(e=[e]);let a=0,i=e.length,n="";for(;a0&&(e[1][0][0]!=="version"||e[1][0][3]!=="4.0")&&(_="vcard3"),a=a||xe.getDesignSet(_);s0&&typeof a[0]=="object"&&"icaltype"in a[0]&&this.resetType(a[0].icaltype),this.isDecorated)for(;n=0;r--)n&&s[r][0]!==n||this._removeObjectByIndex(a,o,r)}addSubcomponent(a){this._components||(this._components=[],this._hydratedComponentCount=0),a.parent&&a.parent.removeSubcomponent(a);let i=this.jCal[2].push(a.jCal);return this._components[i-1]=a,this._hydratedComponentCount++,a.parent=this,a}removeSubcomponent(a){let i=this._removeObject(2,"_components",a);return i&&this._hydratedComponentCount--,i}removeAllSubcomponents(a){let i=this._removeAllObjects(2,"_components",a);return this._hydratedComponentCount=0,i}addProperty(a){if(!(a instanceof it))throw new TypeError("must be instance of ICAL.Property");this._properties||(this._properties=[],this._hydratedPropertyCount=0),a.parent&&a.parent.removeProperty(a);let i=this.jCal[1].push(a.jCal);return this._properties[i-1]=a,this._hydratedPropertyCount++,a.parent=this,a}addPropertyWithValue(a,i){let n=new it(a);return n.setValue(i),this.addProperty(n),n}updatePropertyWithValue(a,i){let n=this.getFirstProperty(a);return n?n.setValue(i):n=this.addPropertyWithValue(a,i),n}removeProperty(a){let i=this._removeObject(1,"_properties",a);return i&&this._hydratedPropertyCount--,i}removeAllProperties(a){let i=this._removeAllObjects(1,"_properties",a);return this._hydratedPropertyCount=0,i}toJSON(){return this.jCal}toString(){return Ee.component(this.jCal,this._designSet)}getTimeZoneByID(a){if(this.parent)return this.parent.getTimeZoneByID(a);if(!this._timezoneCache)return null;if(this._timezoneCache.has(a))return this._timezoneCache.get(a);const i=this.getAllSubcomponents("vtimezone");for(const n of i)if(n.getFirstProperty("tzid").getFirstValue()===a){const o=new X({component:n,tzid:a});return this._timezoneCache.set(a,o),o}return null}}class dr{constructor(a){this.ruleDates=[],this.exDates=[],this.fromData(a)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(a){let i=Ta(a.dtstart,N);if(!i)throw new Error(".dtstart (ICAL.Time) must be given");if(this.dtstart=i,a.component)this._init(a.component);else{if(this.last=Ta(a.last,N)||i.clone(),!a.ruleIterators)throw new Error(".ruleIterators or .component must be given");this.ruleIterators=a.ruleIterators.map(function(n){return Ta(n,Fa)}),this.ruleDateInc=a.ruleDateInc,this.exDateInc=a.exDateInc,a.ruleDates&&(this.ruleDates=a.ruleDates.map(n=>Ta(n,N)),this.ruleDate=this.ruleDates[this.ruleDateInc]),a.exDates&&(this.exDates=a.exDates.map(n=>Ta(n,N)),this.exDate=this.exDates[this.exDateInc]),a.complete!==void 0&&(this.complete=a.complete)}}next(){let a,i,n,o=0;for(;;){if(o++>500)throw new Error("max tries have occurred, rule may be impossible to fulfill.");if(i=this.ruleDate,a=this._nextRecurrenceIter(this.last),!i&&!a){this.complete=!0;break}if((!i||a&&i.compare(a.last)>0)&&(i=a.last.clone(),a.next()),this.ruleDate===i&&this._nextRuleDay(),this.last=i,!this.exDate||(n=this.exDate.compare(this.last),n<0&&this._nextExDay(),n!==0))return this.last;this._nextExDay()}}toJSON(){function a(n){return n.toJSON()}let i=Object.create(null);return i.ruleIterators=this.ruleIterators.map(a),this.ruleDates&&(i.ruleDates=this.ruleDates.map(a)),this.exDates&&(i.exDates=this.exDates.map(a)),i.ruleDateInc=this.ruleDateInc,i.exDateInc=this.exDateInc,i.last=this.last.toJSON(),i.dtstart=this.dtstart.toJSON(),i.complete=this.complete,i}_extractDates(a,i){let n=[],o=a.getAllProperties(i);for(let s=0,r=o.length;sg.compare(d));n.splice(l,0,_)}return n}_init(a){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!a.hasProperty("rdate")&&!a.hasProperty("rrule")&&!a.hasProperty("recurrence-id"))return this.ruleDate=this.last.clone(),void(this.complete=!0);if(a.hasProperty("rdate")&&(this.ruleDates=this._extractDates(a,"rdate"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=tt(this.ruleDates,this.last,(i,n)=>i.compare(n)),this.ruleDate=this.ruleDates[this.ruleDateInc]),a.hasProperty("rrule")){let i,n,o=a.getAllProperties("rrule"),s=0,r=o.length;for(;si.compare(n)),this.exDate=this.exDates[this.exDateInc])}_nextExDay(){this.exDate=this.exDates[++this.exDateInc]}_nextRuleDay(){this.ruleDate=this.ruleDates[++this.ruleDateInc]}_nextRecurrenceIter(){let a=this.ruleIterators;if(a.length===0)return null;let i,n,o,s=a.length,r=0;for(;r0)&&(o=i);return o}}class Kt{constructor(a,i){a instanceof $e||(i=a,a=null),this.component=a||new $e("vevent"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],i&&i.strictExceptions&&(this.strictExceptions=i.strictExceptions),i&&i.exceptions?i.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents("vevent").forEach(function(n){n.hasProperty("recurrence-id")&&this.relateException(n)},this)}static THISANDFUTURE="THISANDFUTURE";exceptions=null;strictExceptions=!1;relateException(a){if(this.isRecurrenceException())throw new Error("cannot relate exception to exceptions");if(a instanceof $e&&(a=new Kt(a)),this.strictExceptions&&a.uid!==this.uid)throw new Error("attempted to relate unrelated exception");let i=a.recurrenceId.toString();if(this.exceptions[i]=a,a.modifiesFuture()){let n=[a.recurrenceId.toUnixTime(),i],o=tt(this.rangeExceptions,n,So);this.rangeExceptions.splice(o,0,n)}}modifiesFuture(){return this.component.hasProperty("recurrence-id")?this.component.getFirstProperty("recurrence-id").getParameter("range")===Kt.THISANDFUTURE:!1}findRangeException(a){if(!this.rangeExceptions.length)return null;let i=a.toUnixTime(),n=tt(this.rangeExceptions,[i],So);if(n-=1,n<0)return null;let o=this.rangeExceptions[n];return ia[0]?1:a[0]>e[0]?-1:0}var Re={foldLength:75,debug:!1,newLineChar:`\r +`,Binary:sr,Component:$e,ComponentParser:class{constructor(e){e===void 0&&(e={});for(let[a,i]of Object.entries(e))this[a]=i}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(e){};ontimezone=function(e){};onevent=function(e){};process(e){typeof e=="string"&&(e=he(e)),e instanceof $e||(e=new $e(e));let a,i=e.getAllSubcomponents(),n=0,o=i.length;for(;n=20)return console.error("TimezoneManager.getTimezoneForIdRec() exceeds recursion limits"),null;if(this._aliases.has(a)){const n=this._aliases.get(a);return this._getTimezoneForIdRec(n,i+1)}return null}hasTimezoneForId(a){return this._timezones.has(a)||this._aliases.has(a)}isAlias(a){return!this._timezones.has(a)&&this._aliases.has(a)}listAllTimezones(a=!1){const i=Array.from(this._timezones.keys());return a?i.concat(Array.from(this._aliases.keys())):i}registerTimezone(a){this._timezones.set(a.timezoneId,a),Re.TimezoneService.register(a.timezoneId,a.toICALTimezone()),this._pendingAliases=this._pendingAliases.filter(([i,n])=>n!==a.timezoneId?!0:(Re.TimezoneService.register(i,a.toICALTimezone()),!1))}registerDefaultTimezones(){console.debug(`@nextcloud/calendar-js app is using version ${$a.version} of the timezone database`);for(const a in $a.zones)if(Object.prototype.hasOwnProperty.call($a.zones,[a])){const i=["BEGIN:VTIMEZONE","TZID:"+a,...$a.zones[a].ics,"END:VTIMEZONE"].join(`\r +`);this.registerTimezoneFromICS(a,i)}for(const a in $a.aliases)Object.prototype.hasOwnProperty.call($a.aliases,[a])&&this.registerAlias(a,$a.aliases[a].aliasTo)}registerTimezoneFromICS(a,i){const n=new ya(a,i);this.registerTimezone(n)}registerAlias(a,i){this._aliases.set(a,i);const n=this.getTimezoneForId(i);if(!n){this._pendingAliases.push([a,i]);return}Re.TimezoneService.register(a,n.toICALTimezone())}unregisterTimezones(a){this._timezones.delete(a),Re.TimezoneService.remove(a)}unregisterAlias(a){this._aliases.delete(a),this._pendingAliases=this._pendingAliases.filter(([i])=>i!==a),Re.TimezoneService.remove(a)}clearAllTimezones(){this._aliases=new Map,this._pendingAliases=[],this._timezones=new Map,Re.TimezoneService.reset(),bt.registerTimezone(ya.utc),bt.registerTimezone(ya.floating),bt.registerAlias("GMT",ya.utc.timezoneId),bt.registerAlias("Z",ya.utc.timezoneId)}}const bt=new $_;bt.clearAllTimezones();function Q_(){return bt}var fr={exports:{}};(function(e,a){(function(i,n){e.exports=n()})(typeof self<"u"?self:Na,function(){return(()=>{var i={646:r=>{r.exports=function(_){if(Array.isArray(_)){for(var l=0,g=new Array(_.length);l<_.length;l++)g[l]=_[l];return g}}},713:r=>{r.exports=function(_,l,g){return l in _?Object.defineProperty(_,l,{value:g,enumerable:!0,configurable:!0,writable:!0}):_[l]=g,_}},860:r=>{r.exports=function(_){if(Symbol.iterator in Object(_)||Object.prototype.toString.call(_)==="[object Arguments]")return Array.from(_)}},206:r=>{r.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}},319:(r,_,l)=>{var g=l(646),d=l(860),f=l(206);r.exports=function(h){return g(h)||d(h)||f()}},8:r=>{function _(l){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?r.exports=_=function(g){return typeof g}:r.exports=_=function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},_(l)}r.exports=_}},n={};function o(r){var _=n[r];if(_!==void 0)return _.exports;var l=n[r]={exports:{}};return i[r](l,l.exports,o),l.exports}o.n=r=>{var _=r&&r.__esModule?()=>r.default:()=>r;return o.d(_,{a:_}),_},o.d=(r,_)=>{for(var l in _)o.o(_,l)&&!o.o(r,l)&&Object.defineProperty(r,l,{enumerable:!0,get:_[l]})},o.o=(r,_)=>Object.prototype.hasOwnProperty.call(r,_),o.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var s={};return(()=>{o.r(s),o.d(s,{VueSelect:()=>G,default:()=>I,mixins:()=>W});var r=o(319),_=o.n(r),l=o(8),g=o.n(l),d=o(713),f=o.n(d);const h={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(c){var v=this;this.autoscroll&&c&&this.$nextTick(function(){return v.maybeAdjustScroll()})}},methods:{maybeAdjustScroll:function(){var c,v=((c=this.$refs.dropdownMenu)===null||c===void 0?void 0:c.children[this.typeAheadPointer])||!1;if(v){var R=this.getDropdownViewport(),O=v.getBoundingClientRect(),z=O.top,q=O.bottom,ie=O.height;if(zR.bottom)return this.$refs.dropdownMenu.scrollTop=v.offsetTop-(R.height-ie)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},u={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange){for(var c=0;c=0;c--)if(this.selectable(this.filteredOptions[c])){this.typeAheadPointer=c;break}},typeAheadDown:function(){for(var c=this.typeAheadPointer+1;c0&&arguments[0]!==void 0?arguments[0]:null;return this.mutableLoading=c??!this.mutableLoading}}};function b(c,v,R,O,z,q,ie,ee){var fe,ne=typeof c=="function"?c.options:c;return v&&(ne.render=v,ne.staticRenderFns=R,ne._compiled=!0),{exports:c,options:ne}}const y={Deselect:b({},function(){var c=this.$createElement,v=this._self._c||c;return v("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"}},[v("path",{attrs:{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"}})])},[]).exports,OpenIndicator:b({},function(){var c=this.$createElement,v=this._self._c||c;return v("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"}},[v("path",{attrs:{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"}})])},[]).exports},k={inserted:function(c,v,R){var O=R.context;if(O.appendToBody){document.body.appendChild(c);var z=O.$refs.toggle.getBoundingClientRect(),q=z.height,ie=z.top,ee=z.left,fe=z.width,ne=window.scrollX||window.pageXOffset,ce=window.scrollY||window.pageYOffset;c.unbindPosition=O.calculatePosition(c,O,{width:fe+"px",left:ne+ee+"px",top:ce+ie+q+"px"})}},unbind:function(c,v,R){R.context.appendToBody&&(c.unbindPosition&&typeof c.unbindPosition=="function"&&c.unbindPosition(),c.parentNode&&c.parentNode.removeChild(c))}},w=function(c){var v={};return Object.keys(c).sort().forEach(function(R){v[R]=c[R]}),JSON.stringify(v)};var S=0;const j=function(){return++S};function Z(c,v){var R=Object.keys(c);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(c);v&&(O=O.filter(function(z){return Object.getOwnPropertyDescriptor(c,z).enumerable})),R.push.apply(R,O)}return R}function B(c){for(var v=1;v-1}},filter:{type:Function,default:function(c,v){var R=this;return c.filter(function(O){var z=R.getOptionLabel(O);return typeof z=="number"&&(z=z.toString()),R.filterBy(O,z,v)})}},createOption:{type:Function,default:function(c){return g()(this.optionList[0])==="object"?f()({},this.label,c):c}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(c){return["function","boolean"].includes(g()(c))}},clearSearchOnBlur:{type:Function,default:function(c){var v=c.clearSearchOnSelect,R=c.multiple;return v&&!R}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:function(c,v){return c}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(c,v,R){var O=R.width,z=R.top,q=R.left;c.style.top=z,c.style.left=q,c.style.width=O}},dropdownShouldOpen:{type:Function,default:function(c){var v=c.noDrop,R=c.open,O=c.mutableLoading;return!v&&R&&!O}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return j()}}},data:function(){return{search:"",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return this.value===void 0||this.$options.propsData.hasOwnProperty("reduce")},selectedValue:function(){var c=this.value;return this.isTrackingValues&&(c=this.$data._value),c!=null&&c!==""?[].concat(c):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var c=this,v={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:B({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:"combobox","aria-autocomplete":"list","aria-label":this.ariaLabelCombobox,"aria-controls":"vs-".concat(this.uid,"__listbox"),"aria-owns":"vs-".concat(this.uid,"__listbox"),"aria-expanded":this.dropdownOpen.toString(),ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":"vs-".concat(this.uid,"__option-").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return c.isComposing=!0},compositionend:function(){return c.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(R){return c.search=R.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:v,listFooter:v,header:B({},v,{deselect:this.deselect}),footer:B({},v,{deselect:this.deselect})}},childComponents:function(){return B({},y,{},this.components)},stateClasses:function(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var c=this,v=function(q){return c.limit!==null?q.slice(0,c.limit):q},R=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return v(R);var O=this.search.length?this.filter(R,this.search,this):R;if(this.taggable&&this.search.length){var z=this.createOption(this.search);this.optionExists(z)||O.unshift(z)}return v(O)},isValueEmpty:function(){return this.selectedValue.length===0},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(c,v){var R=this;!this.taggable&&(typeof R.resetOnOptionsChange=="function"?R.resetOnOptionsChange(c,v,R.selectedValue):R.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(c){this.isTrackingValues&&this.setInternalValueFromOptions(c)}},multiple:function(){this.clearSelection()},open:function(c){this.$emit(c?"open":"close")},search:function(c){c.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on("option:created",this.pushTag)},methods:{setInternalValueFromOptions:function(c){var v=this;Array.isArray(c)?this.$data._value=c.map(function(R){return v.findOptionFromReducedValue(R)}):this.$data._value=this.findOptionFromReducedValue(c)},select:function(c){this.$emit("option:selecting",c),this.isOptionSelected(c)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(c):(this.taggable&&!this.optionExists(c)&&this.$emit("option:created",c),this.multiple&&(c=this.selectedValue.concat(c)),this.updateValue(c),this.$emit("option:selected",c)),this.onAfterSelect(c)},deselect:function(c){var v=this;this.$emit("option:deselecting",c),this.updateValue(this.selectedValue.filter(function(R){return!v.optionComparator(R,c)})),this.$emit("option:deselected",c)},keyboardDeselect:function(c,v){var R,O;this.deselect(c);var z=(R=this.$refs.deselectButtons)===null||R===void 0?void 0:R[v+1],q=(O=this.$refs.deselectButtons)===null||O===void 0?void 0:O[v-1],ie=z??q;ie?ie.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(c){var v=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=""),this.noDrop&&this.multiple&&this.$nextTick(function(){return v.$refs.search.focus()})},updateValue:function(c){var v=this;this.value===void 0&&(this.$data._value=c),c!==null&&(c=Array.isArray(c)?c.map(function(R){return v.reduce(R)}):this.reduce(c)),this.$emit("input",c)},toggleDropdown:function(c){var v=c.target!==this.searchEl;v&&c.preventDefault();var R=[].concat(_()(this.$refs.deselectButtons||[]),_()([this.$refs.clearButton]));this.searchEl===void 0||R.filter(Boolean).some(function(O){return O.contains(c.target)||O===c.target})?c.preventDefault():this.open&&v?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(c){var v=this;return this.selectedValue.some(function(R){return v.optionComparator(R,c)})},isOptionDeselectable:function(c){return this.isOptionSelected(c)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(c){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&c===this.typeAheadPointer},optionComparator:function(c,v){return this.getOptionKey(c)===this.getOptionKey(v)},findOptionFromReducedValue:function(c){var v=this,R=[].concat(_()(this.options),_()(this.pushedTags)).filter(function(O){return JSON.stringify(v.reduce(O))===JSON.stringify(c)});return R.length===1?R[0]:R.find(function(O){return v.optionComparator(O,v.$data._value)})||c},closeSearchOptions:function(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var c=null;this.multiple&&(c=_()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(c)}},optionExists:function(c){var v=this;return this.optionList.some(function(R){return v.optionComparator(R,c)})},optionAriaSelected:function(c){return this.selectable(c)?String(this.isOptionSelected(c)):null},normalizeOptionForSlot:function(c){return g()(c)==="object"?c:f()({},this.label,c)},pushTag:function(c){this.pushedTags.push(c)},onEscape:function(){this.search.length?this.search="":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var c=this.clearSearchOnSelect,v=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:c,multiple:v})&&(this.search=""),void this.closeSearchOptions()}this.mousedown=!1,this.search.length!==0||this.options.length!==0||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit("search:focus")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(c,v){this.isKeyboardNavigation=!1,this.selectable(c)&&(this.typeAheadPointer=v)},onSearchKeyDown:function(c){var v=this,R=function(q){if(q.preventDefault(),v.open)return!v.isComposing&&v.typeAheadSelect();v.open=!0},O={8:function(q){return v.maybeDeleteValue()},9:function(q){return v.onTab()},27:function(q){return v.onEscape()},38:function(q){if(q.preventDefault(),v.isKeyboardNavigation=!0,v.open)return v.typeAheadUp();v.open=!0},40:function(q){if(q.preventDefault(),v.isKeyboardNavigation=!0,v.open)return v.typeAheadDown();v.open=!0}};this.selectOnKeyCodes.forEach(function(q){return O[q]=R});var z=this.mapKeydown(O,this);if(typeof z[c.keyCode]=="function")return z[c.keyCode](c)},onSearchKeyPress:function(c){this.open||c.keyCode!==32||(c.preventDefault(),this.open=!0)}}},function(){var c=this,v=c.$createElement,R=c._self._c||v;return R("div",{staticClass:"v-select",class:c.stateClasses,attrs:{id:"v-select-"+c.uid,dir:c.dir}},[c._t("header",null,null,c.scope.header),c._v(" "),R("div",{ref:"toggle",staticClass:"vs__dropdown-toggle"},[R("div",{ref:"selectedOptions",staticClass:"vs__selected-options",on:{mousedown:c.toggleDropdown}},[c._l(c.selectedValue,function(O,z){return c._t("selected-option-container",[R("span",{key:c.getOptionKey(O),staticClass:"vs__selected"},[c._t("selected-option",[c._v(` + `+c._s(c.getOptionLabel(O))+` + `)],null,c.normalizeOptionForSlot(O)),c._v(" "),c.multiple?R("button",{ref:"deselectButtons",refInFor:!0,staticClass:"vs__deselect",attrs:{disabled:c.disabled,type:"button",title:c.ariaLabelDeselectOption(c.getOptionLabel(O)),"aria-label":c.ariaLabelDeselectOption(c.getOptionLabel(O))},on:{mousedown:function(q){return q.stopPropagation(),c.deselect(O)},keydown:function(q){return!q.type.indexOf("key")&&c._k(q.keyCode,"enter",13,q.key,"Enter")?null:c.keyboardDeselect(O,z)}}},[R(c.childComponents.Deselect,{tag:"component"})],1):c._e()],2)],{option:c.normalizeOptionForSlot(O),deselect:c.deselect,multiple:c.multiple,disabled:c.disabled})}),c._v(" "),c._t("search",[R("input",c._g(c._b({staticClass:"vs__search"},"input",c.scope.search.attributes,!1),c.scope.search.events))],null,c.scope.search)],2),c._v(" "),R("div",{ref:"actions",staticClass:"vs__actions"},[R("button",{directives:[{name:"show",rawName:"v-show",value:c.showClearButton,expression:"showClearButton"}],ref:"clearButton",staticClass:"vs__clear",attrs:{disabled:c.disabled,type:"button",title:c.ariaLabelClearSelected,"aria-label":c.ariaLabelClearSelected},on:{click:c.clearSelection}},[R(c.childComponents.Deselect,{tag:"component"})],1),c._v(" "),c.noDrop?c._e():R("button",{ref:"openIndicatorButton",staticClass:"vs__open-indicator-button",attrs:{type:"button",tabindex:"-1","aria-labelledby":"vs-"+c.uid+"__listbox","aria-controls":"vs-"+c.uid+"__listbox","aria-expanded":c.dropdownOpen.toString()},on:{mousedown:c.toggleDropdown}},[c._t("open-indicator",[R(c.childComponents.OpenIndicator,c._b({tag:"component"},"component",c.scope.openIndicator.attributes,!1))],null,c.scope.openIndicator)],2),c._v(" "),c._t("spinner",[R("div",{directives:[{name:"show",rawName:"v-show",value:c.mutableLoading,expression:"mutableLoading"}],staticClass:"vs__spinner"},[c._v("Loading...")])],null,c.scope.spinner)],2)]),c._v(" "),R("transition",{attrs:{name:c.transition}},[c.dropdownOpen?R("ul",{directives:[{name:"append-to-body",rawName:"v-append-to-body"}],key:"vs-"+c.uid+"__listbox",ref:"dropdownMenu",staticClass:"vs__dropdown-menu",attrs:{id:"vs-"+c.uid+"__listbox",role:"listbox","aria-label":c.ariaLabelListbox,"aria-multiselectable":c.multiple,tabindex:"-1"},on:{mousedown:function(O){return O.preventDefault(),c.onMousedown(O)},mouseup:c.onMouseUp}},[c._t("list-header",null,null,c.scope.listHeader),c._v(" "),c._l(c.filteredOptions,function(O,z){return R("li",{key:c.getOptionKey(O),staticClass:"vs__dropdown-option",class:{"vs__dropdown-option--deselect":c.isOptionDeselectable(O)&&z===c.typeAheadPointer,"vs__dropdown-option--selected":c.isOptionSelected(O),"vs__dropdown-option--highlight":z===c.typeAheadPointer,"vs__dropdown-option--kb-focus":c.hasKeyboardFocusBorder(z),"vs__dropdown-option--disabled":!c.selectable(O)},attrs:{id:"vs-"+c.uid+"__option-"+z,role:"option","aria-selected":c.optionAriaSelected(O)},on:{mousemove:function(q){return c.onMouseMove(O,z)},click:function(q){q.preventDefault(),q.stopPropagation(),c.selectable(O)&&c.select(O)}}},[c._t("option",[c._v(` + `+c._s(c.getOptionLabel(O))+` + `)],null,c.normalizeOptionForSlot(O))],2)}),c._v(" "),c.filteredOptions.length===0?R("li",{staticClass:"vs__no-options"},[c._t("no-options",[c._v(` + Sorry, no matching options. + `)],null,c.scope.noOptions)],2):c._e(),c._v(" "),c._t("list-footer",null,null,c.scope.listFooter)],2):R("ul",{staticStyle:{display:"none",visibility:"hidden"},attrs:{id:"vs-"+c.uid+"__listbox",role:"listbox","aria-label":c.ariaLabelListbox}})]),c._v(" "),c._t("footer",null,null,c.scope.footer)],2)},[]).exports,W={ajax:m,pointer:u,pointerScroll:h},I=G})(),s})()})})(fr);var Qa=fr.exports;const Mi=Math.min,nt=Math.max,ji=Math.round,di=Math.floor,Ga=e=>({x:e,y:e}),K_={left:"right",right:"left",bottom:"top",top:"bottom"},J_={start:"end",end:"start"};function Ro(e,a,i){return nt(e,Mi(a,i))}function yt(e,a){return typeof e=="function"?e(a):e}function Ua(e){return e.split("-")[0]}function E0(e){return e.split("-")[1]}function In(e){return e==="x"?"y":"x"}function gr(e){return e==="y"?"height":"width"}function lt(e){return["top","bottom"].includes(Ua(e))?"y":"x"}function hr(e){return In(lt(e))}function X_(e,a,i){i===void 0&&(i=!1);const n=E0(e),o=hr(e),s=gr(o);let r=o==="x"?n===(i?"end":"start")?"right":"left":n==="start"?"bottom":"top";return a.reference[s]>a.floating[s]&&(r=Yi(r)),[r,Yi(r)]}function ed(e){const a=Yi(e);return[ln(e),a,ln(a)]}function ln(e){return e.replace(/start|end/g,a=>J_[a])}function ad(e,a,i){const n=["left","right"],o=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return i?a?o:n:a?n:o;case"left":case"right":return a?s:r;default:return[]}}function td(e,a,i,n){const o=E0(e);let s=ad(Ua(e),i==="start",n);return o&&(s=s.map(r=>r+"-"+o),a&&(s=s.concat(s.map(ln)))),s}function Yi(e){return e.replace(/left|right|bottom|top/g,a=>K_[a])}function id(e){return{top:0,right:0,bottom:0,left:0,...e}}function nd(e){return typeof e!="number"?id(e):{top:e,right:e,bottom:e,left:e}}function qi(e){const{x:a,y:i,width:n,height:o}=e;return{width:n,height:o,top:i,left:a,right:a+n,bottom:i+o,x:a,y:i}}function Co(e,a,i){let{reference:n,floating:o}=e;const s=lt(a),r=hr(a),_=gr(r),l=Ua(a),g=s==="y",d=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[_]/2-o[_]/2;let u;switch(l){case"top":u={x:d,y:n.y-o.height};break;case"bottom":u={x:d,y:n.y+n.height};break;case"right":u={x:n.x+n.width,y:f};break;case"left":u={x:n.x-o.width,y:f};break;default:u={x:n.x,y:n.y}}switch(E0(a)){case"start":u[r]-=h*(i&&g?-1:1);break;case"end":u[r]+=h*(i&&g?-1:1);break}return u}const od=async(e,a,i)=>{const{placement:n="bottom",strategy:o="absolute",middleware:s=[],platform:r}=i,_=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(a));let g=await r.getElementRects({reference:e,floating:a,strategy:o}),{x:d,y:f}=Co(g,n,l),h=n,u={},m=0;for(let b=0;b<_.length;b++){const{name:y,fn:k}=_[b],{x:w,y:S,data:j,reset:Z}=await k({x:d,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:u,rects:g,platform:r,elements:{reference:e,floating:a}});d=w??d,f=S??f,u={...u,[y]:{...u[y],...j}},Z&&m<=50&&(m++,typeof Z=="object"&&(Z.placement&&(h=Z.placement),Z.rects&&(g=Z.rects===!0?await r.getElementRects({reference:e,floating:a,strategy:o}):Z.rects),{x:d,y:f}=Co(g,h,l)),b=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:u}};async function Fr(e,a){var i;a===void 0&&(a={});const{x:n,y:o,platform:s,rects:r,elements:_,strategy:l}=e,{boundary:g="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:u=0}=yt(a,e),m=nd(u),b=_[h?f==="floating"?"reference":"floating":f],y=qi(await s.getClippingRect({element:(i=await(s.isElement==null?void 0:s.isElement(b)))==null||i?b:b.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(_.floating)),boundary:g,rootBoundary:d,strategy:l})),k=f==="floating"?{x:n,y:o,width:r.floating.width,height:r.floating.height}:r.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(_.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},j=qi(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:_,rect:k,offsetParent:w,strategy:l}):k);return{top:(y.top-j.top+m.top)/S.y,bottom:(j.bottom-y.bottom+m.bottom)/S.y,left:(y.left-j.left+m.left)/S.x,right:(j.right-y.right+m.right)/S.x}}const sd=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(a){var i,n;const{placement:o,middlewareData:s,rects:r,initialPlacement:_,platform:l,elements:g}=a,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...y}=yt(e,a);if((i=s.arrow)!=null&&i.alignmentOffset)return{};const k=Ua(o),w=lt(_),S=Ua(_)===_,j=await(l.isRTL==null?void 0:l.isRTL(g.floating)),Z=h||(S||!b?[Yi(_)]:ed(_)),B=m!=="none";!h&&B&&Z.push(...td(_,b,m,j));const G=[_,...Z],W=await Fr(a,y),I=[];let c=((n=s.flip)==null?void 0:n.overflows)||[];if(d&&I.push(W[k]),f){const z=X_(o,r,j);I.push(W[z[0]],W[z[1]])}if(c=[...c,{placement:o,overflows:I}],!I.every(z=>z<=0)){var v,R;const z=(((v=s.flip)==null?void 0:v.index)||0)+1,q=G[z];if(q)return{data:{index:z,overflows:c},reset:{placement:q}};let ie=(R=c.filter(ee=>ee.overflows[0]<=0).sort((ee,fe)=>ee.overflows[1]-fe.overflows[1])[0])==null?void 0:R.placement;if(!ie)switch(u){case"bestFit":{var O;const ee=(O=c.filter(fe=>{if(B){const ne=lt(fe.placement);return ne===w||ne==="y"}return!0}).map(fe=>[fe.placement,fe.overflows.filter(ne=>ne>0).reduce((ne,ce)=>ne+ce,0)]).sort((fe,ne)=>fe[1]-ne[1])[0])==null?void 0:O[0];ee&&(ie=ee);break}case"initialPlacement":ie=_;break}if(o!==ie)return{reset:{placement:ie}}}return{}}}};async function rd(e,a){const{placement:i,platform:n,elements:o}=e,s=await(n.isRTL==null?void 0:n.isRTL(o.floating)),r=Ua(i),_=E0(i),l=lt(i)==="y",g=["left","top"].includes(r)?-1:1,d=s&&l?-1:1,f=yt(a,e);let{mainAxis:h,crossAxis:u,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return _&&typeof m=="number"&&(u=_==="end"?m*-1:m),l?{x:u*d,y:h*g}:{x:h*g,y:u*d}}const ld=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(a){var i,n;const{x:o,y:s,placement:r,middlewareData:_}=a,l=await rd(a,e);return r===((i=_.offset)==null?void 0:i.placement)&&(n=_.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:r}}}}},_d=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(a){const{x:i,y:n,placement:o}=a,{mainAxis:s=!0,crossAxis:r=!1,limiter:_={fn:y=>{let{x:k,y:w}=y;return{x:k,y:w}}},...l}=yt(e,a),g={x:i,y:n},d=await Fr(a,l),f=lt(Ua(o)),h=In(f);let u=g[h],m=g[f];if(s){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",w=u+d[y],S=u-d[k];u=Ro(w,u,S)}if(r){const y=f==="y"?"top":"left",k=f==="y"?"bottom":"right",w=m+d[y],S=m-d[k];m=Ro(w,m,S)}const b=_.fn({...a,[h]:u,[f]:m});return{...b,data:{x:b.x-i,y:b.y-n}}}}},dd=function(e){return e===void 0&&(e={}),{options:e,fn(a){const{x:i,y:n,placement:o,rects:s,middlewareData:r}=a,{offset:_=0,mainAxis:l=!0,crossAxis:g=!0}=yt(e,a),d={x:i,y:n},f=lt(o),h=In(f);let u=d[h],m=d[f];const b=yt(_,a),y=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const S=h==="y"?"height":"width",j=s.reference[h]-s.floating[S]+y.mainAxis,Z=s.reference[h]+s.reference[S]-y.mainAxis;uZ&&(u=Z)}if(g){var k,w;const S=h==="y"?"width":"height",j=["top","left"].includes(Ua(o)),Z=s.reference[f]-s.floating[S]+(j&&((k=r.offset)==null?void 0:k[f])||0)+(j?0:y.crossAxis),B=s.reference[f]+s.reference[S]+(j?0:((w=r.offset)==null?void 0:w[f])||0)-(j?y.crossAxis:0);mB&&(m=B)}return{[h]:u,[f]:m}}}};function Bt(e){return ur(e)?(e.nodeName||"").toLowerCase():"#document"}function Xe(e){var a;return(e==null||(a=e.ownerDocument)==null?void 0:a.defaultView)||window}function va(e){var a;return(a=(ur(e)?e.ownerDocument:e.document)||window.document)==null?void 0:a.documentElement}function ur(e){return e instanceof Node||e instanceof Xe(e).Node}function la(e){return e instanceof Element||e instanceof Xe(e).Element}function ca(e){return e instanceof HTMLElement||e instanceof Xe(e).HTMLElement}function Bo(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Xe(e).ShadowRoot}function ni(e){const{overflow:a,overflowX:i,overflowY:n,display:o}=_a(e);return/auto|scroll|overlay|hidden|clip/.test(a+n+i)&&!["inline","contents"].includes(o)}function fd(e){return["table","td","th"].includes(Bt(e))}function k0(e){return[":popover-open",":modal"].some(a=>{try{return e.matches(a)}catch{return!1}})}function Hn(e){const a=Pn(),i=la(e)?_a(e):e;return i.transform!=="none"||i.perspective!=="none"||(i.containerType?i.containerType!=="normal":!1)||!a&&(i.backdropFilter?i.backdropFilter!=="none":!1)||!a&&(i.filter?i.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(i.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(i.contain||"").includes(n))}function gd(e){let a=za(e);for(;ca(a)&&!Et(a);){if(Hn(a))return a;if(k0(a))return null;a=za(a)}return null}function Pn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Et(e){return["html","body","#document"].includes(Bt(e))}function _a(e){return Xe(e).getComputedStyle(e)}function A0(e){return la(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function za(e){if(Bt(e)==="html")return e;const a=e.assignedSlot||e.parentNode||Bo(e)&&e.host||va(e);return Bo(a)?a.host:a}function cr(e){const a=za(e);return Et(a)?e.ownerDocument?e.ownerDocument.body:e.body:ca(a)&&ni(a)?a:cr(a)}function Jt(e,a,i){var n;a===void 0&&(a=[]),i===void 0&&(i=!0);const o=cr(e),s=o===((n=e.ownerDocument)==null?void 0:n.body),r=Xe(o);if(s){const _=_n(r);return a.concat(r,r.visualViewport||[],ni(o)?o:[],_&&i?Jt(_):[])}return a.concat(o,Jt(o,[],i))}function _n(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mr(e){const a=_a(e);let i=parseFloat(a.width)||0,n=parseFloat(a.height)||0;const o=ca(e),s=o?e.offsetWidth:i,r=o?e.offsetHeight:n,_=ji(i)!==s||ji(n)!==r;return _&&(i=s,n=r),{width:i,height:n,$:_}}function Gn(e){return la(e)?e:e.contextElement}function Dt(e){const a=Gn(e);if(!ca(a))return Ga(1);const i=a.getBoundingClientRect(),{width:n,height:o,$:s}=mr(a);let r=(s?ji(i.width):i.width)/n,_=(s?ji(i.height):i.height)/o;return(!r||!Number.isFinite(r))&&(r=1),(!_||!Number.isFinite(_))&&(_=1),{x:r,y:_}}const hd=Ga(0);function pr(e){const a=Xe(e);return!Pn()||!a.visualViewport?hd:{x:a.visualViewport.offsetLeft,y:a.visualViewport.offsetTop}}function Fd(e,a,i){return a===void 0&&(a=!1),!i||a&&i!==Xe(e)?!1:a}function _t(e,a,i,n){a===void 0&&(a=!1),i===void 0&&(i=!1);const o=e.getBoundingClientRect(),s=Gn(e);let r=Ga(1);a&&(n?la(n)&&(r=Dt(n)):r=Dt(e));const _=Fd(s,i,n)?pr(s):Ga(0);let l=(o.left+_.x)/r.x,g=(o.top+_.y)/r.y,d=o.width/r.x,f=o.height/r.y;if(s){const h=Xe(s),u=n&&la(n)?Xe(n):n;let m=h,b=_n(m);for(;b&&n&&u!==m;){const y=Dt(b),k=b.getBoundingClientRect(),w=_a(b),S=k.left+(b.clientLeft+parseFloat(w.paddingLeft))*y.x,j=k.top+(b.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,g*=y.y,d*=y.x,f*=y.y,l+=S,g+=j,m=Xe(b),b=_n(m)}}return qi({width:d,height:f,x:l,y:g})}function ud(e){let{elements:a,rect:i,offsetParent:n,strategy:o}=e;const s=o==="fixed",r=va(n),_=a?k0(a.floating):!1;if(n===r||_&&s)return i;let l={scrollLeft:0,scrollTop:0},g=Ga(1);const d=Ga(0),f=ca(n);if((f||!f&&!s)&&((Bt(n)!=="body"||ni(r))&&(l=A0(n)),ca(n))){const h=_t(n);g=Dt(n),d.x=h.x+n.clientLeft,d.y=h.y+n.clientTop}return{width:i.width*g.x,height:i.height*g.y,x:i.x*g.x-l.scrollLeft*g.x+d.x,y:i.y*g.y-l.scrollTop*g.y+d.y}}function cd(e){return Array.from(e.getClientRects())}function br(e){return _t(va(e)).left+A0(e).scrollLeft}function md(e){const a=va(e),i=A0(e),n=e.ownerDocument.body,o=nt(a.scrollWidth,a.clientWidth,n.scrollWidth,n.clientWidth),s=nt(a.scrollHeight,a.clientHeight,n.scrollHeight,n.clientHeight);let r=-i.scrollLeft+br(e);const _=-i.scrollTop;return _a(n).direction==="rtl"&&(r+=nt(a.clientWidth,n.clientWidth)-o),{width:o,height:s,x:r,y:_}}function pd(e,a){const i=Xe(e),n=va(e),o=i.visualViewport;let s=n.clientWidth,r=n.clientHeight,_=0,l=0;if(o){s=o.width,r=o.height;const g=Pn();(!g||g&&a==="fixed")&&(_=o.offsetLeft,l=o.offsetTop)}return{width:s,height:r,x:_,y:l}}function bd(e,a){const i=_t(e,!0,a==="fixed"),n=i.top+e.clientTop,o=i.left+e.clientLeft,s=ca(e)?Dt(e):Ga(1),r=e.clientWidth*s.x,_=e.clientHeight*s.y,l=o*s.x,g=n*s.y;return{width:r,height:_,x:l,y:g}}function Oo(e,a,i){let n;if(a==="viewport")n=pd(e,i);else if(a==="document")n=md(va(e));else if(la(a))n=bd(a,i);else{const o=pr(e);n={...a,x:a.x-o.x,y:a.y-o.y}}return qi(n)}function Tr(e,a){const i=za(e);return i===a||!la(i)||Et(i)?!1:_a(i).position==="fixed"||Tr(i,a)}function Td(e,a){const i=a.get(e);if(i)return i;let n=Jt(e,[],!1).filter(_=>la(_)&&Bt(_)!=="body"),o=null;const s=_a(e).position==="fixed";let r=s?za(e):e;for(;la(r)&&!Et(r);){const _=_a(r),l=Hn(r);!l&&_.position==="fixed"&&(o=null),(s?!l&&!o:!l&&_.position==="static"&&o&&["absolute","fixed"].includes(o.position)||ni(r)&&!l&&Tr(e,r))?n=n.filter(g=>g!==r):o=_,r=za(r)}return a.set(e,n),n}function Dd(e){let{element:a,boundary:i,rootBoundary:n,strategy:o}=e;const s=[...i==="clippingAncestors"?k0(a)?[]:Td(a,this._c):[].concat(i),n],r=s[0],_=s.reduce((l,g)=>{const d=Oo(a,g,o);return l.top=nt(d.top,l.top),l.right=Mi(d.right,l.right),l.bottom=Mi(d.bottom,l.bottom),l.left=nt(d.left,l.left),l},Oo(a,r,o));return{width:_.right-_.left,height:_.bottom-_.top,x:_.left,y:_.top}}function yd(e){const{width:a,height:i}=mr(e);return{width:a,height:i}}function Ed(e,a,i){const n=ca(a),o=va(a),s=i==="fixed",r=_t(e,!0,s,a);let _={scrollLeft:0,scrollTop:0};const l=Ga(0);if(n||!n&&!s)if((Bt(a)!=="body"||ni(o))&&(_=A0(a)),n){const f=_t(a,!0,s,a);l.x=f.x+a.clientLeft,l.y=f.y+a.clientTop}else o&&(l.x=br(o));const g=r.left+_.scrollLeft-l.x,d=r.top+_.scrollTop-l.y;return{x:g,y:d,width:r.width,height:r.height}}function I0(e){return _a(e).position==="static"}function No(e,a){return!ca(e)||_a(e).position==="fixed"?null:a?a(e):e.offsetParent}function Dr(e,a){const i=Xe(e);if(k0(e))return i;if(!ca(e)){let o=za(e);for(;o&&!Et(o);){if(la(o)&&!I0(o))return o;o=za(o)}return i}let n=No(e,a);for(;n&&fd(n)&&I0(n);)n=No(n,a);return n&&Et(n)&&I0(n)&&!Hn(n)?i:n||gd(e)||i}const kd=async function(e){const a=this.getOffsetParent||Dr,i=this.getDimensions,n=await i(e.floating);return{reference:Ed(e.reference,await a(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ad(e){return _a(e).direction==="rtl"}const wd={convertOffsetParentRelativeRectToViewportRelativeRect:ud,getDocumentElement:va,getClippingRect:Dd,getOffsetParent:Dr,getElementRects:kd,getClientRects:cd,getDimensions:yd,getScale:Dt,isElement:la,isRTL:Ad};function vd(e,a){let i=null,n;const o=va(e);function s(){var _;clearTimeout(n),(_=i)==null||_.disconnect(),i=null}function r(_,l){_===void 0&&(_=!1),l===void 0&&(l=1),s();const{left:g,top:d,width:f,height:h}=e.getBoundingClientRect();if(_||a(),!f||!h)return;const u=di(d),m=di(o.clientWidth-(g+f)),b=di(o.clientHeight-(d+h)),y=di(g),k={rootMargin:-u+"px "+-m+"px "+-b+"px "+-y+"px",threshold:nt(0,Mi(1,l))||1};let w=!0;function S(j){const Z=j[0].intersectionRatio;if(Z!==l){if(!w)return r();Z?r(!1,Z):n=setTimeout(()=>{r(!1,1e-7)},1e3)}w=!1}try{i=new IntersectionObserver(S,{...k,root:o.ownerDocument})}catch{i=new IntersectionObserver(S,k)}i.observe(e)}return r(!0),s}function Sd(e,a,i,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:_=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,g=Gn(e),d=o||s?[...g?Jt(g):[],...Jt(a)]:[];d.forEach(k=>{o&&k.addEventListener("scroll",i,{passive:!0}),s&&k.addEventListener("resize",i)});const f=g&&_?vd(g,i):null;let h=-1,u=null;r&&(u=new ResizeObserver(k=>{let[w]=k;w&&w.target===g&&u&&(u.unobserve(a),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=u)==null||S.observe(a)})),i()}),g&&!l&&u.observe(g),u.observe(a));let m,b=l?_t(e):null;l&&y();function y(){const k=_t(e);b&&(k.x!==b.x||k.y!==b.y||k.width!==b.width||k.height!==b.height)&&i(),b=k,m=requestAnimationFrame(y)}return i(),()=>{var k;d.forEach(w=>{o&&w.removeEventListener("scroll",i),s&&w.removeEventListener("resize",i)}),f?.(),(k=u)==null||k.disconnect(),u=null,l&&cancelAnimationFrame(m)}}const Rd=ld,Cd=_d,Bd=sd,Od=dd,Nd=(e,a,i)=>{const n=new Map,o={platform:wd,...i},s={...o.platform,_c:n};return od(e,a,{...o,platform:s})},xd={name:"ChevronDownIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Md=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon chevron-down-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},jd=[],Yd=te(xd,Md,jd,!1,null,null);const yr=Yd.exports,Er=(e,a)=>{const i=[];let n=0,o=e.toLowerCase().indexOf(a.toLowerCase(),n),s=0;for(;o>-1&&s[]}},computed:{ranges(){let e=[];return!this.search&&this.highlight.length===0||(this.highlight.length>0?e=this.highlight:e=Er(this.text,this.search),e.forEach((a,i)=>{a.end(i.start0&&a.push({start:i.start<0?0:i.start,end:i.end>this.text.length?this.text.length:i.end}),a),[]),e.sort((a,i)=>a.start-i.start),e=e.reduce((a,i)=>{if(!a.length)a.push(i);else{const n=a.length-1;a[n].end>=i.start?a[n]={start:a[n].start,end:Math.max(a[n].end,i.end)}:a.push(i)}return a},[])),e},chunks(){if(this.ranges.length===0)return[{start:0,end:this.text.length,highlight:!1,text:this.text}];const e=[];let a=0,i=0;for(;a=this.ranges.length&&aa.highlight?e("strong",{},a.text):a.text)):e("span",{},this.text)}},Ld=null,Zd=null;var Id=te(qd,Ld,Zd,!1,null,null);const w0=Id.exports,Hd={name:"NcEllipsisedOption",components:{NcHighlight:w0},props:{name:{type:String,default:""},search:{type:String,default:""}},computed:{needsTruncate(){return this.name&&this.name.length>=10},split(){return this.name.length-Math.min(Math.floor(this.name.length/2),10)},part1(){return this.needsTruncate?this.name.slice(0,this.split):this.name},part2(){return this.needsTruncate?this.name.slice(this.split):""},highlight1(){return this.search?Er(this.name,this.search):[]},highlight2(){return this.highlight1.map(e=>({start:e.start-this.split,end:e.end-this.split}))}}};var Pd=function(){var e=this,a=e._self._c;return a("span",{staticClass:"name-parts",attrs:{title:e.name}},[a("NcHighlight",{staticClass:"name-parts__first",attrs:{text:e.part1,search:e.search,highlight:e.highlight1}}),e.part2?a("NcHighlight",{staticClass:"name-parts__last",attrs:{text:e.part2,search:e.search,highlight:e.highlight2}}):e._e()],1)},Gd=[],Ud=te(Hd,Pd,Gd,!1,null,"0c4478a6");const zd=Ud.exports,Wd={name:"NcActionRouter",mixins:[er],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}},props:{to:{type:[String,Object],default:"",required:!0},exact:{type:Boolean,default:!1}}};var Vd=function(){var e=this,a=e._self._c;return a("li",{staticClass:"action",attrs:{role:e.isInSemanticMenu&&"presentation"}},[a("RouterLink",{staticClass:"action-router focusable",attrs:{to:e.to,"aria-label":e.ariaLabel,exact:e.exact,title:e.title,rel:"nofollow noreferrer noopener",role:e.isInSemanticMenu&&"menuitem"},nativeOn:{click:function(i){return e.onClick.apply(null,arguments)}}},[e._t("icon",function(){return[a("span",{staticClass:"action-router__icon",class:[e.isIconUrl?"action-router__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?"url(".concat(e.icon,")"):null},attrs:{"aria-hidden":"true"}})]}),e.name?a("span",{staticClass:"action-router__longtext-wrapper"},[a("strong",{staticClass:"action-router__name"},[e._v(" "+e._s(e.name)+" ")]),a("br"),a("span",{staticClass:"action-router__longtext",domProps:{textContent:e._s(e.text)}})]):e.isLongText?a("span",{staticClass:"action-router__longtext",domProps:{textContent:e._s(e.text)}}):a("span",{staticClass:"action-router__text"},[e._v(e._s(e.text))]),e._e()],2)],1)},$d=[],Qd=te(Wd,Vd,$d,!1,null,"579c6b4d");const Kd=Qd.exports,Jd={name:"NcActionText",mixins:[er],inject:{isInSemanticMenu:{from:"NcActions:isSemanticMenu",default:!1}}};var Xd=function(){var e=this,a=e._self._c;return a("li",{staticClass:"action",attrs:{role:e.isInSemanticMenu&&"presentation"}},[a("span",{staticClass:"action-text",on:{click:e.onClick}},[e._t("icon",function(){return[e.icon!==""?a("span",{staticClass:"action-text__icon",class:[e.isIconUrl?"action-text__icon--url":e.icon],style:{backgroundImage:e.isIconUrl?"url(".concat(e.icon,")"):null},attrs:{"aria-hidden":"true"}}):e._e()]}),e.name?a("span",{staticClass:"action-text__longtext-wrapper"},[a("strong",{staticClass:"action-text__name"},[e._v(" "+e._s(e.name)+" ")]),a("br"),a("span",{staticClass:"action-text__longtext",domProps:{textContent:e._s(e.text)}})]):e.isLongText?a("span",{staticClass:"action-text__longtext",domProps:{textContent:e._s(e.text)}}):a("span",{staticClass:"action-text__text"},[e._v(e._s(e.text))]),e._e()],2)])},ef=[],af=te(Jd,Xd,ef,!1,null,"824615f4");const tf=af.exports,nf={name:"NcLoadingIcon",props:{size:{type:Number,default:20},appearance:{type:String,validator(e){return["auto","light","dark"].includes(e)},default:"auto"},name:{type:String,default:""}},computed:{colors(){const e=["#777","#CCC"];return this.appearance==="light"?e:this.appearance==="dark"?e.reverse():["var(--color-loading-light)","var(--color-loading-dark)"]}}};var of=function(){var e=this,a=e._self._c;return a("span",{staticClass:"material-design-icon loading-icon",attrs:{"aria-label":e.name,role:"img"}},[a("svg",{attrs:{width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{fill:e.colors[0],d:"M12,4V2A10,10 0 1,0 22,12H20A8,8 0 1,1 12,4Z"}}),a("path",{attrs:{fill:e.colors[1],d:"M12,4V2A10,10 0 0,1 22,12H20A8,8 0 0,0 12,4Z"}},[e.name?a("title",[e._v(e._s(e.name))]):e._e()])])])},sf=[],rf=te(nf,of,sf,!1,null,"551209a3");const v0=rf.exports,lf=` + + + +`,xo=` + + + + +`,_f=` + + + + + +`,Mo=` + + + + +`;oe(Yl);const kr=e=>{switch(e){case"away":return x("away");case"busy":return x("busy");case"dnd":return x("do not disturb");case"online":return x("online");case"invisible":return x("invisible");case"offline":return x("offline");default:return e}};oe(ql);const df={name:"NcUserStatusIcon",props:{user:{type:String,default:null},status:{type:String,default:null,validator:e=>["online","away","busy","dnd","invisible","offline"].includes(e)},ariaHidden:{type:String,default:null,validator:e=>["true","false"].includes(e)}},data(){return{fetchedUserStatus:null}},computed:{activeStatus(){var e;return(e=this.status)!=null?e:this.fetchedUserStatus},activeSvg(){var e;return(e={online:lf,away:xo,busy:xo,dnd:_f,invisible:Mo,offline:Mo}[this.activeStatus])!=null?e:null},ariaLabel(){return this.ariaHidden==="true"?null:x("User status: {status}",{status:kr(this.activeStatus)})}},watch:{user:{immediate:!0,async handler(e,a){var i,n,o,s;if(!e||!((n=(i=ar())==null?void 0:i.user_status)!=null&&n.enabled)){this.fetchedUserStatus=null;return}try{const{data:r}=await ma.get(Pa("/apps/user_status/api/v1/statuses/{user}",{user:e}));this.fetchedUserStatus=(s=(o=r.ocs)==null?void 0:o.data)==null?void 0:s.status}catch{this.fetchedUserStatus=null}}}}};var ff=function(){var e=this,a=e._self._c;return e.activeStatus?a("span",{staticClass:"user-status-icon",class:{"user-status-icon--invisible":["invisible","offline"].includes(e.status)},attrs:{role:"img","aria-hidden":e.ariaHidden,"aria-label":e.ariaLabel},domProps:{innerHTML:e._s(e.activeSvg)}}):e._e()},gf=[],hf=te(df,ff,gf,!1,null,"0555d8d0");const Ar=hf.exports;oe(Ll);class Ae{constructor(a,i,n,o){this.r=a,this.g=i,this.b=n,o&&(this.name=o)}get color(){const a=i=>"00".concat(i.toString(16)).slice(-2);return"#".concat(a(this.r)).concat(a(this.g)).concat(a(this.b))}}function Ff(e,a){const i=new Array(3);return i[0]=(a[1].r-a[0].r)/e,i[1]=(a[1].g-a[0].g)/e,i[2]=(a[1].b-a[0].b)/e,i}function H0(e,a,i){const n=[];n.push(a);const o=Ff(e,[a,i]);for(let s=1;s>>32-n},rotr:function(i,n){return i<<32-n|i>>>n},endian:function(i){if(i.constructor==Number)return a.rotl(i,8)&16711935|a.rotl(i,24)&4278255360;for(var n=0;n0;i--)n.push(Math.floor(Math.random()*256));return n},bytesToWords:function(i){for(var n=[],o=0,s=0;o>>5]|=i[o]<<24-s%32;return n},wordsToBytes:function(i){for(var n=[],o=0;o>>5]>>>24-o%32&255);return n},bytesToHex:function(i){for(var n=[],o=0;o>>4).toString(16)),n.push((i[o]&15).toString(16));return n.join("")},hexToBytes:function(i){for(var n=[],o=0;o>>6*(3-r)&63)):n.push("=");return n.join("")},base64ToBytes:function(i){i=i.replace(/[^A-Z0-9+\/]/ig,"");for(var n=[],o=0,s=0;o>>6-s*2);return n}};vr.exports=a})();var mf=vr.exports,dn={utf8:{stringToBytes:function(e){return dn.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(dn.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var a=[],i=0;i>>24)&16711935|(_[u]<<24|_[u]>>>8)&4278255360;_[l>>>5]|=128<>>9<<4)+14]=l;for(var m=o._ff,b=o._gg,y=o._hh,k=o._ii,u=0;u<_.length;u+=16){var w=g,S=d,j=f,Z=h;g=m(g,d,f,h,_[u+0],7,-680876936),h=m(h,g,d,f,_[u+1],12,-389564586),f=m(f,h,g,d,_[u+2],17,606105819),d=m(d,f,h,g,_[u+3],22,-1044525330),g=m(g,d,f,h,_[u+4],7,-176418897),h=m(h,g,d,f,_[u+5],12,1200080426),f=m(f,h,g,d,_[u+6],17,-1473231341),d=m(d,f,h,g,_[u+7],22,-45705983),g=m(g,d,f,h,_[u+8],7,1770035416),h=m(h,g,d,f,_[u+9],12,-1958414417),f=m(f,h,g,d,_[u+10],17,-42063),d=m(d,f,h,g,_[u+11],22,-1990404162),g=m(g,d,f,h,_[u+12],7,1804603682),h=m(h,g,d,f,_[u+13],12,-40341101),f=m(f,h,g,d,_[u+14],17,-1502002290),d=m(d,f,h,g,_[u+15],22,1236535329),g=b(g,d,f,h,_[u+1],5,-165796510),h=b(h,g,d,f,_[u+6],9,-1069501632),f=b(f,h,g,d,_[u+11],14,643717713),d=b(d,f,h,g,_[u+0],20,-373897302),g=b(g,d,f,h,_[u+5],5,-701558691),h=b(h,g,d,f,_[u+10],9,38016083),f=b(f,h,g,d,_[u+15],14,-660478335),d=b(d,f,h,g,_[u+4],20,-405537848),g=b(g,d,f,h,_[u+9],5,568446438),h=b(h,g,d,f,_[u+14],9,-1019803690),f=b(f,h,g,d,_[u+3],14,-187363961),d=b(d,f,h,g,_[u+8],20,1163531501),g=b(g,d,f,h,_[u+13],5,-1444681467),h=b(h,g,d,f,_[u+2],9,-51403784),f=b(f,h,g,d,_[u+7],14,1735328473),d=b(d,f,h,g,_[u+12],20,-1926607734),g=y(g,d,f,h,_[u+5],4,-378558),h=y(h,g,d,f,_[u+8],11,-2022574463),f=y(f,h,g,d,_[u+11],16,1839030562),d=y(d,f,h,g,_[u+14],23,-35309556),g=y(g,d,f,h,_[u+1],4,-1530992060),h=y(h,g,d,f,_[u+4],11,1272893353),f=y(f,h,g,d,_[u+7],16,-155497632),d=y(d,f,h,g,_[u+10],23,-1094730640),g=y(g,d,f,h,_[u+13],4,681279174),h=y(h,g,d,f,_[u+0],11,-358537222),f=y(f,h,g,d,_[u+3],16,-722521979),d=y(d,f,h,g,_[u+6],23,76029189),g=y(g,d,f,h,_[u+9],4,-640364487),h=y(h,g,d,f,_[u+12],11,-421815835),f=y(f,h,g,d,_[u+15],16,530742520),d=y(d,f,h,g,_[u+2],23,-995338651),g=k(g,d,f,h,_[u+0],6,-198630844),h=k(h,g,d,f,_[u+7],10,1126891415),f=k(f,h,g,d,_[u+14],15,-1416354905),d=k(d,f,h,g,_[u+5],21,-57434055),g=k(g,d,f,h,_[u+12],6,1700485571),h=k(h,g,d,f,_[u+3],10,-1894986606),f=k(f,h,g,d,_[u+10],15,-1051523),d=k(d,f,h,g,_[u+1],21,-2054922799),g=k(g,d,f,h,_[u+8],6,1873313359),h=k(h,g,d,f,_[u+15],10,-30611744),f=k(f,h,g,d,_[u+6],15,-1560198380),d=k(d,f,h,g,_[u+13],21,1309151649),g=k(g,d,f,h,_[u+4],6,-145523070),h=k(h,g,d,f,_[u+11],10,-1120210379),f=k(f,h,g,d,_[u+2],15,718787259),d=k(d,f,h,g,_[u+9],21,-343485551),g=g+w>>>0,d=d+S>>>0,f=f+j>>>0,h=h+Z>>>0}return e.endian([g,d,f,h])};o._ff=function(s,r,_,l,g,d,f){var h=s+(r&_|~r&l)+(g>>>0)+f;return(h<>>32-d)+r},o._gg=function(s,r,_,l,g,d,f){var h=s+(r&l|_&~l)+(g>>>0)+f;return(h<>>32-d)+r},o._hh=function(s,r,_,l,g,d,f){var h=s+(r^_^l)+(g>>>0)+f;return(h<>>32-d)+r},o._ii=function(s,r,_,l,g,d,f){var h=s+(_^(r|~l))+(g>>>0)+f;return(h<>>32-d)+r},o._blocksize=16,o._digestsize=16,wr.exports=function(s,r){if(s==null)throw new Error("Illegal argument "+s);var _=e.wordsToBytes(o(s,r));return r&&r.asBytes?_:r&&r.asString?n.bytesToString(_):e.bytesToHex(_)}})();var Tf=wr.exports;const Df=Rn(Tf),Yo=function(e){let a=e.toLowerCase();a.match(/^([0-9a-f]{4}-?){8}$/)===null&&(a=Df(a)),a=a.replace(/[^0-9a-f]/g,"");const i=6,n=cf(i);function o(s,r){let _=0;const l=[];for(let g=0;g{const n=window.getComputedStyle(document.body).getPropertyValue("--background-invert-if-dark")==="invert(100%)";return Ps("/avatar"+(i?"/guest":"")+"/{user}/{size}"+(n?"/dark":""),{user:e,size:a})},yf="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Ef="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",kt=(e,a)=>{for(const i in a)e[i]=a[i];return e},fn="numeric",gn="ascii",hn="alpha",Ei="asciinumeric",fi="alphanumeric",Fn="domain",Rr="emoji",kf="scheme",Af="slashscheme",qo="whitespace";function wf(e,a){return e in a||(a[e]=[]),a[e]}function Xa(e,a,i){a[fn]&&(a[Ei]=!0,a[fi]=!0),a[gn]&&(a[Ei]=!0,a[hn]=!0),a[Ei]&&(a[fi]=!0),a[hn]&&(a[fi]=!0),a[fi]&&(a[Fn]=!0),a[Rr]&&(a[Fn]=!0);for(const n in a){const o=wf(n,i);o.indexOf(e)<0&&o.push(e)}}function vf(e,a){const i={};for(const n in a)a[n].indexOf(e)>=0&&(i[n]=!0);return i}function Je(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Je.groups={},Je.prototype={accepts(){return!!this.t},go(e){const a=this,i=a.j[e];if(i)return i;for(let n=0;ne.ta(a,i,n,o),ea=(e,a,i,n,o)=>e.tr(a,i,n,o),Lo=(e,a,i,n,o)=>e.ts(a,i,n,o),H=(e,a,i,n,o)=>e.tt(a,i,n,o),ba="WORD",un="UWORD",Xt="LOCALHOST",cn="TLD",mn="UTLD",ki="SCHEME",ct="SLASH_SCHEME",zn="NUM",Cr="WS",Wn="NL",qt="OPENBRACE",Lt="CLOSEBRACE",Li="OPENBRACKET",Zi="CLOSEBRACKET",Ii="OPENPAREN",Hi="CLOSEPAREN",Pi="OPENANGLEBRACKET",Gi="CLOSEANGLEBRACKET",Ui="FULLWIDTHLEFTPAREN",zi="FULLWIDTHRIGHTPAREN",Wi="LEFTCORNERBRACKET",Vi="RIGHTCORNERBRACKET",$i="LEFTWHITECORNERBRACKET",Qi="RIGHTWHITECORNERBRACKET",Ki="FULLWIDTHLESSTHAN",Ji="FULLWIDTHGREATERTHAN",Xi="AMPERSAND",e0="APOSTROPHE",a0="ASTERISK",Oa="AT",t0="BACKSLASH",i0="BACKTICK",n0="CARET",Ma="COLON",Vn="COMMA",o0="DOLLAR",fa="DOT",s0="EQUALS",$n="EXCLAMATION",ga="HYPHEN",r0="PERCENT",l0="PIPE",_0="PLUS",d0="POUND",f0="QUERY",Qn="QUOTE",Kn="SEMI",ha="SLASH",Zt="TILDE",g0="UNDERSCORE",Br="EMOJI",h0="SYM";var Or=Object.freeze({__proto__:null,WORD:ba,UWORD:un,LOCALHOST:Xt,TLD:cn,UTLD:mn,SCHEME:ki,SLASH_SCHEME:ct,NUM:zn,WS:Cr,NL:Wn,OPENBRACE:qt,CLOSEBRACE:Lt,OPENBRACKET:Li,CLOSEBRACKET:Zi,OPENPAREN:Ii,CLOSEPAREN:Hi,OPENANGLEBRACKET:Pi,CLOSEANGLEBRACKET:Gi,FULLWIDTHLEFTPAREN:Ui,FULLWIDTHRIGHTPAREN:zi,LEFTCORNERBRACKET:Wi,RIGHTCORNERBRACKET:Vi,LEFTWHITECORNERBRACKET:$i,RIGHTWHITECORNERBRACKET:Qi,FULLWIDTHLESSTHAN:Ki,FULLWIDTHGREATERTHAN:Ji,AMPERSAND:Xi,APOSTROPHE:e0,ASTERISK:a0,AT:Oa,BACKSLASH:t0,BACKTICK:i0,CARET:n0,COLON:Ma,COMMA:Vn,DOLLAR:o0,DOT:fa,EQUALS:s0,EXCLAMATION:$n,HYPHEN:ga,PERCENT:r0,PIPE:l0,PLUS:_0,POUND:d0,QUERY:f0,QUOTE:Qn,SEMI:Kn,SLASH:ha,TILDE:Zt,UNDERSCORE:g0,EMOJI:Br,SYM:h0});const Ft=/[a-z]/,P0=new RegExp("\\p{L}","u"),G0=new RegExp("\\p{Emoji}","u"),U0=/\d/,Zo=/\s/,Io=` +`,Sf="️",Rf="‍";let gi=null,hi=null;function Cf(e){e===void 0&&(e=[]);const a={};Je.groups=a;const i=new Je;gi==null&&(gi=Ho(yf)),hi==null&&(hi=Ho(Ef)),H(i,"'",e0),H(i,"{",qt),H(i,"}",Lt),H(i,"[",Li),H(i,"]",Zi),H(i,"(",Ii),H(i,")",Hi),H(i,"<",Pi),H(i,">",Gi),H(i,"(",Ui),H(i,")",zi),H(i,"「",Wi),H(i,"」",Vi),H(i,"『",$i),H(i,"』",Qi),H(i,"<",Ki),H(i,">",Ji),H(i,"&",Xi),H(i,"*",a0),H(i,"@",Oa),H(i,"`",i0),H(i,"^",n0),H(i,":",Ma),H(i,",",Vn),H(i,"$",o0),H(i,".",fa),H(i,"=",s0),H(i,"!",$n),H(i,"-",ga),H(i,"%",r0),H(i,"|",l0),H(i,"+",_0),H(i,"#",d0),H(i,"?",f0),H(i,'"',Qn),H(i,"/",ha),H(i,";",Kn),H(i,"~",Zt),H(i,"_",g0),H(i,"\\",t0);const n=ea(i,U0,zn,{[fn]:!0});ea(n,U0,n);const o=ea(i,Ft,ba,{[gn]:!0});ea(o,Ft,o);const s=ea(i,P0,un,{[hn]:!0});ea(s,Ft),ea(s,P0,s);const r=ea(i,Zo,Cr,{[qo]:!0});H(i,Io,Wn,{[qo]:!0}),H(r,Io),ea(r,Zo,r);const _=ea(i,G0,Br,{[Rr]:!0});ea(_,G0,_),H(_,Sf,_);const l=H(_,Rf);ea(l,G0,_);const g=[[Ft,o]],d=[[Ft,null],[P0,s]];for(let f=0;ff[0]>h[0]?1:-1);for(let f=0;f=0?u[Fn]=!0:Ft.test(h)?U0.test(h)?u[Ei]=!0:u[gn]=!0:u[fn]=!0,Lo(i,h,h,u)}return Lo(i,"localhost",Xt,{ascii:!0}),i.jd=new Je(h0),{start:i,tokens:kt({groups:a},Or)}}function Bf(e,a){const i=Of(a.replace(/[A-Z]/g,_=>_.toLowerCase())),n=i.length,o=[];let s=0,r=0;for(;r=0&&(f+=i[r].length,h++),g+=i[r].length,s+=i[r].length,r++;s-=f,r-=h,g-=f,o.push({t:d.t,v:a.slice(s-g,s),s:s-g,e:s})}return o}function Of(e){const a=[],i=e.length;let n=0;for(;n56319||n+1===i||(s=e.charCodeAt(n+1))<56320||s>57343?e[n]:e.slice(n,n+2);a.push(r),n+=r.length}return a}function Ra(e,a,i,n,o){let s;const r=a.length;for(let _=0;_=0;)s++;if(s>0){a.push(i.join(""));for(let r=parseInt(e.substring(n,n+s),10);r>0;r--)i.pop();n+=s}else i.push(e[n]),n++}return a}const ei={defaultProtocol:"http",events:null,format:Po,formatHref:Po,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Jn(e,a){a===void 0&&(a=null);let i=kt({},ei);e&&(i=kt(i,e instanceof Jn?e.o:e));const n=i.ignoreTags,o=[];for(let s=0;si?n.substring(0,i)+"…":n},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=ei.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const a=this,i=this.toHref(e.get("defaultProtocol")),n=e.get("formatHref",i,this),o=e.get("tagName",i,a),s=this.toFormattedString(e),r={},_=e.get("className",i,a),l=e.get("target",i,a),g=e.get("rel",i,a),d=e.getObj("attributes",i,a),f=e.getObj("events",i,a);return r.href=n,_&&(r.class=_),l&&(r.target=l),g&&(r.rel=g),d&&kt(r,d),{tagName:o,attributes:r,content:s,eventListeners:f}}};function S0(e,a){class i extends Nr{constructor(o,s){super(o,s),this.t=e}}for(const n in a)i.prototype[n]=a[n];return i.t=e,i}const Go=S0("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Uo=S0("text"),Nf=S0("nl"),Fi=S0("url",{isLink:!0,toHref(e){return e===void 0&&(e=ei.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Xt&&e[1].t===Ma}}),aa=e=>new Je(e);function xf(e){let{groups:a}=e;const i=a.domain.concat([Xi,a0,Oa,t0,i0,n0,o0,s0,ga,zn,r0,l0,_0,d0,ha,h0,Zt,g0]),n=[e0,Ma,Vn,fa,$n,f0,Qn,Kn,Pi,Gi,qt,Lt,Zi,Li,Ii,Hi,Ui,zi,Wi,Vi,$i,Qi,Ki,Ji],o=[Xi,e0,a0,t0,i0,n0,o0,s0,ga,qt,Lt,r0,l0,_0,d0,f0,ha,h0,Zt,g0],s=aa(),r=H(s,Zt);re(r,o,r),re(r,a.domain,r);const _=aa(),l=aa(),g=aa();re(s,a.domain,_),re(s,a.scheme,l),re(s,a.slashscheme,g),re(_,o,r),re(_,a.domain,_);const d=H(_,Oa);H(r,Oa,d),H(l,Oa,d),H(g,Oa,d);const f=H(r,fa);re(f,o,r),re(f,a.domain,r);const h=aa();re(d,a.domain,h),re(h,a.domain,h);const u=H(h,fa);re(u,a.domain,h);const m=aa(Go);re(u,a.tld,m),re(u,a.utld,m),H(d,Xt,m);const b=H(h,ga);re(b,a.domain,h),re(m,a.domain,h),H(m,fa,u),H(m,ga,b);const y=H(m,Ma);re(y,a.numeric,Go);const k=H(_,ga),w=H(_,fa);re(k,a.domain,_),re(w,o,r),re(w,a.domain,_);const S=aa(Fi);re(w,a.tld,S),re(w,a.utld,S),re(S,a.domain,_),re(S,o,r),H(S,fa,w),H(S,ga,k),H(S,Oa,d);const j=H(S,Ma),Z=aa(Fi);re(j,a.numeric,Z);const B=aa(Fi),G=aa();re(B,i,B),re(B,n,G),re(G,i,B),re(G,n,G),H(S,ha,B),H(Z,ha,B);const W=H(l,Ma),I=H(g,Ma),c=H(I,ha),v=H(c,ha);re(l,a.domain,_),H(l,fa,w),H(l,ga,k),re(g,a.domain,_),H(g,fa,w),H(g,ga,k),re(W,a.domain,B),H(W,ha,B),re(v,a.domain,B),re(v,i,B),H(v,ha,B);const R=[[qt,Lt],[Li,Zi],[Ii,Hi],[Pi,Gi],[Ui,zi],[Wi,Vi],[$i,Qi],[Ki,Ji]];for(let O=0;O=0&&h++,o++,d++;if(h<0)o-=d,o0&&(s.push(z0(Uo,a,r)),r=[]),o-=h,d-=h;const u=f.t,m=i.slice(o-d,o);s.push(z0(u,a,m))}}return r.length>0&&s.push(z0(Uo,a,r)),s}function z0(e,a,i){const n=i[0].s,o=i[i.length-1].e,s=a.slice(n,o);return new e(s,i)}const He={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function jf(){He.scanner=Cf(He.customSchemes);for(let e=0;e/g,">")}function qf(e){return e.replace(/"/g,""")}function Lf(e){const a=[];for(const i in e){let n=e[i]+"";a.push(`${i}="${qf(n)}"`)}return a.join(" ")}function Zf(e){let{tagName:a,attributes:i,content:n}=e;return`<${a} ${Lf(i)}>${xr(n)}`}function If(e,a){a===void 0&&(a={}),a=new Jn(a,Zf);const i=Yf(e),n=[];for(let o=0;o +`):!s.isLink||!a.check(s)?n.push(xr(s.toString())):n.push(a.render(s))}return n.join("")}String.prototype.linkify||Object.defineProperty(String.prototype,"linkify",{writable:!1,value:function(e){return If(this,e)}});var Mr={exports:{}};(function(e){(function(a){if(typeof i!="function"){var i=function(m){return m};i.nonNative=!0}const n=i("plaintext"),o=i("html"),s=i("comment"),r=/<(\w*)>/g,_=/<\/?([^\s\/>]+)/;function l(m,b,y){m=m||"",b=b||[],y=y||"";let k=d(b,y);return f(m,k)}function g(m,b){m=m||[],b=b||"";let y=d(m,b);return function(k){return f(k||"",y)}}l.init_streaming_mode=g;function d(m,b){return m=h(m),{allowable_tags:m,tag_replacement:b,state:n,tag_buffer:"",depth:0,in_quote_char:""}}function f(m,b){if(typeof m!="string")throw new TypeError("'html' parameter must be a string");let y=b.allowable_tags,k=b.tag_replacement,w=b.state,S=b.tag_buffer,j=b.depth,Z=b.in_quote_char,B="";for(let G=0,W=m.length;G":if(Z)break;if(j){j--;break}Z="",w=n,S+=">",y.has(u(S))?B+=S:B+=k,S="";break;case'"':case"'":I===Z?Z="":Z=Z||I,S+=I;break;case"-":S==="":S.slice(-2)=="--"&&(w=n),S="";break;default:S+=I;break}}return b.state=w,b.tag_buffer=S,b.depth=j,b.in_quote_char=Z,B}function h(m){let b=new Set;if(typeof m=="string"){let y;for(;y=r.exec(m);)b.add(y[1])}else!i.nonNative&&typeof m[i.iterator]=="function"?b=new Set(m):typeof m.forEach=="function"&&m.forEach(b.add,b);return b}function u(m){let b=_.exec(m);return b?b[1].toLowerCase():null}e.exports?e.exports=l:a.striptags=l})(Na)})(Mr);var Hf=Mr.exports;const z2=Rn(Hf),Xn=(e,a)=>{const i=(d,f)=>d.startsWith(f)?d.slice(f.length):d,n=(d,...f)=>f.reduce((h,u)=>i(h,u),d);if(!e)return null;const o=/^https?:\/\//.test(a),s=/^[a-z][a-z0-9+.-]*:.+/.test(a);if(!o&&s||o&&!a.startsWith(mo())||!o&&!a.startsWith("/"))return null;const r=o?n(a,mo(),"/index.php"):a,_=n(e.history.base,Zl(),"/index.php"),l=n(r,_)||"/",g=e.resolve(l).route;return g.matched.length?g.fullPath:null};ka.util.warn;function xt(e){var a;const i=Yt(e);return(a=i?.$el)!=null?a:i}const jr=Pl?window:void 0;function Ai(...e){let a,i,n,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([i,n,o]=e,a=jr):[a,i,n,o]=e,!a)return Ti;Array.isArray(i)||(i=[i]),Array.isArray(n)||(n=[n]);const s=[],r=()=>{s.forEach(d=>d()),s.length=0},_=(d,f,h,u)=>(d.addEventListener(f,h,u),()=>d.removeEventListener(f,h,u)),l=Cn(()=>[xt(a),Yt(o)],([d,f])=>{if(r(),!d)return;const h=Il(f)?{...f}:f;s.push(...i.flatMap(u=>n.map(m=>_(d,u,m,h))))},{immediate:!0,flush:"post"}),g=()=>{l(),r()};return Gs(g),g}let zo=!1;function Wo(e,a,i={}){const{window:n=jr,ignore:o=[],capture:s=!0,detectIframe:r=!1}=i;if(!n)return Ti;nn&&!zo&&(zo=!0,Array.from(n.document.body.children).forEach(d=>d.addEventListener("click",Ti)),n.document.documentElement.addEventListener("click",Ti));let _=!0;const l=d=>o.some(f=>{if(typeof f=="string")return Array.from(n.document.querySelectorAll(f)).some(h=>h===d.target||d.composedPath().includes(h));{const h=xt(f);return h&&(d.target===h||d.composedPath().includes(h))}}),g=[Ai(n,"click",d=>{const f=xt(e);if(!(!f||f===d.target||d.composedPath().includes(f))){if(d.detail===0&&(_=!l(d)),!_){_=!0;return}a(d)}},{passive:!0,capture:s}),Ai(n,"pointerdown",d=>{const f=xt(e);_=!l(d)&&!!(f&&!d.composedPath().includes(f))},{passive:!0}),r&&Ai(n,"blur",d=>{setTimeout(()=>{var f;const h=xt(e);((f=n.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!h?.contains(n.document.activeElement)&&a(d)},0)})].filter(Boolean);return()=>g.forEach(d=>d())}const Pf={[po.mounted](e,a){const i=!a.modifiers.bubble;if(typeof a.value=="function")e.__onClickOutside_stop=Wo(e,a.value,{capture:i});else{const[n,o]=a.value;e.__onClickOutside_stop=Wo(e,n,Object.assign({capture:i},o))}},[po.unmounted](e){e.__onClickOutside_stop()}};function W0(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Yr(e){const a=window.getComputedStyle(e);if(a.overflowX==="scroll"||a.overflowY==="scroll"||a.overflowX==="auto"&&e.clientWidth1?!0:(a.preventDefault&&a.preventDefault(),!1)}const V0=new WeakMap;function Uf(e,a=!1){const i=at(a);let n=null,o="";Cn(Hl(e),_=>{const l=W0(Yt(_));if(l){const g=l;if(V0.get(g)||V0.set(g,g.style.overflow),g.style.overflow!=="hidden"&&(o=g.style.overflow),g.style.overflow==="hidden")return i.value=!0;if(i.value)return g.style.overflow="hidden"}},{immediate:!0});const s=()=>{const _=W0(Yt(e));!_||i.value||(nn&&(n=Ai(_,"touchmove",l=>{Gf(l)},{passive:!1})),_.style.overflow="hidden",i.value=!0)},r=()=>{const _=W0(Yt(e));!_||!i.value||(nn&&n?.(),_.style.overflow=o,V0.delete(_),i.value=!1)};return Gs(r),Ca({get(){return i.value},set(_){_?s():r()}})}function zf(){let e=!1;const a=at(!1);return(i,n)=>{if(a.value=n.value,e)return;e=!0;const o=Uf(i,n.value);Cn(a,s=>o.value=s)}}zf();const qr={data(){return{hasStatus:!1,userStatus:{status:null,message:null,icon:null}}},methods:{async fetchUserStatus(e){var a,i;if(!e)return;const n=ar();if(!(!Object.prototype.hasOwnProperty.call(n,"user_status")||!n.user_status.enabled)&&on())try{const{data:o}=await ma.get(Pa("apps/user_status/api/v1/statuses/{userId}",{userId:e})),{status:s,message:r,icon:_}=o.ocs.data;this.userStatus.status=s,this.userStatus.message=r||"",this.userStatus.icon=_||"",this.hasStatus=!0}catch(o){if(o.response.status===404&&((i=(a=o.response.data.ocs)==null?void 0:a.data)==null?void 0:i.length)===0)return;console.error(o)}}}};oe(Gl);const Lr=Bn("nextcloud").persist().build();function Wf(e){const a=Lr.getItem("user-has-avatar."+e);return typeof a=="string"?!!a:null}function Vo(e,a){e&&Lr.setItem("user-has-avatar."+e,a)}const Vf={name:"NcAvatar",directives:{ClickOutside:Pf},components:{DotsHorizontal:On,NcActions:Us,NcButton:wa,NcIconSvgWrapper:y0,NcLoadingIcon:v0,NcUserStatusIcon:Ar},mixins:[qr],props:{url:{type:String,default:void 0},iconClass:{type:String,default:void 0},user:{type:String,default:void 0},showUserStatus:{type:Boolean,default:!0},showUserStatusCompact:{type:Boolean,default:!0},preloadedUserStatus:{type:Object,default:void 0},isGuest:{type:Boolean,default:!1},displayName:{type:String,default:void 0},size:{type:Number,default:32},allowPlaceholder:{type:Boolean,default:!0},disableTooltip:{type:Boolean,default:!1},disableMenu:{type:Boolean,default:!1},tooltipMessage:{type:String,default:null},isNoUser:{type:Boolean,default:!1},menuContainer:{type:[String,Object,Element,Boolean],default:"body"}},data(){return{avatarUrlLoaded:null,avatarSrcSetLoaded:null,userDoesNotExist:!1,isAvatarLoaded:!1,isMenuLoaded:!1,contactsMenuLoading:!1,contactsMenuActions:[],contactsMenuOpenState:!1}},computed:{avatarAriaLabel(){var e,a;if(this.hasMenu)return this.canDisplayUserStatus||this.showUserStatusIconOnAvatar?x("Avatar of {displayName}, {status}",{displayName:(e=this.displayName)!=null?e:this.user,status:kr(this.userStatus.status)}):x("Avatar of {displayName}",{displayName:(a=this.displayName)!=null?a:this.user})},canDisplayUserStatus(){return this.showUserStatus&&this.hasStatus&&["online","away","busy","dnd"].includes(this.userStatus.status)},showUserStatusIconOnAvatar(){return this.showUserStatus&&this.showUserStatusCompact&&this.hasStatus&&this.userStatus.status!=="dnd"&&this.userStatus.icon},userIdentifier(){return this.isDisplayNameDefined?this.displayName:this.isUserDefined?this.user:""},isUserDefined(){return typeof this.user<"u"},isDisplayNameDefined(){return typeof this.displayName<"u"},isUrlDefined(){return typeof this.url<"u"},hasMenu(){var e;return this.disableMenu?!1:this.isMenuLoaded?this.menu.length>0:!(this.user===((e=on())==null?void 0:e.uid)||this.userDoesNotExist||this.url)},showInitials(){return this.allowPlaceholder&&this.userDoesNotExist&&!(this.iconClass||this.$slots.icon)},avatarStyle(){return{"--size":this.size+"px",lineHeight:this.size+"px",fontSize:Math.round(this.size*.45)+"px"}},initialsWrapperStyle(){const{r:e,g:a,b:i}=Yo(this.userIdentifier);return{backgroundColor:"rgba(".concat(e,", ").concat(a,", ").concat(i,", 0.1)")}},initialsStyle(){const{r:e,g:a,b:i}=Yo(this.userIdentifier);return{color:"rgb(".concat(e,", ").concat(a,", ").concat(i,")")}},tooltip(){return this.disableTooltip?!1:this.tooltipMessage?this.tooltipMessage:this.displayName},initials(){let e="?";if(this.showInitials){const a=this.userIdentifier.trim();if(a==="")return e;const i=a.match(/[\p{L}\p{N}\s]/gu);if(i==null)return e;const n=i.join(""),o=n.lastIndexOf(" ");e=String.fromCodePoint(n.codePointAt(0)),o!==-1&&(e=e.concat(String.fromCodePoint(n.codePointAt(o+1))))}return e.toLocaleUpperCase()},menu(){const e=this.contactsMenuActions.map(i=>{const n=Xn(this.$router,i.hyperlink);return{ncActionComponent:n?Kd:W1,ncActionComponentProps:n?{to:n,icon:i.icon}:{href:i.hyperlink,icon:i.icon},text:i.title}});function a(i){const n=document.createTextNode(i),o=document.createElement("p");return o.appendChild(n),o.innerHTML}if(this.showUserStatus&&(this.userStatus.icon||this.userStatus.message)){const i=` + `.concat(a(this.userStatus.icon),` + `);return[{ncActionComponent:tf,ncActionComponentProps:{},iconSvg:this.userStatus.icon?i:void 0,text:"".concat(this.userStatus.message)}].concat(e)}return e}},watch:{url(){this.userDoesNotExist=!1,this.loadAvatarUrl()},user(){this.userDoesNotExist=!1,this.isMenuLoaded=!1,this.loadAvatarUrl()}},mounted(){this.loadAvatarUrl(),j0("settings:avatar:updated",this.loadAvatarUrl),j0("settings:display-name:updated",this.loadAvatarUrl),this.showUserStatus&&this.user&&!this.isNoUser&&(this.preloadedUserStatus?(this.userStatus.status=this.preloadedUserStatus.status||"",this.userStatus.message=this.preloadedUserStatus.message||"",this.userStatus.icon=this.preloadedUserStatus.icon||"",this.hasStatus=this.preloadedUserStatus.status!==null):this.fetchUserStatus(this.user),j0("user_status:status.updated",this.handleUserStatusUpdated))},beforeDestroy(){Y0("settings:avatar:updated",this.loadAvatarUrl),Y0("settings:display-name:updated",this.loadAvatarUrl),this.showUserStatus&&this.user&&!this.isNoUser&&Y0("user_status:status.updated",this.handleUserStatusUpdated)},methods:{t:x,handleUserStatusUpdated(e){this.user===e.userId&&(this.userStatus={status:e.status,icon:e.icon,message:e.message})},async toggleMenu(e){e.type==="keydown"&&e.key!=="Enter"||(this.contactsMenuOpenState||await this.fetchContactsMenu(),this.contactsMenuOpenState=!this.contactsMenuOpenState)},closeMenu(){this.contactsMenuOpenState=!1},async fetchContactsMenu(){this.contactsMenuLoading=!0;try{const e=encodeURIComponent(this.user),{data:a}=await ma.post(Ps("contactsmenu/findOne"),"shareType=0&shareWith=".concat(e));this.contactsMenuActions=a.topAction?[a.topAction].concat(a.actions):a.actions}catch{this.contactsMenuOpenState=!1}this.contactsMenuLoading=!1,this.isMenuLoaded=!0},loadAvatarUrl(){if(this.isAvatarLoaded=!1,!this.isUrlDefined&&(!this.isUserDefined||this.isNoUser)){this.isAvatarLoaded=!0,this.userDoesNotExist=!0;return}if(this.isUrlDefined){this.updateImageIfValid(this.url);return}if(this.size<=64){const e=this.avatarUrlGenerator(this.user,64),a=[e+" 1x",this.avatarUrlGenerator(this.user,512)+" 8x"].join(", ");this.updateImageIfValid(e,a)}else{const e=this.avatarUrlGenerator(this.user,512);this.updateImageIfValid(e)}},avatarUrlGenerator(e,a){var i;let n=Un(e,a,this.isGuest);return e===((i=on())==null?void 0:i.uid)&&typeof oc_userconfig<"u"&&(n+="?v="+oc_userconfig.avatar.version),n},updateImageIfValid(e,a=null){const i=Wf(this.user);if(this.isUserDefined&&typeof i=="boolean"){this.isAvatarLoaded=!0,this.avatarUrlLoaded=e,a&&(this.avatarSrcSetLoaded=a),i===!1&&(this.userDoesNotExist=!0);return}const n=new Image;n.onload=()=>{this.avatarUrlLoaded=e,a&&(this.avatarSrcSetLoaded=a),this.isAvatarLoaded=!0,Vo(this.user,!0)},n.onerror=()=>{console.debug("Invalid avatar url",e),this.avatarUrlLoaded=null,this.avatarSrcSetLoaded=null,this.userDoesNotExist=!0,this.isAvatarLoaded=!1,Vo(this.user,!1)},a&&(n.srcset=a),n.src=e}}};var $f=function(){var e=this,a=e._self._c;return a("span",{directives:[{name:"click-outside",rawName:"v-click-outside",value:e.closeMenu,expression:"closeMenu"}],ref:"main",staticClass:"avatardiv popovermenu-wrapper",class:{"avatardiv--unknown":e.userDoesNotExist,"avatardiv--with-menu":e.hasMenu,"avatardiv--with-menu-loading":e.contactsMenuLoading},style:e.avatarStyle},[e._t("icon",function(){return[e.iconClass?a("span",{staticClass:"avatar-class-icon",class:e.iconClass}):e.isAvatarLoaded&&!e.userDoesNotExist?a("img",{attrs:{src:e.avatarUrlLoaded,srcset:e.avatarSrcSetLoaded,alt:""}}):e._e()]}),e.hasMenu&&e.menu.length===0?a("NcButton",{staticClass:"action-item action-item__menutoggle",attrs:{type:"tertiary-no-background","aria-label":e.avatarAriaLabel,title:e.tooltip},on:{click:e.toggleMenu},scopedSlots:e._u([{key:"icon",fn:function(){return[e.contactsMenuLoading?a("NcLoadingIcon"):a("DotsHorizontal",{attrs:{size:20}})]},proxy:!0}],null,!1,2617833509)}):e.hasMenu?a("NcActions",{attrs:{"force-menu":"","manual-open":"",type:"tertiary-no-background",container:e.menuContainer,open:e.contactsMenuOpenState,"aria-label":e.avatarAriaLabel,title:e.tooltip},on:{"update:open":function(i){e.contactsMenuOpenState=i},click:e.toggleMenu},scopedSlots:e._u([e.contactsMenuLoading?{key:"icon",fn:function(){return[a("NcLoadingIcon")]},proxy:!0}:null],null,!0)},e._l(e.menu,function(i,n){return a(i.ncActionComponent,e._b({key:n,tag:"component",scopedSlots:e._u([i.iconSvg?{key:"icon",fn:function(){return[a("NcIconSvgWrapper",{attrs:{svg:i.iconSvg}})]},proxy:!0}:null],null,!0)},"component",i.ncActionComponentProps,!1),[e._v(" "+e._s(i.text)+" ")])}),1):e._e(),e.showUserStatusIconOnAvatar?a("span",{staticClass:"avatardiv__user-status avatardiv__user-status--icon"},[e._v(" "+e._s(e.userStatus.icon)+" ")]):e.canDisplayUserStatus?a("NcUserStatusIcon",{staticClass:"avatardiv__user-status",attrs:{status:e.userStatus.status,"aria-hidden":String(e.hasMenu)}}):e._e(),e.showInitials?a("span",{staticClass:"avatardiv__initials-wrapper",style:e.initialsWrapperStyle},[a("span",{staticClass:"avatardiv__initials",style:e.initialsStyle},[e._v(" "+e._s(e.initials)+" ")])]):e._e()],2)},Qf=[],Kf=te(Vf,$f,Qf,!1,null,"9ce7ef1d");const Zr=Kf.exports,Jf=8,$o=32,Xf={name:"NcListItemIcon",components:{NcAvatar:Zr,NcHighlight:w0,NcIconSvgWrapper:y0},mixins:[qr],props:{name:{type:String,required:!0},subname:{type:String,default:""},icon:{type:String,default:""},iconSvg:{type:String,default:""},iconName:{type:String,default:""},search:{type:String,default:""},avatarSize:{type:Number,default:$o},noMargin:{type:Boolean,default:!1},displayName:{type:String,default:null},isNoUser:{type:Boolean,default:!1},id:{type:String,default:null}},setup(){return{margin:Jf,defaultSize:$o}},computed:{hasIcon(){return this.icon!==""},hasIconSvg(){return this.iconSvg!==""},isValidSubname(){var e,a;return((a=(e=this.subname)==null?void 0:e.trim)==null?void 0:a.call(e))!==""},isSizeBigEnough(){return this.avatarSize>=26},cssVars(){const e=this.noMargin?0:this.margin;return{"--height":this.avatarSize+2*e+"px","--margin":this.margin+"px"}},searchParts(){const e=/^([^<]*)<([^>]+)>?$/,a=this.search.match(e);return this.isNoUser||!a?[this.search,this.search]:[a[1].trim(),a[2]]}},beforeMount(){!this.isNoUser&&!this.subname&&this.fetchUserStatus(this.user)}};var eg=function(){var e=this,a=e._self._c;return a("span",e._g({staticClass:"option",class:{"option--compact":e.avatarSize({...e,...a.props}),{}),ariaLabelClearSelected:{type:String,default:x("Clear selected")},ariaLabelCombobox:{type:String,default:null},ariaLabelListbox:{type:String,default:x("Options")},ariaLabelDeselectOption:{type:Function,default:e=>x("Deselect {option}",{option:e})},appendToBody:{type:Boolean,default:!0},calculatePosition:{type:Function,default:null},closeOnSelect:{type:Boolean,default:!0},components:{type:Object,default:()=>({Deselect:{render:e=>e(Nn,{props:{size:20,fillColor:"var(--vs-controls-color)"},style:{cursor:"pointer"}})}})},limit:{type:Number,default:null},disabled:{type:Boolean,default:!1},dropdownShouldOpen:{type:Function,default:({noDrop:e,open:a})=>e?!1:a},filterBy:{type:Function,default:null},inputClass:{type:[String,Object],default:null},inputId:{type:String,default:()=>"select-input-".concat(st())},inputLabel:{type:String,default:null},labelOutside:{type:Boolean,default:!1},keyboardFocusBorder:{type:Boolean,default:!0},label:{type:String,default:null},loading:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},noWrap:{type:Boolean,default:!1},options:{type:Array,default:()=>[]},placeholder:{type:String,default:""},mapKeydown:{type:Function,default(e,a){return{...e,27:i=>{a.open&&i.stopPropagation(),e[27](i)}}}},uid:{type:String,default:()=>st()},placement:{type:String,default:"bottom"},resetFocusOnOptionsChange:{type:Boolean,default:!0},userSelect:{type:Boolean,default:!1},value:{type:[String,Number,Object,Array],default:null},required:{type:Boolean,default:!1}," ":{}},emits:[" "],setup(){const e=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-clickable-area")),a=Number.parseInt(window.getComputedStyle(document.body).getPropertyValue("--default-grid-baseline"));return{avatarSize:e-2*a}},data(){return{search:""}},computed:{inputRequired(){return this.required?this.value===null||Array.isArray(this.value)&&this.value.length===0:null},localCalculatePosition(){return this.calculatePosition!==null?this.calculatePosition:(e,a,{width:i})=>{e.style.width=i;const n={name:"addClass",fn(r){return e.classList.add("vs__dropdown-menu--floating"),{}}},o={name:"togglePlacementClass",fn({placement:r}){return a.$el.classList.toggle("select--drop-up",r==="top"),e.classList.toggle("vs__dropdown-menu--floating-placement-top",r==="top"),{}}},s=()=>{Nd(a.$refs.toggle,e,{placement:this.placement,middleware:[Rd(-1),n,o,Bd(),Cd({limiter:Od()})]}).then(({x:r,y:_})=>{Object.assign(e.style,{left:"".concat(r,"px"),top:"".concat(_,"px"),width:"".concat(a.$refs.toggle.getBoundingClientRect().width,"px")})})};return Sd(a.$refs.toggle,e,s)}},localFilterBy(){const e=/[^<]*<([^>]+)/;return this.filterBy!==null?this.filterBy:this.userSelect?(a,i,n)=>{var o,s,r;const _=n.match(e);return _&&((r=(s=(o=a.subname)==null?void 0:o.toLocaleLowerCase)==null?void 0:s.call(o))==null?void 0:r.indexOf(_[1].toLocaleLowerCase()))>-1||"".concat(i," ").concat(a.subname).toLocaleLowerCase().indexOf(n.toLocaleLowerCase())>-1}:Qa.VueSelect.props.filterBy.default},localLabel(){return this.label!==null?this.label:this.userSelect?"displayName":Qa.VueSelect.props.label.default},propsToForward(){const e=[...Object.keys(Qa.VueSelect.props),...Qa.VueSelect.mixins.flatMap(a=>{var i;return Object.keys((i=a.props)!=null?i:{})})];return{...Object.fromEntries(Object.entries(this.$props).filter(([a,i])=>e.includes(a))),calculatePosition:this.localCalculatePosition,filterBy:this.localFilterBy,label:this.localLabel}}},mounted(){!this.labelOutside&&!this.inputLabel&&!this.ariaLabelCombobox&&ka.util.warn("[NcSelect] An `inputLabel` or `ariaLabelCombobox` should be set. If an external label is used, `labelOutside` should be set to `true`."),this.inputLabel&&this.ariaLabelCombobox&&ka.util.warn("[NcSelect] Only one of `inputLabel` or `ariaLabelCombobox` should to be set.")},methods:{t:x}};var og=function(){var e=this,a=e._self._c;return a("VueSelect",e._g(e._b({staticClass:"select",class:{"select--no-wrap":e.noWrap,"user-select":e.userSelect},on:{search:i=>e.search=i},scopedSlots:e._u([!e.labelOutside&&e.inputLabel?{key:"header",fn:function(){return[a("label",{staticClass:"select__label",attrs:{for:e.inputId}},[e._v(" "+e._s(e.inputLabel)+" ")])]},proxy:!0}:null,{key:"search",fn:function({attributes:i,events:n}){return[a("input",e._g(e._b({class:["vs__search",e.inputClass],attrs:{required:e.inputRequired}},"input",i,!1),n))]}},{key:"open-indicator",fn:function({attributes:i}){return[a("ChevronDown",e._b({style:{cursor:e.disabled?null:"pointer"},attrs:{"fill-color":"var(--vs-controls-color)",size:26}},"ChevronDown",i,!1))]}},{key:"option",fn:function(i){return[e.userSelect?a("NcListItemIcon",e._b({attrs:{"avatar-size":32,name:i[e.localLabel],search:e.search}},"NcListItemIcon",i,!1)):a("NcEllipsisedOption",{attrs:{name:String(i[e.localLabel]),search:e.search}})]}},{key:"selected-option",fn:function(i){return[e.userSelect?a("NcListItemIcon",e._b({attrs:{"avatar-size":e.avatarSize,name:i[e.localLabel],"no-margin":"",search:e.search}},"NcListItemIcon",i,!1)):a("NcEllipsisedOption",{attrs:{name:String(i[e.localLabel]),search:e.search}})]}},{key:"spinner",fn:function(i){return[i.loading?a("NcLoadingIcon"):e._e()]}},{key:"no-options",fn:function(){return[e._v(" "+e._s(e.t("No results"))+" ")]},proxy:!0},e._l(e.$scopedSlots,function(i,n){return{key:n,fn:function(o){return[e._t(n,null,null,o)]}}})],null,!0)},"VueSelect",e.propsToForward,!1),e.$listeners))},sg=[],rg=te(ng,og,sg,!1,null,null);const R0=rg.exports;oe(zl);function lg(e=[],a=[]){const i={},n=[];for(const o of e){const s=o.split("/");let[r,_]=[s.shift(),s.join("/")];_||(_=r,r=x("Global")),i[r]=i[r]||{continent:r,regions:[]},i[r].regions.push({label:Ir(_),cities:[],timezoneId:o})}for(const o of a){const{continent:s,label:r,timezoneId:_}=o;i[s]=i[s]||{continent:s,regions:[]},i[s].regions.push({label:r,cities:[],timezoneId:_})}for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&(i[o].regions.sort((s,r)=>s.labelo.continent[]},value:{type:String,default:"floating"},uid:{type:[String,Number],default:()=>"tz-".concat(st(5))}},emits:["input"],computed:{placeholder(){return x("Type to search time zone")},selectedTimezone(){for(const e of this.additionalTimezones)if(e.timezoneId===this.value)return e;return{label:Ir(this.value),timezoneId:this.value}},options(){const e=_g(),a=lg(e.listAllTimezones(),this.additionalTimezones);let i=[];return Object.values(a).forEach(n=>{i=i.concat(n.regions)}),i}},methods:{t:x,change(e){e&&this.$emit("input",e.timezoneId)},isSelectable(e){return!e.timezoneId.startsWith("tz-group__")},filterBy(e,a,i){const n=i.trim().split(" ");return e.timezoneId.startsWith("tz-group__")?e.regions.some(o=>this.matchTimezoneId(o.timezoneId,n)):this.matchTimezoneId(e.timezoneId,n)},matchTimezoneId(e,a){return a.every(i=>e.toLowerCase().includes(i.toLowerCase()))}}};var fg=function(){var e=this,a=e._self._c;return a("NcSelect",{attrs:{"aria-label-combobox":e.t("Search for time zone"),clearable:!1,"filter-by":e.filterBy,multiple:!1,options:e.options,placeholder:e.placeholder,selectable:e.isSelectable,uid:e.uid,value:e.selectedTimezone,label:"label"},on:{"option:selected":e.change}})},gg=[],hg=te(dg,fg,gg,!1,null,null);const Fg=hg.exports;function Hr(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function C0(e){return Hr(e)?new Date(e.getTime()):e==null?new Date(NaN):new Date(e)}function ug(e){return Hr(e)&&!isNaN(e.getTime())}function Pr(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var i=C0(e),n=i.getDay(),o=(n+7-a)%7;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function Gr(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.firstDayOfWeek,n=i===void 0?0:i,o=a.firstWeekContainsDate,s=o===void 0?1:o;if(!(s>=1&&s<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var r=C0(e),_=r.getFullYear(),l=new Date(0),g=_+1;g>=_-1&&(l.setFullYear(g,0,s),l.setHours(0,0,0,0),l=Pr(l,n),!(r.getTime()>=l.getTime()));g--);return l}function eo(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=a.firstDayOfWeek,n=i===void 0?0:i,o=a.firstWeekContainsDate,s=o===void 0?1:o,r=C0(e),_=Pr(r,n),l=Gr(r,{firstDayOfWeek:n,firstWeekContainsDate:s}),g=_.getTime()-l.getTime();return Math.round(g/(7*24*3600*1e3))+1}var Ur={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},cg=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function Ke(e){for(var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,i="".concat(Math.abs(e)),n=e<0?"-":"";i.length1&&arguments[1]!==void 0?arguments[1]:"",i=e>0?"-":"+",n=Math.abs(e),o=Math.floor(n/60),s=n%60;return i+Ke(o,2)+a+Ke(s,2)}var es=function(e,a,i){var n=e<12?"AM":"PM";return i?n.toLocaleLowerCase():n},It={Y:function(e){var a=e.getFullYear();return a<=9999?"".concat(a):"+".concat(a)},YY:function(e){return Ke(e.getFullYear(),4).substr(2)},YYYY:function(e){return Ke(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return Ke(e.getMonth()+1,2)},MMM:function(e,a){return a.monthsShort[e.getMonth()]},MMMM:function(e,a){return a.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return Ke(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return Ke(e.getHours(),2)},h:function(e){var a=e.getHours();return a===0?12:a>12?a%12:a},hh:function(){var e=It.h.apply(It,arguments);return Ke(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return Ke(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return Ke(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return Ke(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return Ke(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,a){return a.weekdaysMin[e.getDay()]},ddd:function(e,a){return a.weekdaysShort[e.getDay()]},dddd:function(e,a){return a.weekdays[e.getDay()]},A:function(e,a){var i=a.meridiem||es;return i(e.getHours(),e.getMinutes(),!1)},a:function(e,a){var i=a.meridiem||es;return i(e.getHours(),e.getMinutes(),!0)},Z:function(e){return Xo(Jo(e),":")},ZZ:function(e){return Xo(Jo(e))},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,a){return eo(e,{firstDayOfWeek:a.firstDayOfWeek,firstWeekContainsDate:a.firstWeekContainsDate})},ww:function(e,a){return Ke(It.w(e,a),2)}};function B0(e,a){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=a?String(a):"YYYY-MM-DDTHH:mm:ss.SSSZ",o=C0(e);if(!ug(o))return"Invalid Date";var s=i.locale||Ur;return n.replace(cg,function(r,_){return _||(typeof It[r]=="function"?"".concat(It[r](o,s)):r)})}function as(e){return bg(e)||pg(e)||mg()}function mg(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function pg(e){if(Symbol.iterator in Object(e)||Object.prototype.toString.call(e)==="[object Arguments]")return Array.from(e)}function bg(e){if(Array.isArray(e)){for(var a=0,i=new Array(e.length);a68?i-1:i)*100+n,ja({},$0,n)}),Fe("YYYY",vg,$0),Fe("M",mt,function(e){return ja({},ui,parseInt(e,10)-1)}),Fe("MM",Ba,function(e){return ja({},ui,parseInt(e,10)-1)}),Fe("MMM",Ht("monthsShort"),Pt("monthsShort",ui)),Fe("MMMM",Ht("months"),Pt("months",ui)),Fe("D",mt,is),Fe("DD",Ba,is),Fe(["H","h"],mt,ns),Fe(["HH","hh"],Ba,ns),Fe("m",mt,os),Fe("mm",Ba,os),Fe("s",mt,ss),Fe("ss",Ba,ss),Fe("S",zr,function(e){return ja({},Q0,parseInt(e,10)*100)}),Fe("SS",Ba,function(e){return ja({},Q0,parseInt(e,10)*10)}),Fe("SSS",wg,Q0);function Bg(e){return e.meridiemParse||/[ap]\.?m?\.?/i}function Og(e){return"".concat(e).toLowerCase().charAt(0)==="p"}Fe(["A","a"],Bg,function(e,a){var i=typeof a.isPM=="function"?a.isPM(e):Og(e);return{isPM:i}});function Ng(e){var a=e.match(/([+-]|\d\d)/g)||["-","0","0"],i=Dg(a,3),n=i[0],o=i[1],s=i[2],r=parseInt(o,10)*60+parseInt(s,10);return r===0?0:n==="+"?-r:+r}Fe(["Z","ZZ"],Sg,function(e){return{offset:Ng(e)}}),Fe("x",Wr,function(e){return{date:new Date(parseInt(e,10))}}),Fe("X",Rg,function(e){return{date:new Date(parseFloat(e)*1e3)}}),Fe("d",zr,"weekday"),Fe("dd",Ht("weekdaysMin"),Pt("weekdaysMin","weekday")),Fe("ddd",Ht("weekdaysShort"),Pt("weekdaysShort","weekday")),Fe("dddd",Ht("weekdays"),Pt("weekdays","weekday")),Fe("w",mt,"week"),Fe("ww",Ba,"week");function xg(e,a){if(e!==void 0&&a!==void 0){if(a){if(e<12)return e+12}else if(e===12)return 0}return e}function Mg(e){for(var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new Date,i=[0,0,1,0,0,0,0],n=[a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()],o=!0,s=0;s<7;s++)e[s]===void 0?i[s]=o?n[s]:i[s]:(i[s]=e[s],o=!1);return i}function jg(e,a,i,n,o,s,r){var _;return e<100&&e>=0?(_=new Date(e+400,a,i,n,o,s,r),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,i,n,o,s,r),_}function Yg(){for(var e,a=arguments.length,i=new Array(a),n=0;n=0?(i[0]+=400,e=new Date(Date.UTC.apply(Date,i)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(o)):e=new Date(Date.UTC.apply(Date,i)),e}function qg(e,a,i){var n=a.match(Ag);if(!n)throw new Error;for(var o=n.length,s={},r=0;r2&&arguments[2]!==void 0?arguments[2]:{};try{var n=i.locale,o=n===void 0?Ur:n,s=i.backupDate,r=s===void 0?new Date:s,_=qg(e,a,o),l=_.year,g=_.month,d=_.day,f=_.hour,h=_.minute,u=_.second,m=_.millisecond,b=_.isPM,y=_.date,k=_.offset,w=_.weekday,S=_.week;if(y)return y;var j=[l,g,d,f,h,u,m];if(j[3]=xg(j[3],b),S!==void 0&&g===void 0&&d===void 0){var Z=Gr(l===void 0?r:new Date(l,3),{firstDayOfWeek:o.firstDayOfWeek,firstWeekContainsDate:o.firstWeekContainsDate});return new Date(Z.getTime()+(S-1)*7*24*3600*1e3)}var B,G=Mg(j,r);return k!==void 0?(G[6]+=k*60*1e3,B=Yg.apply(void 0,as(G))):B=jg.apply(void 0,as(G)),w!==void 0&&B.getDay()!==w?new Date(NaN):B}catch{return new Date(NaN)}}function wi(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?wi=function(a){return typeof a}:wi=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},wi(e)}function et(e,a,i){return a in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,e}function pn(){return pn=Object.assign||function(e){for(var a=1;a=0)&&(i[o]=e[o]);return i}function Ig(e,a){if(e==null)return{};var i=Zg(e,a),n,o;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Gt(e,a){return Hg(e)||Pg(e,a)||Gg(e,a)||Ug()}function Hg(e){if(Array.isArray(e))return e}function Pg(e,a){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var i=[],n=!0,o=!1,s=void 0;try{for(var r=e[Symbol.iterator](),_;!(n=(_=r.next()).done)&&(i.push(_.value),!(a&&i.length===a));n=!0);}catch(l){o=!0,s=l}finally{try{!n&&r.return!=null&&r.return()}finally{if(o)throw s}}return i}}function Gg(e,a){if(e){if(typeof e=="string")return ls(e,a);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set")return Array.from(i);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return ls(e,a)}}function ls(e,a){(a==null||a>e.length)&&(a=e.length);for(var i=0,n=new Array(a);i1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,r=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,_=new Date(e,a,i,n,o,s,r);return e<100&&e>=0&&_.setFullYear(e),_}function Aa(e){return e instanceof Date&&!isNaN(e)}function O0(e){return Array.isArray(e)&&e.length===2&&e.every(Aa)&&e[0]<=e[1]}function Kg(e){return Array.isArray(e)&&e.every(Aa)}function At(e){var a=new Date(e);if(Aa(a))return a;for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o1&&arguments[1]!==void 0?arguments[1]:document.body;if(!e||e===a)return null;var i=function(s,r){return getComputedStyle(s,null).getPropertyValue(r)},n=/(auto|scroll)/,o=n.test(i(e,"overflow")+i(e,"overflow-y")+i(e,"overflow-x"));return o?e:N0(e.parentNode,a)}var _h={name:"Popup",inject:{prefixClass:{default:"mx"}},props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var a=this;this.$nextTick(function(){e&&a.displayPopup()})}}},mounted:function(){var e=this;this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var a=this.$parent.$el;this._displayPopup=sh(function(){return e.displayPopup()}),this._scrollParent=N0(a)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)},beforeDestroy:function(){this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup)},methods:{handleClickOutside:function(e){if(this.visible){var a=e.target,i=this.$el;i&&!i.contains(a)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(this.visible){var e=this.$el,a=this.$parent.$el,i=this.appendToBody;this._popupRect||(this._popupRect=rh(e));var n=this._popupRect,o=n.width,s=n.height,r=lh(a,o,s,i),_=r.left,l=r.top;this.left=_,this.top=l}}}};function ia(e,a,i,n,o,s,r,_,l,g){var d=typeof i=="function"?i.options:i;return e&&e.render&&(d.render=e.render,d.staticRenderFns=e.staticRenderFns,d._compiled=!0),i}var dh=_h,fh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("transition",{attrs:{name:e.prefixClass+"-zoom-in-down"}},[e.visible?i("div",{class:e.prefixClass+"-datepicker-main "+e.prefixClass+"-datepicker-popup",style:{top:e.top,left:e.left,position:"absolute"}},[e._t("default")],2):e._e()])},gh=[],hh=void 0,Fh=ia({render:fh,staticRenderFns:gh},hh,dh),uh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"}},[i("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])},ch=[],mh=void 0,ph=ia({render:uh,staticRenderFns:ch},mh,{}),bh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"}},[i("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}}),e._v(" "),i("path",{attrs:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}),e._v(" "),i("path",{attrs:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}})])},Th=[],Dh=void 0,yh=ia({render:bh,staticRenderFns:Th},Dh,{}),Eh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"}},[i("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])},kh=[],Ah=void 0,wh=ia({render:Eh,staticRenderFns:kh},Ah,{}),vh={props:{type:String,disabled:Boolean},inject:{prefixClass:{default:"mx"}}},Sh=vh,Rh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("button",e._g({class:[e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-btn-icon-"+e.type,{disabled:e.disabled}],attrs:{type:"button",disabled:e.disabled}},e.$listeners),[i("i",{class:e.prefixClass+"-icon-"+e.type})])},Ch=[],Bh=void 0,to=ia({render:Rh,staticRenderFns:Ch},Bh,Sh),Oh={name:"TableDate",components:{IconButton:to},inject:{getLocale:{default:function(){return St}},getWeek:{default:function(){return eo}},prefixClass:{default:"mx"},onDateMouseEnter:{default:void 0},onDateMouseLeave:{default:void 0}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.getLocale().formatLocale.firstDayOfWeek||0},yearMonth:function(){var e=this.getLocale(),a=e.yearFormat,i=e.monthBeforeYear,n=e.monthFormat,o=n===void 0?"MMM":n,s={panel:"year",label:this.formatDate(this.calendar,a)},r={panel:"month",label:this.formatDate(this.calendar,o)};return i?[r,s]:[s,r]},days:function(){var e=this.getLocale(),a=e.days||e.formatLocale.weekdaysMin;return a.concat(a).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){var e=this.calendar.getFullYear(),a=this.calendar.getMonth(),i=eh({firstDayOfWeek:this.firstDayOfWeek,year:e,month:a});return ao(i,7)}},methods:{isDisabledArrows:function(e){var a=new Date(this.calendar);switch(e){case"last-year":a.setFullYear(a.getFullYear()-1,a.getMonth()+1,0),a.setHours(23,59,59,999);break;case"next-year":a.setFullYear(a.getFullYear()+1);break;case"last-month":a.setMonth(a.getMonth(),0),a.setHours(23,59,59,999);break;case"next-month":a.setMonth(a.getMonth()+1);break}return this.disabledCalendarChanger(a,e)},handleIconLeftClick:function(){this.$emit("changecalendar",Dn(this.calendar,function(e){return e-1}),"last-month")},handleIconRightClick:function(){this.$emit("changecalendar",Dn(this.calendar,function(e){return e+1}),"next-month")},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e-1}),"last-year")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e+1}),"next-year")},handlePanelChange:function(e){this.$emit("changepanel",e)},handleMouseEnter:function(e){typeof this.onDateMouseEnter=="function"&&this.onDateMouseEnter(e)},handleMouseLeave:function(e){typeof this.onDateMouseLeave=="function"&&this.onDateMouseLeave(e)},handleCellClick:function(e){var a=e.target;a.tagName.toUpperCase()==="DIV"&&(a=a.parentNode);var i=a.getAttribute("data-row-col");if(i){var n=i.split(",").map(function(l){return parseInt(l,10)}),o=Gt(n,2),s=o[0],r=o[1],_=this.dates[s][r];this.$emit("select",new Date(_))}},formatDate:function(e,a){return B0(e,a,{locale:this.getLocale().formatLocale})},getCellTitle:function(e){var a=this.titleFormat;return this.formatDate(e,a)},getWeekNumber:function(e){return this.getWeek(e,this.getLocale().formatLocale)}}},Nh=Oh,xh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-date"},[i("div",{class:e.prefixClass+"-calendar-header"},[i("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-year")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),i("icon-button",{attrs:{type:"left",disabled:e.isDisabledArrows("last-month")},on:{click:e.handleIconLeftClick}}),e._v(" "),i("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-year")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),i("icon-button",{attrs:{type:"right",disabled:e.isDisabledArrows("next-month")},on:{click:e.handleIconRightClick}}),e._v(" "),i("span",{class:e.prefixClass+"-calendar-header-label"},e._l(e.yearMonth,function(n){return i("button",{key:n.panel,class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-btn-current-"+n.panel,attrs:{type:"button"},on:{click:function(o){return e.handlePanelChange(n.panel)}}},[e._v(` + `+e._s(n.label)+` + `)])}),0)],1),e._v(" "),i("div",{class:e.prefixClass+"-calendar-content"},[i("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-date"},[i("thead",[i("tr",[e.showWeekNumber?i("th",{class:e.prefixClass+"-week-number-header"}):e._e(),e._v(" "),e._l(e.days,function(n){return i("th",{key:n},[e._v(e._s(n))])})],2)]),e._v(" "),i("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,function(n,o){return i("tr",{key:o,class:[e.prefixClass+"-date-row",e.getRowClasses(n)]},[e.showWeekNumber?i("td",{class:e.prefixClass+"-week-number",attrs:{"data-row-col":o+",0"}},[e._v(` + `+e._s(e.getWeekNumber(n[0]))+` + `)]):e._e(),e._v(" "),e._l(n,function(s,r){return i("td",{key:r,staticClass:"cell",class:e.getCellClasses(s),attrs:{"data-row-col":o+","+r,title:e.getCellTitle(s)},on:{mouseenter:function(_){return e.handleMouseEnter(s)},mouseleave:function(_){return e.handleMouseLeave(s)}}},[i("div",[e._v(e._s(s.getDate()))])])})],2)}),0)])])])},Mh=[],jh=void 0,Yh=ia({render:xh,staticRenderFns:Mh},jh,Nh),qh={name:"TableMonth",components:{IconButton:to},inject:{getLocale:{default:function(){return St}},prefixClass:{default:"mx"}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{calendarYear:function(){return this.calendar.getFullYear()},months:function(){var e=this.getLocale(),a=e.months||e.formatLocale.monthsShort,i=a.map(function(n,o){return{text:n,month:o}});return ao(i,3)}},methods:{isDisabledArrows:function(e){var a=new Date(this.calendar);switch(e){case"last-year":a.setFullYear(a.getFullYear()-1,11,31),a.setHours(23,59,59,999);break;case"next-year":a.setFullYear(a.getFullYear()+1,0,1);break}return this.disabledCalendarChanger(a,e)},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e-1}),"last-year")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e+1}),"next-year")},handlePanelChange:function(){this.$emit("changepanel","year")},handleClick:function(e){var a=e.target;a.tagName.toUpperCase()==="DIV"&&(a=a.parentNode);var i=a.getAttribute("data-month");i&&!a.classList.contains("disabled")&&this.$emit("select",parseInt(i,10))}}},Lh=qh,Zh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-month"},[i("div",{class:e.prefixClass+"-calendar-header"},[i("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-year")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),i("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-year")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),i("span",{class:e.prefixClass+"-calendar-header-label"},[i("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text",attrs:{type:"button"},on:{click:e.handlePanelChange}},[e._v(` + `+e._s(e.calendarYear)+` + `)])])],1),e._v(" "),i("div",{class:e.prefixClass+"-calendar-content"},[i("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-month",on:{click:e.handleClick}},e._l(e.months,function(n,o){return i("tr",{key:o},e._l(n,function(s,r){return i("td",{key:r,staticClass:"cell",class:e.getCellClasses(s.month),attrs:{"data-month":s.month}},[i("div",[e._v(e._s(s.text))])])}),0)}),0)])])},Ih=[],Hh=void 0,Ph=ia({render:Zh,staticRenderFns:Ih},Hh,Lh),Gh={name:"TableYear",components:{IconButton:to},inject:{prefixClass:{default:"mx"}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},getCellClasses:{type:Function,default:function(){return[]}},getYearPanel:{type:Function}},computed:{years:function(){var e=new Date(this.calendar);return typeof this.getYearPanel=="function"?this.getYearPanel(e):this.getYears(e)},firstYear:function(){return this.years[0][0]},lastYear:function(){var e=function(a){return a[a.length-1]};return e(e(this.years))}},methods:{isDisabledArrows:function(e){var a=new Date(this.calendar);switch(e){case"last-decade":a.setFullYear(this.firstYear-1,11,31),a.setHours(23,59,59,999);break;case"next-decade":a.setFullYear(this.lastYear+1,0,1);break}return this.disabledCalendarChanger(a,e)},getYears:function(e){for(var a=Math.floor(e.getFullYear()/10)*10,i=[],n=0;n<10;n++)i.push(a+n);return ao(i,2)},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e-10}),"last-decade")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",wt(this.calendar,function(e){return e+10}),"next-decade")},handleClick:function(e){var a=e.target;a.tagName.toUpperCase()==="DIV"&&(a=a.parentNode);var i=a.getAttribute("data-year");i&&!a.classList.contains("disabled")&&this.$emit("select",parseInt(i,10))}}},Uh=Gh,zh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-year"},[i("div",{class:e.prefixClass+"-calendar-header"},[i("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-decade")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),i("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-decade")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),i("span",{class:e.prefixClass+"-calendar-header-label"},[i("span",[e._v(e._s(e.firstYear))]),e._v(" "),i("span",{class:e.prefixClass+"-calendar-decade-separator"}),e._v(" "),i("span",[e._v(e._s(e.lastYear))])])],1),e._v(" "),i("div",{class:e.prefixClass+"-calendar-content"},[i("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-year",on:{click:e.handleClick}},e._l(e.years,function(n,o){return i("tr",{key:o},e._l(n,function(s,r){return i("td",{key:r,staticClass:"cell",class:e.getCellClasses(s),attrs:{"data-year":s}},[i("div",[e._v(e._s(s))])])}),0)}),0)])])},Wh=[],Vh=void 0,$h=ia({render:zh,staticRenderFns:Wh},Vh,Uh),ot={name:"CalendarPanel",inject:{prefixClass:{default:"mx"},dispatchDatePicker:{default:function(){return function(){}}}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},defaultPanel:{type:String},disabledCalendarChanger:{type:Function,default:function(){return!1}},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},getYearPanel:{type:Function},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){var e=["date","month","year"],a=Math.max(e.indexOf(this.type),e.indexOf(this.defaultPanel)),i=a!==-1?e[a]:"date";return{panel:i,innerCalendar:new Date}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],a={year:Jg,month:Tn,date:Xg},i=a[this.type]||a.date;return e.filter(Aa).map(function(n){return i(n)})},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{initCalendar:function(){var e=this.calendar;if(!Aa(e)){var a=this.innerValue.length;e=At(a>0?this.innerValue[a-1]:this.defaultValue)}this.innerCalendar=Tn(e)},isDisabled:function(e){return this.disabledDate(new Date(e),this.innerValue)},emitDate:function(e,a){this.isDisabled(e)||(this.$emit("select",e,a,this.innerValue),this.dispatchDatePicker("pick",e,a))},handleCalendarChange:function(e,a){var i=new Date(this.innerCalendar);this.innerCalendar=e,this.$emit("update:calendar",e),this.dispatchDatePicker("calendar-change",e,i,a)},handelPanelChange:function(e){var a=this.panel;this.panel=e,this.dispatchDatePicker("panel-change",e,a)},handleSelectYear:function(e){if(this.type==="year"){var a=this.getYearCellDate(e);this.emitDate(a,"year")}else if(this.handleCalendarChange(Ea(e,this.calendarMonth),"year"),this.handelPanelChange("month"),this.partialUpdate&&this.innerValue.length===1){var i=new Date(this.innerValue[0]);i.setFullYear(e),this.emitDate(i,"year")}},handleSelectMonth:function(e){if(this.type==="month"){var a=this.getMonthCellDate(e);this.emitDate(a,"month")}else if(this.handleCalendarChange(Ea(this.calendarYear,e),"month"),this.handelPanelChange("date"),this.partialUpdate&&this.innerValue.length===1){var i=new Date(this.innerValue[0]);i.setFullYear(this.calendarYear),this.emitDate(Dn(i,e),"month")}},handleSelectDate:function(e){this.emitDate(e,this.type==="week"?"week":"date")},getMonthCellDate:function(e){return Ea(this.calendarYear,e)},getYearCellDate:function(e){return Ea(e,0)},getDateClasses:function(e){var a=e.getMonth()!==this.calendarMonth,i=[];e.getTime()===new Date().setHours(0,0,0,0)&&i.push("today"),a&&i.push("not-current-month");var n=this.getStateClass(e);return n==="active"&&a||i.push(n),i.concat(this.getClasses(e,this.innerValue,i.join(" ")))},getMonthClasses:function(e){var a=[];if(this.type!=="month"){this.calendarMonth===e&&a.push("active");var i=this.getMonthCellDate(e);return this.disabledCalendarChanger(i,"month")&&a.push("disabled"),a}var n=this.getMonthCellDate(e);return a.push(this.getStateClass(n)),a.concat(this.getClasses(n,this.innerValue,a.join(" ")))},getYearClasses:function(e){var a=[];if(this.type!=="year"){this.calendarYear===e&&a.push("active");var i=this.getYearCellDate(e);return this.disabledCalendarChanger(i,"year")&&a.push("disabled"),a}var n=this.getYearCellDate(e);return a.push(this.getStateClass(n)),a.concat(this.getClasses(n,this.innerValue,a.join(" ")))},getStateClass:function(e){return this.isDisabled(e)?"disabled":this.innerValue.some(function(a){return a.getTime()===e.getTime()})?"active":""},getWeekState:function(e){if(this.type!=="week")return"";var a=e[0].getTime(),i=e[6].getTime(),n=this.innerValue.some(function(o){var s=o.getTime();return s>=a&&s<=i});return n?"".concat(this.prefixClass,"-active-week"):""}},render:function(){var e=arguments[0],a=this.panel,i=this.innerCalendar;return a==="year"?e($h,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:i,getCellClasses:this.getYearClasses,getYearPanel:this.getYearPanel},on:{select:this.handleSelectYear,changecalendar:this.handleCalendarChange}}):a==="month"?e(Ph,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:i,getCellClasses:this.getMonthClasses},on:{select:this.handleSelectMonth,changepanel:this.handelPanelChange,changecalendar:this.handleCalendarChange}}):e(Yh,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:i,getCellClasses:this.getDateClasses,getRowClasses:this.getWeekState,titleFormat:this.titleFormat,showWeekNumber:typeof this.showWeekNumber=="boolean"?this.showWeekNumber:this.type==="week"},class:et({},"".concat(this.prefixClass,"-calendar-week-mode"),this.type==="week"),on:{select:this.handleSelectDate,changepanel:this.handelPanelChange,changecalendar:this.handleCalendarChange}})}},Ut={name:"CalendarRange",components:{CalendarPanel:ot},provide:function(){return{onDateMouseEnter:this.onDateMouseEnter,onDateMouseLeave:this.onDateMouseLeave}},inject:{prefixClass:{default:"mx"}},props:pe({},ot.props),data:function(){return{innerValue:[],calendars:[],hoveredValue:null}},computed:{calendarMinDiff:function(){var e={date:1,month:12,year:120};return e[this.type]||e.date},calendarMaxDiff:function(){return 1/0},defaultValues:function(){return Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue]}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=O0(this.value)?this.value:[new Date(NaN),new Date(NaN)];var a=this.innerValue.map(function(i,n){return Tn(At(i,e.defaultValues[n]))});this.updateCalendars(a)}}},methods:{handleSelect:function(e,a){var i=Gt(this.innerValue,2),n=i[0],o=i[1];Aa(n)&&!Aa(o)?(n.getTime()>e.getTime()?this.innerValue=[e,n]:this.innerValue=[n,e],this.emitDate(this.innerValue,a)):this.innerValue=[e,new Date(NaN)]},onDateMouseEnter:function(e){this.hoveredValue=e},onDateMouseLeave:function(){this.hoveredValue=null},emitDate:function(e,a){this.$emit("select",e,a)},updateStartCalendar:function(e){this.updateCalendars([e,this.calendars[1]],1)},updateEndCalendar:function(e){this.updateCalendars([this.calendars[0],e],0)},updateCalendars:function(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,i=this.getCalendarGap(e);if(i){var n=new Date(e[a]);n.setMonth(n.getMonth()+(a===0?-i:i)),e[a]=n}this.calendars=e},getCalendarGap:function(e){var a=Gt(e,2),i=a[0],n=a[1],o=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth(),r=o*12+s,_=this.calendarMinDiff,l=this.calendarMaxDiff;return r<_?_-r:r>l?l-r:0},getRangeClasses:function(e,a,i){var n=[].concat(this.getClasses(e,a,i));if(/disabled|active/.test(i))return n;var o=function(s,r){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(m){return m.getTime()},l=_(s),g=r.map(_),d=Gt(g,2),f=d[0],h=d[1];if(f>h){var u=[h,f];f=u[0],h=u[1]}return l>f&&l"u")return 0;if(ci!==void 0)return ci;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var a=document.createElement("div");return a.style.width="100%",e.appendChild(a),ci=e.offsetWidth-a.offsetWidth,e.parentNode.removeChild(e),ci}var Kh={inject:{prefixClass:{default:"mx"}},data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=Qh(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var a=e.clientHeight*100/e.scrollHeight;this.thumbHeight=a<100?"".concat(a,"%"):""}},handleScroll:function(e){var a=e.currentTarget,i=a.scrollHeight,n=a.scrollTop;this.thumbTop="".concat(n*100/i,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0;var a=this.$refs.thumb.offsetTop;this._prevY=e.clientY-a,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var a=e.clientY,i=this.$refs.wrap,n=i.scrollHeight,o=i.clientHeight,s=a-this._prevY,r=s*n/o;i.scrollTop=r}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},Jh=Kh,Xh=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{class:e.prefixClass+"-scrollbar",style:{position:"relative",overflow:"hidden"}},[i("div",{ref:"wrap",class:e.prefixClass+"-scrollbar-wrap",style:{marginRight:"-"+e.scrollbarWidth+"px"},on:{scroll:e.handleScroll}},[e._t("default")],2),e._v(" "),i("div",{class:e.prefixClass+"-scrollbar-track"},[i("div",{ref:"thumb",class:e.prefixClass+"-scrollbar-thumb",style:{height:e.thumbHeight,top:e.thumbTop},on:{mousedown:e.handleDragstart}})])])},eF=[],aF=void 0,Kr=ia({render:Xh,staticRenderFns:eF},aF,Jh),K0=function(e){return e=parseInt(e,10),e<10?"0".concat(e):"".concat(e)},J0=function(e,a,i){if(Array.isArray(i))return i.filter(function(s){return s>=0&&s2&&arguments[2]!==void 0?arguments[2]:0;if(n<=0){requestAnimationFrame(function(){a.scrollTop=i});return}var o=i-a.scrollTop,s=o/n*10;requestAnimationFrame(function(){var r=a.scrollTop+s;if(r>=i){a.scrollTop=i;return}a.scrollTop=r,e(a,i,n-10)})},iF={name:"ListColumns",components:{ScrollbarVertical:Kr},inject:{prefixClass:{default:"mx"}},props:{date:Date,scrollDuration:{type:Number,default:100},getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter(function(a){return a.list.length>0})}},watch:{date:{handler:function(){var e=this;this.$nextTick(function(){e.scrollToSelected(e.scrollDuration)})}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return J0(this.use12h?12:24,this.hourStep,this.hourOptions).map(function(a){var i=new Date(e.date),n=K0(a);e.use12h&&(a===0&&(n="12"),i.getHours()>=12&&(a+=12));var o=i.setHours(a);return{value:o,text:n}})},getMinutesList:function(){var e=this;return J0(60,this.minuteStep,this.minuteOptions).map(function(a){var i=new Date(e.date).setMinutes(a);return{value:i,text:K0(a)}})},getSecondsList:function(){var e=this;return J0(60,this.secondStep,this.secondOptions).map(function(a){var i=new Date(e.date).setSeconds(a);return{value:i,text:K0(a)}})},getAMPMList:function(){var e=this;return["AM","PM"].map(function(a,i){var n=new Date(e.date),o=n.setHours(n.getHours()%12+i*12);return{text:a,value:o}})},scrollToSelected:function(e){for(var a=this.$el.querySelectorAll(".active"),i=0;i0&&arguments[0]!==void 0?arguments[0]:"",a=e.split(":");if(a.length>=2){var i=parseInt(a[0],10),n=parseInt(a[1],10);return{hours:i,minutes:n}}return null}var _F=function(e,a){e&&(e.scrollTop=a)},dF={name:"ListOptions",components:{ScrollbarVertical:Kr},inject:{getLocale:{default:function(){return St}},prefixClass:{default:"mx"}},props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],a=this.options;if(typeof a=="function")return a()||[];var i=X0(a.start),n=X0(a.end),o=X0(a.step),s=a.format||this.format;if(i&&n&&o)for(var r=i.minutes+i.hours*60,_=n.minutes+n.hours*60,l=o.minutes+o.hours*60,g=Math.floor((_-r)/l),d=0;d<=g;d++){var f=r+d*l,h=Math.floor(f/60),u=f%60,m=new Date(this.date).setHours(h,u,0);e.push({value:m,text:this.formatDate(m,s)})}return e}},mounted:function(){this.scrollToSelected()},methods:{formatDate:function(e,a){return B0(e,a,{locale:this.getLocale().formatLocale})},scrollToSelected:function(){var e=this.$el.querySelector(".active");if(e){var a=N0(e,this.$el);if(a){var i=e.offsetTop;_F(a,i)}}},handleSelect:function(e){this.$emit("select",e,"time")}}},fF=dF,gF=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("scrollbar-vertical",e._l(e.list,function(n){return i("div",{key:n.value,class:[e.prefixClass+"-time-option",e.getClasses(n.value)],on:{click:function(o){return e.handleSelect(n.value)}}},[e._v(` + `+e._s(n.text)+` + `)])}),0)},hF=[],FF=void 0,uF=ia({render:gF,staticRenderFns:hF},FF,fF),cF={name:"TimePanel",components:{ListColumns:lF,ListOptions:uF},inject:{getLocale:{default:function(){return St}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0},scrollDuration:{type:Number,default:100}},data:function(){return{innerValue:At(this.value,this.defaultValue)}},computed:{title:function(){var e=this.timeTitleFormat,a=new Date(this.innerValue);return this.formatDate(a,e)},innerForamt:function(){return typeof this.format=="string"?this.format:"HH:mm:ss"},ShowHourMinuteSecondAMPM:function(){var e=this,a=this.innerForamt,i={showHour:/[HhKk]/.test(a),showMinute:/m/.test(a),showSecond:/s/.test(a),use12h:/a/i.test(a)},n={};return Object.keys(i).forEach(function(o){n[o]=typeof e[o]=="boolean"?e[o]:i[o]}),n}},watch:{value:{immediate:!0,handler:function(){this.innerValue=At(this.value,this.defaultValue)}}},methods:{formatDate:function(e,a){return B0(e,a,{locale:this.getLocale().formatLocale})},isDisabledTime:function(e){return this.disabledTime(new Date(e))},isDisabledHour:function(e){var a=new Date(e);return this.isDisabledTime(a)&&this.isDisabledTime(a.setMinutes(0,0,0))&&this.isDisabledTime(a.setMinutes(59,59,999))},isDisabledMinute:function(e){var a=new Date(e);return this.isDisabledTime(a)&&this.isDisabledTime(a.setSeconds(0,0))&&this.isDisabledTime(a.setSeconds(59,999))},isDisabledAMPM:function(e){var a=new Date(e),i=a.getHours()<12?0:12,n=i+11;return this.isDisabledTime(a)&&this.isDisabledTime(a.setHours(i,0,0,0))&&this.isDisabledTime(a.setHours(n,59,59,999))},isDisabled:function(e,a){return a==="hour"?this.isDisabledHour(e):a==="minute"?this.isDisabledMinute(e):a==="ampm"?this.isDisabledAMPM(e):this.isDisabledTime(e)},handleSelect:function(e,a){var i=new Date(e);this.isDisabled(e,a)||(this.innerValue=i,this.isDisabledTime(i)||this.$emit("select",i,a))},handleClickTitle:function(){this.$emit("clicktitle")},getClasses:function(e,a){var i=new Date(e);return this.isDisabled(e,a)?"disabled":i.getTime()===this.innerValue.getTime()?"active":""}}},mF=cF,pF=function(){var e=this,a=e.$createElement,i=e._self._c||a;return i("div",{class:e.prefixClass+"-time"},[e.showTimeHeader?i("div",{class:e.prefixClass+"-time-header"},[i("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-time-header-title",attrs:{type:"button"},on:{click:e.handleClickTitle}},[e._v(` + `+e._s(e.title)+` + `)])]):e._e(),e._v(" "),i("div",{class:e.prefixClass+"-time-content"},[e.timePickerOptions?i("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.innerForamt},on:{select:e.handleSelect}}):i("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep,"scroll-duration":e.scrollDuration},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])},bF=[],TF=void 0,La=ia({render:pF,staticRenderFns:bF},TF,mF),zt={name:"TimeRange",inject:{prefixClass:{default:"mx"}},props:pe({},La.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if(O0(this.value)){var e=Gt(this.value,2),a=e[0],i=e[1];this.startValue=a,this.endValue=i}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,a){var i=[this.startValue,this.endValue];this.$emit("select",i,e==="time"?"time-range":e,a)},handleSelectStart:function(e,a){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(a,0)},handleSelectEnd:function(e,a){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(a,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()2&&arguments[2]!==void 0?arguments[2]:!0;this.userInput=null;var n=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",n),this.$emit("change",n,a),i&&this.closePopup(),n},isValidValue:function(e){return this.validMultipleType?Kg(e):this.range?O0(e):Aa(e)},isValidValueAndNotDisabled:function(e){if(!this.isValidValue(e))return!1;var a=typeof this.disabledDate=="function"?this.disabledDate:function(){return!1},i=typeof this.disabledTime=="function"?this.disabledTime:function(){return!1};return Array.isArray(e)||(e=[e]),e.every(function(n){return!a(n)&&!i(n)})},handleMultipleDates:function(e,a){if(this.validMultipleType&&a){var i=a.filter(function(n){return n.getTime()!==e.getTime()});return i.length===a.length&&i.push(e),i}return e},handleSelectDate:function(e,a,i){e=this.handleMultipleDates(e,i),this.confirm?this.currentValue=e:this.emitValue(e,a,!this.validMultipleType&&(a===this.type||a==="time"))},clear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleClear:function(e){e.stopPropagation(),this.clear()},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){var a=e.currentTarget.getAttribute("data-index"),i=this.shortcuts[parseInt(a,10)];if(ua(i)&&typeof i.onClick=="function"){var n=i.onClick(this);n&&this.emitValue(n)}},openPopup:function(e){this.popupVisible||this.disabled||(this.defaultOpen=!0,this.$emit("open",e),this.$emit("update:open",!0))},closePopup:function(){this.popupVisible&&(this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1))},blur:function(){this.$refs.input&&this.$refs.input.blur()},focus:function(){this.$refs.input&&this.$refs.input.focus()},handleInputChange:function(){var e=this;if(!(!this.editable||this.userInput===null)){var a=this.userInput.trim();if(this.userInput=null,a===""){this.clear();return}var i;if(this.validMultipleType)i=a.split(this.innerRangeSeparator).map(function(o){return e.parseDate(o.trim())});else if(this.range){var n=a.split(this.innerRangeSeparator);n.length!==2&&(n=a.split(this.innerRangeSeparator.trim())),i=n.map(function(o){return e.parseDate(o.trim())})}else i=this.parseDate(a);this.isValidValueAndNotDisabled(i)?(this.emitValue(i),this.blur()):this.$emit("input-error",a)}},handleInputInput:function(e){this.userInput=typeof e=="string"?e:e.target.value},handleInputKeydown:function(e){var a=e.keyCode;a===9?this.closePopup():a===13&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(e),this.$emit("focus",e)},hasSlot:function(e){return!!(this.$slots[e]||this.$scopedSlots[e])},renderSlot:function(e,a,i){var n=this.$scopedSlots[e];return n?n(i)||a:this.$slots[e]||a},renderInput:function(){var e=this.$createElement,a=this.prefixClass,i=pe({name:"date",type:"text",autocomplete:"off",value:this.text,class:this.inputClass||"".concat(this.prefixClass,"-input"),readonly:!this.editable,disabled:this.disabled,placeholder:this.placeholder},this.inputAttr),n=i.value,o=i.class,s=Ig(i,["value","class"]),r={keydown:this.handleInputKeydown,focus:this.handleInputFocus,blur:this.handleInputBlur,input:this.handleInputInput,change:this.handleInputChange},_=this.renderSlot("input",e("input",{domProps:{value:n},class:o,attrs:pe({},s),on:pe({},r),ref:"input"}),{props:i,events:r}),l=this.type==="time"?e(yh):e(ph);return e("div",{class:"".concat(a,"-input-wrapper"),on:{mouseenter:this.handleMouseEnter,mouseleave:this.handleMouseLeave,click:this.openPopup},ref:"inputWrapper"},[_,this.showClearIcon?e("i",{class:"".concat(a,"-icon-clear"),on:{click:this.handleClear}},[this.renderSlot("icon-clear",e(wh))]):e("i",{class:"".concat(a,"-icon-calendar")},[this.renderSlot("icon-calendar",l)])])},renderContent:function(){var e=this.$createElement,a=this.range?yF:DF,i=a[this.type]||a.default,n=pe({},vt(this.$props,Object.keys(i.props)),{value:this.currentValue}),o=pe({},vt(this.$listeners,i.emits||[]),{select:this.handleSelectDate}),s=e(i,ai([{},{props:n,on:o,ref:"picker"}]));return e("div",{class:"".concat(this.prefixClass,"-datepicker-body")},[this.renderSlot("content",s,{value:this.currentValue,emit:this.handleSelectDate})])},renderSidebar:function(){var e=this,a=this.$createElement,i=this.prefixClass;return a("div",{class:"".concat(i,"-datepicker-sidebar")},[this.renderSlot("sidebar",null,{value:this.currentValue,emit:this.handleSelectDate}),this.shortcuts.map(function(n,o){return a("button",{key:o,attrs:{"data-index":o,type:"button"},class:"".concat(i,"-btn ").concat(i,"-btn-text ").concat(i,"-btn-shortcut"),on:{click:e.handleSelectShortcut}},[n.text])})])},renderHeader:function(){var e=this.$createElement;return e("div",{class:"".concat(this.prefixClass,"-datepicker-header")},[this.renderSlot("header",null,{value:this.currentValue,emit:this.handleSelectDate})])},renderFooter:function(){var e=this.$createElement,a=this.prefixClass;return e("div",{class:"".concat(a,"-datepicker-footer")},[this.renderSlot("footer",null,{value:this.currentValue,emit:this.handleSelectDate}),this.confirm?e("button",{attrs:{type:"button"},class:"".concat(a,"-btn ").concat(a,"-datepicker-btn-confirm"),on:{click:this.handleConfirmDate}},[this.confirmText]):null])}},render:function(){var e,a=arguments[0],i=this.prefixClass,n=this.inline,o=this.disabled,s=this.hasSlot("sidebar")||this.shortcuts.length?this.renderSidebar():null,r=a("div",{class:"".concat(i,"-datepicker-content")},[this.hasSlot("header")?this.renderHeader():null,this.renderContent(),this.hasSlot("footer")||this.confirm?this.renderFooter():null]);return a("div",{class:(e={},et(e,"".concat(i,"-datepicker"),!0),et(e,"".concat(i,"-datepicker-range"),this.range),et(e,"".concat(i,"-datepicker-inline"),n),et(e,"disabled",o),e)},[n?null:this.renderInput(),n?a("div",{class:"".concat(i,"-datepicker-main")},[s,r]):a(Fh,{ref:"popup",class:this.popupClass,style:this.popupStyle,attrs:{visible:this.popupVisible,appendToBody:this.appendToBody},on:{clickoutside:this.handleClickOutSide}},[s,r])])}};Ja.locale=Qr,Ja.install=function(e){e.component(Ja.name,Ja)},typeof window<"u"&&window.Vue&&Ja.install(window.Vue),pn(Ja,{CalendarPanel:ot,CalendarRange:Ut,TimePanel:La,TimeRange:zt,DatetimePanel:io,DatetimeRange:Jr}),oe(Vl);const EF={name:"CalendarBlankIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var kF=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon calendar-blank-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M19,19H5V8H19M16,1V3H8V1H6V3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3H18V1"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},AF=[],wF=te(EF,kF,AF,!1,null,null);const vF=wF.exports,SF={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var RF=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon web-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},CF=[],BF=te(SF,RF,CF,!1,null,null);const OF=BF.exports,_s={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD H:mm:ss",year:"YYYY",month:"YYYY-MM",time:"H:mm:ss",week:"w"},NF={name:"NcDateTimePicker",components:{CalendarBlank:vF,DatePicker:Ja,NcPopover:xn,NcTimezonePicker:Fg,Web:OF},inheritAttrs:!1,props:{clearable:{type:Boolean,default:!1},minuteStep:{type:Number,default:10},type:{type:String,default:"date"},format:{type:String,default:null},formatter:{type:Object,default:null},lang:{type:Object,default:null},value:{default:()=>new Date},timezoneId:{type:String,default:"UTC"},showTimezoneSelect:{type:Boolean,default:!1},highlightTimezone:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},showWeekNumber:{type:Boolean,default:!1},placeholder:{type:String,default:null}},emits:["update:value","update:timezone-id"],setup(){return{timezoneDialogHeaderId:"timezone-dialog-header-".concat(st())}},data(){return{showTimezonePopover:!1,tzVal:this.timezoneId}},computed:{defaultLang(){return{formatLocale:{months:$l(),monthsShort:Ql(),weekdays:Kl(),weekdaysShort:Jl(),weekdaysMin:Xl(),firstDayOfWeek:e1()},monthFormat:"MMM"}},defaultPlaceholder(){return this.type==="time"?x("Pick a time"):this.type==="month"?x("Pick a month"):this.type==="year"?x("Pick a year"):this.type==="week"?x("Pick a week"):this.type==="date"?x("Pick a date"):x("Pick a date and a time")},formatTypeMap(){var e;return(e=_s[this.type])!=null?e:_s.date},internalFormatter(){var e;return{getWeek:a=>{const i=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate()));i.setUTCDate(i.getUTCDate()+4-(i.getUTCDay()||7));const n=new Date(Date.UTC(i.getUTCFullYear(),0,1));return Math.ceil(((i-n)/864e5+1)/7)},...(e=this.formatter)!=null?e:{}}}},methods:{t:x,handleSelectYear(e){const a=this.$refs.datepicker.currentValue;if(a)try{const i=new Date(new Date(a).setFullYear(e));this.$refs.datepicker.selectDate(i)}catch{console.error("Invalid value",a,e)}},handleSelectMonth(e){const a=this.$refs.datepicker.currentValue;if(a)try{const i=new Date(new Date(a).setMonth(e));this.$refs.datepicker.selectDate(i)}catch{console.error("Invalid value",a,e)}},toggleTimezonePopover(){this.showTimezoneSelect&&(this.showTimezonePopover=!this.showTimezonePopover)}}};var xF=function(){var e=this,a=e._self._c;return a("DatePicker",e._g(e._b({ref:"datepicker",attrs:{"append-to-body":e.appendToBody,clearable:e.clearable,format:e.format?e.format:e.formatTypeMap,formatter:e.internalFormatter,lang:e.lang?e.lang:e.defaultLang,"minute-step":e.minuteStep,placeholder:e.placeholder?e.placeholder:e.defaultPlaceholder,"popup-class":{"show-week-number":e.showWeekNumber},"show-week-number":e.showWeekNumber,type:e.type,value:e.value},on:{"select-year":e.handleSelectYear,"select-month":e.handleSelectMonth,"update:value":function(i){return e.$emit("update:value",e.value)}},scopedSlots:e._u([{key:"icon-calendar",fn:function(){return[e.showTimezoneSelect?a("NcPopover",{attrs:{"popup-role":"dialog",shown:e.showTimezonePopover,"popover-base-class":"timezone-select__popper"},on:{"update:shown":function(i){e.showTimezonePopover=i}},scopedSlots:e._u([{key:"trigger",fn:function({attrs:i}){return[a("button",e._b({staticClass:"datetime-picker-inline-icon",class:{"datetime-picker-inline-icon--highlighted":e.highlightTimezone},on:{mousedown:function(n){return n.stopPropagation(),n.preventDefault(),(()=>{}).apply(null,arguments)}}},"button",i,!1),[a("Web",{attrs:{size:20}})],1)]}}],null,!1,270852355)},[a("div",{attrs:{role:"dialog","aria-labelledby":e.timezoneDialogHeaderId}},[a("div",{staticClass:"timezone-popover-wrapper__label"},[a("strong",{attrs:{id:e.timezoneDialogHeaderId}},[e._v(" "+e._s(e.t("Please select a time zone:"))+" ")])]),a("NcTimezonePicker",{staticClass:"timezone-popover-wrapper__timezone-select",on:{input:function(i){return e.$emit("update:timezone-id",arguments[0])}},model:{value:e.tzVal,callback:function(i){e.tzVal=i},expression:"tzVal"}})],1)]):a("CalendarBlank",{attrs:{size:20}})]},proxy:!0},e._l(e.$scopedSlots,function(i,n){return{key:n,fn:function(o){return[e._t(n,null,null,o)]}}})],null,!0)},"DatePicker",e.$attrs,!1),e.$listeners))},MF=[],jF=te(NF,xF,MF,!1,null,"4727c294");const YF=jF.exports;zs(YF);const qF=["date","datetime-local","month","time","week"],LF={name:"NcDateTimePickerNative",inheritAttrs:!1,props:{value:{type:Date,default:null},id:{type:String,required:!0},type:{type:String,default:"date",validate:e=>qF.includes(e)},label:{type:String,default:"Please choose a date"},min:{type:[Date,Boolean],default:null},max:{type:[Date,Boolean],default:null},hideLabel:{type:Boolean,default:!1},inputClass:{type:[Object,String],default:""}},emits:["input"],computed:{formattedValue(){return this.formatValue(this.value)},formattedMin(){return this.min?this.formatValue(this.min):!1},formattedMax(){return this.max?this.formatValue(this.max):!1},listeners(){return{...this.$listeners,input:e=>{if(isNaN(e.target.valueAsNumber))return this.$emit("input",null);if(this.type==="time"){const n=e.target.value;if(this.value===""){const{yyyy:_,MM:l,dd:g}=this.getReadableDate(new Date);return this.$emit("input",new Date("".concat(_,"-").concat(l,"-").concat(g,"T").concat(n)))}const{yyyy:o,MM:s,dd:r}=this.getReadableDate(this.value);return this.$emit("input",new Date("".concat(o,"-").concat(s,"-").concat(r,"T").concat(n)))}else if(this.type==="month"){const n=(new Date(e.target.value).getMonth()+1).toString().padStart(2,"0");if(this.value===""){const{yyyy:l,dd:g,hh:d,mm:f}=this.getReadableDate(new Date);return this.$emit("input",new Date("".concat(l,"-").concat(n,"-").concat(g,"T").concat(d,":").concat(f)))}const{yyyy:o,dd:s,hh:r,mm:_}=this.getReadableDate(this.value);return this.$emit("input",new Date("".concat(o,"-").concat(n,"-").concat(s,"T").concat(r,":").concat(_)))}const a=new Date(e.target.valueAsNumber).getTimezoneOffset()*1e3*60,i=e.target.valueAsNumber+a;return this.$emit("input",new Date(i))}}}},methods:{getReadableDate(e){if(e instanceof Date){const a=e.getFullYear().toString().padStart(4,"0"),i=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),s=e.getMinutes().toString().padStart(2,"0");return{yyyy:a,MM:i,dd:n,hh:o,mm:s}}},formatValue(e){if(e instanceof Date){const{yyyy:a,MM:i,dd:n,hh:o,mm:s}=this.getReadableDate(e);if(this.type==="datetime-local")return"".concat(a,"-").concat(i,"-").concat(n,"T").concat(o,":").concat(s);if(this.type==="date")return"".concat(a,"-").concat(i,"-").concat(n);if(this.type==="month")return"".concat(a,"-").concat(i);if(this.type==="time")return"".concat(o,":").concat(s);if(this.type==="week"){const r=new Date(a,0,1),_=Math.floor((e-r)/(24*60*60*1e3)),l=Math.ceil(_/7);return"".concat(a,"-W").concat(l)}}else return""}}};var ZF=function(){var e=this,a=e._self._c;return a("div",{staticClass:"native-datetime-picker"},[a("label",{class:{"hidden-visually":e.hideLabel},attrs:{for:e.id}},[e._v(e._s(e.label))]),a("input",e._g(e._b({staticClass:"native-datetime-picker--input",class:e.inputClass,attrs:{id:e.id,type:e.type,min:e.formattedMin,max:e.formattedMax},domProps:{value:e.formattedValue}},"input",e.$attrs,!1),e.listeners))])},IF=[],HF=te(LF,ZF,IF,!1,null,"fbe2ff4a");const PF=HF.exports;zs(PF);const GF={name:"AlertCircleOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var UF=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon alert-circle-outline-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},zF=[],WF=te(GF,UF,zF,!1,null,null);const VF=WF.exports,$F={name:"NcInputField",components:{NcButton:wa,AlertCircle:VF,Check:jn},inheritAttrs:!1,props:{value:{type:[String,Number],required:!0},type:{type:String,default:"text",validator:e=>["text","password","email","tel","url","search","number"].includes(e)},label:{type:String,default:void 0},labelOutside:{type:Boolean,default:!1},placeholder:{type:String,default:void 0},showTrailingButton:{type:Boolean,default:!1},trailingButtonLabel:{type:String,default:""},success:{type:Boolean,default:!1},error:{type:Boolean,default:!1},helperText:{type:String,default:""},disabled:{type:Boolean,default:!1},pill:{type:Boolean,default:!1},inputClass:{type:[Object,String],default:""}},emits:["update:value","trailing-button-click"],computed:{computedId(){return this.$attrs.id&&this.$attrs.id!==""?this.$attrs.id:this.inputName},inputName(){return"input"+st()},hasLeadingIcon(){return this.$slots.default},hasTrailingIcon(){return this.success},hasPlaceholder(){return this.placeholder!==""&&this.placeholder!==void 0},computedPlaceholder(){return this.hasPlaceholder?this.placeholder:this.label},isValidLabel(){const e=this.label||this.labelOutside;return e||console.warn("You need to add a label to the NcInputField component. Either use the prop label or use an external one, as per the example in the documentation."),e},ariaDescribedby(){const e=[];return this.helperText.length>0&&e.push("".concat(this.inputName,"-helper-text")),this.$attrs["aria-describedby"]&&e.push(this.$attrs["aria-describedby"]),e.join(" ")||null}},methods:{focus(){this.$refs.input.focus()},select(){this.$refs.input.select()},handleInput(e){this.$emit("update:value",this.type==="number"&&typeof this.value=="number"?parseFloat(e.target.value,10):e.target.value)},handleTrailingButtonClick(e){this.$emit("trailing-button-click",e)}}};var QF=function(){var e=this,a=e._self._c;return a("div",{staticClass:"input-field",class:{"input-field--disabled":e.disabled,"input-field--label-outside":e.labelOutside||!e.isValidLabel,"input-field--leading-icon":e.hasLeadingIcon,"input-field--trailing-icon":e.showTrailingButton||e.hasTrailingIcon,"input-field--pill":e.pill}},[a("div",{staticClass:"input-field__main-wrapper"},[a("input",e._g(e._b({ref:"input",staticClass:"input-field__input",class:[e.inputClass,{"input-field__input--success":e.success,"input-field__input--error":e.error}],attrs:{id:e.computedId,type:e.type,disabled:e.disabled,placeholder:e.computedPlaceholder,"aria-describedby":e.ariaDescribedby,"aria-live":"polite"},domProps:{value:e.value.toString()},on:{input:e.handleInput}},"input",e.$attrs,!1),e.$listeners)),!e.labelOutside&&e.isValidLabel?a("label",{staticClass:"input-field__label",attrs:{for:e.computedId}},[e._v(" "+e._s(e.label)+" ")]):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:e.hasLeadingIcon,expression:"hasLeadingIcon"}],staticClass:"input-field__icon input-field__icon--leading"},[e._t("default")],2),e.showTrailingButton?a("NcButton",{staticClass:"input-field__trailing-button",attrs:{type:"tertiary-no-background","aria-label":e.trailingButtonLabel,disabled:e.disabled},on:{click:e.handleTrailingButtonClick},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("trailing-button-icon")]},proxy:!0}],null,!0)}):e.success||e.error?a("div",{staticClass:"input-field__icon input-field__icon--trailing"},[e.success?a("Check",{staticStyle:{color:"var(--color-success-text)"},attrs:{size:20}}):e.error?a("AlertCircle",{staticStyle:{color:"var(--color-error-text)"},attrs:{size:20}}):e._e()],1):e._e()],1),e.helperText.length>0?a("p",{staticClass:"input-field__helper-text-message",class:{"input-field__helper-text-message--error":e.error,"input-field__helper-text-message--success":e.success},attrs:{id:"".concat(e.inputName,"-helper-text")}},[e.success?a("Check",{staticClass:"input-field__helper-text-message__icon",attrs:{size:18}}):e.error?a("AlertCircle",{staticClass:"input-field__helper-text-message__icon",attrs:{size:18}}):e._e(),e._v(" "+e._s(e.helperText)+" ")],1):e._e()])},KF=[],JF=te($F,QF,KF,!1,null,"374fffac");const Rt=JF.exports;var yn={exports:{}};function ds(e,a=100,i={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(a<0)throw new RangeError("`wait` must not be negative.");const{immediate:n}=typeof i=="boolean"?{immediate:i}:i;let o,s,r,_,l;function g(){const h=o,u=s;return o=void 0,s=void 0,l=e.apply(h,u),l}function d(){const h=Date.now()-_;h=0?r=setTimeout(d,a-h):(r=void 0,n||(l=g()))}const f=function(...h){if(o&&this!==o)throw new Error("Debounced method called with different contexts.");o=this,s=h,_=Date.now();const u=n&&!r;return r||(r=setTimeout(d,a)),u&&(l=g()),l};return f.clear=()=>{r&&(clearTimeout(r),r=void 0)},f.flush=()=>{r&&f.trigger()},f.trigger=()=>{l=g(),f.clear()},f}yn.exports.debounce=ds,yn.exports=ds;var XF=yn.exports;const no=Rn(XF),eu={name:"EyeIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var au=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon eye-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},tu=[],iu=te(eu,au,tu,!1,null,null);const nu=iu.exports,ou={name:"EyeOffIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var su=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon eye-off-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},ru=[],lu=te(ou,su,ru,!1,null,null);const _u=lu.exports;oe(t1);const du=a1().detectUser().setApp("@nextcloud/vue").build(),fs=Wt("core","capabilities",{}).password_policy||null,fu=new Set(Object.keys(Rt.props)),gu={name:"NcPasswordField",components:{NcInputField:Rt,Eye:nu,EyeOff:_u},inheritAttrs:!1,props:{" ":{},...Rt.props,showTrailingButton:{type:Boolean,default:!0},trailingButtonLabel:void 0,checkPasswordStrength:{type:Boolean,default:!1},minlength:{type:Number,default:0},maxlength:{type:Number,default:null},asText:{type:Boolean,default:!1}},emits:["valid","invalid","update:value"],data(){return{isPasswordHidden:!0,internalHelpMessage:"",isValid:null}},computed:{computedError(){return this.error||this.isValid===!1},computedSuccess(){return this.success||this.isValid===!0},computedHelperText(){return this.helperText.length>0?this.helperText:this.internalHelpMessage},rules(){const{minlength:e}=this;return{minlength:e??fs?.minLength}},trailingButtonLabelPassword(){return this.isPasswordHidden?x("Show password"):x("Hide password")},propsAndAttrsToForward(){return{...this.$attrs,...Object.fromEntries(Object.entries(this.$props).filter(([e])=>fu.has(e)))}}},watch:{value(e){if(this.checkPasswordStrength){if(fs===null)return;this.checkPassword(e)}}},methods:{focus(){this.$refs.inputField.focus()},select(){this.$refs.inputField.select()},handleInput(e){this.$emit("update:value",e.target.value)},togglePasswordVisibility(){this.isPasswordHidden=!this.isPasswordHidden},checkPassword:no(async function(e){try{const{data:a}=await ma.post(Pa("apps/password_policy/api/v1/validate"),{password:e});if(this.isValid=a.ocs.data.passed,a.ocs.data.passed){this.internalHelpMessage=x("Password is secure"),this.$emit("valid");return}this.internalHelpMessage=a.ocs.data.reason,this.$emit("invalid")}catch(a){du.error("Password policy returned an error",a)}},500)}};var hu=function(){var e=this,a=e._self._c;return a("NcInputField",e._g(e._b({ref:"inputField",attrs:{type:e.isPasswordHidden&&!e.asText?"password":"text","trailing-button-label":e.trailingButtonLabelPassword,"helper-text":e.computedHelperText,error:e.computedError,success:e.computedSuccess,minlength:e.rules.minlength,"input-class":{"password-field__input--secure-text":e.isPasswordHidden&&e.asText}},on:{"trailing-button-click":e.togglePasswordVisibility,input:e.handleInput},scopedSlots:e._u([{key:"trailing-button-icon",fn:function(){return[e.isPasswordHidden?a("Eye",{attrs:{size:18}}):a("EyeOff",{attrs:{size:18}})]},proxy:!0}])},"NcInputField",e.propsAndAttrsToForward,!1),e.$listeners),[e._t("default")],2)},Fu=[],uu=te(gu,hu,Fu,!1,null,"d984b8e5");const W2=uu.exports,cu={name:"ArrowRightIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var mu=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon arrow-right-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},pu=[],bu=te(cu,mu,pu,!1,null,null);const Tu=bu.exports,Du={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var yu=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},Eu=[],ku=te(Du,yu,Eu,!1,null,null);const Au=ku.exports;oe(i1,Ws);const wu=new Set(Object.keys(Rt.props)),vu={name:"NcTextField",components:{NcInputField:Rt,Close:Nn,ArrowRight:Tu,Undo:Au},inheritAttrs:!1,props:{" ":{},...Rt.props,trailingButtonLabel:{type:String,default:""},trailingButtonIcon:{type:String,default:"close",validator:e=>["close","arrowRight","undo"].includes(e)}},emits:["update:value"],computed:{propsAndAttrsToForward(){const e={undo:x("Undo changes"),close:x("Clear text"),arrowRight:x("Save changes")};return{...this.$attrs,...Object.fromEntries(Object.entries(this.$props).filter(([a])=>wu.has(a))),trailingButtonLabel:this.trailingButtonLabel||e[this.trailingButtonIcon]}}},methods:{focus(){this.$refs.inputField.focus()},select(){this.$refs.inputField.select()},handleInput(e){this.$emit("update:value",e.target.value)}}};var Su=function(){var e=this,a=e._self._c;return a("NcInputField",e._g(e._b({ref:"inputField",on:{input:e.handleInput},scopedSlots:e._u([e.type!=="search"?{key:"trailing-button-icon",fn:function(){return[e.trailingButtonIcon==="close"?a("Close",{attrs:{size:20}}):e.trailingButtonIcon==="arrowRight"?a("ArrowRight",{attrs:{size:20}}):e.trailingButtonIcon==="undo"?a("Undo",{attrs:{size:20}}):e._e()]},proxy:!0}:null],null,!0)},"NcInputField",e.propsAndAttrsToForward,!1),e.$listeners),[e._t("default")],2)},Ru=[],Cu=te(vu,Su,Ru,!1,null,null);const Bu=Cu.exports;oe(Vs),V1,x("Submit"),oe(n1),Bn("nextcloud").persist().build(),oe(o1);const Ou={name:"NcVNodes",props:{vnodes:{type:[Array,Object],default:null}},render(e){var a,i,n;return this.vnodes||((a=this.$slots)==null?void 0:a.default)||((n=(i=this.$scopedSlots)==null?void 0:i.default)==null?void 0:n.call(i))}},Nu=null,xu=null;var Mu=te(Ou,Nu,xu,!1,null,null);const V2=Mu.exports,ju={name:"ChevronUpIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Yu=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon chevron-up-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},qu=[],Lu=te(ju,Yu,qu,!1,null,null);const Zu=Lu.exports;oe(s1),oe(r1),oe(l1,Ws),oe($s,_1);x("Search…");oe(f1);const Iu={name:"CogIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var Hu=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon cog-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},Pu=[],Gu=te(Iu,Hu,Pu,!1,null,null);const $2=Gu.exports;x("Settings"),oe(g1),no(function(){this.selectedSection="",document.activeElement.className.includes("navigation-list__link")&&document.activeElement.blur()},300);let Uu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",zu=(e=21)=>{let a="",i=e;for(;i--;)a+=Uu[Math.random()*64|0];return a};function vi(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?vi=function(a){return typeof a}:vi=function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},vi(e)}var Xr={selector:"vue-portal-target-".concat(zu())},Wu=function(e){return Xr.selector=e},en=typeof window<"u"&&(typeof document>"u"?"undefined":vi(document))!==void 0,Vu=ka.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(e){return{updatedNodes:e.nodes}},render:function(e){var a=this.updatedNodes&&this.updatedNodes();return a?a.length===1&&!a[0].text?a:e(this.tag||"DIV",a):e()},destroyed:function(){var e=this.$el;e&&e.parentNode.removeChild(e)}}),$u=ka.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(Xr.selector)}},tag:{type:String,default:"DIV"}},render:function(e){if(this.disabled){var a=this.$scopedSlots&&this.$scopedSlots.default();return a?a.length<2&&!a[0].text?a:e(this.tag,a):e()}return e()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var e=this;this.$nextTick(function(){!e.disabled&&e.slotFn!==e.$scopedSlots.default&&(e.container.updatedNodes=e.$scopedSlots.default),e.slotFn=e.$scopedSlots.default})},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(e){e?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(en)return document.querySelector(this.selector)},insertTargetEl:function(){if(en){var e=document.querySelector("body"),a=document.createElement(this.tag);a.id=this.selector.substring(1),e.appendChild(a)}},mount:function(){if(en){var e=this.getTargetEl(),a=document.createElement("DIV");this.prepend&&e.firstChild?e.insertBefore(a,e.firstChild):e.appendChild(a),this.container=new Vu({el:a,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function Qu(e){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};e.component(a.name||"portal",$u),a.defaultSelector&&Wu(a.defaultSelector)}typeof window<"u"&&window.Vue&&window.Vue===ka&&ka.use(Qu),oe();const Ku={name:"NcEmptyContent",props:{name:{type:String,default:""},description:{type:String,default:""}},computed:{hasName(){return this.name!==""},hasDescription(){var e;return this.description!==""||((e=this.$slots.description)==null?void 0:e[0])}}};var Ju=function(){var e=this,a=e._self._c;return a("div",{staticClass:"empty-content",attrs:{role:"note"}},[e.$slots.icon?a("div",{staticClass:"empty-content__icon",attrs:{"aria-hidden":"true"}},[e._t("icon")],2):e._e(),e._t("name",function(){return[e.hasName?a("span",{staticClass:"empty-content__name"},[e._v(" "+e._s(e.name)+" ")]):e._e()]}),e.hasDescription?a("p",{staticClass:"empty-content__description"},[e._t("description",function(){return[e._v(" "+e._s(e.description)+" ")]})],2):e._e(),e.$slots.action?a("div",{staticClass:"empty-content__action"},[e._t("action")],2):e._e()],2)},Xu=[],ec=te(Ku,Ju,Xu,!1,null,"fede0c71");const oo=ec.exports;oe(h1),oe(F1),oe(u1);const ac={name:"ArrowLeftIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var tc=function(){var e=this,a=e._self._c;return a("span",e._b({staticClass:"material-design-icon arrow-left-icon",attrs:{"aria-hidden":e.title?null:!0,"aria-label":e.title,role:"img"},on:{click:function(i){return e.$emit("click",i)}}},"span",e.$attrs,!1),[a("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[a("path",{attrs:{d:"M20,11V13H8L13.5,18.5L12.08,19.92L4.16,12L12.08,4.08L13.5,5.5L8,11H20Z"}},[e.title?a("title",[e._v(e._s(e.title))]):e._e()])])])},ic=[],nc=te(ac,tc,ic,!1,null,null);const el=nc.exports;var al={exports:{}};(function(e,a){(function(i,n){e.exports=n()})(typeof self<"u"?self:Na,function(){return function(i){function n(s){if(o[s])return o[s].exports;var r=o[s]={i:s,l:!1,exports:{}};return i[s].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var o={};return n.m=i,n.c=o,n.d=function(s,r,_){n.o(s,r)||Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:_})},n.n=function(s){var r=s&&s.__esModule?function(){return s.default}:function(){return s};return n.d(r,"a",r),r},n.o=function(s,r){return Object.prototype.hasOwnProperty.call(s,r)},n.p="",n(n.s=60)}([function(i,n){function o(r,_){var l=r[1]||"",g=r[3];if(!g)return l;if(_&&typeof btoa=="function"){var d=s(g);return[l].concat(g.sources.map(function(f){return"/*# sourceURL="+g.sourceRoot+f+" */"})).concat([d]).join(` +`)}return[l].join(` +`)}function s(r){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"}i.exports=function(r){var _=[];return _.toString=function(){return this.map(function(l){var g=o(l,r);return l[2]?"@media "+l[2]+"{"+g+"}":g}).join("")},_.i=function(l,g){typeof l=="string"&&(l=[[null,l,""]]);for(var d={},f=0;fW.parts.length&&(I.parts.length=W.parts.length)}else{for(var v=[],c=0;c"u"||(k=__VUE_SSR_CONTEXT__),_&&_.call(this,k),k&&k._registeredComponents&&k._registeredComponents.add(g)},u._ssrRegister=m):_&&(m=_),m){var b=u.functional,y=b?u.render:u.beforeCreate;b?(u._injectStyles=m,u.render=function(k,w){return m.call(w),y(k,w)}):u.beforeCreate=y?[].concat(y,m):[m]}return{esModule:d,exports:f,options:u}}},function(i,n,o){function s(l,g){var d,f=l&&l.a;!(d=l&&l.hsl?(0,_.default)(l.hsl):l&&l.hex&&l.hex.length>0?(0,_.default)(l.hex):l&&l.hsv?(0,_.default)(l.hsv):l&&l.rgba?(0,_.default)(l.rgba):l&&l.rgb?(0,_.default)(l.rgb):(0,_.default)(l))||d._a!==void 0&&d._a!==null||d.setAlpha(f||1);var h=d.toHsl(),u=d.toHsv();return h.s===0&&(u.h=h.h=l.h||l.hsl&&l.hsl.h||g||0),{hsl:h,hex:d.toHexString().toUpperCase(),hex8:d.toHex8String().toUpperCase(),rgba:d.toRgb(),hsv:u,oldHue:l.h||g||h.h,source:l.source,a:l.a||d.getAlpha()}}Object.defineProperty(n,"__esModule",{value:!0});var r=o(65),_=function(l){return l&&l.__esModule?l:{default:l}}(r);n.default={props:["value"],data:function(){return{val:s(this.value)}},computed:{colors:{get:function(){return this.val},set:function(l){this.val=l,this.$emit("input",l)}}},watch:{value:function(l){this.val=s(l)}},methods:{colorChange:function(l,g){this.oldHue=this.colors.hsl.h,this.colors=s(l,g||this.oldHue)},isValidHex:function(l){return(0,_.default)(l).isValid()},simpleCheckForValidColor:function(l){for(var g=["r","g","b","a","h","s","l","v"],d=0,f=0,h=0;h0?s:o)(r)}},function(i,n){i.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},function(i,n,o){var s=o(12);i.exports=function(r,_){if(!s(r))return r;var l,g;if(_&&typeof(l=r.toString)=="function"&&!s(g=l.call(r))||typeof(l=r.valueOf)=="function"&&!s(g=l.call(r))||!_&&typeof(l=r.toString)=="function"&&!s(g=l.call(r)))return g;throw TypeError("Can't convert object to primitive value")}},function(i,n){i.exports={}},function(i,n,o){var s=o(46),r=o(30);i.exports=Object.keys||function(_){return s(_,r)}},function(i,n,o){var s=o(29)("keys"),r=o(19);i.exports=function(_){return s[_]||(s[_]=r(_))}},function(i,n,o){var s=o(15),r=o(4),_=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(i.exports=function(l,g){return _[l]||(_[l]=g!==void 0?g:{})})("versions",[]).push({version:s.version,mode:o(14)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(i,n){i.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(i,n,o){var s=o(8).f,r=o(6),_=o(11)("toStringTag");i.exports=function(l,g,d){l&&!r(l=d?l:l.prototype,_)&&s(l,_,{configurable:!0,value:g})}},function(i,n,o){n.f=o(11)},function(i,n,o){var s=o(4),r=o(15),_=o(14),l=o(32),g=o(8).f;i.exports=function(d){var f=r.Symbol||(r.Symbol=_?{}:s.Symbol||{});d.charAt(0)=="_"||d in f||g(f,d,{value:l.f(d)})}},function(i,n){n.f={}.propertyIsEnumerable},function(i,n,o){function s(f){return f&&f.__esModule?f:{default:f}}Object.defineProperty(n,"__esModule",{value:!0});var r=o(3),_=s(r),l=o(5),g=s(l),d=["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#CCCCCC","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"];n.default={name:"Compact",mixins:[_.default],props:{palette:{type:Array,default:function(){return d}}},components:{"ed-in":g.default},computed:{pick:function(){return this.colors.hex.toUpperCase()}},methods:{handlerClick:function(f){this.colorChange({hex:f,source:"hex"})}}}},function(i,n,o){Object.defineProperty(n,"__esModule",{value:!0}),n.default={name:"editableInput",props:{label:String,labelText:String,desc:String,value:[String,Number],max:Number,min:Number,arrowOffset:{type:Number,default:1}},computed:{val:{get:function(){return this.value},set:function(s){if(!(this.max!==void 0&&+s>this.max))return s;this.$refs.input.value=this.max}},labelId:function(){return"input__label__"+this.label+"__"+Math.random().toString().slice(2,5)},labelSpanText:function(){return this.labelText||this.label}},methods:{update:function(s){this.handleChange(s.target.value)},handleChange:function(s){var r={};r[this.label]=s,r.hex===void 0&&r["#"]===void 0?this.$emit("change",r):s.length>5&&this.$emit("change",r)},handleKeyDown:function(s){var r=this.val,_=Number(r);if(_){var l=this.arrowOffset||1;s.keyCode===38&&(r=_+l,this.handleChange(r),s.preventDefault()),s.keyCode===40&&(r=_-l,this.handleChange(r),s.preventDefault())}}}}},function(i,n,o){Object.defineProperty(n,"__esModule",{value:!0});var s=o(3),r=function(l){return l&&l.__esModule?l:{default:l}}(s),_=["#FFFFFF","#F2F2F2","#E6E6E6","#D9D9D9","#CCCCCC","#BFBFBF","#B3B3B3","#A6A6A6","#999999","#8C8C8C","#808080","#737373","#666666","#595959","#4D4D4D","#404040","#333333","#262626","#0D0D0D","#000000"];n.default={name:"Grayscale",mixins:[r.default],props:{palette:{type:Array,default:function(){return _}}},components:{},computed:{pick:function(){return this.colors.hex.toUpperCase()}},methods:{handlerClick:function(l){this.colorChange({hex:l,source:"hex"})}}}},function(i,n,o){function s(d){return d&&d.__esModule?d:{default:d}}Object.defineProperty(n,"__esModule",{value:!0});var r=o(5),_=s(r),l=o(3),g=s(l);n.default={name:"Material",mixins:[g.default],components:{"ed-in":_.default},methods:{onChange:function(d){d&&(d.hex?this.isValidHex(d.hex)&&this.colorChange({hex:d.hex,source:"hex"}):(d.r||d.g||d.b)&&this.colorChange({r:d.r||this.colors.rgba.r,g:d.g||this.colors.rgba.g,b:d.b||this.colors.rgba.b,a:d.a||this.colors.rgba.a,source:"rgba"}))}}}},function(i,n,o){function s(h){return h&&h.__esModule?h:{default:h}}Object.defineProperty(n,"__esModule",{value:!0});var r=o(81),_=s(r),l=o(3),g=s(l),d=o(13),f=s(d);n.default={name:"Slider",mixins:[g.default],props:{swatches:{type:Array,default:function(){return[{s:.5,l:.8},{s:.5,l:.65},{s:.5,l:.5},{s:.5,l:.35},{s:.5,l:.2}]}}},components:{hue:f.default},computed:{normalizedSwatches:function(){return this.swatches.map(function(h){return(h===void 0?"undefined":(0,_.default)(h))!=="object"?{s:.5,l:h}:h})}},methods:{isActive:function(h,u){var m=this.colors.hsl;return m.l===1&&h.l===1||m.l===0&&h.l===0||Math.abs(m.l-h.l)<.01&&Math.abs(m.s-h.s)<.01},hueChange:function(h){this.colorChange(h)},handleSwClick:function(h,u){this.colorChange({h:this.colors.hsl.h,s:u.s,l:u.l,source:"hsl"})}}}},function(i,n,o){var s=o(14),r=o(41),_=o(44),l=o(7),g=o(26),d=o(88),f=o(31),h=o(95),u=o(11)("iterator"),m=!([].keys&&"next"in[].keys()),b=function(){return this};i.exports=function(y,k,w,S,j,Z,B){d(w,k,S);var G,W,I,c=function(ne){if(!m&&ne in z)return z[ne];switch(ne){case"keys":case"values":return function(){return new w(this,ne)}}return function(){return new w(this,ne)}},v=k+" Iterator",R=j=="values",O=!1,z=y.prototype,q=z[u]||z["@@iterator"]||j&&z[j],ie=q||c(j),ee=j?R?c("entries"):ie:void 0,fe=k=="Array"&&z.entries||q;if(fe&&(I=h(fe.call(new y)))!==Object.prototype&&I.next&&(f(I,v,!0),s||typeof I[u]=="function"||l(I,u,b)),R&&q&&q.name!=="values"&&(O=!0,ie=function(){return q.call(this)}),s&&!B||!m&&!O&&z[u]||l(z,u,ie),g[k]=ie,g[v]=b,j)if(G={values:R?ie:c("values"),keys:Z?ie:c("keys"),entries:ee},B)for(W in G)W in z||_(z,W,G[W]);else r(r.P+r.F*(m||O),k,G);return G}},function(i,n,o){var s=o(4),r=o(15),_=o(86),l=o(7),g=o(6),d=function(f,h,u){var m,b,y,k=f&d.F,w=f&d.G,S=f&d.S,j=f&d.P,Z=f&d.B,B=f&d.W,G=w?r:r[h]||(r[h]={}),W=G.prototype,I=w?s:S?s[h]:(s[h]||{}).prototype;w&&(u=h);for(m in u)(b=!k&&I&&I[m]!==void 0)&&g(G,m)||(y=b?I[m]:u[m],G[m]=w&&typeof I[m]!="function"?u[m]:Z&&b?_(y,s):B&&I[m]==y?function(c){var v=function(R,O,z){if(this instanceof c){switch(arguments.length){case 0:return new c;case 1:return new c(R);case 2:return new c(R,O)}return new c(R,O,z)}return c.apply(this,arguments)};return v.prototype=c.prototype,v}(y):j&&typeof y=="function"?_(Function.call,y):y,j&&((G.virtual||(G.virtual={}))[m]=y,f&d.R&&W&&!W[m]&&l(W,m,y)))};d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,i.exports=d},function(i,n,o){i.exports=!o(9)&&!o(17)(function(){return Object.defineProperty(o(43)("div"),"a",{get:function(){return 7}}).a!=7})},function(i,n,o){var s=o(12),r=o(4).document,_=s(r)&&s(r.createElement);i.exports=function(l){return _?r.createElement(l):{}}},function(i,n,o){i.exports=o(7)},function(i,n,o){var s=o(16),r=o(89),_=o(30),l=o(28)("IE_PROTO"),g=function(){},d=function(){var f,h=o(43)("iframe"),u=_.length;for(h.style.display="none",o(94).appendChild(h),h.src="javascript:",f=h.contentWindow.document,f.open(),f.write("","import '../assets/NcActionButtonGroup-CQxLn2fv.css';\nimport { defineComponent } from \"vue\";\nimport { G as GenRandomId } from \"./GenRandomId-CMooMQt0.mjs\";\nimport { r as register, a as t } from \"./_l10n-B4dEPXsr.mjs\";\nimport { n as normalizeComponent } from \"./_plugin-vue2_normalizer-DU4iP6Vu.mjs\";\nregister();\nconst _sfc_main = defineComponent({\n name: \"NcActionButtonGroup\",\n inject: {\n isInSemanticMenu: {\n from: \"NcActions:isSemanticMenu\",\n default: false\n }\n },\n props: {\n /**\n * Optional text shown below the button group\n */\n name: {\n required: false,\n default: void 0,\n type: String\n }\n },\n setup() {\n return {\n labelId: \"nc-action-button-group-\".concat(GenRandomId())\n };\n },\n methods: {\n t\n }\n});\nvar _sfc_render = function render() {\n var _vm = this, _c = _vm._self._c;\n _vm._self._setupProxy;\n return _c(\"li\", { staticClass: \"nc-button-group-base\", attrs: { \"role\": _vm.isInSemanticMenu && \"presentation\" } }, [_vm.name ? _c(\"div\", { attrs: { \"id\": _vm.labelId } }, [_vm._v(\" \" + _vm._s(_vm.name) + \" \")]) : _vm._e(), _c(\"ul\", { staticClass: \"nc-button-group-content\", attrs: { \"role\": \"group\", \"aria-labelledby\": _vm.name ? _vm.labelId : void 0 } }, [_vm._t(\"default\")], 2)]);\n};\nvar _sfc_staticRenderFns = [];\nvar __component__ = /* @__PURE__ */ normalizeComponent(\n _sfc_main,\n _sfc_render,\n _sfc_staticRenderFns,\n false,\n null,\n null\n);\nconst NcActionButtonGroup = __component__.exports;\nexport {\n NcActionButtonGroup as N\n};\n","/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n * Portions Copyright (C) Philipp Kewisch */\nclass t{static fromString(e){return new t(e)}constructor(t){this.value=t}icaltype=\"binary\";decodeValue(){return this._b64_decode(this.value)}setEncodedValue(t){this.value=this._b64_encode(t)}_b64_encode(t){let e,i,r,n,s,a,o,l,h=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",u=0,c=0,d=\"\",m=[];if(!t)return t;do{e=t.charCodeAt(u++),i=t.charCodeAt(u++),r=t.charCodeAt(u++),l=e<<16|i<<8|r,n=l>>18&63,s=l>>12&63,a=l>>6&63,o=63&l,m[c++]=h.charAt(n)+h.charAt(s)+h.charAt(a)+h.charAt(o)}while(u>16&255,i=l>>8&255,r=255&l,m[c++]=64==a?String.fromCharCode(e):64==o?String.fromCharCode(e,i):String.fromCharCode(e,i,r)}while(ui)-(e12||(i=[0,31,28,31,30,31,30,31,31,30,31,30,31][t],2==t&&(i+=s.isLeapYear(e))),i}static isLeapYear(t){return t<=1752?t%4==0:t%4==0&&t%100!=0||t%400==0}static fromDayOfYear(t,e){let i=e,r=t,n=new s;n.auto_normalize=!1;let a=s.isLeapYear(i)?1:0;if(r<1)return i--,a=s.isLeapYear(i)?1:0,r+=s.daysInYearPassedMonth[a][12],s.fromDayOfYear(r,i);if(r>s.daysInYearPassedMonth[a][12])return a=s.isLeapYear(i)?1:0,r-=s.daysInYearPassedMonth[a][12],i++,s.fromDayOfYear(r,i);n.year=i,n.isDate=!0;for(let t=11;t>=0;t--)if(r>s.daysInYearPassedMonth[a][t]){n.month=t+1,n.day=r-s.daysInYearPassedMonth[a][t];break}return n.auto_normalize=!0,n}static fromStringv2(t){return new s({year:parseInt(t.slice(0,4),10),month:parseInt(t.slice(5,7),10),day:parseInt(t.slice(8,10),10),isDate:!0})}static fromDateString(t){return new s({year:p(t.slice(0,4)),month:p(t.slice(5,7)),day:p(t.slice(8,10)),isDate:!0})}static fromDateTimeString(t,e){if(t.length<19)throw new Error('invalid date-time value: \"'+t+'\"');let i,r;t[19]&&\"Z\"===t[19]?i=c.utcTimezone:e&&(r=e.getParameter(\"tzid\"),e.parent&&(\"standard\"===e.parent.name||\"daylight\"===e.parent.name?i=c.localTimezone:r&&(i=e.parent.getTimeZoneByID(r))));const n={year:p(t.slice(0,4)),month:p(t.slice(5,7)),day:p(t.slice(8,10)),hour:p(t.slice(11,13)),minute:p(t.slice(14,16)),second:p(t.slice(17,19))};return r&&!i&&(n.timezone=r),new s(n,i)}static fromString(t,e){return t.length>10?s.fromDateTimeString(t,e):s.fromDateString(t)}static fromJSDate(t,e){return(new s).fromJSDate(t,e)}static fromData=function(t,e){return(new s).fromData(t,e)};static now(){return s.fromJSDate(new Date,!1)}static weekOneStarts(t,e){let i=s.fromData({year:t,month:1,day:1,isDate:!0}),r=i.dayOfWeek(),n=e||s.DEFAULT_WEEK_START;return r>s.THURSDAY&&(i.day+=7),n>s.THURSDAY&&(i.day-=7),i.day-=r-n,i}static getDominicalLetter(t){let e=\"GFEDCBA\",i=(t+(t/4|0)+(t/400|0)-(t/100|0)-1)%7;return s.isLeapYear(t)?e[(i+6)%7]+e[i]:e[i]}static#t=null;static get epochTime(){return this.#t||(this.#t=s.fromData({year:1970,month:1,day:1,hour:0,minute:0,second:0,isDate:!1,timezone:\"Z\"})),this.#t}static _cmp_attr(t,e,i){return t[i]>e[i]?1:t[i]=0){o.day=1,0!=n&&n--,a=o.day;let e=t-o.dayOfWeek();e<0&&(e+=7),a+=e,a-=t,i=t}else{o.day=r,n++,i=o.dayOfWeek()-t,i<0&&(i+=7),i=r-i}return i+=7*n,a+i}isNthWeekDay(t,e){let i=this.dayOfWeek();return 0===e&&i===t||this.nthWeekDay(t,e)===this.day}weekNumber(t){let e,i=(this.year<<12)+(this.month<<8)+(this.day<<3)+t;if(i in s._wnCache)return s._wnCache[i];let r=this.clone();r.isDate=!0;let n=this.year;12==r.month&&r.day>25?(e=s.weekOneStarts(n+1,t),r.compare(e)<0?e=s.weekOneStarts(n,t):n++):(e=s.weekOneStarts(n,t),r.compare(e)<0&&(e=s.weekOneStarts(--n,t)));let a=A(r.subtractDate(e).toSeconds()/86400/7)+1;return s._wnCache[i]=a,a}addDuration(t){let e=t.isNegative?-1:1,i=this.second,r=this.minute,n=this.hour,s=this.day;i+=e*t.seconds,r+=e*t.minutes,n+=e*t.hours,s+=e*t.days,s+=7*e*t.weeks,this.second=i,this.minute=r,this.hour=n,this.day=s,this._cachedUnixTime=null}subtractDate(t){let e=this.toUnixTime()+this.utcOffset(),i=t.toUnixTime()+t.utcOffset();return r.fromSeconds(e-i)}subtractDateTz(t){let e=this.toUnixTime(),i=t.toUnixTime();return r.fromSeconds(e-i)}compare(t){let e=this.toUnixTime(),i=t.toUnixTime();return e>i?1:i>e?-1:0}compareDateOnlyTz(t,e){let i=this.convertToZone(e),r=t.convertToZone(e),n=0;return 0!=(n=s._cmp_attr(i,r,\"year\"))||0!=(n=s._cmp_attr(i,r,\"month\"))||(n=s._cmp_attr(i,r,\"day\")),n}convertToZone(t){let e=this.clone(),i=this.zone.tzid==t.tzid;return this.isDate||i||c.convert_time(e,this.zone,t),e.zone=t,e}utcOffset(){return this.zone==c.localTimezone||this.zone==c.utcTimezone?0:this.zone.utcOffset(this)}toICALString(){let t=this.toString();return t.length>10?ut.icalendar.value[\"date-time\"].toICAL(t):ut.icalendar.value.date.toICAL(t)}toString(){let t=this.year+\"-\"+Y(this.month)+\"-\"+Y(this.day);return this.isDate||(t+=\"T\"+Y(this.hour)+\":\"+Y(this.minute)+\":\"+Y(this.second),this.zone===c.utcTimezone&&(t+=\"Z\")),t}toJSDate(){return this.zone==c.localTimezone?this.isDate?new Date(this.year,this.month-1,this.day):new Date(this.year,this.month-1,this.day,this.hour,this.minute,this.second,0):new Date(1e3*this.toUnixTime())}_normalize(){return this._time.isDate&&(this._time.hour=0,this._time.minute=0,this._time.second=0),this.adjust(0,0,0,0),this}adjust(t,e,i,r,n){let a,o,l,h,u,c,d,m=0,f=0,p=n||this._time;if(p.isDate||(l=p.second+r,p.second=l%60,a=A(l/60),p.second<0&&(p.second+=60,a--),h=p.minute+i+a,p.minute=h%60,o=A(h/60),p.minute<0&&(p.minute+=60,o--),u=p.hour+e+o,p.hour=u%24,m=A(u/24),p.hour<0&&(p.hour+=24,m--)),p.month>12?f=A((p.month-1)/12):p.month<1&&(f=A(p.month/12)-1),p.year+=f,p.month-=12*f,c=p.day+t+m,c>0)for(;d=s.daysInMonth(p.month,p.year),!(c<=d);)p.month++,p.month>12&&(p.year++,p.month=1),c-=d;else for(;c<=0;)1==p.month?(p.year--,p.month=12):p.month--,c+=s.daysInMonth(p.month,p.year);return p.day=c,this._cachedUnixTime=null,this}fromUnixTime(t){this.zone=c.utcTimezone;let e=new Date(1e3*t);this.year=e.getUTCFullYear(),this.month=e.getUTCMonth()+1,this.day=e.getUTCDate(),this._time.isDate?(this.hour=0,this.minute=0,this.second=0):(this.hour=e.getUTCHours(),this.minute=e.getUTCMinutes(),this.second=e.getUTCSeconds()),this._cachedUnixTime=null}toUnixTime(){if(null!==this._cachedUnixTime)return this._cachedUnixTime;let t=this.utcOffset(),e=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second-t);return this._cachedUnixTime=e/1e3,this._cachedUnixTime}toJSON(){let t,e=[\"year\",\"month\",\"day\",\"hour\",\"minute\",\"second\",\"isDate\"],i=Object.create(null),r=0,n=e.length;for(;r1)throw new h(\"invalid ical body. component began but did not end\");return e=null,1==i.length?i[0]:i}l.property=function(t,e){let i={component:[[],[]],designSet:e||ut.defaultSet};return l._handleContentLine(t,i),i.component[1][0]},l.component=function(t){return l(t)};class h extends Error{constructor(t){super(t),this.name=this.constructor.name;try{throw new Error}catch(t){if(t.stack){let e=t.stack.split(\"\\n\");e.shift(),this.stack=e.join(\"\\n\")}}}}l.ParserError=h,l._handleContentLine=function(t,e){let i,r,n,s,a,o,u=t.indexOf(\":\"),c=t.indexOf(\";\"),d={};if(-1!==c&&-1!==u&&c>u&&(c=-1),-1!==c){if(n=t.slice(0,Math.max(0,c)).toLowerCase(),a=l._parseParameters(t.slice(Math.max(0,c)),0,e.designSet),-1==a[2])throw new h(\"Invalid parameters in '\"+t+\"'\");if(d=a[0],i=a[1].length+a[2]+c,-1===(r=t.slice(Math.max(0,i)).indexOf(\":\")))throw new h(\"Missing parameter value in '\"+t+\"'\");s=t.slice(Math.max(0,i+r+1))}else{if(-1===u)throw new h('invalid line (no token \";\" or \":\") \"'+t+'\"');if(n=t.slice(0,Math.max(0,u)).toLowerCase(),s=t.slice(Math.max(0,u+1)),\"begin\"===n){let t=[s.toLowerCase(),[],[]];return 1===e.stack.length?e.component.push(t):e.component[2].push(t),e.stack.push(e.component),e.component=t,void(e.designSet||(e.designSet=ut.getDesignSet(e.component[0])))}if(\"end\"===n)return void(e.component=e.stack.pop())}let m,f,p,y,_=!1,g=!1;e.designSet.propertyGroups&&-1!==n.indexOf(\".\")?(f=n.split(\".\"),d.group=f[0],p=f[1]):p=n,p in e.designSet.property&&(m=e.designSet.property[p],\"multiValue\"in m&&(_=m.multiValue),\"structuredValue\"in m&&(g=m.structuredValue),s&&\"detectType\"in m&&(o=m.detectType(s))),o||(o=\"value\"in d?d.value.toLowerCase():m?m.defaultType:\"unknown\"),delete d.value,_&&g?(s=l._parseMultiValue(s,g,o,[],_,e.designSet,g),y=[p,d,o,s]):_?(y=[p,d,o],l._parseMultiValue(s,_,o,y,null,e.designSet,!1)):g?(s=l._parseMultiValue(s,g,o,[],null,e.designSet,g),y=[p,d,o,s]):(s=l._parseValue(s,o,e.designSet,!1),y=[p,d,o,s]),\"vcard\"!==e.component[0]||0!==e.component[1].length||\"version\"===n&&\"4.0\"===s||(e.designSet=ut.getDesignSet(\"vcard3\")),e.component[1].push(y)},l._parseValue=function(t,e,i,r){return e in i.value&&\"fromICAL\"in i.value[e]?i.value[e].fromICAL(t,r):t},l._parseParameters=function(t,e,i){let r,n,s,a,o,u,c=e,d=0,m={},f=-1;for(;!1!==d&&-1!==(d=_(t,\"=\",d+1));){if(r=t.slice(c+1,d),0==r.length)throw new h(\"Empty parameter name in '\"+t+\"'\");if(n=r.toLowerCase(),u=!1,o=!1,a=n in i.param&&i.param[n].valueType?i.param[n].valueType:\"text\",n in i.param&&(o=i.param[n].multiValue,i.param[n].multiValueSeparateDQuote&&(u=l._rfc6868Escape('\"'+o+'\"'))),'\"'===t[d+1]){if(f=d+2,d=_(t,'\"',f),o&&-1!=d){let e=!0;for(;e;)t[d+1]==o&&'\"'==t[d+2]?d=_(t,'\"',d+3):e=!1}if(-1===d)throw new h('invalid line (no matching double quote) \"'+t+'\"');s=t.slice(f,d),c=_(t,\";\",d),-1===c&&(d=!1)}else{f=d+1;let e=_(t,\";\",f),i=_(t,\":\",f);-1!==i&&e>i?(e=i,d=!1):-1===e?(e=-1===i?t.length:i,d=!1):(c=e,d=e),s=t.slice(f,e)}if(s=l._rfc6868Escape(s),o){let t=u||o;s=l._parseMultiValue(s,t,a,[],null,i)}else s=l._parseValue(s,a,i);o&&n in m?Array.isArray(m[n])?m[n].push(s):m[n]=[m[n],s]:m[n]=s}return[m,s,f]},l._rfc6868Escape=function(t){return t.replace(/\\^['n^]/g,(function(t){return o[t]}))},l._parseMultiValue=function(t,e,i,r,n,s,a){let o,h=0,u=0;if(0===e.length)return t;for(;-1!==(h=_(t,e,u));)o=t.slice(u,h),o=n?l._parseMultiValue(o,n,i,[],null,s,a):l._parseValue(o,i,s,a),r.push(o),u=h+e.length;return o=t.slice(u),o=n?l._parseMultiValue(o,n,i,[],null,s,a):l._parseValue(o,i,s,a),r.push(o),1==r.length?r[0]:r},l._eachLine=function(t,e){let i,r,n,s=t.length,o=t.search(a),l=o;do{l=t.indexOf(\"\\n\",o)+1,n=l>1&&\"\\r\"===t[l-2]?2:1,0===l&&(l=s,n=0),r=t[o],\" \"===r||\"\\t\"===r?i+=t.slice(o+1,l-n):(i&&e(null,i),i=t.slice(o,l-n)),o=l}while(l!==s);i=i.trim(),i.length&&e(null,i)};const u=[\"tzid\",\"location\",\"tznames\",\"latitude\",\"longitude\"];class c{static _compare_change_fn(t,e){return t.yeare.year?1:t.monthe.month?1:t.daye.day?1:t.houre.hour?1:t.minutee.minute?1:t.seconde.second?1:0}static convert_time(t,e,i){if(t.isDate||e.tzid==i.tzid||e==c.localTimezone||i==c.localTimezone)return t.zone=i,t;let r=e.utcOffset(t);return t.adjust(0,0,0,-r),r=i.utcOffset(t),t.adjust(0,0,0,r),null}static fromData(t){return(new c).fromData(t)}static#e=null;static get utcTimezone(){return this.#e||(this.#e=c.fromData({tzid:\"UTC\"})),this.#e}static#i=null;static get localTimezone(){return this.#i||(this.#i=c.fromData({tzid:\"floating\"})),this.#i}static adjust_change(t,e,i,r,n){return s.prototype.adjust.call(t,e,i,r,n,t)}static _minimumExpansionYear=-1;static EXTRA_COVERAGE=5;constructor(t){this.wrappedJSObject=this,this.fromData(t)}tzid=\"\";location=\"\";tznames=\"\";latitude=0;longitude=0;component=null;expandedUntilYear=0;icalclass=\"icaltimezone\";fromData(t){if(this.expandedUntilYear=0,this.changes=[],t instanceof yt)this.component=t;else{if(t&&\"component\"in t)if(\"string\"==typeof t.component){let e=l(t.component);this.component=new yt(e)}else t.component instanceof yt?this.component=t.component:this.component=null;for(let e of u)t&&e in t&&(this[e]=t[e])}return this.component instanceof yt&&!this.tzid&&(this.tzid=this.component.getFirstPropertyValue(\"tzid\")),this}utcOffset(t){if(this==c.utcTimezone||this==c.localTimezone)return 0;if(this._ensureCoverage(t.year),!this.changes.length)return 0;let e={year:t.year,month:t.month,day:t.day,hour:t.hour,minute:t.minute,second:t.second},i=this._findNearbyChange(e),r=-1,n=1;for(;;){let t=D(this.changes[i],!0);if(t.utcOffset=0?r=i:n=-1,-1==n&&-1!=r)break;if(i+=n,i<0)return 0;if(i>=this.changes.length)break}let s=this.changes[r];if(s.utcOffset-s.prevUtcOffset<0&&r>0){let t=D(s,!0);if(c.adjust_change(t,0,0,0,t.prevUtcOffset),c._compare_change_fn(e,t)<0){let t=this.changes[r-1],e=!1;s.is_daylight!=e&&t.is_daylight==e&&(s=t)}}return s.utcOffset}_findNearbyChange(t){let e=g(this.changes,t,c._compare_change_fn);return e>=this.changes.length?this.changes.length-1:e}_ensureCoverage(t){if(-1==c._minimumExpansionYear){let t=s.now();c._minimumExpansionYear=t.year}let e=t;if(ee)&&t);)r.year=t.year,r.month=t.month,r.day=t.day,r.hour=t.hour,r.minute=t.minute,r.second=t.second,r.isDate=t.isDate,c.adjust_change(r,0,0,0,-r.prevUtcOffset),i.push(r)}}else r=a(),r.year=n.year,r.month=n.month,r.day=n.day,r.hour=n.hour,r.minute=n.minute,r.second=n.second,c.adjust_change(r,0,0,0,-r.prevUtcOffset),i.push(r);return i}toString(){return this.tznames?this.tznames:this.tzid}}let d=null;const m={get count(){return null===d?0:Object.keys(d).length},reset:function(){d=Object.create(null);let t=c.utcTimezone;d.Z=t,d.UTC=t,d.GMT=t},has:function(t){return null!==d&&!!d[t]},get:function(t){return null===d&&this.reset(),d[t]},register:function(t,e){if(null===d&&this.reset(),t instanceof yt&&\"vtimezone\"===t.name&&(t=(e=new c(t)).tzid),!(e instanceof c))throw new TypeError(\"timezone must be ICAL.Timezone or ICAL.Component\");d[t]=e},remove:function(t){return null===d?null:delete d[t]}};function f(t){return\"number\"==typeof t&&isNaN(t)}function p(t){let e=parseInt(t,10);if(f(e))throw new Error('Could not extract integer from \"'+t+'\"');return e}function y(t,e){if(void 0!==t)return t instanceof e?t:new e(t)}function _(t,e,i){for(;-1!==(i=t.indexOf(e,i));){if(!(i>0&&\"\\\\\"===t[i-1]))return i;i+=1}return-1}function g(t,e,i){if(!t.length)return 0;let r,n,s=0,a=t.length-1;for(;s<=a;)if(r=s+Math.floor((a-s)/2),n=i(e,t[r]),n<0)a=r-1;else{if(!(n>0))break;s=r+1}return n<0?r:n>0?r+1:r}function D(t,e){if(t&&\"object\"==typeof t){if(t instanceof Date)return new Date(t.getTime());if(\"clone\"in t)return t.clone();if(Array.isArray(t)){let i=[];for(let r=0;r65535?2:1:(e+=Tt.newLineChar+\" \"+i.slice(0,Math.max(0,r)),i=i.slice(Math.max(0,r)),r=n=0)}return e.slice(Tt.newLineChar.length+1)}function Y(t){switch(\"string\"!=typeof t&&(\"number\"==typeof t&&(t=parseInt(t)),t=String(t)),t.length){case 0:return\"00\";case 1:return\"0\"+t;default:return t}}function A(t){return t<0?Math.ceil(t):Math.floor(t)}function O(t,e){for(let i in t){let r=Object.getOwnPropertyDescriptor(t,i);r&&!Object.getOwnPropertyDescriptor(e,i)&&Object.defineProperty(e,i,r)}return e}var b=Object.freeze({__proto__:null,updateTimezones:function(t){let e,i,r,n,s;if(!t||\"vcalendar\"!==t.name)return t;for(e=t.getAllSubcomponents(),i=[],r={},s=0;si)-(i>e)}_normalize(){let t=this.toSeconds(),e=this.factor;for(;t<-43200;)t+=97200;for(;t>50400;)t-=97200;this.fromSeconds(t),0==t&&(this.factor=e)}toICALString(){return ut.icalendar.value[\"utc-offset\"].toICAL(this.toString())}toString(){return(1==this.factor?\"+\":\"-\")+Y(this.hours)+\":\"+Y(this.minutes)}}class E extends s{static fromDateAndOrTimeString(t,e){function i(t,e,i){return t?p(t.slice(e,e+i)):null}let r=t.split(\"T\"),n=r[0],s=r[1],a=s?ut.vcard.value.time._splitZone(s):[],o=a[0],l=a[1],h=n?n.length:0,u=l?l.length:0,d=n&&\"-\"==n[0]&&\"-\"==n[1],m=l&&\"-\"==l[0],f={year:d?null:i(n,0,4),month:!d||4!=h&&7!=h?7==h||10==h?i(n,5,2):null:i(n,2,2),day:5==h?i(n,3,2):7==h&&d?i(n,5,2):10==h?i(n,8,2):null,hour:m?null:i(l,0,2),minute:m&&3==u?i(l,1,2):u>4?i(l,m?1:3,2):null,second:4==u?i(l,2,2):6==u?i(l,4,2):8==u?i(l,6,2):null};return o=\"Z\"==o?c.utcTimezone:o&&\":\"==o[3]?S.fromString(o):null,new E(f,o,e)}constructor(t,e,i){super(t,e),this.icaltype=i||\"date-and-or-time\"}icalclass=\"vcardtime\";icaltype=\"date-and-or-time\";clone(){return new E(this._time,this.zone,this.icaltype)}_normalize(){return this}utcOffset(){return this.zone instanceof S?this.zone.toSeconds():s.prototype.utcOffset.apply(this,arguments)}toICALString(){return ut.vcard.value[this.icaltype].toICAL(this.toString())}toString(){let t,e=this.year,i=this.month,r=this.day,n=this.hour,s=this.minute,a=this.second,o=null!==i,l=null!==r,h=null!==n,u=null!==s,d=null!==a,m=(null!==e?Y(e)+(o||l?\"-\":\"\"):o||l?\"--\":\"\")+(o?Y(i):\"\")+(l?\"-\"+Y(r):\"\"),f=(h?Y(n):\"-\")+(h&&u?\":\":\"\")+(u?Y(s):\"\")+(h||u?\"\":\"-\")+(u&&d?\":\":\"\")+(d?Y(a):\"\");if(this.zone===c.utcTimezone)t=\"Z\";else if(this.zone instanceof S)t=this.zone.toString();else if(this.zone===c.localTimezone)t=\"\";else if(this.zone instanceof c){t=S.fromSeconds(this.zone.utcOffset(this)).toString()}else t=\"\";switch(this.icaltype){case\"time\":return f+t;case\"date-and-or-time\":case\"date-time\":return m+(\"--\"==f?\"\":\"T\"+f+t);case\"date\":return m}return null}}class C{static _indexMap={BYSECOND:0,BYMINUTE:1,BYHOUR:2,BYDAY:3,BYMONTHDAY:4,BYYEARDAY:5,BYWEEKNO:6,BYMONTH:7,BYSETPOS:8};static _expandMap={SECONDLY:[1,1,1,1,1,1,1,1],MINUTELY:[2,1,1,1,1,1,1,1],HOURLY:[2,2,1,1,1,1,1,1],DAILY:[2,2,2,1,1,1,1,1],WEEKLY:[2,2,2,2,3,3,1,1],MONTHLY:[2,2,2,2,2,3,3,1],YEARLY:[2,2,2,2,2,2,2,2]};static UNKNOWN=0;static CONTRACT=1;static EXPAND=2;static ILLEGAL=3;constructor(t){this.fromData(t)}completed=!1;rule=null;dtstart=null;last=null;occurrence_number=0;by_indices=null;initialized=!1;by_data=null;days=null;days_index=0;fromData(t){if(this.rule=y(t.rule,B),!this.rule)throw new Error(\"iterator requires a (ICAL.Recur) rule\");if(this.dtstart=y(t.dtstart,s),!this.dtstart)throw new Error(\"iterator requires a (ICAL.Time) dtstart\");t.by_data?this.by_data=t.by_data:this.by_data=D(this.rule.parts,!0),t.occurrence_number&&(this.occurrence_number=t.occurrence_number),this.days=t.days||[],t.last&&(this.last=y(t.last,s)),this.by_indices=t.by_indices,this.by_indices||(this.by_indices={BYSECOND:0,BYMINUTE:0,BYHOUR:0,BYDAY:0,BYMONTH:0,BYWEEKNO:0,BYMONTHDAY:0}),this.initialized=t.initialized||!1,this.initialized||this.init()}init(){this.initialized=!0,this.last=this.dtstart.clone();let t=this.by_data;if(\"BYDAY\"in t&&this.sort_byday_rules(t.BYDAY),\"BYYEARDAY\"in t&&(\"BYMONTH\"in t||\"BYWEEKNO\"in t||\"BYMONTHDAY\"in t||\"BYDAY\"in t))throw new Error(\"Invalid BYYEARDAY rule\");if(\"BYWEEKNO\"in t&&\"BYMONTHDAY\"in t)throw new Error(\"BYWEEKNO does not fit to BYMONTHDAY\");if(\"MONTHLY\"==this.rule.freq&&(\"BYYEARDAY\"in t||\"BYWEEKNO\"in t))throw new Error(\"For MONTHLY recurrences neither BYYEARDAY nor BYWEEKNO may appear\");if(\"WEEKLY\"==this.rule.freq&&(\"BYYEARDAY\"in t||\"BYMONTHDAY\"in t))throw new Error(\"For WEEKLY recurrences neither BYMONTHDAY nor BYYEARDAY may appear\");if(\"YEARLY\"!=this.rule.freq&&\"BYYEARDAY\"in t)throw new Error(\"BYYEARDAY may only appear in YEARLY rules\");this.last.second=this.setup_defaults(\"BYSECOND\",\"SECONDLY\",this.dtstart.second),this.last.minute=this.setup_defaults(\"BYMINUTE\",\"MINUTELY\",this.dtstart.minute),this.last.hour=this.setup_defaults(\"BYHOUR\",\"HOURLY\",this.dtstart.hour);let e=this.last.day=this.setup_defaults(\"BYMONTHDAY\",\"DAILY\",this.dtstart.day);if(this.last.month=this.setup_defaults(\"BYMONTH\",\"MONTHLY\",this.dtstart.month),\"WEEKLY\"==this.rule.freq)if(\"BYDAY\"in t){let[,e]=this.ruleDayOfWeek(t.BYDAY[0],this.rule.wkst),i=e-this.last.dayOfWeek(this.rule.wkst);(this.last.dayOfWeek(this.rule.wkst)=0||i<0)&&(this.last.day+=i)}else{let e=B.numericDayToIcalDay(this.dtstart.dayOfWeek());t.BYDAY=[e]}if(\"YEARLY\"==this.rule.freq){for(;this.expand_year_days(this.last.year),!(this.days.length>0);)this.increment_year(this.rule.interval);this._nextByYearDay()}if(\"MONTHLY\"==this.rule.freq&&this.has_by_data(\"BYDAY\")){let t=null,e=this.last.clone(),i=s.daysInMonth(this.last.month,this.last.year);for(let r of this.by_data.BYDAY){this.last=e.clone();let[n,a]=this.ruleDayOfWeek(r),o=this.last.nthWeekDay(a,n);if(n>=6||n<=-6)throw new Error(\"Malformed values in BYDAY part\");if(o>i||o<=0){if(t&&t.month==e.month)continue;for(;o>i||o<=0;)this.increment_month(),i=s.daysInMonth(this.last.month,this.last.year),o=this.last.nthWeekDay(a,n)}this.last.day=o,(!t||this.last.compare(t)<0)&&(t=this.last.clone())}if(this.last=t.clone(),this.has_by_data(\"BYMONTHDAY\")&&this._byDayAndMonthDay(!0),this.last.day>i||0==this.last.day)throw new Error(\"Malformed values in BYDAY part\")}else if(this.has_by_data(\"BYMONTHDAY\")){this.last.day=1;let t=s.daysInMonth(this.last.month,this.last.year);if(e<0)this.last.day=t+e+1;else if(this.by_data.BYMONTHDAY[0]>t){if(!this.next_month()&&!this.next_month()&&!this.next_month())throw new Error(\"No possible occurrences\")}else this.last.day=e}}next(){let t,e=this.last?this.last.clone():null;if(this.rule.count&&this.occurrence_number>=this.rule.count||this.rule.until&&this.last.compare(this.rule.until)>0)return this.completed=!0,null;if(0==this.occurrence_number&&this.last.compare(this.dtstart)>=0)return this.occurrence_number++,this.last;do{switch(t=1,this.rule.freq){case\"SECONDLY\":this.next_second();break;case\"MINUTELY\":this.next_minute();break;case\"HOURLY\":this.next_hour();break;case\"DAILY\":this.next_day();break;case\"WEEKLY\":this.next_week();break;case\"MONTHLY\":t=this.next_month();break;case\"YEARLY\":this.next_year();break;default:return null}}while(!this.check_contracting_rules()||this.last.compare(this.dtstart)<0||!t);if(0==this.last.compare(e))throw new Error(\"Same occurrence found twice, protecting you from death by recursion\");return this.rule.until&&this.last.compare(this.rule.until)>0?(this.completed=!0,null):(this.occurrence_number++,this.last)}next_second(){return this.next_generic(\"BYSECOND\",\"SECONDLY\",\"second\",\"minute\")}increment_second(t){return this.increment_generic(t,\"second\",60,\"minute\")}next_minute(){return this.next_generic(\"BYMINUTE\",\"MINUTELY\",\"minute\",\"hour\",\"next_second\")}increment_minute(t){return this.increment_generic(t,\"minute\",60,\"hour\")}next_hour(){return this.next_generic(\"BYHOUR\",\"HOURLY\",\"hour\",\"monthday\",\"next_minute\")}increment_hour(t){this.increment_generic(t,\"hour\",24,\"monthday\")}next_day(){let t=\"DAILY\"==this.rule.freq;return 0==this.next_hour()||(t?this.increment_monthday(this.rule.interval):this.increment_monthday(1)),0}next_week(){let t=0;if(0==this.next_weekday_by_week())return t;if(this.has_by_data(\"BYWEEKNO\")){this.by_indices.BYWEEKNO++,this.by_indices.BYWEEKNO==this.by_data.BYWEEKNO.length&&(this.by_indices.BYWEEKNO=0,t=1),this.last.month=1,this.last.day=1;let e=this.by_data.BYWEEKNO[this.by_indices.BYWEEKNO];this.last.day+=7*e,t&&this.increment_year(1)}else this.increment_monthday(7*this.rule.interval);return t}normalizeByMonthDayRules(t,e,i){let r,n=s.daysInMonth(e,t),a=[],o=0,l=i.length;for(;on)){if(r<0)r=n+(r+1);else if(0===r)continue;-1===a.indexOf(r)&&a.push(r)}return a.sort((function(t,e){return t-e}))}_byDayAndMonthDay(t){let e,i,r,n,a=this.by_data.BYDAY,o=0,l=a.length,h=0,u=this,c=this.last.day;function d(){for(n=s.daysInMonth(u.last.month,u.last.year),e=u.normalizeByMonthDayRules(u.last.year,u.last.month,u.by_data.BYMONTHDAY),r=e.length;e[o]<=c&&(!t||e[o]!=c)&&on){m();continue}let t=e[o++];if(t>=i){c=t;for(let t=0;ti&&(this.last.day=1,this.increment_month(),this.is_day_in_byday(this.last)?this.has_by_data(\"BYSETPOS\")&&!this.check_set_position(1)||(t=1):t=0)}else if(this.has_by_data(\"BYMONTHDAY\")){this.by_indices.BYMONTHDAY++,this.by_indices.BYMONTHDAY>=this.by_data.BYMONTHDAY.length&&(this.by_indices.BYMONTHDAY=0,this.increment_month());let e=s.daysInMonth(this.last.month,this.last.year),i=this.by_data.BYMONTHDAY[this.by_indices.BYMONTHDAY];i<0&&(i=e+i+1),i>e?(this.last.day=1,t=this.is_day_in_byday(this.last)):this.last.day=i}else{this.increment_month();let e=s.daysInMonth(this.last.month,this.last.year);this.by_data.BYMONTHDAY[0]>e?t=0:this.last.day=this.by_data.BYMONTHDAY[0]}return t}next_weekday_by_week(){let t=0;if(0==this.next_hour())return t;if(!this.has_by_data(\"BYDAY\"))return 1;for(;;){let e=new s;this.by_indices.BYDAY++,this.by_indices.BYDAY==Object.keys(this.by_data.BYDAY).length&&(this.by_indices.BYDAY=0,t=1);let i=this.by_data.BYDAY[this.by_indices.BYDAY],r=this.ruleDayOfWeek(i)[1];r-=this.rule.wkst,r<0&&(r+=7),e.year=this.last.year,e.month=this.last.month,e.day=this.last.day;let n=e.startDoyWeek(this.rule.wkst);if(r+n<1&&!t)continue;let a=s.fromDayOfYear(n+r,this.last.year);return this.last.year=a.year,this.last.month=a.month,this.last.day=a.day,t}}next_year(){if(0==this.next_hour())return 0;if(++this.days_index==this.days.length){this.days_index=0;do{this.increment_year(this.rule.interval),this.expand_year_days(this.last.year)}while(0==this.days.length)}return this._nextByYearDay(),1}_nextByYearDay(){let t=this.days[this.days_index],e=this.last.year;t<1&&(t+=1,e+=1);let i=s.fromDayOfYear(t,e);this.last.day=i.day,this.last.month=i.month}ruleDayOfWeek(t,e){let i=t.match(/([+-]?[0-9])?(MO|TU|WE|TH|FR|SA|SU)/);if(i){return[parseInt(i[1]||0,10),t=B.icalDayToNumericDay(i[2],e)]}return[0,0]}next_generic(t,e,i,r,n){let s=t in this.by_data,a=this.rule.freq==e,o=0;if(n&&0==this[n]())return o;if(s){this.by_indices[t]++;let e=this.by_data[t];this.by_indices[t]==e.length&&(this.by_indices[t]=0,o=1),this.last[i]=e[this.by_indices[t]]}else a&&this[\"increment_\"+i](this.rule.interval);return s&&o&&a&&this[\"increment_\"+r](1),o}increment_monthday(t){for(let e=0;et&&(this.last.day-=t,this.increment_month())}}increment_month(){if(this.last.day=1,this.has_by_data(\"BYMONTH\"))this.by_indices.BYMONTH++,this.by_indices.BYMONTH==this.by_data.BYMONTH.length&&(this.by_indices.BYMONTH=0,this.increment_year(1)),this.last.month=this.by_data.BYMONTH[this.by_indices.BYMONTH];else{\"MONTHLY\"==this.rule.freq?this.last.month+=this.rule.interval:this.last.month++,this.last.month--;let t=A(this.last.month/12);this.last.month%=12,this.last.month++,0!=t&&this.increment_year(t)}}increment_year(t){this.last.year+=t}increment_generic(t,e,i,r){this.last[e]+=t;let n=A(this.last[e]/i);this.last[e]%=i,0!=n&&this[\"increment_\"+r](n)}has_by_data(t){return t in this.rule.parts}expand_year_days(t){let e=new s;this.days=[];let i={},r=[\"BYDAY\",\"BYWEEKNO\",\"BYMONTHDAY\",\"BYMONTH\",\"BYYEARDAY\"];for(let t of r)t in this.rule.parts&&(i[t]=this.rule.parts[t]);if(\"BYMONTH\"in i&&\"BYWEEKNO\"in i){let r=1,n={};e.year=t,e.isDate=!0;for(let i=0;i0?(e=h+7*(s-1),e<=r&&this.days.push(a+e)):(e=u+7*(s+1),e>0&&this.days.push(a+e))}}this.days.sort((function(t,e){return t-e}))}else if(2==n&&\"BYDAY\"in i&&\"BYMONTHDAY\"in i){let e=this.expand_by_day(t);for(let i of e){let e=s.fromDayOfYear(i,t);this.by_data.BYMONTHDAY.indexOf(e.day)>=0&&this.days.push(i)}}else if(3==n&&\"BYDAY\"in i&&\"BYMONTHDAY\"in i&&\"BYMONTH\"in i){let e=this.expand_by_day(t);for(let i of e){let e=s.fromDayOfYear(i,t);this.by_data.BYMONTH.indexOf(e.month)>=0&&this.by_data.BYMONTHDAY.indexOf(e.day)>=0&&this.days.push(i)}}else if(2==n&&\"BYDAY\"in i&&\"BYWEEKNO\"in i){let e=this.expand_by_day(t);for(let i of e){let e=s.fromDayOfYear(i,t).weekNumber(this.rule.wkst);this.by_data.BYWEEKNO.indexOf(e)&&this.days.push(i)}}else 3==n&&\"BYDAY\"in i&&\"BYWEEKNO\"in i&&\"BYMONTHDAY\"in i||(this.days=1==n&&\"BYYEARDAY\"in i?this.days.concat(this.by_data.BYYEARDAY):[]);return 0}expand_by_day(t){let e=[],i=this.last.clone();i.year=t,i.month=1,i.day=1,i.isDate=!0;let r=i.dayOfWeek();i.month=12,i.day=31,i.isDate=!0;let n=i.dayOfWeek(),s=i.dayOfYear();for(let t of this.by_data.BYDAY){let i=this.ruleDayOfWeek(t),a=i[0],o=i[1];if(0==a){for(let t=(o+7-r)%7+1;t<=s;t+=7)e.push(t)}else if(a>0){let t;t=o>=r?o-r+1:o-r+8,e.push(t+7*(a-1))}else{let t;a=-a,t=o<=n?s-n+o:s-n+o-7,e.push(t-7*(a-1))}}return e}is_day_in_byday(t){if(this.by_data.BYDAY)for(let e of this.by_data.BYDAY){let i=this.ruleDayOfWeek(e),r=i[0],n=i[1],s=t.dayOfWeek();if(0==r&&n==s||t.nthWeekDay(n,r)==t.day)return 1}return 0}check_set_position(t){if(this.has_by_data(\"BYSETPOS\")){return-1!==this.by_data.BYSETPOS.indexOf(t)}return!1}sort_byday_rules(t){for(let e=0;ethis.ruleDayOfWeek(t[e],this.rule.wkst)[1]){let r=t[e];t[e]=t[i],t[i]=r}}}check_contract_restriction(t,e){let i=C._indexMap[t],r=C._expandMap[this.rule.freq][i],n=!1;if(t in this.by_data&&r==C.CONTRACT){let i=this.by_data[t];for(let t of i)if(t==e){n=!0;break}}else n=!0;return n}check_contracting_rules(){let t=this.last.dayOfWeek(),e=this.last.weekNumber(this.rule.wkst),i=this.last.dayOfYear();return this.check_contract_restriction(\"BYSECOND\",this.last.second)&&this.check_contract_restriction(\"BYMINUTE\",this.last.minute)&&this.check_contract_restriction(\"BYHOUR\",this.last.hour)&&this.check_contract_restriction(\"BYDAY\",B.numericDayToIcalDay(t))&&this.check_contract_restriction(\"BYWEEKNO\",e)&&this.check_contract_restriction(\"BYMONTHDAY\",this.last.day)&&this.check_contract_restriction(\"BYMONTH\",this.last.month)&&this.check_contract_restriction(\"BYYEARDAY\",i)}setup_defaults(t,e,i){let r=C._indexMap[t];return C._expandMap[this.rule.freq][r]!=C.CONTRACT&&(t in this.by_data||(this.by_data[t]=[i]),this.rule.freq!=e)?this.by_data[t][0]:i}toJSON(){let t=Object.create(null);return t.initialized=this.initialized,t.rule=this.rule.toJSON(),t.dtstart=this.dtstart.toJSON(),t.by_data=this.by_data,t.days=this.days,t.last=this.last.toJSON(),t.by_indices=this.by_indices,t.occurrence_number=this.occurrence_number,t}}const w=/^(SU|MO|TU|WE|TH|FR|SA)$/,x=/^([+-])?(5[0-3]|[1-4][0-9]|[1-9])?(SU|MO|TU|WE|TH|FR|SA)$/,v={SU:s.SUNDAY,MO:s.MONDAY,TU:s.TUESDAY,WE:s.WEDNESDAY,TH:s.THURSDAY,FR:s.FRIDAY,SA:s.SATURDAY},N=Object.fromEntries(Object.entries(v).map((t=>t.reverse()))),I=[\"SECONDLY\",\"MINUTELY\",\"HOURLY\",\"DAILY\",\"WEEKLY\",\"MONTHLY\",\"YEARLY\"];class B{static fromString(t){let e=this._stringToData(t,!1);return new B(e)}static fromData(t){return new B(t)}static _stringToData(t,e){let i=Object.create(null),r=t.split(\";\"),n=r.length;for(let t=0;t7&&(i-=7),N[i]}constructor(t){this.wrappedJSObject=this,this.parts={},t&&\"object\"==typeof t&&this.fromData(t)}parts=null;interval=1;wkst=s.MONDAY;until=null;count=null;freq=null;icalclass=\"icalrecur\";icaltype=\"recur\";iterator(t){return new C({rule:this,dtstart:t})}clone(){return new B(this.toJSON())}isFinite(){return!(!this.count&&!this.until)}isByCount(){return!(!this.count||this.until)}addComponent(t,e){let i=t.toUpperCase();i in this.parts?this.parts[i].push(e):this.parts[i]=[e]}setComponent(t,e){this.parts[t.toUpperCase()]=e.slice()}getComponent(t){let e=t.toUpperCase();return e in this.parts?this.parts[e].slice():[]}getNextOccurrence(t,e){let i,r=this.iterator(t);do{i=r.next()}while(i&&i.compare(e)<=0);return i&&e.zone&&(i.zone=e.zone),i}fromData(t){for(let e in t){let i=e.toUpperCase();i in L?Array.isArray(t[e])?this.parts[i]=t[e]:this.parts[i]=[t[e]]:this[e]=t[e]}this.interval&&\"number\"!=typeof this.interval&&M.INTERVAL(this.interval,this),this.wkst&&\"number\"!=typeof this.wkst&&(this.wkst=B.icalDayToNumericDay(this.wkst)),!this.until||this.until instanceof s||(this.until=s.fromString(this.until))}toJSON(){let t=Object.create(null);t.freq=this.freq,this.count&&(t.count=this.count),this.interval>1&&(t.interval=this.interval);for(let[e,i]of Object.entries(this.parts))Array.isArray(i)&&1==i.length?t[e.toLowerCase()]=i[0]:t[e.toLowerCase()]=D(i);return this.until&&(t.until=this.until.toString()),\"wkst\"in this&&this.wkst!==s.DEFAULT_WEEK_START&&(t.wkst=B.numericDayToIcalDay(this.wkst)),t}toString(){let t=\"FREQ=\"+this.freq;this.count&&(t+=\";COUNT=\"+this.count),this.interval>1&&(t+=\";INTERVAL=\"+this.interval);for(let[e,i]of Object.entries(this.parts))t+=\";\"+e+\"=\"+i;return this.until&&(t+=\";UNTIL=\"+this.until.toICALString()),\"wkst\"in this&&this.wkst!==s.DEFAULT_WEEK_START&&(t+=\";WKST=\"+B.numericDayToIcalDay(this.wkst)),t}}function z(t,e,i,r){let n=r;if(\"+\"===r[0]&&(n=r.slice(1)),n=p(n),void 0!==e&&r '+e);if(void 0!==i&&r>i)throw new Error(t+': invalid value \"'+r+'\" must be < '+e);return n}const M={FREQ:function(t,e,i){if(-1===I.indexOf(t))throw new Error('invalid frequency \"'+t+'\" expected: \"'+I.join(\", \")+'\"');e.freq=t},COUNT:function(t,e,i){e.count=p(t)},INTERVAL:function(t,e,i){e.interval=p(t),e.interval<1&&(e.interval=1)},UNTIL:function(t,e,i){t.length>10?e.until=ut.icalendar.value[\"date-time\"].fromICAL(t):e.until=ut.icalendar.value.date.fromICAL(t),i||(e.until=s.fromString(e.until))},WKST:function(t,e,i){if(!w.test(t))throw new Error('invalid WKST value \"'+t+'\"');e.wkst=B.icalDayToNumericDay(t)}},L={BYSECOND:z.bind(void 0,\"BYSECOND\",0,60),BYMINUTE:z.bind(void 0,\"BYMINUTE\",0,59),BYHOUR:z.bind(void 0,\"BYHOUR\",0,23),BYDAY:function(t){if(x.test(t))return t;throw new Error('invalid BYDAY value \"'+t+'\"')},BYMONTHDAY:z.bind(void 0,\"BYMONTHDAY\",-31,31),BYYEARDAY:z.bind(void 0,\"BYYEARDAY\",-366,366),BYWEEKNO:z.bind(void 0,\"BYWEEKNO\",-53,53),BYMONTH:z.bind(void 0,\"BYMONTH\",1,12),BYSETPOS:z.bind(void 0,\"BYSETPOS\",-366,366)};class k{static fromString(t,e){let i=t.split(\"/\");if(2!==i.length)throw new Error('Invalid string value: \"'+t+'\" must contain a \"/\" char.');let n={start:s.fromDateTimeString(i[0],e)},a=i[1];return r.isValueString(a)?n.duration=r.fromString(a):n.end=s.fromDateTimeString(a,e),new k(n)}static fromData(t){return new k(t)}static fromJSON(t,e,i){function n(t,e){return i?s.fromString(t,e):s.fromDateTimeString(t,e)}return r.isValueString(t[1])?k.fromData({start:n(t[0],e),duration:r.fromString(t[1])}):k.fromData({start:n(t[0],e),end:n(t[1],e)})}constructor(t){if(this.wrappedJSObject=this,t&&\"start\"in t){if(t.start&&!(t.start instanceof s))throw new TypeError(\".start must be an instance of ICAL.Time\");this.start=t.start}if(t&&t.end&&t.duration)throw new Error(\"cannot accept both end and duration\");if(t&&\"end\"in t){if(t.end&&!(t.end instanceof s))throw new TypeError(\".end must be an instance of ICAL.Time\");this.end=t.end}if(t&&\"duration\"in t){if(t.duration&&!(t.duration instanceof r))throw new TypeError(\".duration must be an instance of ICAL.Duration\");this.duration=t.duration}}start=null;end=null;duration=null;icalclass=\"icalperiod\";icaltype=\"period\";clone(){return k.fromData({start:this.start?this.start.clone():null,end:this.end?this.end.clone():null,duration:this.duration?this.duration.clone():null})}getDuration(){return this.duration?this.duration:this.end.subtractDate(this.start)}getEnd(){if(this.end)return this.end;{let t=this.start.clone();return t.addDuration(this.duration),t}}toString(){return this.start+\"/\"+(this.end||this.duration)}toJSON(){return[this.start.toString(),(this.end||this.duration).toString()]}toICALString(){return this.start.toICALString()+\"/\"+(this.end||this.duration).toICALString()}}const P=/\\\\\\\\|\\\\,|\\\\[Nn]/g,U=/\\\\|,|\\n/g;function j(t,e){return{matches:/.*/,fromICAL:function(e,i){return function(t,e,i){if(-1===t.indexOf(\"\\\\\"))return t;i&&(e=new RegExp(e.source+\"|\\\\\\\\\"+i,e.flags));return t.replace(e,X)}(e,t,i)},toICAL:function(t,i){let r=e;return i&&(r=new RegExp(r.source+\"|\"+i,r.flags)),t.replace(r,(function(t){switch(t){case\"\\\\\":return\"\\\\\\\\\";case\";\":return\"\\\\;\";case\",\":return\"\\\\,\";case\"\\n\":return\"\\\\n\";default:return t}}))}}}const V={defaultType:\"text\"},H={defaultType:\"text\",multiValue:\",\"},R={defaultType:\"text\",structuredValue:\";\"},W={defaultType:\"integer\"},F={defaultType:\"date-time\",allowedTypes:[\"date-time\",\"date\"]},K={defaultType:\"date-time\"},q={defaultType:\"uri\"},J={defaultType:\"utc-offset\"},Z={defaultType:\"recur\"},G={defaultType:\"date-and-or-time\",allowedTypes:[\"date-time\",\"date\",\"text\"]};function X(t){switch(t){case\"\\\\\\\\\":return\"\\\\\";case\"\\\\;\":return\";\";case\"\\\\,\":return\",\";case\"\\\\n\":case\"\\\\N\":return\"\\n\";default:return t}}let Q={categories:H,url:q,version:V,uid:V},$={boolean:{values:[\"TRUE\",\"FALSE\"],fromICAL:function(t){return\"TRUE\"===t},toICAL:function(t){return t?\"TRUE\":\"FALSE\"}},float:{matches:/^[+-]?\\d+\\.\\d+$/,fromICAL:function(t){let e=parseFloat(t);return f(e)?0:e},toICAL:function(t){return String(t)}},integer:{fromICAL:function(t){let e=parseInt(t);return f(e)?0:e},toICAL:function(t){return String(t)}},\"utc-offset\":{toICAL:function(t){return t.length<7?t.slice(0,3)+t.slice(4,6):t.slice(0,3)+t.slice(4,6)+t.slice(7,9)},fromICAL:function(t){return t.length<6?t.slice(0,3)+\":\"+t.slice(3,5):t.slice(0,3)+\":\"+t.slice(3,5)+\":\"+t.slice(5,7)},decorate:function(t){return S.fromString(t)},undecorate:function(t){return t.toString()}}};const tt=O($,{text:j(/\\\\\\\\|\\\\;|\\\\,|\\\\[Nn]/g,/\\\\|;|,|\\n/g),uri:{},binary:{decorate:function(e){return t.fromString(e)},undecorate:function(t){return t.toString()}},\"cal-address\":{},date:{decorate:function(t,e){return ht.strict?s.fromDateString(t,e):s.fromString(t,e)},undecorate:function(t){return t.toString()},fromICAL:function(t){return!ht.strict&&t.length>=15?tt[\"date-time\"].fromICAL(t):t.slice(0,4)+\"-\"+t.slice(4,6)+\"-\"+t.slice(6,8)},toICAL:function(t){let e=t.length;return 10==e?t.slice(0,4)+t.slice(5,7)+t.slice(8,10):e>=19?tt[\"date-time\"].toICAL(t):t}},\"date-time\":{fromICAL:function(t){if(ht.strict||8!=t.length){let e=t.slice(0,4)+\"-\"+t.slice(4,6)+\"-\"+t.slice(6,8)+\"T\"+t.slice(9,11)+\":\"+t.slice(11,13)+\":\"+t.slice(13,15);return t[15]&&\"Z\"===t[15]&&(e+=\"Z\"),e}return tt.date.fromICAL(t)},toICAL:function(t){let e=t.length;if(10!=e||ht.strict){if(e>=19){let e=t.slice(0,4)+t.slice(5,7)+t.slice(8,13)+t.slice(14,16)+t.slice(17,19);return t[19]&&\"Z\"===t[19]&&(e+=\"Z\"),e}return t}return tt.date.toICAL(t)},decorate:function(t,e){return ht.strict?s.fromDateTimeString(t,e):s.fromString(t,e)},undecorate:function(t){return t.toString()}},duration:{decorate:function(t){return r.fromString(t)},undecorate:function(t){return t.toString()}},period:{fromICAL:function(t){let e=t.split(\"/\");return e[0]=tt[\"date-time\"].fromICAL(e[0]),r.isValueString(e[1])||(e[1]=tt[\"date-time\"].fromICAL(e[1])),e},toICAL:function(t){return t=t.slice(),ht.strict||10!=t[0].length?t[0]=tt[\"date-time\"].toICAL(t[0]):t[0]=tt.date.toICAL(t[0]),r.isValueString(t[1])||(ht.strict||10!=t[1].length?t[1]=tt[\"date-time\"].toICAL(t[1]):t[1]=tt.date.toICAL(t[1])),t.join(\"/\")},decorate:function(t,e){return k.fromJSON(t,e,!ht.strict)},undecorate:function(t){return t.toJSON()}},recur:{fromICAL:function(t){return B._stringToData(t,!0)},toICAL:function(t){let e=\"\";for(let[i,r]of Object.entries(t))\"until\"==i?r=r.length>10?tt[\"date-time\"].toICAL(r):tt.date.toICAL(r):\"wkst\"==i?\"number\"==typeof r&&(r=B.numericDayToIcalDay(r)):Array.isArray(r)&&(r=r.join(\",\")),e+=i.toUpperCase()+\"=\"+r+\";\";return e.slice(0,Math.max(0,e.length-1))},decorate:function(t){return B.fromData(t)},undecorate:function(t){return t.toJSON()}},time:{fromICAL:function(t){if(t.length<6)return t;let e=t.slice(0,2)+\":\"+t.slice(2,4)+\":\"+t.slice(4,6);return\"Z\"===t[6]&&(e+=\"Z\"),e},toICAL:function(t){if(t.length<8)return t;let e=t.slice(0,2)+t.slice(3,5)+t.slice(6,8);return\"Z\"===t[8]&&(e+=\"Z\"),e}}});let et=O(Q,{action:V,attach:{defaultType:\"uri\"},attendee:{defaultType:\"cal-address\"},calscale:V,class:V,comment:V,completed:K,contact:V,created:K,description:V,dtend:F,dtstamp:K,dtstart:F,due:F,duration:{defaultType:\"duration\"},exdate:{defaultType:\"date-time\",allowedTypes:[\"date-time\",\"date\"],multiValue:\",\"},exrule:Z,freebusy:{defaultType:\"period\",multiValue:\",\"},geo:{defaultType:\"float\",structuredValue:\";\"},\"last-modified\":K,location:V,method:V,organizer:{defaultType:\"cal-address\"},\"percent-complete\":W,priority:W,prodid:V,\"related-to\":V,repeat:W,rdate:{defaultType:\"date-time\",allowedTypes:[\"date-time\",\"date\",\"period\"],multiValue:\",\",detectType:function(t){return-1!==t.indexOf(\"/\")?\"period\":-1===t.indexOf(\"T\")?\"date\":\"date-time\"}},\"recurrence-id\":F,resources:H,\"request-status\":R,rrule:Z,sequence:W,status:V,summary:V,transp:V,trigger:{defaultType:\"duration\",allowedTypes:[\"duration\",\"date-time\"]},tzoffsetfrom:J,tzoffsetto:J,tzurl:q,tzid:V,tzname:V});const it=O($,{text:j(P,U),uri:j(P,U),date:{decorate:function(t){return E.fromDateAndOrTimeString(t,\"date\")},undecorate:function(t){return t.toString()},fromICAL:function(t){return 8==t.length?tt.date.fromICAL(t):\"-\"==t[0]&&6==t.length?t.slice(0,4)+\"-\"+t.slice(4):t},toICAL:function(t){return 10==t.length?tt.date.toICAL(t):\"-\"==t[0]&&7==t.length?t.slice(0,4)+t.slice(5):t}},time:{decorate:function(t){return E.fromDateAndOrTimeString(\"T\"+t,\"time\")},undecorate:function(t){return t.toString()},fromICAL:function(t){let e=it.time._splitZone(t,!0),i=e[0],r=e[1];return 6==r.length?r=r.slice(0,2)+\":\"+r.slice(2,4)+\":\"+r.slice(4,6):4==r.length&&\"-\"!=r[0]?r=r.slice(0,2)+\":\"+r.slice(2,4):5==r.length&&(r=r.slice(0,3)+\":\"+r.slice(3,5)),5!=i.length||\"-\"!=i[0]&&\"+\"!=i[0]||(i=i.slice(0,3)+\":\"+i.slice(3)),r+i},toICAL:function(t){let e=it.time._splitZone(t),i=e[0],r=e[1];return 8==r.length?r=r.slice(0,2)+r.slice(3,5)+r.slice(6,8):5==r.length&&\"-\"!=r[0]?r=r.slice(0,2)+r.slice(3,5):6==r.length&&(r=r.slice(0,3)+r.slice(4,6)),6!=i.length||\"-\"!=i[0]&&\"+\"!=i[0]||(i=i.slice(0,3)+i.slice(4)),r+i},_splitZone:function(t,e){let i,r,n=t.length-1,s=t.length-(e?5:6),a=t[s];return\"Z\"==t[n]?(i=t[n],r=t.slice(0,Math.max(0,n))):t.length>6&&(\"-\"==a||\"+\"==a)?(i=t.slice(s),r=t.slice(0,Math.max(0,s))):(i=\"\",r=t),[i,r]}},\"date-time\":{decorate:function(t){return E.fromDateAndOrTimeString(t,\"date-time\")},undecorate:function(t){return t.toString()},fromICAL:function(t){return it[\"date-and-or-time\"].fromICAL(t)},toICAL:function(t){return it[\"date-and-or-time\"].toICAL(t)}},\"date-and-or-time\":{decorate:function(t){return E.fromDateAndOrTimeString(t,\"date-and-or-time\")},undecorate:function(t){return t.toString()},fromICAL:function(t){let e=t.split(\"T\");return(e[0]?it.date.fromICAL(e[0]):\"\")+(e[1]?\"T\"+it.time.fromICAL(e[1]):\"\")},toICAL:function(t){let e=t.split(\"T\");return it.date.toICAL(e[0])+(e[1]?\"T\"+it.time.toICAL(e[1]):\"\")}},timestamp:tt[\"date-time\"],\"language-tag\":{matches:/^[a-zA-Z0-9-]+$/},\"phone-number\":{fromICAL:function(t){return Array.from(t).filter((function(t){return\"\\\\\"===t?void 0:t})).join(\"\")},toICAL:function(t){return Array.from(t).map((function(t){return\",\"===t||\";\"===t?\"\\\\\"+t:t})).join(\"\")}}});let rt=O(Q,{adr:{defaultType:\"text\",structuredValue:\";\",multiValue:\",\"},anniversary:G,bday:G,caladruri:q,caluri:q,clientpidmap:R,email:V,fburl:q,fn:V,gender:R,geo:q,impp:q,key:q,kind:V,lang:{defaultType:\"language-tag\"},logo:q,member:q,n:{defaultType:\"text\",structuredValue:\";\",multiValue:\",\"},nickname:H,note:V,org:{defaultType:\"text\",structuredValue:\";\"},photo:q,related:q,rev:{defaultType:\"timestamp\"},role:V,sound:q,source:q,tel:{defaultType:\"uri\",allowedTypes:[\"uri\",\"text\"]},title:V,tz:{defaultType:\"text\",allowedTypes:[\"text\",\"utc-offset\",\"uri\"]},xml:V}),nt=O($,{binary:tt.binary,date:it.date,\"date-time\":it[\"date-time\"],\"phone-number\":it[\"phone-number\"],uri:tt.uri,text:tt.text,time:tt.time,vcard:tt.text,\"utc-offset\":{toICAL:function(t){return t.slice(0,7)},fromICAL:function(t){return t.slice(0,7)},decorate:function(t){return S.fromString(t)},undecorate:function(t){return t.toString()}}}),st=O(Q,{fn:V,n:{defaultType:\"text\",structuredValue:\";\",multiValue:\",\"},nickname:H,photo:{defaultType:\"binary\",allowedTypes:[\"binary\",\"uri\"]},bday:{defaultType:\"date-time\",allowedTypes:[\"date-time\",\"date\"],detectType:function(t){return-1===t.indexOf(\"T\")?\"date\":\"date-time\"}},adr:{defaultType:\"text\",structuredValue:\";\",multiValue:\",\"},label:V,tel:{defaultType:\"phone-number\"},email:V,mailer:V,tz:{defaultType:\"utc-offset\",allowedTypes:[\"utc-offset\",\"text\"]},geo:{defaultType:\"float\",structuredValue:\";\"},title:V,role:V,logo:{defaultType:\"binary\",allowedTypes:[\"binary\",\"uri\"]},agent:{defaultType:\"vcard\",allowedTypes:[\"vcard\",\"text\",\"uri\"]},org:R,note:H,prodid:V,rev:{defaultType:\"date-time\",allowedTypes:[\"date-time\",\"date\"],detectType:function(t){return-1===t.indexOf(\"T\")?\"date\":\"date-time\"}},\"sort-string\":V,sound:{defaultType:\"binary\",allowedTypes:[\"binary\",\"uri\"]},class:V,key:{defaultType:\"binary\",allowedTypes:[\"binary\",\"text\"]}}),at={value:tt,param:{cutype:{values:[\"INDIVIDUAL\",\"GROUP\",\"RESOURCE\",\"ROOM\",\"UNKNOWN\"],allowXName:!0,allowIanaToken:!0},\"delegated-from\":{valueType:\"cal-address\",multiValue:\",\",multiValueSeparateDQuote:!0},\"delegated-to\":{valueType:\"cal-address\",multiValue:\",\",multiValueSeparateDQuote:!0},encoding:{values:[\"8BIT\",\"BASE64\"]},fbtype:{values:[\"FREE\",\"BUSY\",\"BUSY-UNAVAILABLE\",\"BUSY-TENTATIVE\"],allowXName:!0,allowIanaToken:!0},member:{valueType:\"cal-address\",multiValue:\",\",multiValueSeparateDQuote:!0},partstat:{values:[\"NEEDS-ACTION\",\"ACCEPTED\",\"DECLINED\",\"TENTATIVE\",\"DELEGATED\",\"COMPLETED\",\"IN-PROCESS\"],allowXName:!0,allowIanaToken:!0},range:{values:[\"THISANDFUTURE\"]},related:{values:[\"START\",\"END\"]},reltype:{values:[\"PARENT\",\"CHILD\",\"SIBLING\"],allowXName:!0,allowIanaToken:!0},role:{values:[\"REQ-PARTICIPANT\",\"CHAIR\",\"OPT-PARTICIPANT\",\"NON-PARTICIPANT\"],allowXName:!0,allowIanaToken:!0},rsvp:{values:[\"TRUE\",\"FALSE\"]},\"sent-by\":{valueType:\"cal-address\"},tzid:{matches:/^\\//},value:{values:[\"binary\",\"boolean\",\"cal-address\",\"date\",\"date-time\",\"duration\",\"float\",\"integer\",\"period\",\"recur\",\"text\",\"time\",\"uri\",\"utc-offset\"],allowXName:!0,allowIanaToken:!0}},property:et,propertyGroups:!1},ot={value:it,param:{type:{valueType:\"text\",multiValue:\",\"},value:{values:[\"text\",\"uri\",\"date\",\"time\",\"date-time\",\"date-and-or-time\",\"timestamp\",\"boolean\",\"integer\",\"float\",\"utc-offset\",\"language-tag\"],allowXName:!0,allowIanaToken:!0}},property:rt,propertyGroups:!0},lt={value:nt,param:{type:{valueType:\"text\",multiValue:\",\"},value:{values:[\"text\",\"uri\",\"date\",\"date-time\",\"phone-number\",\"time\",\"boolean\",\"integer\",\"float\",\"utc-offset\",\"vcard\",\"binary\"],allowXName:!0,allowIanaToken:!0}},property:st,propertyGroups:!0};const ht={strict:!0,defaultSet:at,defaultType:\"unknown\",components:{vcard:ot,vcard3:lt,vevent:at,vtodo:at,vjournal:at,valarm:at,vtimezone:at,daylight:at,standard:at},icalendar:at,vcard:ot,vcard3:lt,getDesignSet:function(t){return t&&t in ht.components?ht.components[t]:ht.defaultSet}};var ut=ht;const ct=\"\\r\\n\",dt=\"unknown\",mt={'\"':\"^'\",\"\\n\":\"^n\",\"^\":\"^^\"};function ft(t){\"string\"==typeof t[0]&&(t=[t]);let e=0,i=t.length,r=\"\";for(;e0&&(\"version\"!==t[1][0][0]||\"4.0\"!==t[1][0][3])&&(o=\"vcard3\"),e=e||ut.getDesignSet(o);s0&&\"object\"==typeof t[0]&&\"icaltype\"in t[0]&&this.resetType(t[0].icaltype),this.isDecorated)for(;i=0;s--)i&&n[s][0]!==i||this._removeObjectByIndex(t,r,s)}addSubcomponent(t){this._components||(this._components=[],this._hydratedComponentCount=0),t.parent&&t.parent.removeSubcomponent(t);let e=this.jCal[2].push(t.jCal);return this._components[e-1]=t,this._hydratedComponentCount++,t.parent=this,t}removeSubcomponent(t){let e=this._removeObject(2,\"_components\",t);return e&&this._hydratedComponentCount--,e}removeAllSubcomponents(t){let e=this._removeAllObjects(2,\"_components\",t);return this._hydratedComponentCount=0,e}addProperty(t){if(!(t instanceof pt))throw new TypeError(\"must be instance of ICAL.Property\");this._properties||(this._properties=[],this._hydratedPropertyCount=0),t.parent&&t.parent.removeProperty(t);let e=this.jCal[1].push(t.jCal);return this._properties[e-1]=t,this._hydratedPropertyCount++,t.parent=this,t}addPropertyWithValue(t,e){let i=new pt(t);return i.setValue(e),this.addProperty(i),i}updatePropertyWithValue(t,e){let i=this.getFirstProperty(t);return i?i.setValue(e):i=this.addPropertyWithValue(t,e),i}removeProperty(t){let e=this._removeObject(1,\"_properties\",t);return e&&this._hydratedPropertyCount--,e}removeAllProperties(t){let e=this._removeAllObjects(1,\"_properties\",t);return this._hydratedPropertyCount=0,e}toJSON(){return this.jCal}toString(){return ft.component(this.jCal,this._designSet)}getTimeZoneByID(t){if(this.parent)return this.parent.getTimeZoneByID(t);if(!this._timezoneCache)return null;if(this._timezoneCache.has(t))return this._timezoneCache.get(t);const e=this.getAllSubcomponents(\"vtimezone\");for(const i of e)if(i.getFirstProperty(\"tzid\").getFirstValue()===t){const e=new c({component:i,tzid:t});return this._timezoneCache.set(t,e),e}return null}}class _t{constructor(t){this.ruleDates=[],this.exDates=[],this.fromData(t)}complete=!1;ruleIterators=null;ruleDates=null;exDates=null;ruleDateInc=0;exDateInc=0;exDate=null;ruleDate=null;dtstart=null;last=null;fromData(t){let e=y(t.dtstart,s);if(!e)throw new Error(\".dtstart (ICAL.Time) must be given\");if(this.dtstart=e,t.component)this._init(t.component);else{if(this.last=y(t.last,s)||e.clone(),!t.ruleIterators)throw new Error(\".ruleIterators or .component must be given\");this.ruleIterators=t.ruleIterators.map((function(t){return y(t,C)})),this.ruleDateInc=t.ruleDateInc,this.exDateInc=t.exDateInc,t.ruleDates&&(this.ruleDates=t.ruleDates.map((t=>y(t,s))),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.exDates&&(this.exDates=t.exDates.map((t=>y(t,s))),this.exDate=this.exDates[this.exDateInc]),void 0!==t.complete&&(this.complete=t.complete)}}next(){let t,e,i,r=0;for(;;){if(r++>500)throw new Error(\"max tries have occurred, rule may be impossible to fulfill.\");if(e=this.ruleDate,t=this._nextRecurrenceIter(this.last),!e&&!t){this.complete=!0;break}if((!e||t&&e.compare(t.last)>0)&&(e=t.last.clone(),t.next()),this.ruleDate===e&&this._nextRuleDay(),this.last=e,!this.exDate||(i=this.exDate.compare(this.last),i<0&&this._nextExDay(),0!==i))return this.last;this._nextExDay()}}toJSON(){function t(t){return t.toJSON()}let e=Object.create(null);return e.ruleIterators=this.ruleIterators.map(t),this.ruleDates&&(e.ruleDates=this.ruleDates.map(t)),this.exDates&&(e.exDates=this.exDates.map(t)),e.ruleDateInc=this.ruleDateInc,e.exDateInc=this.exDateInc,e.last=this.last.toJSON(),e.dtstart=this.dtstart.toJSON(),e.complete=this.complete,e}_extractDates(t,e){let i=[],r=t.getAllProperties(e);for(let t=0,e=r.length;tt.compare(e)));i.splice(t,0,e)}return i}_init(t){if(this.ruleIterators=[],this.last=this.dtstart.clone(),!t.hasProperty(\"rdate\")&&!t.hasProperty(\"rrule\")&&!t.hasProperty(\"recurrence-id\"))return this.ruleDate=this.last.clone(),void(this.complete=!0);if(t.hasProperty(\"rdate\")&&(this.ruleDates=this._extractDates(t,\"rdate\"),this.ruleDates[0]&&this.ruleDates[0].compare(this.dtstart)<0?(this.ruleDateInc=0,this.last=this.ruleDates[0].clone()):this.ruleDateInc=g(this.ruleDates,this.last,((t,e)=>t.compare(e))),this.ruleDate=this.ruleDates[this.ruleDateInc]),t.hasProperty(\"rrule\")){let e,i,r=t.getAllProperties(\"rrule\"),n=0,s=r.length;for(;nt.compare(e))),this.exDate=this.exDates[this.exDateInc])}_nextExDay(){this.exDate=this.exDates[++this.exDateInc]}_nextRuleDay(){this.ruleDate=this.ruleDates[++this.ruleDateInc]}_nextRecurrenceIter(){let t=this.ruleIterators;if(0===t.length)return null;let e,i,r,n=t.length,s=0;for(;s0)&&(r=e);return r}}class gt{constructor(t,e){t instanceof yt||(e=t,t=null),this.component=t||new yt(\"vevent\"),this._rangeExceptionCache=Object.create(null),this.exceptions=Object.create(null),this.rangeExceptions=[],e&&e.strictExceptions&&(this.strictExceptions=e.strictExceptions),e&&e.exceptions?e.exceptions.forEach(this.relateException,this):this.component.parent&&!this.isRecurrenceException()&&this.component.parent.getAllSubcomponents(\"vevent\").forEach((function(t){t.hasProperty(\"recurrence-id\")&&this.relateException(t)}),this)}static THISANDFUTURE=\"THISANDFUTURE\";exceptions=null;strictExceptions=!1;relateException(t){if(this.isRecurrenceException())throw new Error(\"cannot relate exception to exceptions\");if(t instanceof yt&&(t=new gt(t)),this.strictExceptions&&t.uid!==this.uid)throw new Error(\"attempted to relate unrelated exception\");let e=t.recurrenceId.toString();if(this.exceptions[e]=t,t.modifiesFuture()){let i=[t.recurrenceId.toUnixTime(),e],r=g(this.rangeExceptions,i,Dt);this.rangeExceptions.splice(r,0,i)}}modifiesFuture(){if(!this.component.hasProperty(\"recurrence-id\"))return!1;return this.component.getFirstProperty(\"recurrence-id\").getParameter(\"range\")===gt.THISANDFUTURE}findRangeException(t){if(!this.rangeExceptions.length)return null;let e=t.toUnixTime(),i=g(this.rangeExceptions,[e],Dt);if(i-=1,i<0)return null;let r=this.rangeExceptions[i];return ee[0]?1:e[0]>t[0]?-1:0}var Tt={foldLength:75,debug:!1,newLineChar:\"\\r\\n\",Binary:t,Component:yt,ComponentParser:class{constructor(t){void 0===t&&(t={});for(let[e,i]of Object.entries(t))this[e]=i}parseEvent=!0;parseTimezone=!0;oncomplete=function(){};onerror=function(t){};ontimezone=function(t){};onevent=function(t){};process(t){\"string\"==typeof t&&(t=l(t)),t instanceof yt||(t=new yt(t));let e,i=t.getAllSubcomponents(),r=0,n=i.length;for(;r= 20) {\n console.error(\"TimezoneManager.getTimezoneForIdRec() exceeds recursion limits\");\n return null;\n }\n if (this._aliases.has(timezoneId)) {\n const resolvedTimezoneId = this._aliases.get(timezoneId);\n return this._getTimezoneForIdRec(resolvedTimezoneId, level + 1);\n }\n return null;\n }\n /**\n * Checks if there is a timezone for the given id stored in this manager\n *\n * @param {string} timezoneId The id of the timezone\n * @return {boolean}\n */\n hasTimezoneForId(timezoneId) {\n return this._timezones.has(timezoneId) || this._aliases.has(timezoneId);\n }\n /**\n * Checks if the given timezone id is an alias\n *\n * @param {string} timezoneId The id of the timezone\n * @return {boolean}\n */\n isAlias(timezoneId) {\n return !this._timezones.has(timezoneId) && this._aliases.has(timezoneId);\n }\n /**\n * Lists all timezones\n *\n * @param {boolean=} includeAliases Whether or not to include aliases\n * @return {string[]}\n */\n listAllTimezones(includeAliases = false) {\n const timezones = Array.from(this._timezones.keys());\n if (includeAliases) {\n return timezones.concat(Array.from(this._aliases.keys()));\n }\n return timezones;\n }\n /**\n * Registers a timezone\n *\n * @param {Timezone} timezone The timezone-object to register\n */\n registerTimezone(timezone) {\n this._timezones.set(timezone.timezoneId, timezone);\n ICAL.TimezoneService.register(timezone.timezoneId, timezone.toICALTimezone());\n this._pendingAliases = this._pendingAliases.filter(([aliasName, timezoneId]) => {\n if (timezoneId !== timezone.timezoneId) {\n return true;\n }\n ICAL.TimezoneService.register(aliasName, timezone.toICALTimezone());\n return false;\n });\n }\n registerDefaultTimezones() {\n console.debug(`@nextcloud/calendar-js app is using version ${tzData.version} of the timezone database`);\n for (const tzid in tzData.zones) {\n if (Object.prototype.hasOwnProperty.call(tzData.zones, [tzid])) {\n const ics = [\n \"BEGIN:VTIMEZONE\",\n \"TZID:\" + tzid,\n ...tzData.zones[tzid].ics,\n \"END:VTIMEZONE\"\n ].join(\"\\r\\n\");\n this.registerTimezoneFromICS(tzid, ics);\n }\n }\n for (const tzid in tzData.aliases) {\n if (Object.prototype.hasOwnProperty.call(tzData.aliases, [tzid])) {\n this.registerAlias(tzid, tzData.aliases[tzid].aliasTo);\n }\n }\n }\n /**\n * Registers a timezone based on ics data\n *\n * @param {string} timezoneId The id of the timezone\n * @param {string} ics The iCalendar timezone definition\n */\n registerTimezoneFromICS(timezoneId, ics) {\n const timezone = new Timezone(timezoneId, ics);\n this.registerTimezone(timezone);\n }\n /**\n * Registers a new timezone-alias\n *\n * @param {string} aliasName The timezone-id of the alias\n * @param {string} timezoneId The timezone-id to resolve the alias to\n */\n registerAlias(aliasName, timezoneId) {\n this._aliases.set(aliasName, timezoneId);\n const resolvedTimezone = this.getTimezoneForId(timezoneId);\n if (!resolvedTimezone) {\n this._pendingAliases.push([aliasName, timezoneId]);\n return;\n }\n ICAL.TimezoneService.register(aliasName, resolvedTimezone.toICALTimezone());\n }\n /**\n * Unregisters a timezone\n *\n * @param {string} timezoneId Unregisters a timezone by Id\n */\n unregisterTimezones(timezoneId) {\n this._timezones.delete(timezoneId);\n ICAL.TimezoneService.remove(timezoneId);\n }\n /**\n * Unregisters a timezone-alias\n *\n * @param {string} aliasName The alias to unregister\n */\n unregisterAlias(aliasName) {\n this._aliases.delete(aliasName);\n this._pendingAliases = this._pendingAliases.filter(([pendingAliasName]) => pendingAliasName !== aliasName);\n ICAL.TimezoneService.remove(aliasName);\n }\n /**\n * Clear all timezones\n */\n clearAllTimezones() {\n this._aliases = /* @__PURE__ */ new Map();\n this._pendingAliases = [];\n this._timezones = /* @__PURE__ */ new Map();\n ICAL.TimezoneService.reset();\n timezoneManager.registerTimezone(Timezone.utc);\n timezoneManager.registerTimezone(Timezone.floating);\n timezoneManager.registerAlias(\"GMT\", Timezone.utc.timezoneId);\n timezoneManager.registerAlias(\"Z\", Timezone.utc.timezoneId);\n }\n}\nconst timezoneManager = new TimezoneManager();\ntimezoneManager.clearAllTimezones();\nfunction getTimezoneManager() {\n return timezoneManager;\n}\nfunction isOlsonTimezone(tzName) {\n const hasSlash = tzName.indexOf(\"/\") !== -1;\n const hasSpace = tzName.indexOf(\" \") !== -1;\n const startsWithETC = tzName.startsWith(\"Etc\");\n const startsWithUS = tzName.startsWith(\"US/\");\n return hasSlash && !hasSpace && !startsWithETC && !startsWithUS;\n}\nfunction getSortedTimezoneList(timezoneList = [], additionalTimezones = [], globalTimezoneName = \"Global\") {\n const sortedByContinent = {};\n const sortedList = [];\n for (const timezoneId of timezoneList) {\n const components = timezoneId.split(\"/\");\n let [continent, name] = [components.shift(), components.join(\"/\")];\n if (!name) {\n name = continent;\n continent = globalTimezoneName;\n }\n sortedByContinent[continent] = sortedByContinent[continent] || {\n continent,\n regions: []\n };\n sortedByContinent[continent].regions.push({\n label: getReadableTimezoneName(name),\n cities: [],\n timezoneId\n });\n }\n for (const additionalTimezone of additionalTimezones) {\n const { continent, label, timezoneId } = additionalTimezone;\n sortedByContinent[continent] = sortedByContinent[continent] || {\n continent,\n regions: []\n };\n sortedByContinent[continent].regions.push({\n label,\n cities: [],\n timezoneId\n });\n }\n for (const continent in sortedByContinent) {\n if (!Object.prototype.hasOwnProperty.call(sortedByContinent, continent)) {\n continue;\n }\n sortedByContinent[continent].regions.sort((a, b) => {\n if (a.label < b.label) {\n return -1;\n }\n return 1;\n });\n sortedList.push(sortedByContinent[continent]);\n }\n sortedList.sort((a, b) => {\n if (a.continent < b.continent) {\n return -1;\n }\n return 1;\n });\n return sortedList;\n}\nfunction getReadableTimezoneName(timezoneId) {\n return timezoneId.split(\"_\").join(\" \").replace(\"St \", \"St. \").split(\"/\").join(\" - \");\n}\nexport {\n Timezone,\n getReadableTimezoneName,\n getSortedTimezoneList,\n getTimezoneManager,\n isOlsonTimezone\n};\n","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.VueSelect=t():e.VueSelect=t()}(\"undefined\"!=typeof self?self:this,(function(){return(()=>{var e={646:e=>{e.exports=function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t{e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},860:e=>{e.exports=function(e){if(Symbol.iterator in Object(e)||\"[object Arguments]\"===Object.prototype.toString.call(e))return Array.from(e)}},206:e=>{e.exports=function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}},319:(e,t,n)=>{var o=n(646),i=n(860),s=n(206);e.exports=function(e){return o(e)||i(e)||s()}},8:e=>{function t(n){return\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},t(n)}e.exports=t}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var o={};return(()=>{\"use strict\";n.r(o),n.d(o,{VueSelect:()=>m,default:()=>_,mixins:()=>O});var e=n(319),t=n.n(e),i=n(8),s=n.n(i),r=n(713),a=n.n(r);const l={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer:function(){this.autoscroll&&this.maybeAdjustScroll()},open:function(e){var t=this;this.autoscroll&&e&&this.$nextTick((function(){return t.maybeAdjustScroll()}))}},methods:{maybeAdjustScroll:function(){var e,t=(null===(e=this.$refs.dropdownMenu)||void 0===e?void 0:e.children[this.typeAheadPointer])||!1;if(t){var n=this.getDropdownViewport(),o=t.getBoundingClientRect(),i=o.top,s=o.bottom,r=o.height;if(in.bottom)return this.$refs.dropdownMenu.scrollTop=t.offsetTop-(n.height-r)}},getDropdownViewport:function(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},c={data:function(){return{typeAheadPointer:-1}},watch:{filteredOptions:function(){if(this.resetFocusOnOptionsChange)for(var e=0;e=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown:function(){for(var e=this.typeAheadPointer+1;e0&&void 0!==arguments[0]?arguments[0]:null;return this.mutableLoading=null==e?!this.mutableLoading:e}}};function p(e,t,n,o,i,s,r,a){var l,c=\"function\"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),s&&(c._scopeId=\"data-v-\"+s),r?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||\"undefined\"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(r)},c._ssrRegister=l):i&&(l=a?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}const d={Deselect:p({},(function(){var e=this.$createElement,t=this._self._c||e;return t(\"svg\",{attrs:{xmlns:\"http://www.w3.org/2000/svg\",width:\"10\",height:\"10\"}},[t(\"path\",{attrs:{d:\"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z\"}})])}),[],!1,null,null,null).exports,OpenIndicator:p({},(function(){var e=this.$createElement,t=this._self._c||e;return t(\"svg\",{attrs:{xmlns:\"http://www.w3.org/2000/svg\",width:\"14\",height:\"10\"}},[t(\"path\",{attrs:{d:\"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z\"}})])}),[],!1,null,null,null).exports},h={inserted:function(e,t,n){var o=n.context;if(o.appendToBody){document.body.appendChild(e);var i=o.$refs.toggle.getBoundingClientRect(),s=i.height,r=i.top,a=i.left,l=i.width,c=window.scrollX||window.pageXOffset,u=window.scrollY||window.pageYOffset;e.unbindPosition=o.calculatePosition(e,o,{width:l+\"px\",left:c+a+\"px\",top:u+r+s+\"px\"})}},unbind:function(e,t,n){n.context.appendToBody&&(e.unbindPosition&&\"function\"==typeof e.unbindPosition&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};const f=function(e){var t={};return Object.keys(e).sort().forEach((function(n){t[n]=e[n]})),JSON.stringify(t)};var y=0;const b=function(){return++y};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function v(e){for(var t=1;t-1}},filter:{type:Function,default:function(e,t){var n=this;return e.filter((function(e){var o=n.getOptionLabel(e);return\"number\"==typeof o&&(o=o.toString()),n.filterBy(e,o,t)}))}},createOption:{type:Function,default:function(e){return\"object\"===s()(this.optionList[0])?a()({},this.label,e):e}},resetFocusOnOptionsChange:{type:Boolean,default:!0},resetOnOptionsChange:{default:!1,validator:function(e){return[\"function\",\"boolean\"].includes(s()(e))}},clearSearchOnBlur:{type:Function,default:function(e){var t=e.clearSearchOnSelect,n=e.multiple;return t&&!n}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:\"auto\"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:function(){return[13]}},searchInputQuerySelector:{type:String,default:\"[type=search]\"},mapKeydown:{type:Function,default:function(e,t){return e}},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default:function(e,t,n){var o=n.width,i=n.top,s=n.left;e.style.top=i,e.style.left=s,e.style.width=o}},dropdownShouldOpen:{type:Function,default:function(e){var t=e.noDrop,n=e.open,o=e.mutableLoading;return!t&&(n&&!o)}},keyboardFocusBorder:{type:Boolean,default:!1},uid:{type:[String,Number],default:function(){return b()}}},data:function(){return{search:\"\",open:!1,isComposing:!1,isKeyboardNavigation:!1,pushedTags:[],_value:[]}},computed:{isTrackingValues:function(){return void 0===this.value||this.$options.propsData.hasOwnProperty(\"reduce\")},selectedValue:function(){var e=this.value;return this.isTrackingValues&&(e=this.$data._value),null!=e&&\"\"!==e?[].concat(e):[]},optionList:function(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl:function(){return this.$scopedSlots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope:function(){var e=this,t={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:v({id:this.inputId,disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,role:\"combobox\",\"aria-autocomplete\":\"list\",\"aria-label\":this.ariaLabelCombobox,\"aria-controls\":\"vs-\".concat(this.uid,\"__listbox\"),\"aria-owns\":\"vs-\".concat(this.uid,\"__listbox\"),\"aria-expanded\":this.dropdownOpen.toString(),ref:\"search\",type:\"search\",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{\"aria-activedescendant\":\"vs-\".concat(this.uid,\"__option-\").concat(this.typeAheadPointer)}:{}),events:{compositionstart:function(){return e.isComposing=!0},compositionend:function(){return e.isComposing=!1},keydown:this.onSearchKeyDown,keypress:this.onSearchKeyPress,blur:this.onSearchBlur,focus:this.onSearchFocus,input:function(t){return e.search=t.target.value}}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:\"openIndicator\",role:\"presentation\",class:\"vs__open-indicator\"}},listHeader:t,listFooter:t,header:v({},t,{deselect:this.deselect}),footer:v({},t,{deselect:this.deselect})}},childComponents:function(){return v({},d,{},this.components)},stateClasses:function(){return{\"vs--open\":this.dropdownOpen,\"vs--single\":!this.multiple,\"vs--multiple\":this.multiple,\"vs--searching\":this.searching&&!this.noDrop,\"vs--searchable\":this.searchable&&!this.noDrop,\"vs--unsearchable\":!this.searchable,\"vs--loading\":this.mutableLoading,\"vs--disabled\":this.disabled}},searching:function(){return!!this.search},dropdownOpen:function(){return this.dropdownShouldOpen(this)},searchPlaceholder:function(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions:function(){var e=this,t=function(t){return null!==e.limit?t.slice(0,e.limit):t},n=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return t(n);var o=this.search.length?this.filter(n,this.search,this):n;if(this.taggable&&this.search.length){var i=this.createOption(this.search);this.optionExists(i)||o.unshift(i)}return t(o)},isValueEmpty:function(){return 0===this.selectedValue.length},showClearButton:function(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options:function(e,t){var n=this;!this.taggable&&(\"function\"==typeof n.resetOnOptionsChange?n.resetOnOptionsChange(e,t,n.selectedValue):n.resetOnOptionsChange)&&this.clearSelection(),this.value&&this.isTrackingValues&&this.setInternalValueFromOptions(this.value)},value:{immediate:!0,handler:function(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple:function(){this.clearSelection()},open:function(e){this.$emit(e?\"open\":\"close\")},search:function(e){e.length&&(this.open=!0)}},created:function(){this.mutableLoading=this.loading,this.$on(\"option:created\",this.pushTag)},methods:{setInternalValueFromOptions:function(e){var t=this;Array.isArray(e)?this.$data._value=e.map((function(e){return t.findOptionFromReducedValue(e)})):this.$data._value=this.findOptionFromReducedValue(e)},select:function(e){this.$emit(\"option:selecting\",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&this.$emit(\"option:created\",e),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit(\"option:selected\",e)),this.onAfterSelect(e)},deselect:function(e){var t=this;this.$emit(\"option:deselecting\",e),this.updateValue(this.selectedValue.filter((function(n){return!t.optionComparator(n,e)}))),this.$emit(\"option:deselected\",e)},keyboardDeselect:function(e,t){var n,o;this.deselect(e);var i=null===(n=this.$refs.deselectButtons)||void 0===n?void 0:n[t+1],s=null===(o=this.$refs.deselectButtons)||void 0===o?void 0:o[t-1],r=null!=i?i:s;r?r.focus():this.searchEl.focus()},clearSelection:function(){this.updateValue(this.multiple?[]:null),this.searchEl.focus()},onAfterSelect:function(e){var t=this;this.closeOnSelect&&(this.open=!this.open),this.clearSearchOnSelect&&(this.search=\"\"),this.noDrop&&this.multiple&&this.$nextTick((function(){return t.$refs.search.focus()}))},updateValue:function(e){var t=this;void 0===this.value&&(this.$data._value=e),null!==e&&(e=Array.isArray(e)?e.map((function(e){return t.reduce(e)})):this.reduce(e)),this.$emit(\"input\",e)},toggleDropdown:function(e){var n=e.target!==this.searchEl;n&&e.preventDefault();var o=[].concat(t()(this.$refs.deselectButtons||[]),t()([this.$refs.clearButton]||0));void 0===this.searchEl||o.filter(Boolean).some((function(t){return t.contains(e.target)||t===e.target}))?e.preventDefault():this.open&&n?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected:function(e){var t=this;return this.selectedValue.some((function(n){return t.optionComparator(n,e)}))},isOptionDeselectable:function(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},hasKeyboardFocusBorder:function(e){return!(!this.keyboardFocusBorder||!this.isKeyboardNavigation)&&e===this.typeAheadPointer},optionComparator:function(e,t){return this.getOptionKey(e)===this.getOptionKey(t)},findOptionFromReducedValue:function(e){var n=this,o=[].concat(t()(this.options),t()(this.pushedTags)).filter((function(t){return JSON.stringify(n.reduce(t))===JSON.stringify(e)}));return 1===o.length?o[0]:o.find((function(e){return n.optionComparator(e,n.$data._value)}))||e},closeSearchOptions:function(){this.open=!1,this.$emit(\"search:blur\")},maybeDeleteValue:function(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){var e=null;this.multiple&&(e=t()(this.selectedValue.slice(0,this.selectedValue.length-1))),this.updateValue(e)}},optionExists:function(e){var t=this;return this.optionList.some((function(n){return t.optionComparator(n,e)}))},optionAriaSelected:function(e){return this.selectable(e)?String(this.isOptionSelected(e)):null},normalizeOptionForSlot:function(e){return\"object\"===s()(e)?e:a()({},this.label,e)},pushTag:function(e){this.pushedTags.push(e)},onEscape:function(){this.search.length?this.search=\"\":this.open=!1},onSearchBlur:function(){if(!this.mousedown||this.searching){var e=this.clearSearchOnSelect,t=this.multiple;return this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:t})&&(this.search=\"\"),void this.closeSearchOptions()}this.mousedown=!1,0!==this.search.length||0!==this.options.length||this.closeSearchOptions()},onSearchFocus:function(){this.open=!0,this.$emit(\"search:focus\")},onMousedown:function(){this.mousedown=!0},onMouseUp:function(){this.mousedown=!1},onMouseMove:function(e,t){this.isKeyboardNavigation=!1,this.selectable(e)&&(this.typeAheadPointer=t)},onSearchKeyDown:function(e){var t=this,n=function(e){if(e.preventDefault(),t.open)return!t.isComposing&&t.typeAheadSelect();t.open=!0},o={8:function(e){return t.maybeDeleteValue()},9:function(e){return t.onTab()},27:function(e){return t.onEscape()},38:function(e){if(e.preventDefault(),t.isKeyboardNavigation=!0,t.open)return t.typeAheadUp();t.open=!0},40:function(e){if(e.preventDefault(),t.isKeyboardNavigation=!0,t.open)return t.typeAheadDown();t.open=!0}};this.selectOnKeyCodes.forEach((function(e){return o[e]=n}));var i=this.mapKeydown(o,this);if(\"function\"==typeof i[e.keyCode])return i[e.keyCode](e)},onSearchKeyPress:function(e){this.open||32!==e.keyCode||(e.preventDefault(),this.open=!0)}}},(function(){var e=this,t=e.$createElement,n=e._self._c||t;return n(\"div\",{staticClass:\"v-select\",class:e.stateClasses,attrs:{id:\"v-select-\"+e.uid,dir:e.dir}},[e._t(\"header\",null,null,e.scope.header),e._v(\" \"),n(\"div\",{ref:\"toggle\",staticClass:\"vs__dropdown-toggle\"},[n(\"div\",{ref:\"selectedOptions\",staticClass:\"vs__selected-options\",on:{mousedown:e.toggleDropdown}},[e._l(e.selectedValue,(function(t,o){return e._t(\"selected-option-container\",[n(\"span\",{key:e.getOptionKey(t),staticClass:\"vs__selected\"},[e._t(\"selected-option\",[e._v(\"\\n \"+e._s(e.getOptionLabel(t))+\"\\n \")],null,e.normalizeOptionForSlot(t)),e._v(\" \"),e.multiple?n(\"button\",{ref:\"deselectButtons\",refInFor:!0,staticClass:\"vs__deselect\",attrs:{disabled:e.disabled,type:\"button\",title:e.ariaLabelDeselectOption(e.getOptionLabel(t)),\"aria-label\":e.ariaLabelDeselectOption(e.getOptionLabel(t))},on:{mousedown:function(n){return n.stopPropagation(),e.deselect(t)},keydown:function(n){return!n.type.indexOf(\"key\")&&e._k(n.keyCode,\"enter\",13,n.key,\"Enter\")?null:e.keyboardDeselect(t,o)}}},[n(e.childComponents.Deselect,{tag:\"component\"})],1):e._e()],2)],{option:e.normalizeOptionForSlot(t),deselect:e.deselect,multiple:e.multiple,disabled:e.disabled})})),e._v(\" \"),e._t(\"search\",[n(\"input\",e._g(e._b({staticClass:\"vs__search\"},\"input\",e.scope.search.attributes,!1),e.scope.search.events))],null,e.scope.search)],2),e._v(\" \"),n(\"div\",{ref:\"actions\",staticClass:\"vs__actions\"},[n(\"button\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.showClearButton,expression:\"showClearButton\"}],ref:\"clearButton\",staticClass:\"vs__clear\",attrs:{disabled:e.disabled,type:\"button\",title:e.ariaLabelClearSelected,\"aria-label\":e.ariaLabelClearSelected},on:{click:e.clearSelection}},[n(e.childComponents.Deselect,{tag:\"component\"})],1),e._v(\" \"),e.noDrop?e._e():n(\"button\",{ref:\"openIndicatorButton\",staticClass:\"vs__open-indicator-button\",attrs:{type:\"button\",tabindex:\"-1\",\"aria-labelledby\":\"vs-\"+e.uid+\"__listbox\",\"aria-controls\":\"vs-\"+e.uid+\"__listbox\",\"aria-expanded\":e.dropdownOpen.toString()},on:{mousedown:e.toggleDropdown}},[e._t(\"open-indicator\",[n(e.childComponents.OpenIndicator,e._b({tag:\"component\"},\"component\",e.scope.openIndicator.attributes,!1))],null,e.scope.openIndicator)],2),e._v(\" \"),e._t(\"spinner\",[n(\"div\",{directives:[{name:\"show\",rawName:\"v-show\",value:e.mutableLoading,expression:\"mutableLoading\"}],staticClass:\"vs__spinner\"},[e._v(\"Loading...\")])],null,e.scope.spinner)],2)]),e._v(\" \"),n(\"transition\",{attrs:{name:e.transition}},[e.dropdownOpen?n(\"ul\",{directives:[{name:\"append-to-body\",rawName:\"v-append-to-body\"}],key:\"vs-\"+e.uid+\"__listbox\",ref:\"dropdownMenu\",staticClass:\"vs__dropdown-menu\",attrs:{id:\"vs-\"+e.uid+\"__listbox\",role:\"listbox\",\"aria-label\":e.ariaLabelListbox,\"aria-multiselectable\":e.multiple,tabindex:\"-1\"},on:{mousedown:function(t){return t.preventDefault(),e.onMousedown(t)},mouseup:e.onMouseUp}},[e._t(\"list-header\",null,null,e.scope.listHeader),e._v(\" \"),e._l(e.filteredOptions,(function(t,o){return n(\"li\",{key:e.getOptionKey(t),staticClass:\"vs__dropdown-option\",class:{\"vs__dropdown-option--deselect\":e.isOptionDeselectable(t)&&o===e.typeAheadPointer,\"vs__dropdown-option--selected\":e.isOptionSelected(t),\"vs__dropdown-option--highlight\":o===e.typeAheadPointer,\"vs__dropdown-option--kb-focus\":e.hasKeyboardFocusBorder(o),\"vs__dropdown-option--disabled\":!e.selectable(t)},attrs:{id:\"vs-\"+e.uid+\"__option-\"+o,role:\"option\",\"aria-selected\":e.optionAriaSelected(t)},on:{mousemove:function(n){return e.onMouseMove(t,o)},click:function(n){n.preventDefault(),n.stopPropagation(),e.selectable(t)&&e.select(t)}}},[e._t(\"option\",[e._v(\"\\n \"+e._s(e.getOptionLabel(t))+\"\\n \")],null,e.normalizeOptionForSlot(t))],2)})),e._v(\" \"),0===e.filteredOptions.length?n(\"li\",{staticClass:\"vs__no-options\"},[e._t(\"no-options\",[e._v(\"\\n Sorry, no matching options.\\n \")],null,e.scope.noOptions)],2):e._e(),e._v(\" \"),e._t(\"list-footer\",null,null,e.scope.listFooter)],2):n(\"ul\",{staticStyle:{display:\"none\",visibility:\"hidden\"},attrs:{id:\"vs-\"+e.uid+\"__listbox\",role:\"listbox\",\"aria-label\":e.ariaLabelListbox}})]),e._v(\" \"),e._t(\"footer\",null,null,e.scope.footer)],2)}),[],!1,null,null,null).exports,O={ajax:u,pointer:c,pointerScroll:l},_=m})(),o})()}));\n//# sourceMappingURL=vue-select.js.map","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform,\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: 0,\n crossAxis: 0,\n alignmentAxis: null,\n ...rawValue\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = ['top', 'left'].includes(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if (isYAxis) {\n availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;\n } else {\n availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n // Browsers without `ShadowRoot` support.\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, detectOverflow as detectOverflow$1, offset as offset$1, autoPlacement as autoPlacement$1, shift as shift$1, flip as flip$1, size as size$1, hide as hide$1, arrow as arrow$1, inline as inline$1, limitShift as limitShift$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getNodeScroll, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\nfunction getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n ...clippingAncestor,\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n const x = rect.left + scroll.scrollLeft - offsets.x;\n const y = rect.top + scroll.scrollTop - offsets.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n return element.offsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const {\n left,\n top,\n width,\n height\n } = element.getBoundingClientRect();\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle